% 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]{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[utf8]{inputenc}


\usepackage[scale=2]{ccicons}


\usepackage[official]{eurosym}


\usepackage{tikz}


\usepackage[europeanresistors,americaninductors]{circuitikz}



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

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



%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*}{4cm}(11.7cm,8.0cm)
    \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}Building a Secure Energy System with Variable Renewables:\\
  Challenges and Solutions}
%\subtitle{---}
\author{
  T. Brown${}^1$, D. Schlachtberger${}^1$, J. Hörsch${}^1$, S. Schramm${}^1$, M. Greiner${}^2$\\
  ${}^1$\emph{Frankfurt Institute for Advanced Studies (FIAS), University of Frankfurt};
  ${}^2$\emph{Aarhus University}
}

\date{\vspace{0.5cm}CoNDyNet Summer School, Jacobs University, Bremen, 23rd June 2016}


\titlegraphic{%
  \vspace{5.2cm}
  % left bottom right top
  \includegraphics[trim=0 0cm 0 0cm,width=5.5cm,clip=true]{fias-web-official}
  \hspace{2cm}
  \includegraphics[width=4.5cm]{condynet}
}

\begin{document}

\maketitle


\begin{frame}

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


\section{The Challenges of Optimising a Renewable Energy System}



\begin{frame}
  \frametitle{Where we are: electricity generation across major EU countries in 2013}

  \centering
  \includegraphics[width=12cm]{european_countries-energy}


\end{frame}



\begin{frame}
  \frametitle{Where we're going: electricity generation in Germany per year}

  In 15 years Germany has gone from a system dominated by nuclear and
  fossil fuels, to one with 33\% renewables in electricity consumption.

  \centering

  \includegraphics[width=12cm]{germany_yearly_electricity}

  \source{Author's own representation based on \url{https://www.energy-charts.de/energy_en.htm}}
\end{frame}



\begin{frame}[fragile]
  \frametitle{Goal: understand the destination, so we can steer towards it}

  Want to answer (at least) two questions:
  \begin{enumerate}
  \item What \alert{infrastructure} (wind, solar, hydro generators,
    storage and networks) does a highly renewable electricity system
    require and \alert{where} should it go?
  \item Given a desired CO${}_2$ reduction (e.g. 95\% compared to 1990),
    what is the \alert{cost-optimal} combination of infrastructure
    (including all capital and marginal costs) that can guarantee
    security of supply?
  \end{enumerate}



\end{frame}



\begin{frame}[fragile]
  \frametitle{Interesting Questions}
  How do system characteristics and costs change as we \dots
  \begin{itemize}
  \item \dots restrict transmission expansion (i.e. due to public acceptance)?
  \item \dots impose import/export balance constraints (i.e. due to politics)?
  \item \dots relax CO${}_2$ constraint?
  \item \dots include non-pumped-hydro storage?
  \item \dots include meshed overlay direct current network and/or more phase-shifting transformers?
  \item \dots couple electricity sector to heating and transport?
  \end{itemize}

Some of these questions are driven by politics/social factors: compromises that take us away from economic optimum.

\end{frame}



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

Need high spatial resolution to represent VRE variations and
transmission constraints.


\centering
\includegraphics[width=11cm]{ENTSO-E_map_2012-low}
\source{ENTSO-E}


\end{frame}




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

Need high temporal resolution to represent load and VRE resource
variability and correlations. Wind generation in Europe in July 2013:


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


\end{frame}



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


  \alert{Modelling all sectors of the energy system involves lots of interdependencies}

  \vspace{0.5cm}

  Example: Improving building insulation:
  \begin{itemize}
  \item increases capital expenditure (bad)
  \item reduces heating demand (good)
  \item reduces electricity demand if heating is provided  via heat pumps (good)
  \item may reduce flexibility provision by reducing the need/availability of thermal storage (bad)
  \end{itemize}

  Beyond sector coupling: Nexus of energy, water, agriculture and biodiversity.

\end{frame}

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


  \alert{Modelling must respect physics}

  \vspace{0.5cm}

  \begin{itemize}
  \item How much detail in the input data do we need?
  \item Optimise transmission simultaneously with generation capacity?
  \item Optimise electricity, heating and transport together?
  \item How bad are linear approximations?
  \item Can we make the algorithms faster, to add detail in other areas?
  \item By looking at static situations, do we miss dynamic effects?
  \end{itemize}



\end{frame}




\begin{frame}
  \frametitle{Examples from literature of energy system optimisation}

\begin{table}[!t]
	\centering
	\begin{tabular}{@{}llllll@{}}
\toprule
Study & Scope &  Spatial      &  Temporal & What? & Flow \\
& & resolution & resolution &  & physics \\
\midrule
Czisch (2005) & MENA & low & high & electricity (gen and grid) & transport \\
Hagspiel et al. (2014) & EU & medium & low & electricity (gen and grid) & linear \\
Egerer et al. (2014) & EU &high & low &  electricity (gen only) & linear \\
Fraunhofers ISE, IWES & DE & none & high & electricity, heating, transport & none \\
\bottomrule
	\end{tabular}
\end{table}

\vspace{0.5cm}

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

\centering

Czisch

\includegraphics[width=3cm]{czisch-cropped}
\end{column}
\begin{column}{3.5cm}


\centering


Hagspiel et al.

\includegraphics[width=3cm]{ena-ewi-cropped}
\end{column}
\begin{column}{3.5cm}

\centering

Egerer et al.

\includegraphics[width=3cm]{egerer-cropped}
\end{column}

\end{columns}




\end{frame}


\begin{frame}[fragile]
  \frametitle{Problem 4: Flatness of solution space near the optimum}




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


  Once we've formulated our optimisation problem and solved it, we're not done.

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

  In which directions do the costs explode?

  Typical energy optimisation results are \alert{very flat} around the
  optimum, i.e. there are many similar configurations with similar costs.

  It is very important for policy-makers to know what freedom there
  is to adjust the solution, without exploding the costs.


  \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 ``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{Introduction: Dealing with Renewable Intermittency}

\begin{frame}
  \frametitle{Variability: Single wind site in Berlin}

  Looking at the wind output of a single wind plant over two weeks, it is highly
  variable, frequently dropping close to zero and fluctuating strongly.

  \centering
  \includegraphics[width=12cm]{variability-berlin}


\end{frame}



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

  But the wind does not blow the same at every site at every time: at a given time there are a variety of wind conditions across Germany. These differences \alert{balance out over time and space}.

  \centering
  \includegraphics[width=10cm]{2015-05-13-1100}

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

\end{frame}




\begin{frame}
  \frametitle{Variability: Single country: Germany}

  For a whole country like Germany this results in valleys and peaks that are  somewhat smoother, but the profile still frequently
  drops close to zero.

  \centering
  \includegraphics[width=12cm]{variability-de}


\end{frame}



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

  The scale of the weather systems are bigger than countries, so to leverage the full smoothing effects, you need to integrate wind at the \alert{continental scale}.

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

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

\end{frame}



\begin{frame}
  \frametitle{Variability: A continent: Europe}


  If we can integrate the feed-in of wind turbines across the European continent, the
  feed-in is considerably smoother: we've eliminated most valleys and
  peaks.

  \centering
  \includegraphics[width=12cm]{variability-eu}


\end{frame}



\begin{frame}
  \frametitle{Variability: Flexible hydroelectricity}


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

  \includegraphics[width=8cm]{Alta-damm}

  \end{column}

  \begin{column}{6cm}

    Existing hydroelectric plants can provide much of the backup. Hydro has several attractive properties:
    \begin{itemize}
    \item It is renewable
    \item It is flexible - water can be stored until needed and then dispatched very quickly
    \item It has no fuel costs
    \item It already covers 15-18\% of Europe's electricity demand, depending on rain conditions
    \end{itemize}

  \end{column}

\end{columns}
\source{Wikipedia}
\end{frame}



\begin{frame}
  \frametitle{Variability: A continent: Wind plus Hydro}

  Flexible, renewable hydroelectricity from storage dams in Scandinavia and the Alps can fill many of the valleys; excess energy can either be curtailed (spilled) or stored.

  \centering
  \includegraphics[width=12cm]{variability-load}


\end{frame}





\section{Cost Optimisation: Balancing Renewable Intermittency in Space versus Time}



\begin{frame}[fragile]
  \frametitle{Goal}

Given a desired CO${}_2$ reduction, what is the most cost-effective energy system?

\begin{equation*}
  \textrm{Minimise} \left(\parbox{6em}{Yearly system costs}\right) = \sum_n \left(\parbox{6em}{Annualised capital costs}\right) + \sum_{n,t} \left(\parbox{6em}{Marginal costs}\right)
\end{equation*}
subject to
\begin{itemize}
\item meeting energy demand at each node $n$ (e.g. countries) and time $t$ (e.g. hours of year)
\item wind, solar, hydro (variable renewables) availability $\forall\: n,t$
\item electricity/gas transmission constraints between nodes
\item (installed capacity) $\leq$ (geographical potential for renewables)
\item CO${}_2$ constraint
\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*}


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


We introduce KKT multipliers $\l_i$ and $\m_j$ for each constraint
equation, which have an economic interpretation as the \alert{shadow
  prices} of the constraints. They tell us how the value
of the objective function $f(x^*)$ changes as we relax/tighten the
corresponding 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*}
    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 (30 European countries in this case), 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{Constraints 1/6: 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:
    \begin{equation*}
      d_{n,t} = \sum_{s} g_{n,s,t} + \sum_{\ell \in n} 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/6: Generation availability}
Generator/storage dispatch $g_{n,s,t}$ cannot exceed availability $\bar{g}_{n,s,t}$, which is bounded by capacity $\bar{g}_{n,s}$ and installable potential $\hat{g}_{n,s}$. Both the dispatch $g_{n,s,t}$ and the capacity $\bar{g}_{n,s}$ are subject to optimisation.
    \begin{equation*}
      0 \leq g_{n,s,t} \leq \bar{g}_{n,s,t} \leq  \bar{g}_{n,s} \leq  \hat{g}_{n,s}
    \end{equation*}

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

\end{frame}

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

  Storage units such as batteries or hydrogen storage can work in both
  storage and dispatch mode. They have a limited energy capacity. The
  amount of energy stored is called the \alert{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{Constraints 4/6: Kirchoff's Laws for Physical Flow}

  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\}$. (Assume
  voltage magnitudes $|V_n|$ are constant and redefine $x_\ell \to
  |V_\ell|^{-2} x_\ell$.)

  The flows $f_\ell$ are linked to the $x_\ell$ via the voltage angles
  $\theta_n$ for each node by $f_\ell = \frac{\theta_i -
    \theta_j}{x_\ell}$.


  We have to satisfy Kirchoff's Laws, which can be compactly expressed
  using the \alert{incidence matrix} $K \in \R^{N\times L}$ (boundary
  operator in homology theory) of the graph and the \alert{cycle
    basis} $C \in \R^{L\times(L-N+1)}$ (kernel of $K$) and the
  diagonal matrix of the $x_l$,  $X = \textrm{diag}(x_1,\dots,x_L)
  \in \R^{L\times L}$.

  \begin{itemize}
  \item  Kirchoff's Current Law: $\mathbf{p} = K \mathbf{f}$
  \item  Kirchoff's Voltage Law: $C^t \mathbf{\theta} = C^t X \mathbf{f} = 0$
  \end{itemize}

  We can satisfy these using:
  \begin{align*}
    \mathbf{f} & = X^{-1} K^t \mathbf{\theta} \hspace{2cm} (\sim E = -\nabla \phi)\\
    \mathbf{p} & = K X^{-1} K^t \mathbf{\theta} \hspace{2cm} (\sim \rho = \Delta \phi)
  \end{align*}

\end{frame}



\begin{frame}
  \frametitle{Constraints 5/6: Transmission Line Thermal Limits}

    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*}

    However, since the $\bar{P}_\ell$ are subject to optimisation, we can always expand the capacity of the lines at a cost which appears in the objective function (and a computational cost, because it introduces non-linearities...).
\end{frame}


\begin{frame}
  \frametitle{Constraints 6/6: 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.

    Transmission volume limits are respected, given length $d_l$ and capacity $\bar{P}_\ell$ of each line:
    \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{Cost and other assumptions}

\begin{table}[!t]
	\centering
	\begin{tabular}{@{}lrl@{}}
\toprule
Quantity &  Cost     &  Unit \\
\midrule
Wind onshore capital & 1000  & \euro/kW \\
Wind offshore capital & 2000  & \euro/kW \\
Solar capital & 1000  & \euro/kW \\
Gas capital & 900  & \euro/kW \\
Gas marginal & 75 & \euro/MWh\\
Battery storage & 200 & \euro/kWh \\
Hydrogen storage & 2000 & \euro/kW \\
Transmission line & 400 & \euro/MW/km \\
Gas CO${}_2$ emissions & 0.2 & t/MWh${}_{\textrm{thermal}}$ \\
Gas plant efficiency & 40 & \% \\
Interest rate &  7  & \% \\
Line lifetime &  40  & years \\
Generators lifetime &  20 & years \\
\bottomrule
	\end{tabular}
\end{table}

\end{frame}



\begin{frame}
  \frametitle{Costs: No interconnecting transmission allowed}



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

  Technology~by~energy:
  % left bottom right top
  \begin{tabular}{cc}
    \includegraphics[align=c,trim=0 0cm 0 0cm,width=3.2cm,clip=true]{total-pie-0} &  \pbox{20cm}{ $\mu_{\textrm{CO}_2} = 168$ \\  $\mu_{\textrm{trans}} = 4800$} \\
  \end{tabular}


  Average~cost~\alert{\euro 71/MWh}:

  \includegraphics[width=3.6cm]{total-costs-joint-1}

  \end{column}

  \begin{column}{9cm}
    % left bottom right top
    \centering
    \includegraphics[trim=0 4cm 0 4cm,width=8cm,clip=true]{euro-pie-0}

    \raggedright
    Countries must be self-sufficient at all times; lots of storage and some gas to deal with fluctuations of wind and solar.
  \end{column}

\end{columns}
\end{frame}

\begin{frame}
  \frametitle{Dispatch with no interconnecting transmission}

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

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

\begin{frame}
  \frametitle{Costs: Moderate amount of interconnection (3-4 times today's)}


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

  Technology~by~energy:
    % left bottom right top
  \begin{tabular}{cc}
    \includegraphics[align=c,trim=0 0cm 0 0cm,width=3.2cm,clip=true]{total-pie-0-25} &  \pbox{20cm}{ $\mu_{\textrm{CO}_2} = 65$ \\  $\mu_{\textrm{trans}} = 235$} \\
  \end{tabular}


  Average~cost~\alert{\euro 51/MWh}:

  \includegraphics[width=4.8cm]{total-costs-joint-2}

  \end{column}

  \begin{column}{9cm}
    % left bottom right top
    \centering
    \includegraphics[trim=0 4cm 0 4cm,width=8cm,clip=true]{euro-pie-0-25}

    \raggedright
    A restricted extension of interconnection goes a long way to reduce the costs.
    More onshore wind, less solar and storage.
  \end{column}


\end{columns}

\end{frame}



\begin{frame}
  \frametitle{Dispatch with moderate interconnecting transmission}

  For Great Britain with moderate interconnecting transmission, excess wind can be exported instead of being curtailed:

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



\begin{frame}
  \frametitle{Costs: Cost-optimal expansion of interconnecting transmission}


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

  Technology~by~energy:
  % left bottom right top
    \begin{tabular}{cc}
    \includegraphics[align=c,trim=0 0cm 0 0cm,width=3.2cm,clip=true]{total-pie-1} &  \pbox{20cm}{ $\mu_{\textrm{CO}_2} = 42$ \\  $\mu_{\textrm{trans}} = 0$} \\
  \end{tabular}

  Average~cost~\alert{\euro 45/MWh}:

  \includegraphics[width=5.9cm]{total-costs-joint-3}

  \end{column}

  \begin{column}{9cm}
    % left bottom right top
    \centering
    \includegraphics[trim=0 4cm 0 4cm,width=8cm,clip=true]{euro-pie-1}

    \raggedright
    Large transmission expansion; onshore wind dominates. This optimal solution may run into public acceptance problems.
  \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{Costs: Comparison}




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

    \vspace{0.5cm}
  \includegraphics[width=10cm]{costs-comparison}

  \end{column}

  \begin{column}{5cm}
    \begin{itemize}
    \item Total system costs can be as cheap as today's system (down
      to \euro 45/MWh)
     \item Energy is dominated by wind (77\% for the cost-optimal system), followed
       by hydro (15\%) and solar (5\%)
     \item Restricting transmission requires more storage to deal with variability, driving up the costs by up to 55\%
     \item Compromise locks in many benefits of transmission
    \end{itemize}

  \end{column}

\end{columns}
\end{frame}



\begin{frame}
  \frametitle{Costs: Comparison for Changing heterogeneity}




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

    \vspace{0.5cm}
  \includegraphics[width=10cm]{costs-comparison-hetero}

  \end{column}

  \begin{column}{5cm}
    \begin{itemize}
    \item For the optimal solution try varying the heterogenity, e.g. for self-sufficiency parameter $k$, country must generate annually between $1/k$ and $k$ of its annual load.
    \item $k=0$ on left is unconstrained; $k=1$ means on balance self-sufficient over the year
    \end{itemize}

  \end{column}

\end{columns}
\end{frame}




\section{Trade-Offs in Spatial Resolution}

\begin{frame}[fragile]
  \frametitle{Spatial resolution}

In reality network has much more detail. Need high spatial resolution to represent VRE resource variation and
transmission constraints in electricity and gas networks.


\centering
\includegraphics[width=8cm]{europe-transmission}
\source{ENTSO-E}


\end{frame}





\begin{frame}
  \frametitle{Changing spatial resolution}

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 10,000 network nodes of the European system.


\end{frame}



\begin{frame}
  \frametitle{Many algorithms in the literature}

  There are lots of algorithms for clustering/aggregating networks, particularly in the engineering literature:
  \begin{itemize}
  \item $k$-means clustering on (electrical) distance
    \item $k$-means on load distribution
    \item Community clustering (e.g. Louvain)
    \item Spectral analysis of Laplacian matrix
      \item Clustering of Locational Marginal Prices with nodal pricing (sees congestion and RE generation)
      \item PTDF clustering
        \item Cluster nodes with correlated RE time series
  \end{itemize}


  The algorithms all serve different purposes (e.g. reducing part of
  the network on the boundary, to focus on another part).

  Not always tested on real network data.

\end{frame}


\begin{frame}
  \frametitle{Our metrics of interest}

  What we want from a network aggregation algorithm:

  \begin{enumerate}
  \item Preservation of major flows within original network
  \item Preservation of overall volume of flows
  \item For capacity optimisation: representative capacity extensions with aggregated network
  \item Preservation of spatial distribution of generation capacity
  \end{enumerate}

\end{frame}


\begin{frame}
  \frametitle{$k$-means clustering on load or load \& conventional generation}

  Cluster nodes based on load using $k$-means.

  I.e. find $k$ centroids and the corresponding $k$-partition of the
  original nodes that minimises the sum of squared distances from each
  centroid to its nodal members:

  \begin{equation}
    \min_{\{x_c\}} \sum_{c=1}^k \sum_{n \in N_c} w_n || x_c - x_n ||^2
  \end{equation}

  where each node is weighted $w_n$ by the average load there.


  NB: Totally ignores grid topology. It works because network is
  principally laid out to serve the load (with exception of large
  conventional power plants situated near e.g. mines/rivers).
\end{frame}



\begin{frame}
  \frametitle{Take an open grid: SciGRID for Germany}

  \url{http://scigrid.de/} (NEXT Energy)

\begin{columns}[T]
  \begin{column}{6.5cm}
  \begin{itemize}
  \item Uses OpenStreetMap (OSM) relations (ordered lists of nodes,
    ways and other relations) to generate an open network dataset
  \item So far only Germany, because relations for transmission lines
    are sparse outside Germany
  \item Only transmission lines in dataset, no trafos, load or generation
    data, these have been added as a PyPSA advertising example and a
    few tweaks to the grid
  \end{itemize}
  \end{column}

\begin{column}{5cm}

\centering

\includegraphics[width=5.5cm]{scigrid}

\end{column}
\end{columns}

\source{NEXT Energy, OSM}
\end{frame}



\begin{frame}
  \frametitle{$k$-means clustering (stubs are reduced in pre-processing)}

\centering
\includegraphics[width=11cm]{clusters-graphs}


\end{frame}



\begin{frame}
  \frametitle{Question of spatial resolution}


  If we take our ``worst case'' from before of no interconnection (\euro~71/MWh), we
  still assumed each country had no internal bottlenecks.

  How is this result affected by an increase of spatial resolution in
  each country?

  We expect
  \begin{itemize}
  \item A better representation of existing internal bottlenecks will prevent the transport of e.g. offshore wind to the south.
    \item Localised areas of e.g. good wind can be better exploited by the optimisation.
  \end{itemize}

  Which effect wins?
\end{frame}



\begin{frame}
  \frametitle{Clustering nodes}


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

1 nodes:

\includegraphics[width=7cm]{de-pie-1}
\end{column}
\begin{column}{6.5cm}

4 nodes:

\includegraphics[width=7cm]{de-pie-4}
\end{column}

\end{columns}


\end{frame}


\begin{frame}
  \frametitle{Clustering nodes}


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

16 nodes:

\includegraphics[width=7cm]{de-pie-16}
\end{column}
\begin{column}{6.5cm}

128 nodes:

\includegraphics[width=7cm]{de-pie-128}
\end{column}

\end{columns}


\end{frame}

\begin{frame}
  \frametitle{Comparison of results: energy}

\centering


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

\includegraphics[width=11cm]{clusters-yearly_energy}
\end{column}
\begin{column}{4cm}


  \begin{itemize}
  \item As resolution increases, we trade offshore wind for consumer-near
wind and solar energy.
   \item 94~TWh/a is lost in storage efficiency losses
   \item 61~TWh/a of renewables are curtailed
  \end{itemize}

\end{column}

\end{columns}




\end{frame}




\begin{frame}
  \frametitle{Comparison of results: power}

\centering


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

\includegraphics[width=11.5cm]{clusters-capacity-7}
\end{column}
\begin{column}{4cm}

  \vspace{1cm}
  \begin{itemize}
  \item Big increase in total capacity as we shift from offshore to onshore and solar
    \item Big increase in storage capacity
  \end{itemize}

\end{column}

\end{columns}




\end{frame}


\begin{frame}
  \frametitle{Comparison of results: cost}

\centering


\begin{columns}[T]
\begin{column}{10.5cm}
\vspace{0.5cm}
\includegraphics[width=11.5cm]{clusters-bar-7}
\end{column}
\begin{column}{4cm}


  \begin{itemize}
  \item As spatial resolution increases, cost of generation increases
    from \euro~77/MWh to \euro~105/MWh due to grid bottlenecks, an
    \alert{increase of 37\%}
  \item NB: This is \alert{without} any grid extensions and without
    interconnection; with both of these the solution would be
    \alert{considerably cheaper}
  \end{itemize}

\end{column}

\end{columns}




\end{frame}





\section{Optimisation Outlook: Temporal Resolution and Sector Coupling}


\begin{frame}
  \frametitle{Time series reduction example: wind production in Germany and Denmark}

\begin{columns}[T]
\begin{column}{6.2cm}
\includegraphics[width=7cm]{DE-wind-DK-wind-fourplot.png}
\end{column}
\begin{column}{7cm}
  \begin{itemize}
    \item Want to capture correlations in time series (load, wind and solar) and spatio-temporal patterns without taking whole year of hourly data
  \item $k$-means clustering creates $k$ clusters
\item Centroids chosen  to minimise the sum of
  squared distances between the centroids and the original points
\item Weighting $w(s) \propto$  number of points assigned to each cluster
\item Convex hull not so well captured
  \end{itemize}

\end{column}
\end{columns}

\end{frame}


\begin{frame}
  \frametitle{Sector integration}

  Replacing heating and transport fossil fuels with renewable sources and renewable electricity increases efficiency and reduces emissions of GHG.

  \centering
  \includegraphics[width=12cm]{weissbuch-sector_coupling}

  \source{BMWi Weißbuch}
\end{frame}

\begin{frame}
  \frametitle{Sector Coupling: Additional Flexibility}

  Example from Germany of final energy consumption reduction and
  increased flexibility through electrifying other energy sectors:

\ra{1.1}
\begin{table}[!t]
	\label{tab:results}
	\centering
	\begin{tabular}{@{}lrlrl@{}}
\toprule
Sector & Today's final  & Electrification & Future final & Extra flexibility \\
 & energy [TWh/a] &  & energy [TWh/a] & \\
\midrule
Traditional electric & 550 & Efficiency & 400 & None \\
Transport & 800 & Electric vehicles & 150 & Batteries \\
Low-T Heating & 900 & Heat pumps & 300 & Thermal storage \\
\midrule
Total & 2250 & & 850 & \\
\bottomrule
	\end{tabular}
\end{table}


Industrial process heat, aviation, shipping and agricultural emissions are more tricky...

\end{frame}



\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.2cm}
  \centering
  \large
  \textbf{Open data + free software $\Rightarrow$ Transparency + Reproducibility}

  \normalsize
  \raggedright
  \vspace{0.2cm}

  There's an initiative for that, with a wiki, a lively mailing list and regular workshops:
  \vspace{0.2cm}

  \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)}

  The FIAS software PyPSA is online at \url{http://pypsa.org/} and on
  github. It can do:



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

  \begin{itemize}
  \item Static power flow
    \item Linear optimal power flow
    \item Security-constrained linear optimal power flow
    \item Total electricity system investment optimisation
  \end{itemize}

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

  Coming soon: heat and gas sectors
  \end{column}

\begin{column}{7cm}

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


\end{column}
\end{columns}

\end{frame}




\section{Conclusions}




\begin{frame}
  \frametitle{Conclusions}

  \begin{itemize}
    \item The questions are no longer \emph{whether a renewable system is possible} or \emph{whether it can be affordable}; rather it is \alert{what compromises will we make} and \alert{how much will they cost}?
    \item The cost-optimal system has lots of onshore wind and international network expansion, with \alert{costs comparable to today's}.
    \item If countries do \alert{not} cooperate on grid expansion, storage becomes
      necessary to deal with the variability of renewables, \alert{driving up
        costs by 55\%} - the price of non-cooperation.
    \item Network bottlenecks \alert{internal} to the countries could increase the costs by \alert{another 40\%}.
    \item Major challenges for modelling: getting more grid detail, while retaining European scope; sector coupling with transport and heating; reducing model complexity.

  \end{itemize}
\end{frame}



\begin{frame}{Copyright}


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

  The source \LaTeX, self-made graphics and Python code used to
  generate the self-made graphics are available here:

  \url{http://nworbmot.org/energy/talks.html}

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

  \begin{center}\ccbysa\end{center}

\end{frame}




\begin{frame}
  \frametitle{Duration curve: Berlin}

  A \alert{duration curve} shows the feed-in for the whole year, re-ordered by from highest to lowest value. For a single location there are many hours with no feed-in.

  \centering
  \includegraphics[width=12cm]{duration-berlin}


\end{frame}


\begin{frame}
  \frametitle{Duration curve: Germany}

  For a whole country there are fewer peaks and fewer hours with no feed-in.

  \centering
  \includegraphics[width=12cm]{duration-de}


\end{frame}


\begin{frame}
  \frametitle{Duration curve: Europe}

  For the whole of Europe there are no times with zero feed-in.

  \centering
  \includegraphics[width=12cm]{duration-eu}


\end{frame}

\end{document}
