% NB: use pdflatex to compile NOT pdftex.  Also make sure youngtab is
% there...

% converting eps graphics to pdf with ps2pdf generates way too much
% whitespace in the resulting pdf, so crop with pdfcrop
% cf. http://www.cora.nwra.com/~stockwel/rgspages/pdftips/pdftips.shtml




\documentclass[10pt,aspectratio=169,dvipsnames]{beamer}
%\usetheme[everytitleformat=uppercase]{m}
\usetheme[everytitleformat=regular,color/block=transparent]{m}
\usepackage[absolute,overlay]{textpos}
\usepackage{booktabs}

\usepackage{graphbox} %loads graphicx package

\usepackage{pbox}

\usepackage{adjustbox}

\usepackage[utf8]{inputenc}


\usepackage[scale=2]{ccicons}


\usepackage[official]{eurosym}


\usepackage{tikz}
\usetikzlibrary{arrows.meta}


\usepackage[europeanresistors,americaninductors]{circuitikz}



\setbeamerfont{alerted text}{series=\bfseries}
%\setbeamercolor{alerted text}{fg=BurntOrange}
%\setbeamercolor{alerted text}{fg=mDarkTeal}
%\setbeamercolor{alerted text}{fg=Brown}  % Goran
\setbeamercolor{alerted text}{fg=Mahogany}  % Goran

\setbeamercolor{background canvas}{bg=white}


\newcommand{\R}{\mathbb{R}}

\def\l{\lambda}
\def\m{\mu}
\def\d{\partial}
\def\cL{\mathcal{L}}
\def\co2{CO${}_2$}


\def\el{${}_{el}$}
\def\th{${}_{th}$}
\def\gas{${}_{gas}$}



\newif\ifgoat

\goattrue



\newcommand*\rot{\rotatebox{90}}


\usepackage{pifont}
\newcommand*\OK{\ding{51}}


%use this to add space between rows
\newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}

% for sources http://tex.stackexchange.com/questions/48473/best-way-to-give-sources-of-images-used-in-a-beamer-presentation

\setbeamercolor{framesource}{fg=gray}
\setbeamerfont{framesource}{size=\tiny}


\newcommand{\source}[1]{\begin{textblock*}{5cm}(10.5cm,8.35cm)
    \begin{beamercolorbox}[ht=0.5cm,right]{framesource}
        \usebeamerfont{framesource}\usebeamercolor[fg]{framesource} Source: {#1}
    \end{beamercolorbox}
\end{textblock*}}

\usepackage{hyperref}


%\usepackage[pdftex]{graphicx}


\graphicspath{{graphics/}}

\DeclareGraphicsExtensions{.pdf,.jpeg,.png,.jpg}



\def\goat#1{{\scriptsize\color{green}{[#1]}}}



\let\olditem\item
\renewcommand{\item}{%
\olditem\vspace{5pt}}

\title{\vspace{-1.7cm}
  Modelling the electricity grid for \\
  deep carbon dioxide reductions in all sectors
}
%\subtitle{---}
\author{
  {\bf Tom Brown}, \href{mailto:tom.brown@kit.edu}{tom.brown@kit.edu}, \url{https://nworbmot.org/}\\
  \emph{Karlsruhe Institute of Technology (KIT), Institute for Automation and Applied Informatics (IAI)}
}


\date{\vspace{0.3cm}ENSYSTRA Summer School 2018, Flensburg, 5th September 2018}


\titlegraphic{%
  \vspace{5.8cm}
  % left bottom right top
  \includegraphics[trim=0 0cm 0 0cm,height=1.8cm,clip=true]{kit.png}
  \hspace{5cm}
\includegraphics[trim=0 0cm 0 0cm,height=1.8cm,clip=true]{helmholtz.png}
}

\begin{document}

\maketitle


\begin{frame}

  \frametitle{Table of Contents}
  \setbeamertemplate{section in toc}[sections numbered]
  \tableofcontents[hideallsubsections]
\end{frame}

\section{The Challenge}



\begin{frame}
  \frametitle{The Global Carbon Dioxide Challenge: Budgets from 2016}

  600 Gt budget gives 33\% chance of $1.5^\circ$C (Paris: `pursue efforts to limit [warming] to $1.5^\circ$C')\\
  800 Gt budget gives 66\% chance of $2^\circ$C (Paris: hold `the increase...to well below $2^\circ$C')

  \vspace{.05cm}
  \centering
  \includegraphics[width=14.6cm]{carbon_crunch-cropped}

  \source{`Three years to safeguard our climate,' Nature, 2017}

\end{frame}

\begin{frame}
  \frametitle{The Global Carbon Dioxide Challenge: 2C Looking to 2100}

  \begin{columns}[T]
\begin{column}{6cm}

  The budget to 2050 depends also on whether we allow net negative emissions, for which negative emission technologies (NET) are required  to suck CO$_2$ out of the atmosphere, such as bioenergy with CCS (BECCS), direct air capture (DAC), enhanced weathering, afforestation, reforestation and ocean fertilisation.

  \begin{itemize}
  \item Blue: 2C compliant without NET
  \item Green: 2C compliant with NET
  \item Grey: other non-compliant scenarios
  \end{itemize}
\end{column}
\begin{column}{7cm}

  \includegraphics[trim=0 0cm 0 0cm,width=7.5cm,clip=true]{vanVuuren-2017-nature_energy.png}
\end{column}
\end{columns}

\source{\href{https://doi.org/10.1038/s41560-017-0055-2}{van Vuuren et al, Nature Energy, 2017}}

\end{frame}




\begin{frame}
  \frametitle{The Global Carbon Dioxide Challenge: 1.5C Looking to 2100}

  \begin{columns}[T]
\begin{column}{4cm}

  \begin{itemize}
  \item Radiative forcing of 1.9~W/m$^2$ corresponds to 66\% change of
    achieving 1.5C limit
    %RCP2.6 is 2C target
  \item Scenarios that are 1.5C compliant require net zero CO$_2$
    emissions by 2050 followed by net negative emissions until 2100
  \end{itemize}
\end{column}
\begin{column}{10cm}

  \includegraphics[trim=0 0cm 0 0cm,width=10.5cm,clip=true]{rogelj-2018-nature_cc.png}
\end{column}
\end{columns}

\source{\href{https://doi.org/10.1038/s41558-018-0091-3}{Rogelj et al, Nature Climate Change, 2018}}

\end{frame}


\begin{frame}
  \frametitle{A Paris-compliant scenario: EU28 gets 8\% of global 600 Gt budget}

  \centering
  \includegraphics[trim=0 0cm 0 0.0cm,width=11.5cm]{EU28-48-budget-CO2.pdf}

\end{frame}


\begin{frame}
  \frametitle{It's not just about electricity demand...}

  %GHG are 4~Gt, CO2 is only 3.188~Gt
  EU28 \co2{} emissions in 2015 (total 3.2~Gt \co2, 8\% of global):

  \centering
    % left bottom right top
  \includegraphics[trim=0 0.7cm 0 0.5cm,width=12cm]{EU28-emissions_pie-2015-CO2.pdf}

%  ...\alert{but} wind and solar will dominate primary energy in all sectors, so electrification is critical.

  \source{Brown, data from \href{https://www.eea.europa.eu/data-and-maps/data/national-emissions-reported-to-the-unfccc-and-to-the-eu-greenhouse-gas-monitoring-mechanism-13}{EEA}}
\end{frame}



\begin{frame}
  \frametitle{...but electification of other sectors is critical for decarbonisation}

  Wind and solar dominate the expandable potentials for low-carbon
  energy provision, so \alert{electrification is essential} to decarbonise
  sectors such as transport and heating.

  \vspace{0.5cm}

  \begin{columns}[T]
\begin{column}{6cm}
  \includegraphics[trim=0 0cm 0 0cm,width=6cm,clip=true]{tesla.jpg}
\end{column}
\begin{column}{6cm}

  \includegraphics[trim=0 0cm 0 0cm,width=6cm,clip=true]{640px-Heat_Pump.jpg}
\end{column}
\end{columns}

    \vspace{0.7cm}
  Fortunately, these sectors can also offer crucial \alert{flexibility} back to the electricity system.


\source{Tesla; heat pump: \href{https://commons.wikimedia.org/w/index.php?curid=10795550}{Kristoferb at English Wikipedia}}

\end{frame}




\begin{frame}{Low cost of renewable energy 2017 (NB: ignores variability)}

  \centering
  \includegraphics[width=14cm]{lazard-cropped.jpg}

  \source{\href{https://www.lazard.com/perspective/levelized-cost-of-energy-2017/}{Lazard's LCOE Analysis V11}}

\end{frame}


\begin{frame}[fragile]
  \frametitle{Energy System Design: Research Questions}

\begin{columns}[T]
  \begin{column}{9cm}

    \vspace{.2cm}
  \begin{itemize}
  \item What \alert{infrastructure} does a highly renewable energy system
    require?
   \item \alert{Where} should it go? And \alert{when}?
  \item Given a desired \co2 reduction, how much will it \alert{cost}?
    \item How to deal with the \alert{variability}  of wind and solar?
  \end{itemize}

  \hspace{0.15cm}

  The answers to these questions affect \alert{hundreds of billions}
  of euros of spending per year.

  \hspace{0.15cm}

  Researchers deal with these questions by solving large \alert{optimisation} problems.
  \end{column}
  \begin{column}{4.5cm}
    \vspace{.2cm}
  \includegraphics[width=4.7cm]{goat-clean}
  \end{column}
\end{columns}
\end{frame}



\begin{frame}[fragile]
  \frametitle{Take account of social and political constraints}



\begin{columns}[T]

  \begin{column}{4.5cm}


\centering
\includegraphics[width=5cm]{nein_zur_monstertrasse}

  \end{column}


  \begin{column}{7.6cm}


  \vspace{.7cm}

  The Energy Transition is not just a case of ``cost optimisation
  under CO${}_2$ constraints''.  There are also \alert{social and political constraints}.

  We need to assess:
  \begin{itemize}
    \item Reducing need for transmission using \alert{storage / sector coupling} (e.g. battery electric vehicles, thermal storage)
    \item \alert{New technologies} that can minimise the landscape impact of transmission
    \item \alert{Efficiency} and \alert{sufficiency} to reduce demand
  \end{itemize}

  \vspace{0.2cm}

  \alert{Transparency is critical} for public acceptance.
  \end{column}

\end{columns}

\end{frame}


\begin{frame}[fragile]
  \frametitle{Problem 1: Spatial resolution}

Need high \alert{spatial resolution} to represent VRE variations and
transmission constraints.


\centering
\ifgoat
\includegraphics[width=8.5cm]{pypsa-eur-grid}
\fi

\source{PyPSA-Eur, based on ENTSO-E map}

\end{frame}




\begin{frame}[fragile]
  \frametitle{Problem 2: Temporal resolution}

Need high \alert{temporal resolution} to represent load and VRE resource
variability, correlations and extreme events. Wind generation in Europe in July 2013:


\centering
\includegraphics[width=12cm]{various_wind}


\end{frame}



\begin{frame}[fragile]
  \frametitle{Problem 3: Model complexity}

  Large number of interacting \alert{interdependencies} between places, times and sectors.

  What can we \alert{simplify} while retaining accuracy?

  What should we \alert{co-optimise} and what can be treated separately?
  \vspace{0.5cm}


% graphic generated in
\begin{figure}[!t]
\begin{adjustbox}{scale=0.70,trim=5 8.8cm 0 1cm}


  \begin{circuitikz}
  \draw (1.5,14.5) to [short,i^=grid connection] (1.5,13);
  \draw [ultra thick] (-5,13) node[anchor=south]{electric bus} -- (6,13);
  \draw(2.5,13) |- +(0,0.5) to [short,i^=$$] +(2,0.5);
  \draw (0,-0.5) ;
  \draw (0.5,13) -- +(0,-0.5) node[sground]{};
  \draw (2.5,12) node[vsourcesinshape, rotate=270](V2){}
  (V2.left) -- +(0,0.6);
  \draw (2.5,11.2) node{generators};
    \node[draw,minimum width=1cm,minimum height=0.6cm,anchor=south west] at (3.4,11.9){storage};
    \draw (4,13) to (4,12.5);


  \draw [ultra thick] (-6,10) node[anchor=south]{transport} -- (-3,10);
  \draw (-5.5,10) -- +(0,-0.5) node[sground]{};
  \draw (-3.5,10) to [short,i_=${}$] (-3.5,13);
  \draw (-3.2,11.5)  node[rotate=90]{discharge};
  \draw (-4.5,13) to [short,i^=${}$] (-4.5,10);
  \draw (-4.2,11.5)  node[rotate=90]{charge};
  \node[draw,minimum width=1cm,minimum height=0.6cm,anchor=south west] at (-4.5,8.9){battery};
  \draw (-4,10) to (-4,9.5);

    \draw [ultra thick] (2,10) -- (6.5,10)  node[anchor=south]{heat};
  \draw (3.5,10) -- +(0,-0.5) node[sground]{};
  % esource (empty source) is a dipole, so remove the legs by making it connect a distance of its own width
  % follows: http://tex.stackexchange.com/questions/87275/use-circuitikz-voltage-source-icon-as-a-node
  \draw (4.5,9.35) to [esource] (4.5,8.5);
  \draw (4.5,10) -- (4.5,9.35);
  \draw (4.5,8.3) node{solar thermal};
  \draw (5,13) to [short,i^=heat pump;] (5,10);
  \draw (6.2,11) node{resistive heater};
  \node[draw,minimum width=1cm,minimum height=0.6cm,anchor=south west] at (5.5,8.9){hot water tank};
  \draw (6,10) to (6,9.5);


  \draw [ultra thick] (-2,10)  -- (0.5,10) node[anchor=south]{hydrogen};
  \draw (-1.5,13) to [short,i_=${}$] (-1.5,10);
    \draw (-1.2,11.5)  node[rotate=90]{electrolysis};
  \draw (-0.5,10) to [short,i^=${}$] (-0.5,13);
  \draw (-0.2,11.5)  node[rotate=90]{fuel cell};
  \draw (-1,10) to (-1,9.5);
  \node[draw,minimum width=1cm,minimum height=0.6cm,anchor=south west] at (-1.5,8.9){store};

  \draw (0,10) to [short,i_=${}$] (0,8);
  \draw [ultra thick] (-1,8) node[anchor=south]{methane} -- (3,8);
  \draw (1.5,8) to [short,i_=${}$] (1.5,13);
  \draw (2.5,8) to [short,i_=${}$] (2.5,10);
  \node[draw,minimum width=1cm,minimum height=0.6cm,anchor=south west] at (0.5,6.9){store};
  \draw (1,8) to (1,7.5);
  \draw (0.3,9)  node[rotate=90]{methanation};
  \draw (1.8,9.2)  node[rotate=90]{generator/CHP};
  \draw (2.8,9)  node[rotate=90]{boiler/CHP};
  \end{circuitikz}

\end{adjustbox}
\end{figure}


\end{frame}




\begin{frame}
  \frametitle{Problem 4: Understand Solution Space}



\begin{columns}[T]
  \begin{column}{6cm}


  \vspace{1cm}

  How \alert{sensitive} is our solution to changes in the inputs?

  \vspace{0.3cm}

  Researchers have focused in the past on \alert{local} linear
  sensitivity, but it's also important to look at the \alert{global
    behaviour} of the objective function on the feasible space, to
  understand where the costs increase the fastest.


  \end{column}

  \begin{column}{7cm}


\centering
\includegraphics[width=7.5cm]{flat_optimum}

  \end{column}

\end{columns}


\end{frame}

\begin{frame}[fragile]
  \frametitle{Overarching goal}


  Find the \alert{sweet spot} where:
  \begin{itemize}
  \item Computation time is finite (i.e. a week)
  \item Temporal resolution is ``good enough''
  \item Spatial resolution is ``good enough''
  \item Model detail is ``good enough''
  \end{itemize}

  AND quantify the error we make by only being ``good enough''  (e.g. are important metrics $\pm 10\%$ or $\pm 50\%$ correct?)

  AND be sure we're got a handle on all sectoral interdependencies that might affect the results.

\end{frame}





\section{Variability of Wind, Solar \& Demand}


\begin{frame}
  \frametitle{Variability: Different wind conditions over Europe}

  Wind, solar and demand vary at different time scales, e.g. wind is
  particularly affected by large weather
  systems at the \alert{continental scale} that pass in 1-2 weeks. See videos of \href{https://www.youtube.com/watch?v=ttfuEnMz2UM}{wind} and \href{https://www.youtube.com/watch?v=XqJAD666Elk}{solar}.

  \centering
  \includegraphics[width=10cm]{2015-11-30-0300.png}

  \source{\url{https://earth.nullschool.net/}}

\end{frame}


\begin{frame}
  \frametitle{Daily variations: challenges and solutions}

  \begin{columns}[T]
    \begin{column}{5cm}
      \includegraphics[trim=0 0cm 0 0cm,width=5cm,clip=true]{DE-solar-day.pdf}
      \includegraphics[trim=0 0cm 0 0cm,width=5cm,clip=true]{DE-transport-day.pdf}
    \end{column}
    \begin{column}{4cm}
      Daily variations in supply and demand can be balanced by
      \begin{itemize}
      \item \alert{short-term storage} (e.g. batteries, pumped-hydro, small thermal storage)
      \item \alert{demand-side management} (e.g. battery electric vehicles,
        industry)
      \item \alert{east-west grids over multiple time zones}
      \end{itemize}

    \end{column}
    \begin{column}{5cm}
      \includegraphics[trim=0 0cm 0 0cm,width=5cm,clip=true]{pumped-storage-diagram-best1.jpg}

      \vspace{.5cm}

      \includegraphics[trim=0 0cm 0 0cm,width=5cm,clip=true]{tesla-charging.jpg}
    \end{column}
  \end{columns}

\end{frame}




\begin{frame}
  \frametitle{Synoptic variations: challenges and solutions}

  \begin{columns}[T]
    \begin{column}{5cm}
      \includegraphics[trim=0 0cm 0 0cm,width=5.3cm,clip=true]{DE-wind-month.pdf}

      \includegraphics[trim=0 0cm 0 0cm,width=5cm,clip=true]{2015-11-30-0300.png}

    \end{column}
    \begin{column}{4cm}
      \href{https://www.youtube.com/watch?v=ttfuEnMz2UM}{Synoptic variations} in supply and demand can be balanced by
      \begin{itemize}
      \item \alert{medium-term storage} (e.g. chemically with hydrogen or methane storage, thermal energy storage, hydro reservoirs)
      \item \alert{continent-wide grids}
      \end{itemize}

    \end{column}
    \begin{column}{5cm}
      \includegraphics[trim=0 0cm 0 0cm,width=4.5cm,clip=true]{1024px-Gasometer_in_East_London.jpg}

      \includegraphics[trim=0 0cm 0 0cm,width=4.5cm,clip=true]{europe_map.pdf}
    \end{column}
  \end{columns}

\end{frame}




\begin{frame}
  \frametitle{Seasonal variations: challenges and solutions}

  \begin{columns}[T]
    \begin{column}{5cm}
      \includegraphics[trim=0 0cm 0 0cm,width=5cm,clip=true]{DE-wind-solar-year.pdf}
      \includegraphics[trim=0 0cm 0 0cm,width=5cm,clip=true]{DE-heat-year.pdf}
    \end{column}
    \begin{column}{4cm}
      Seasonal variations in supply and demand can be balanced by
      \begin{itemize}
      \item \alert{long-term storage} (e.g. chemically with hydrogen or methane storage, long-term thermal energy storage, hydro reservoirs)
      \item \alert{north-south grids over multiple latitudes}
      \end{itemize}

    \end{column}
    \begin{column}{5cm}
      \includegraphics[trim=0 0cm 0 0cm,width=4.7cm,clip=true]{1024px-Gasometer_in_East_London.jpg}

      \vspace{.2cm}

      \includegraphics[trim=0 0cm 0 0cm,width=4.7cm,clip=true]{pit-zoom.png}
    \end{column}
  \end{columns}

\end{frame}



\section{Warm-Up: Electricity Only}


\begin{frame}
  \frametitle{Research approach}

  Avoid too many assumptions. Fix the \alert{boundary conditions}:

  \begin{itemize}
  \item Meet demand for energy services
  \item Reduce \co2 emissions
  \item Conservative predictions for cost developments
  \item No/minimal/optimal grid expansion (i.e. constraints for public acceptance)
  \end{itemize}

  Then \alert{let the math decide the rest}, i.e. choose the number of
  wind turbines / solar panels / storage units / transmission lines to
  minimise total costs (investment \alert{and} operation).

  \vspace{.3cm}

  Generation, storage and transmission optimised \alert{jointly}
  because they are \alert{strongly interacting}.
\end{frame}



\begin{frame}[fragile]
  \frametitle{Linear optimisation of annual system costs}

Find the long-term cost-optimal energy system, including investments and short-term costs:
\begin{equation*}
  \textrm{Minimise} \left(\parbox{6em}{\centering\alert{Yearly\\system costs}}\right) = \sum_n \left(\parbox{6em}{\centering\alert{Annualised capital costs}}\right) + \sum_{n,t} \left(\parbox{5em}{\centering\alert{Marginal costs}}\right)
\end{equation*}
subject to
\begin{itemize}
\item meeting \alert{energy demand} at each node $n$ (e.g. region) and time $t$ (e.g. hour of year)
\item wind, solar, hydro (variable renewables) \alert{availability time series} $\forall\: n,t$
\item \alert{transmission constraints} between nodes
\item (installed capacity) $\leq$ (\alert{geographical potentials} for renewables)
\item \alert{CO${}_2$ constraint} (95\% reduction compared to 1990)
\item \alert{Flexibility} from gas plants, battery storage, hydrogen storage, networks
\end{itemize}

\end{frame}



\begin{frame}
  \frametitle{Optimisation problem}

Optimisation problems take the following form:

We have an \alert{objective function} $f: \R^k \to \R$ which is to be either maximised or minimised:
\begin{equation*}
  \max_{x} f(x)
\end{equation*}
[$x = (x_1, \dots x_k)$] subject to some \alert{constraints} within $\R^k$:
\begin{align*}
  g_i(x) & = c_i \hspace{1cm}\leftrightarrow\hspace{1cm} \l_i \hspace{1cm} i = 1,\dots n \\
  h_j(x) & \leq d_j \hspace{1cm}\leftrightarrow\hspace{1cm} \m_j \hspace{1cm} j = 1,\dots m
\end{align*}

We introduce KKT `Lagrange' multipliers $\l_i$ and $\m_j$ for
each constraint equation.

The constraints define a \alert{feasible space} within $\R^k$.

\end{frame}




\begin{frame}
  \frametitle{Lagrangian}


We now study the \alert{Lagrangian function}
\begin{equation*}
   \cL(x,\l,\m) = f(x) + \sum_i \l_i \left[c_i - g_i(x)\right]  + \sum_j \m_j \left[d_j - h_j(x)\right]
\end{equation*}
which is similar to the Lagrangian from Lagrangian mechanics, except that
there are no time dynamics and we've included not just equality constraints, but also \alert{inequality} constraints.

The stationary points of $\cL(x,\mathbf{\l},\m)$ tell us about the optima of $f(x)$ given the constraints.

The KKT variables can be intepreted as the change in the objective function, i.e. the cost/gain, as we relax the constraints
\begin{equation*}
  \l_i  = \frac{\d \cL}{\d c_i} \hspace{1cm}   \m_j  = \frac{\d \cL}{\d d_j}
\end{equation*}

The KKT variables have an economic interpretation as the \alert{shadow prices} of the constraints, i.e. the change in the value of the objective function $f(x^*)$ as we relax/tighten the constraints.



\end{frame}



\begin{frame}
  \frametitle{Linear optimisation problem}


  Objective is the minimisation of \alert{total annual system costs}, composed of \alert{capital costs} $c_*$ (investment costs) and \alert{operating costs} $o_*$ (fuel ,etc.):
  \begin{equation*}
\min    f(\bar{P}_\ell,  \bar{g}_{n,s},  g_{n,s,t}) =  \sum_{\ell} c_l \bar{P}_\ell + \sum_{n,s} c_{n,s} \bar{g}_{n,s} + \sum_{n,s,t} w_t o_{n,s} g_{n,s,t}
  \end{equation*}
  We optimise for $n$ nodes, representative times $t$ and transmission lines $l$:
  \begin{itemize}
  \item the transmission capacity $\bar{P}_\ell$ of all the lines $\ell$
  \item the generation and storage capacities $\bar{g}_{n,s}$ of all technologies (wind/solar/gas etc.) $s$ at each node $n$
  \item the dispatch $g_{n,s,t}$ of each generator and storage unit at each point in time $t$
  \end{itemize}

  Representative time points are weighted $w_t$ such that $\sum_t w_t = 365*24$ and the capital costs $c_*$ are annualised, so that the objective function represents the annual system cost.

\end{frame}



\begin{frame}
\frametitle{Model Inputs and Outputs}

\begin{columns}
  \begin{column}{6cm}


    \begin{table}[!t]
	\centering
	\begin{tabular}{@{}p{1.15cm}p{4.54cm}@{}}
\toprule
\alert{Inputs} & Description \\
\midrule
$d_{n,t}$ & Demand (inelastic) \\
$\bar{g}_{n,s,t}$ & Per unit availability for wind and solar \\
$\hat{g}_{n,s}$ & Generator installable potentials \\
various & Existing hydro data \\
various & Grid topology \\
$\eta_*$ & Storage efficiencies \\
$c_{n,s,t}$ & Generator capital costs \\
$o_{n,s,t}$ & Generator marginal costs \\
$c_\ell$ & Line costs \\
\bottomrule
	\end{tabular}
\end{table}
  \end{column}
    \begin{column}{1cm}


      \vspace{1cm}

      $\to$

    \end{column}
  \begin{column}{6cm}


    \begin{table}[!t]
	\centering
	\begin{tabular}{@{}p{1.15cm}p{4.54cm}@{}}
\toprule
\alert{Outputs} & Description \\
\midrule
$\bar{g}_{n,s}$ &  Generator capacities \\
$g_{n,s,t}$ & Generator dispatch \\
$\bar{P}_\ell$ & Line capacities \\
$f_{\ell,t}$ & Line flows \\
$\lambda_*,\mu_*$ & Lagrange/KKT multipliers of all constraints \\
f & Total system costs \\
\bottomrule
	\end{tabular}
\end{table}
  \end{column}

\end{columns}
\end{frame}


\begin{frame}
  \frametitle{Constraints 1/5: Nodal energy balance}

  Demand $d_{n,t}$ at each node $n$ and time $t$ is always met by
  generation/storage units $g_{n,s,t}$ at the node or from transmission
  flows $f_{\ell,t}$ on lines attached at the node (Kirchhoff's Current Law):
    \begin{equation*}
      p_n = d_{n,t} - \sum_{s} g_{n,s,t} = \sum_{\ell}  K_{n\ell}\,f_{\ell,t}  \hspace{1cm}\leftrightarrow\hspace{1cm} \l_{n,t}
    \end{equation*}

    Nodes are shown as thick busbars connected by transmission lines (thin lines):

\centering
\begin{circuitikz}
  \draw (1.5,14.5) to [short,i^=$f_1$] (1.5,13);
  \draw [ultra thick] (0,13) node[anchor=south]{m} -- (4,13);
  \draw(2.5,13) |- +(0,0.5) to [short,i^=$f_2$] +(5,0.5) |- +(0,-0.5);
  \draw [ultra thick] (6,13) node[anchor=south]{n} -- +(4,0);
  \draw (8.5,14.5) to [short,i^=$f_3$] +(0,-1.5);
  \draw (0,-0.5) ;
  \draw (0.5,13) -- +(0,-0.5) node[sground]{};
  \draw (2,12) node[vsourcesinshape, rotate=270](V2){}
  (V2.left) -- +(0,0.6);
  \draw (3.5,12) node[vsourcesinshape, rotate=270](V2){}
  (V2.left) -- +(0,0.6);
  \draw (0.5,11) node{$d_m$};
  \draw (2,11) node{$g_{m,w}$};
  \draw (3.5,11) node{$g_{m,s}$};
  \draw (2,10.3) node{$d_m = g_{m,w} + g_{m,s} + f_1 - f_2$};
  \draw (6.5,13) -- +(0,-0.5) node[sground]{};
  \draw (8,12) node[vsourcesinshape, rotate=270](V2){}
  (V2.left) -- +(0,0.6);
  \draw (9.5,12) node[vsourcesinshape, rotate=270](V2){}
  (V2.left) -- +(0,0.6);
  \draw (6.5,11) node{$d_n$};
  \draw (8,11) node{$g_{n,w}$};
  \draw (9.5,11) node{$g_{n,s}$};
  \draw (8,10.3) node{$d_n = g_{n,w} + g_{n,s} + f_2 + f_3$};

\end{circuitikz}


\end{frame}



\begin{frame}
  \frametitle{Constraints 2/5: Generation availability}
  Generator/storage dispatch $g_{n,s,t}$ cannot exceed availability $\bar{g}_{n,s,t}*\bar{g}_{n,s}$, made up of per unit availability $0 \leq \bar{g}_{n,s,t} \leq 1$ multiplied by the capacity $\bar{g}_{n,s}$. The capacity is bounded by the installable potential $\hat{g}_{n,s}$.
    \begin{equation*}
      0 \leq g_{n,s,t} \leq \bar{g}_{n,s,t}* \bar{g}_{n,s} \leq  \bar{g}_{n,s} \leq  \hat{g}_{n,s}
    \end{equation*}

    \centering
      \includegraphics[width=11cm]{scigrid-curtailment}

\end{frame}



\begin{frame}
  \frametitle{Expansion potentials for wind and solar}

  Expansion potentials are limited by \alert{land usage} and
  \alert{conservation areas}; potential yearly energy yield at each site
  limited by \alert{weather conditions}:

  \centering
  \includegraphics[trim=0 0cm 0 0cm,width=14cm,clip=true]{average_power_density_potential-eps-converted-to}


\end{frame}


\begin{frame}
  \frametitle{Constraints 3/5: Storage consistency}

  Storage units such as batteries or hydrogen storage can work in both
  storage and dispatch mode. They have a limited energy capacity (state of charge).

  \begin{align*}
    soc_{n,t} = \eta_0soc_{n,t-1} + \eta_1g_{n,t,\textrm{store}} -  \eta_2^{-1} g_{n,t,\textrm{dispatch}}
  \end{align*}

  There are efficiency losses $\eta$; hydroelectric dams can also have a river inflow.

\end{frame}





\begin{frame}
  \frametitle{Kirchhoff's Current Law (KCL)}

  KCL (constraint 1/5) enforces energy conservation at each vertex (the power imbalance
  equals what goes out minus what comes in).

  \vspace{.3cm}

  \begin{columns}
    \column[c]{.5\textwidth}


    \centering

  %https://tex.stackexchange.com/questions/270543/draw-a-graph-in-latex-with-tikz
  \begin{tikzpicture}
    \begin{scope}[every node/.style={circle,thick,draw,fill=yellow}]
      \node (1) at (0,3) {$+5$};
      \node (2) at (0,0) {$-5$};
    \end{scope}

    \begin{scope}[>={Stealth[black]},
        every node/.style={fill=white,circle},
        every edge/.style={draw=red,very thick}]
      \path [->] (1) edge node {$+5$} (2);
    \end{scope}
  \end{tikzpicture}

    \column[c]{.5\textwidth}


    \centering

  %https://tex.stackexchange.com/questions/270543/draw-a-graph-in-latex-with-tikz
  \begin{tikzpicture}
    \begin{scope}[every node/.style={circle,thick,draw,fill=yellow}]
      \node (1) at (1.5,5) {$+12$};
      \node (2) at (1.5,2.5) {$-2$};
      \node (3) at (0,0) {$-7$};
      \node (4) at (3,0) {$-3$};
    \end{scope}

    \begin{scope}[>={Stealth[black]},
        every node/.style={fill=white,circle},
        every edge/.style={draw=red,very thick}]
      \path [->] (1) edge node {$12$} (2);
      \path [->] (2) edge node {$7$} (3);
      \path [->] (2) edge node {$3$} (4);
    \end{scope}
  \end{tikzpicture}


  \end{columns}

\end{frame}





\begin{frame}
  \frametitle{Kirchhoff's Voltage Law (KVL)}

  However, KCL isn't enough to determine the flow as soon as there are
  \alert{closed cycles} (i.e. multiple paths between pairs of nodes)
  in the network.  In addition, we need \alert{Ohm's law} in combination with KVL:
  voltage differences around each cycle add up to zero.

  \vspace{.3cm}

  \begin{columns}
    \column[c]{.5\textwidth}


    \centering

  %https://tex.stackexchange.com/questions/270543/draw-a-graph-in-latex-with-tikz
  \begin{tikzpicture}
    \begin{scope}[every node/.style={circle,thick,draw,fill=yellow}]
      \node (1) at (0,3) {$+6$};
      \node (2) at (3,3) {$0$};
      \node (3) at (1.5,0) {$-6$};
    \end{scope}

    \begin{scope}[>={Stealth[black]},
        every node/.style={fill=white,circle},
        every edge/.style={draw=red,very thick}]
      \path [->] (1) edge node {$?$} (2);
      \path [->] (2) edge node {$?$} (3);
      \path [->] (3) edge node {$?$} (1);
    \end{scope}
  \end{tikzpicture}


      \column[c]{.5\textwidth}


      For equal reactances for each edge:


  \vspace{.3cm}

    \centering
  %https://tex.stackexchange.com/questions/270543/draw-a-graph-in-latex-with-tikz
  \begin{tikzpicture}
    \begin{scope}[every node/.style={circle,thick,draw,fill=yellow}]
      \node (1) at (0,3) {$+6$};
      \node (2) at (3,3) {$0$};
      \node (3) at (1.5,0) {$-6$};
    \end{scope}

    \begin{scope}[>={Stealth[black]},
        every node/.style={fill=white,circle},
        every edge/.style={draw=red,very thick}]
      \path [->] (1) edge node {$2$} (2);
      \path [->] (2) edge node {$2$} (3);
      \path [->] (3) edge node {$-4$} (1);
    \end{scope}
  \end{tikzpicture}

  \raggedright
  NB: For directed graph, sign determines direction of flow.

  \end{columns}
\end{frame}




\begin{frame}
  \frametitle{Ohm's Law}

  \alert{Ohm's Law}: The potential difference (voltage) $V_1 - V_2$ across an ideal conductor is proportional to the current through it $I$. The constant of proportionality is called the \alert{resistance}, $R$. Ohm's Law is thus:
  \begin{equation*}
     V_1 - V_2 = I\,R
  \end{equation*}

  \centering
  \includegraphics[width=8cm]{ohm_law.png}


\end{frame}

\begin{frame}
  \frametitle{Analogy DC circuits to linear power flow}

  The equations for DC circuits and linear power flow in AC circuits are analogous:
  \begin{equation*}
    I = \frac{V_i - V_j}{R} \hspace{.55cm} \leftrightarrow \hspace{.55cm} f_\ell =  \frac{\theta_i - \theta_j}{x_\ell}
  \end{equation*}

  if we make the following identification:
    \ra{1.05}
  \begin{table}[!t]
    \begin{tabular}{p{4cm}p{0.5cm}p{4cm}}
      \toprule
      Current flow $I$ & $\leftrightarrow$  &  Active power flow $f_\ell$ \\
      Potential/voltage $V_i$ & $\leftrightarrow$  &  Voltage angle $\theta_i$ \\
      Resistance $R$ & $\leftrightarrow$  &  Reactance $X$ \\
      \bottomrule
    \end{tabular}
  \end{table}

\end{frame}


\begin{frame}
  \frametitle{Constraints 4/5: Transmission Flows}

  The linearised \alert{power flows} $f_\ell$ for each line $\ell \in \{1,\dots
  L\}$ in an AC network are determined by the
  \alert{reactances} $x_\ell$ of the transmission lines and the \alert{net power
    injection} at each node $p_n$ for $n\in\{1,\dots N\}$, via the voltage angles $\theta_i$ at the nodes (like auxilliary variables):
  \begin{equation*}
    f_\ell = \frac{\theta_i -
    \theta_j}{x_\ell}
  \end{equation*}

    Transmission flows cannot exceed the thermal capacities of the transmission lines (otherwise they sag and hit buildings/trees):
    \begin{equation*}
      | f_{\ell,t} | \leq  \bar{P}_\ell
    \end{equation*}

  Since the impedances $x_\ell$ change as capacity $\bar{P}_\ell$ is
  added, we do multiple runs and iteratively update the $x_\ell$ after
  each run, rather than risking a non-linear (or MILP) optimisation.


\end{frame}



\begin{frame}
  \frametitle{Constraints 5/5: Global constraints on \co2 and transmission volumes}
  CO${}_2$ limits are respected, given emissions $e_{n,s}$ for each fuel source $s$:
    \begin{equation*}
      \sum_{n,s,t}  g_{n,s,t} e_{n,s} \leq \textrm{CAP}_{\textrm{CO}_2} \hspace{1cm} \leftrightarrow \hspace{1cm} \m_{\textrm{CO}_2}
    \end{equation*}
    We enforce a reduction of \co2 emissions by 95\% compared to 1990
    levels, in line with German and EU targets for 2050.

    Optimal transmission capacities $\bar{P}_\ell$ cannot be reduced compared to today's capacities $\bar{P}_\ell^{\textrm{today}}$:
    \begin{equation*}
      \bar{P}_\ell \geq  \bar{P}_\ell^{\textrm{today}}
    \end{equation*}

    But we can also limit total new transmission volume in MWkm ($d_\ell$ is line length in km):
    \begin{equation*}
      \sum_{\ell} d_\ell   \bar{P}_\ell \leq \textrm{CAP}_{\textrm{trans}} \hspace{1cm} \leftrightarrow \hspace{1cm} \m_{\textrm{trans}}
    \end{equation*}
    We  successively change the transmission limit, to assess the costs of balancing power in time (i.e. storage) versus space (i.e. transmission networks).

\end{frame}



\begin{frame}
  \frametitle{Warm-up: Determine optimal electricity system}


\begin{columns}[T]
\begin{column}{7cm}
  \begin{itemize}
  \item Meet all electricity demand.
  \item Reduce \co2{} by 95\% compared to 1990.
  \item \alert{Generation} (where potentials allow): onshore and offshore
    wind, solar, hydroelectricity, backup from natural gas.
  \item \alert{Storage}: batteries for short term, electrolyse hydrogen gas for long term.
  \item \alert{Grid expansion}: simulate everything from no grid expansion (like a \alert{decentralised solution}) to optimal grid expansion (with significant \alert{cross-border trade}).
  \end{itemize}
\end{column}
\begin{column}{6.5cm}


  \vspace{0.3cm}
\centering

\ifgoat
\includegraphics[width=7cm]{pypsa-eur-grid}
\fi

\end{column}
\end{columns}


\source{PyPSA-Eur, based on ENTSO-E map}
\end{frame}




\begin{frame}
  \frametitle{PyPSA-Eur: Open Model of European Transmission System}
\begin{columns}[T]
\begin{column}{6cm}


  \vspace{0.4cm}
\centering

%\includegraphics[width=4cm]{line-loading}
\includegraphics[width=7cm]{pypsa-eur-grid}
\end{column}
\begin{column}{7.5cm}

  \begin{itemize}
    \item Grid data based on \alert{GridKit} extraction of ENTSO-E interactive map
    \item \alert{powerplantmatching} tool combines open databases using matching algorithm \href{https://github.com/larsga/Duke}{DUKE}
    \item Renewable energy time series from open \alert{atlite}, based
      on Aarhus University REatlas
    \item Geographic \alert{potentials} for RE from land use
    \item Basic \alert{validation} described in Hörsch et al \href{https://arxiv.org/abs/1806.01613}{`PyPSA-Eur: An Open Optimisation Model of the
      European Transmission System'}
    \item \url{https://github.com/PyPSA/pypsa-eur}
  \end{itemize}
\end{column}
\end{columns}

\end{frame}



\begin{frame}
  \frametitle{Costs and assumptions for the electricity sector (projections for 2030)}

  \begin{table}
\centering
\begin{tabular}{@{}lrlrr@{}}
\toprule
Quantity                &Overnight  Cost [\euro]  &Unit & FOM [\%/a] & Lifetime [a] \\
\midrule
Wind onshore    &1182   &kW\el &3 & 25   \\
Wind offshore  &2506   &kW\el  &3& 25  \\
Solar PV           &600   &kW\el &4 & 25   \\
Gas             &400    &kW\el  &4& 30  \\
%Gas marginal            &75     &\euro{}/MWh$_{\textrm{e}}$    \\
Battery storage         &1275   &kW\el  & 3 & 20 \\
Hydrogen storage        &2070   &kW\el  & 1.7 &20 \\
Transmission line       &400    &MWkm & 2 & 40\\
\bottomrule
\end{tabular}
\end{table}
  Interest rate of 7\%, storage efficiency losses, only gas has \co2 emissions, gas marginal costs.

  Batteries can store for 6 hours at maximal rating (efficiency $0.9\times 0.9$), hydrogen storage for 168 hours (efficiency $0.75\times 0.58$).
\end{frame}


\begin{frame}
  \frametitle{Reduce spatial resolution with clustering}

\begin{columns}[T]
\begin{column}{7cm}
We need spatial resolution to:
\begin{itemize}
\item capture the \alert{geographical variation} of renewables resources and the load
\item capture \alert{spatio-temporal effects} (e.g. size of wind correlations across the continent)
\item represent important \alert{transmission constraints}
\end{itemize}

BUT we do not want to have to model all 5,000 network nodes of the European system.
\end{column}
\begin{column}{6cm}
  \vspace{.5cm}

    \centering
    \includegraphics[width=6.5cm]{clustering}
\end{column}
\end{columns}
\end{frame}


\begin{frame}
  \frametitle{Solution: $k$-means clustering}

\centering
 \includegraphics[width=13cm]{networks-clustered-crop}

\end{frame}







\begin{frame}
  \frametitle{Electricity system with no grid expansion}
\begin{columns}[T]
\begin{column}{8cm}
    \includegraphics[width=8cm]{legend-two}
    \ifgoat
    \includegraphics[trim=0 0cm 0 2cm,width=8cm]{euro-pie-pre-7-branch_limit-1-256.png}
    \fi
\end{column}
\begin{column}{6cm}

  \vspace{.7cm}
  \begin{itemize}
  \item Wind in North where grid capacity allows, solar in South
  \item With \alert{no grid expansion}, lots of storage required to
    balance variability, \alert{costs are high}
  \item Batteries pair with solar in South
  \item Hydrogen storages pairs with longer-term variations of wind in North
  \end{itemize}
\end{column}

\end{columns}


\end{frame}



\begin{frame}
  \frametitle{Dispatch with no grid expansion}

  For Great Britain with limited interconnecting transmission, excess wind is either stored as hydrogen or curtailed:

  \centering
  \includegraphics[width=13cm]{GB-0}
\end{frame}


\begin{frame}
  \frametitle{When grid expansion allowed: avoid costly storage}

  \hspace{-1.1cm}
  \includegraphics[width=15cm]{legend-flat}
  \begin{columns}[T]

\begin{column}{8cm}

  \ifgoat
  \includegraphics[trim=0 0cm 0 2cm,width=8cm]{euro-pie-pre-7-branch_limit-1-5-256.png}
  \fi

\end{column}
\begin{column}{8cm}

  \raisebox{-6.6cm}{
\ifgoat
\includegraphics[trim=0 0cm 0 2cm,width=8cm]{euro-pie-pre-7-branch_limit-3-256.png}
\fi
  }

\end{column}

\end{columns}


\end{frame}



\begin{frame}
  \frametitle{Dispatch with cost-optimal interconnecting transmission}

  Almost all excess wind can be now be exported:

  \centering
  \includegraphics[width=13cm]{GB-1}
\end{frame}



\begin{frame}
  \frametitle{Cost behaviour as transmission expansion is allowed}


\begin{columns}[T]
\begin{column}{8.5cm}
\centering
  \includegraphics[width=8.5cm]{costs_per_cluster_181}
  %\includegraphics[width=6cm]{pre-2-costs_de_storage}
\end{column}
\begin{column}{6cm}
  \begin{itemize}
%\item   %Big reduction in curtailment
    \item Big \alert{non-linear cost reduction} as grid is expanded
    \item Most of cost reduction happens with \alert{25\% grid
      expansion} compared to today's grid (25\% corresponds
      to TYNDP)
    \item Costs comparable to today's system (around \euro 200~billion/a)
      \item Investment in solar and batteries decrease significantly as
        grid expanded; with cost-optimal grid, system is dominated by
        wind
  \end{itemize}
\end{column}
\end{columns}
\source{\href{https://doi.org/10.1016/j.energy.2017.06.004}{Schlachtberger et al, 2017}, \href{https://doi.org/10.1109/EEM.2017.7982024}{Hörsch et al, 2017}}
\end{frame}



\begin{frame}
  \frametitle{Different flexibility options have difference temporal scales}

\begin{columns}[T]
  \begin{column}{10.5cm}

    \vspace{0.5cm}
  \includegraphics[width=11cm]{soc_series_LV0-25_H2_hydro_diw2030_solar1_7-eps-converted-to.pdf}

  \end{column}

  \begin{column}{3cm}
    \vspace{1cm}
    \begin{itemize}
    \item Hydro reservoirs are \alert{seasonal}
    \item Hydrogen storage is \alert{synoptic}
    \end{itemize}

  \end{column}

\end{columns}
\end{frame}



\begin{frame}
  \frametitle{Different flexibility options have difference temporal scales}

\begin{columns}[T]
  \begin{column}{10.5cm}

    \vspace{0.5cm}
  \includegraphics[width=11cm]{soc_series_LV0-25_all_2011-08_diw2030_solar1_7-eps-converted-to.pdf}

  \end{column}

  \begin{column}{3cm}
        \vspace{2cm}
    \begin{itemize}
    \item Pumped hydro and battery storage are \alert{daily}
    \end{itemize}

  \end{column}

\end{columns}
\end{frame}



\begin{frame}
  \frametitle{Locational Marginal Prices CAP=1 versus CAP=3}



  \begin{columns}[T]

\begin{column}{8cm}

  \hspace{1cm}  With today's capacities:

  \includegraphics[width=8cm]{lmp-1-256.pdf}

\end{column}
\begin{column}{8cm}

  \hspace{1cm}With three times today's grid:

  \includegraphics[width=8cm]{lmp-3-256.pdf}

\end{column}

\end{columns}


\end{frame}



\begin{frame}
  \frametitle{Grid expansion cap shadow price as cap is relaxed}


\begin{columns}[T]
\begin{column}{10cm}
\centering
  \includegraphics[width=11cm]{shadows-branch_limit}
  %\includegraphics[width=6cm]{pre-2-costs_de_storage}
\end{column}
\begin{column}{4cm}
  \begin{itemize}
%\item   %Big reduction in curtailment
  \item With overhead lines the optimal system has around 3 times today's transmission volume
  \item With underground cables (5-8 times more expensive) the optimal system has around 1.3 to 1.6 times today's transmission volume
  \end{itemize}
\end{column}
\end{columns}

\end{frame}

\section{Electricity, Heat and Transport}


\begin{frame}
  \frametitle{Include other sectors: heating and land transport}

  Electricity,  (low-temperature) heating and land transport cover 77\% of 2015 CO$_2$ emissions:

  \centering
    % left bottom right top
  \includegraphics[trim=0 0cm 0 0.5cm,width=12cm]{EU28-emissions_pie-2015-CO2.pdf}


  \source{Brown, data from \href{https://www.eea.europa.eu/data-and-maps/data/national-emissions-reported-to-the-unfccc-and-to-the-eu-greenhouse-gas-monitoring-mechanism-13}{EEA}}
\end{frame}


\begin{frame}{Efficiency of renewables and sector coupling}


  \includegraphics[width=\linewidth,trim=2.7cm 20cm 3.2cm 1.8cm,clip=true]{./graphics/bmwi-whitepaper-figure_18.pdf}

  \source{\href{https://www.bmwi.de/Redaktion/EN/Publikationen/whitepaper-electricity-market.html}{BMWi White Paper 2015}}
\end{frame}


\begin{frame}[fragile]
  \frametitle{Challenge: Heating and transport demand strongly peaked}


  \begin{columns}[T]
\begin{column}{6cm}
  Compared to electricity, heating and transport are \alert{strongly peaked}.
  \begin{itemize}
  \item   Heating is strongly seasonal, but also with synoptic variations.
    \item   Transport has strong daily periodicity.
  \end{itemize}

  \vspace{.3cm}

  \includegraphics[trim=0 0cm 0 0cm,width=6cm,clip=true]{elec_demand.pdf}

\end{column}
\begin{column}{6cm}
  \includegraphics[trim=0 0cm 0 0cm,width=5.7cm,clip=true]{heat_demand.pdf}
  \includegraphics[trim=0 0cm 0 0cm,width=5.7cm,clip=true]{transport_profiles.pdf}
\end{column}
\end{columns}



\end{frame}


\begin{frame}[fragile]
  \frametitle{Sector Coupling}

  \alert{Idea}: Couple the electricity sector to heating and mobility.

  This enables decarbonisation of these sectors \alert{and} offers more flexibility to the power system.

  \vspace{0.2cm}

  \begin{columns}[T]
\begin{column}{6cm}
  \alert{Battery electric vehicles} can change their charging pattern to benefit the
  system and even feed back into the grid if necessary

  \includegraphics[trim=0 0cm 0 0cm,width=6cm,clip=true]{tesla.jpg}
\end{column}
\begin{column}{6cm}
  \alert{Heat} and \alert{synthetic fuels} are easier and cheaper to store than electricity, even over many months

  \vspace{0.5cm}

        \includegraphics[trim=0 0cm 0 0cm,width=6cm,clip=true]{pit-zoom}
\end{column}
\end{columns}


\end{frame}

\begin{frame}
  \frametitle{Sector coupling: A new source of flexibility}

  Couple the electricity sector (electric demand, generators,
  electricity storage, grid) to electrified
  transport and low-T heating demand (model covers 75\% of final energy consumption in 2014).
  Also allow production of synthetic hydrogen and methane.
% graphic generated in
\begin{figure}[!t]
\begin{adjustbox}{scale=0.70,trim=5 8.8cm 0 1cm}


  \begin{circuitikz}
  \draw (1.5,14.5) to [short,i^=grid connection] (1.5,13);
  \draw [ultra thick] (-5,13) node[anchor=south]{electric bus} -- (6,13);
  \draw(2.5,13) |- +(0,0.5) to [short,i^=$$] +(2,0.5);
  \draw (0,-0.5) ;
  \draw (0.5,13) -- +(0,-0.5) node[sground]{};
  \draw (2.5,12) node[vsourcesinshape, rotate=270](V2){}
  (V2.left) -- +(0,0.6);
  \draw (2.5,11.2) node{generators};
    \node[draw,minimum width=1cm,minimum height=0.6cm,anchor=south west] at (3.4,11.9){storage};
    \draw (4,13) to (4,12.5);


  \draw [ultra thick] (-6,10) node[anchor=south]{transport} -- (-3,10);
  \draw (-5.5,10) -- +(0,-0.5) node[sground]{};
  \draw (-3.5,10) to [short,i_=${}$] (-3.5,13);
  \draw (-3.2,11.5)  node[rotate=90]{discharge};
  \draw (-4.5,13) to [short,i^=${}$] (-4.5,10);
  \draw (-4.2,11.5)  node[rotate=90]{charge};
  \node[draw,minimum width=1cm,minimum height=0.6cm,anchor=south west] at (-4.5,8.9){battery};
  \draw (-4,10) to (-4,9.5);

    \draw [ultra thick] (2,10) -- (6.5,10)  node[anchor=south]{heat};
  \draw (3.5,10) -- +(0,-0.5) node[sground]{};
  % esource (empty source) is a dipole, so remove the legs by making it connect a distance of its own width
  % follows: http://tex.stackexchange.com/questions/87275/use-circuitikz-voltage-source-icon-as-a-node
  \draw (4.5,9.35) to [esource] (4.5,8.5);
  \draw (4.5,10) -- (4.5,9.35);
  \draw (4.5,8.3) node{solar thermal};
  \draw (5,13) to [short,i^=heat pump;] (5,10);
  \draw (6.2,11) node{resistive heater};
  \node[draw,minimum width=1cm,minimum height=0.6cm,anchor=south west] at (5.5,8.9){hot water tank};
  \draw (6,10) to (6,9.5);


  \draw [ultra thick] (-2,10)  -- (0.5,10) node[anchor=south]{hydrogen};
  \draw (-1.5,13) to [short,i_=${}$] (-1.5,10);
    \draw (-1.2,11.5)  node[rotate=90]{electrolysis};
  \draw (-0.5,10) to [short,i^=${}$] (-0.5,13);
  \draw (-0.2,11.5)  node[rotate=90]{fuel cell};
  \draw (-1,10) to (-1,9.5);
  \node[draw,minimum width=1cm,minimum height=0.6cm,anchor=south west] at (-1.5,8.9){store};

  \draw (0,10) to [short,i_=${}$] (0,8);
  \draw [ultra thick] (-1,8) node[anchor=south]{methane} -- (3,8);
  \draw (1.5,8) to [short,i_=${}$] (1.5,13);
  \draw (2.5,8) to [short,i_=${}$] (2.5,10);
  \node[draw,minimum width=1cm,minimum height=0.6cm,anchor=south west] at (0.5,6.9){store};
  \draw (1,8) to (1,7.5);
  \draw (0.3,9)  node[rotate=90]{methanation};
  \draw (1.8,9.2)  node[rotate=90]{generator/CHP};
  \draw (2.8,9)  node[rotate=90]{boiler/CHP};
  \end{circuitikz}

\end{adjustbox}
\end{figure}

\end{frame}



\begin{frame}
  \frametitle{Transport sector: Electrification of Transport}
\begin{columns}[T]
\begin{column}{7cm}
    \includegraphics[trim=0 0cm 0 0cm,width=8cm,clip=true]{transport_profiles.pdf}

    Weekly profile for the transport demand based on statistics gathered by the German Federal Highway Research Institute (BASt).

\end{column}
\begin{column}{7cm}
  \begin{itemize}
  \item All road and rail transport in each country is electrified, where it is not already electrified
    \item Because of higher efficiency of electric motors, final
      energy consumption 3.5 times lower than today at 1102~TWh\el/a for the 30
      countries
            \item In model can replace Electric Vehicles (EVs) with Fuel Cell Vehicles (FCVs) consuming hydrogen. Advantage: hydrogen cheap to store. Disadvantage: efficiency of fuel cell only 60\%, compared to 90\% for battery discharging.
  \end{itemize}
\end{column}
\end{columns}

\end{frame}



\begin{frame}
  \frametitle{Transport sector: Battery Electric Vehicles}
\begin{columns}[T]
\begin{column}{7cm}
    \includegraphics[trim=0 0cm 0 0cm,width=8cm,clip=true]{bev_availability.pdf}

    Availability (i.e. fraction of vehicles plugged in) of Battery Electric Vehicles (BEV).
\end{column}
\begin{column}{7cm}
  \begin{itemize}
  \item Passenger cars to Battery Electric Vehicles (BEVs), 50~kWh battery available and 11~kW charging power
  \item Can participate in DSM and V2G, depending on scenario (state of charge returns to at least 75\% every morning)
    \item All BEVs have time-dependent availability, averaging 80\%, max 95\% (at night)
    \item No changes in consumer behaviour assumed (e.g. car-sharing/pooling)
    \item BEVs are treated as exogenous (capital costs NOT included in calculation)
  \end{itemize}
\end{column}
\end{columns}

\end{frame}


\begin{frame}
  \frametitle{Coupling Transport to Electricity}
  \begin{columns}[T]
    \begin{column}{9cm}
      \includegraphics[width=9cm]{RGI-t-0.pdf}


    \end{column}
    \begin{column}{5cm}
      \begin{itemize}
      \item If all road and rail transport is electrified, electrical demand increases 37\%
      \item Costs increase 41\% because charging profiles are very peaked (NB: distribution grid costs NOT included)
      \item Stronger preference for PV and storage in system mix because of daytime peak
      \item Can now use flexible charging
      \end{itemize}
    \end{column}
  \end{columns}
\end{frame}




\begin{frame}
  \frametitle{Using Battery Electric Vehicle Flexibility}
  \begin{columns}[T]
    \begin{column}{9cm}
      \includegraphics[width=9cm]{RGI-transport-0.pdf}


    \end{column}
    \begin{column}{6cm}
      \begin{itemize}
      \item Shifting the charging time can reduce system costs by up to 14\%.
      \item If only 25\% of vehicles participate: already a 10\% benefit.
      \item Allowing battery EVs to feed back into the grid (V2G) reduces costs by a further 10\%.
      \item This removes case for stationary batteries and allows more solar.
      \item If fuel cells replace electric vehicles, hydrogen electrolysis increases costs because of conversion losses.
      \end{itemize}
    \end{column}
  \end{columns}
\end{frame}












\begin{frame}
  \frametitle{Heating sector: Many Options with Thermal Energy Storage (TES)}
\begin{columns}[T]
\begin{column}{7cm}

    \includegraphics[trim=0 0cm 0 0cm,width=8cm,clip=true]{heat_demand.pdf}

    Heat demand profile from 2011 in all 30 countries using population-weighted average daily T in each country, degree-day approx. and scaled to Eurostat total heating demand.


\end{column}
\begin{column}{7cm}
  \begin{itemize}
  \item All space and water heating in the residential and services
    sectors is considered, with no additional efficiency measures
    (conservative) - total heating demand is  3585~TWh\th/a.
  \item Heating demand can be met by heat pumps, resistive heaters, gas boilers, solar thermal, Combined-Heat-and-Power (CHP) units. No industrial waste heat.
    \item Thermal Energy Storage (TES) is available to the system as hot water tanks.
  \end{itemize}
\end{column}
\end{columns}

\end{frame}






\begin{frame}
  \frametitle{Centralised District Heating versus Decentralised Heating}

  We model both fully decentralised heating and cases where up to 45\%
  of heat demand is met with district heating in northern countries.

\begin{columns}[T]
\begin{column}{5cm}
  \alert{Decentral individual heating} can be supplied by:
  \begin{itemize}
    \item Air- or Ground-sourced heat pumps
  \item Resistive heaters
  \item Gas boilers
    \item Small solar thermal
  \item Water tanks with short time constant $\tau = 3$ days
  \end{itemize}
\end{column}
\begin{column}{5cm}
  \alert{Central heating} can be supplied via district heating networks by:
  \begin{itemize}
    \item Air-sourced heat pumps
\item Resistive heaters
\item Gas boilers
        \item Large solar thermal
  \item Water tanks with long time constant $\tau = 180$ days
\item CHPs
  \end{itemize}
\end{column}

\begin{column}{5cm}
  CHP feasible dispatch:
    \includegraphics[trim=0 0cm 0 0cm,width=5cm,clip=true]{chp_feasible.pdf}
\end{column}

\end{columns}


\end{frame}



\begin{frame}
  \frametitle{Cost and other assumptions}

  \begin{table}
\centering
\begin{tabular}{@{}lrlrrr@{}}
\toprule
Quantity                & O'night cost [\euro]  &Unit & FOM [\%/a] & Lifetime [a] & Efficiency \\
\midrule
GS Heat pump decentral & 1400 & kW\th  & 3.5& 20 \\
AS Heat pump decentral & 1050 & kW\th  & 3.5& 20 \\
AS Heat pump central & 700 & kW\th  & 3.5& 20 \\
Resistive heater & 100  & kW\th  & 2& 20 & 0.9\\
Gas boiler decentral & 175  & kW\th  & 2& 20 & 0.9 \\
Gas boiler central & 63  & kW\th  & 1& 22 & 0.9 \\
CHP & 650 & kW\el & 3& 25\\
Central water tanks & 30 & m${}^3$  & 1& 40 & $\tau = 180$d\\
District heating & 220 & kW\th & 1 & 40 &  \\
Methanation+DAC & 1000 & kW$_{H_2}$ & 3 & 25  & 0.6\\
%Gas plant efficiency    &30     &\%     \\
%Interest rate           &7      &\%     \\
\bottomrule
\end{tabular}
\end{table}
  Costs oriented towards Henning \& Palzer (2014, Fraunhofer ISE) and Danish Energy Database
\end{frame}


\begin{frame}
  \frametitle{Coupling Heating to Transport and Electricity: Electricity Demand}
  \begin{columns}[T]
    \begin{column}{9cm}
      \includegraphics[width=9cm]{RGI-supply_energy.pdf}

    \end{column}
    \begin{column}{5cm}
      \begin{itemize}
      \item To 4062~TWh\el/a demand from electricity and transport, 3585~TWh\th/a heating demand is added
      \item Much of the heating demand is met via electricity, but with high efficiency from heat pumps
      \item Electricity demand 80\% higher than current electricity demand
        %5600/3100
      \item Efficiency savings can reduce this \dots
      \end{itemize}
    \end{column}
  \end{columns}
\end{frame}




\begin{frame}
  \frametitle{Coupling Heating to Transport and Electricity: Costs}
  \begin{columns}[T]
    \begin{column}{9cm}
      \includegraphics[width=9cm]{RGI-h-0.pdf}

    \end{column}
    \begin{column}{5cm}
      \begin{itemize}
      \item Costs jump by 117\% to cover new energy supply and heating infrastructure
      \item 95\% \co2{} reduction means most heat is generated by heat pumps using renewable electricity
      \item Cold winter weeks with high demand, low wind, low solar and low heat pump COP mean backup gas boilers required
      \end{itemize}
    \end{column}
  \end{columns}
\end{frame}



\begin{frame}
  \frametitle{Cold week in winter}

    \begin{columns}[T]
    \begin{column}{6cm}

  \centering
\includegraphics[trim=0 0cm 0 0cm,width=5.5cm,clip=true]{cold_week-base-0-DE}

\includegraphics[trim=0 0cm 0 0cm,width=5.5cm,clip=true]{cold_week-base-0_urban_heat-DE}
    \end{column}
    \begin{column}{7cm}
      \vspace{1.5cm}
        There are difficult periods in winter with:
        \begin{itemize}
        \item \alert{Low} wind and solar generation
        \item \alert{High} space heating demand
        \item \alert{Low} air temperatures, which are bad for air-sourced heat pump performance
        \end{itemize}

        Solution: \alert{backup gas boilers} burning either natural gas, or
        synthetic methane.
    \end{column}
    \end{columns}
\end{frame}



\begin{frame}
  \frametitle{Using heating flexibility}
  \begin{columns}[T]
    \begin{column}{8.3cm}
      \includegraphics[width=9cm]{RGI-heating-0.pdf}
    \end{column}
    \begin{column}{6cm}

      \vspace{.5cm}
        Successively activating couplings and flexibility \alert{reduces costs} by 28\%.
        These options include:
        \begin{itemize}
          \item  production of \alert{synthetic methane}
          \item  centralised \alert{district heating} in areas with dense heat demand
          \item long-term \alert{thermal energy storage} (TES)  in district heating networks
          \item \alert{demand-side management} and vehicle-to-grid from battery electric vehicles (BEV)
        \end{itemize}
    \end{column}
  \end{columns}
\end{frame}



\begin{frame}
  \frametitle{Cold week in winter: inflexible (left); smart (right)}

  \begin{columns}[T]
    \begin{column}{6.5cm}
  \centering
\includegraphics[trim=0 0cm 0 0cm,width=5.5cm,clip=true]{cold_week-base-0-DE}

\includegraphics[trim=0 0cm 0 0cm,width=5.5cm,clip=true]{cold_week-base-0_urban_heat-DE}
    \end{column}
    \begin{column}{6.5cm}
  \centering

  \includegraphics[trim=0 0cm 0 0cm,width=5.5cm,clip=true]{cold_week-central-tes-0-DE}

  \includegraphics[trim=0 0cm 0 0cm,width=5.5cm,clip=true]{cold_week-central-tes-0_urban_heat-DE}
    \end{column}
  \end{columns}
\end{frame}


\begin{frame}
  \frametitle{Storage energy levels: different time scales}

\begin{columns}[T]
  \begin{column}{9cm}

    \vspace{0.5cm}
  \includegraphics[width=9cm]{scales.pdf}

  \end{column}

  \begin{column}{6cm}
    \begin{itemize}
    \item Methane storage is depleted in winter, then replenished
      throughout the summer with synthetic methane
    \item Hydrogen storage fluctuates every 2–3 weeks, dictated by
      wind variations
    \item Long-Term Thermal Energy Storage (LTES) has a dominant
      seasonal pattern, with synoptic-scale fluctuations are
      super-imposed
    \item Battery Electric Vehicles (BEV) and battery storage
      vary daily
    \end{itemize}

  \end{column}

\end{columns}
\end{frame}






\begin{frame}
  \frametitle{LTES and P2G in autarkic (self-sufficient) apartment block}

  LTES and H2 storage enable \alert{complete self-sufficiency} for an
  apartment block in Brütten, Switzerland. All its energy comes from solar panels and a heat pump (no grid connections).

  \centering
  \includegraphics[trim=0 0cm 0 0cm,width=12cm,clip=true]{bruetten-house-system.jpg}
\end{frame}



\begin{frame}
  \frametitle{Benefit of grid expansion for sector-coupled system}


    The previous sector coupling results come from a model with one
    node power country described in
    \href{https://arxiv.org/abs/1801.05290}{Brown et al 2018}, for the
    case with no interconnecting transmission.

\begin{columns}[T]
  \begin{column}{9cm}

    \vspace{0.1cm}
  \includegraphics[width=9cm]{lv_sweep-co20.pdf}

  \end{column}

  \begin{column}{6cm}

    We recently applied the smart flexibility model to a 128-node
    model of Europe.

    \begin{itemize}
    \item The optimal volume of transmission is similar to electricity-only (around factor 3 bigger than today)
    \item Like electricity, over half of benefit available at 25\% expansion (comparable to TYNDP)
    \item Total cost benefit of grid is higher: $\sim$ 80 billion \euro/a
    \end{itemize}

  \end{column}

\end{columns}


%  Benefit of cross-border transmission is weaker with full sector flexibility (right) than with inflexible sector coupling (left); comes close to today's costs of around \euro~377~billion per year

\end{frame}






\begin{frame}
  \frametitle{Distribution of technologies}


\begin{columns}[T]
  \begin{column}{8cm}

    \vspace{0.5cm}
  \includegraphics[width=8cm]{lv1p25-CO0-spatial-costs-all.pdf}

  \end{column}

  \begin{column}{7cm}
    \vspace{.5cm}
    \begin{itemize}
    \item Wind now also in South because of seasonal alignment with heat demand
    \item Solar now also in North because of match with transport demand
    \item P2G near wind and at periphery of network
    \item Grid expansion mostly around North Sea, to bring offshore to load centres, and East-West to smooth weather coming from Atlantic
    \end{itemize}

  \end{column}

\end{columns}

\end{frame}


\begin{frame}{Pathway down to zero emissions in electricity, heating and transport}
\begin{columns}[T]
  \begin{column}{9cm}

    \includegraphics[width=9cm]{co2_sweep-lv1-25.pdf}

  \end{column}


  \begin{column}{6cm}

    \vspace{0.5cm}

    If we look at investments to eradicate \co2{} emissions in
    electricity, heating and transport we see:

    \begin{itemize}
    \item Electricity and transport are decarbonised first
    \item Heating comes next with expansion of heat pumps below 30\%
    \item Below 10\%, power-to-gas solutions replace natural gas
    \end{itemize}

  \end{column}

\end{columns}

\end{frame}





\begin{frame}{Benefit of grid depends on level of carbon dioxide reduction}
\begin{columns}[T]
  \begin{column}{9cm}

    \includegraphics[width=9cm]{total_costs-lv-co2.pdf}

  \end{column}


  \begin{column}{6cm}

    \vspace{0.7cm}
    \begin{itemize}
    \item Optimal grid (rightmost node of each curve) grows successively larger
    \item Benefit of grid expansion grows with depth of CO$_2$ reduction
    \item Can still get away with no transmission reinforcement (if
      the system is operated flexibly)
    \end{itemize}

  \end{column}

\end{columns}

\end{frame}


\begin{frame}
  \frametitle{Outlook}

  \begin{itemize}
  \item Develop \alert{improvements on  algorithmic side} to enable larger problems (clustering, improved optimisation routines)
  \item Explore \alert{pathways} from here to 2050 more rigorously
  \item Improve \alert{technology palette}: bioenergy, waste heat, CCS, DAC, more synthetic electrofuels
 \item Complete \alert{sectoral coverage}: aviation, shipping, process heat
   in industry
    \item Explore more \alert{grid optimisation} options: HTC, DLR, PST, SPS with
      storage/DSM
    \item Improve representation of \alert{thermal loads} (e.g. to assess building insulation)
          \item Co-optimise \alert{distribution grids} in a simplified manner
     \item Develop \alert{model simplifications} that reproduce features of bigger model
  \end{itemize}
\end{frame}



\section{Open Energy Modelling}


\begin{frame}
  \frametitle{Idea of Open Energy Modelling}

  The whole chain from raw data to modelling results should be open:

  \vspace{0.2cm}

  \centering
  \includegraphics[width=13cm]{open-model-process}

  \vspace{0.1cm}
  \centering
  \large
  \textbf{Open data + free software $\Rightarrow$ Transparency + Reproducibility}

  \normalsize
  \vspace{0.1cm}

  There's an initiative for that! Sign up for the mailing list / come to the next workshop:
  \vspace{0.1cm}

  \centering

  \includegraphics[width=8cm]{openmod-logo-large}

  \large
  \textbf{\href{http://openmod-initiative.org/}{openmod-initiative.org}}

  \normalsize
  \raggedright

  \source{openmod initiative}
\end{frame}




\begin{frame}
  \frametitle{Python for Power System Analysis (PyPSA)}

  Our free software PyPSA is online at \url{https://pypsa.org/} and on
  github. It can do:



\begin{columns}[T]
  \begin{column}{6cm}

  \begin{itemize}
  \item Static \alert{power flow}
  \item \alert{Linear optimal power flow} (LOPF) (multiple periods, unit commitment,
    storage, coupling to other sectors)
    \item \alert{Security-constrained LOPF}
    \item Total electricity system \alert{investment optimisation}
  \end{itemize}

  It has models for storage, meshed AC grids, meshed DC grids, hydro plants, variable renewables and sector coupling.

  \end{column}

\begin{column}{7cm}

  \vspace{0.3cm}
\centering
\includegraphics[width=8cm]{lmp}


\end{column}
\end{columns}

\end{frame}


\section{Conclusions}


\begin{frame}{Conclusions}

  \begin{itemize}
    \item Meeting \alert{Paris targets} is much more urgent than widely recognised

    \item There are \alert{lots of cost-effective solutions} thanks to falling price of renewables

    \item \alert{Electrification of other energy sectors} like heating
      and transport is important, since wind and solar will dominate
      low-carbon primary energy provision

    \item \alert{Grid helps} to make CO2 reduction easier $=$ cheaper


    \item \alert{Cross-sectoral} approaches are important to reduce
      CO2 emissions \alert{and} for flexibility

    \item \alert{Policy prerequisites}: high, increasing and
      transparent \alert{price for \co2{} pollution}; to manage grid
      congestion better: \alert{smaller bidding zones} and \alert{more dynamic pricing}

    \item The energy system is complex and contains some uncertainty
      (e.g. cost developments, scaleability of power-to-gas, consumer behaviour), so
      \alert{openness is critical}

  \end{itemize}

\end{frame}


\begin{frame}{Copyright}


  Unless otherwise stated, the graphics and text are Copyright \copyright Tom Brown, 2018.


  The graphics and text for which no other attribution are given are licensed under a
  \href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons
  Attribution 4.0 International Licence}.

  \begin{center}\ccby\end{center}

\end{frame}


\end{document}
