% 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[color/block=transparent]{metropolis}

\usepackage[absolute,overlay]{textpos}
\usepackage{booktabs}
\usepackage[utf8]{inputenc}


\usepackage[scale=2]{ccicons}

\usepackage[official]{eurosym}

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


\setbeamerfont{alerted text}{series=\bfseries}
\setbeamercolor{alerted text}{fg=Mahogany}
\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$}



% 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]}}}


\newcommand{\ubar}[1]{\text{\b{$#1$}}}


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

\title{Energy System Modelling\\ Summer Semester 2019, Lecture on Multi-Horizon Dynamic Investment}
%\subtitle{---}
\author{
  {\bf Dr. 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{.3cm}27th June 2019}


\titlegraphic{%
  \vspace{6cm}
  \hspace{10cm}
    \includegraphics[trim=0 0cm 0 0cm,height=1.8cm,clip=true]{kit.png}
}

\begin{document}

\maketitle


\begin{frame}

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


\section{Review}


\begin{frame}
  \frametitle{Short-run efficiency}

  Short-run efficiency is concerned with the \alert{efficient operation} of the existing energy system, assuming that the capacities of all investments are fixed.
  \begin{columns}[T]
    \begin{column}{7.5cm}

      \alert{Example}: Power plant dispatch for inelastic demand $d$. All capacities $G_s$ [MW] are fixed. We optimise the \alert{dispatch} $g_s$ [MW], assuming that the \alert{marginal costs} $o_s$ [\euro/MWh] scale linearly with the dispatch. We minimise \alert{total operational costs}:
      \begin{equation*}
        \min_{\{g_s\}} \sum_s o_s g_s
      \end{equation*}
      with constraints
  \begin{align*}
    \sum_s g_s & = d\hspace{1cm} \leftrightarrow \hspace{1cm} \l \\
        g_s  & \leq  G_s  \hspace{1cm}\leftrightarrow\hspace{1cm} \bar{\m}_s \\
    - g_s  & \leq  0  \hspace{1cm}\leftrightarrow\hspace{1cm} \ubar{\m}_s
  \end{align*}
    \end{column}
    \begin{column}{6.5cm}

        \vspace{.5cm}
        %https://www.forum-csr.net/News/7186/Marktwirtschaftparadox.html
        \includegraphics[trim=0 0cm 0 0cm,width=7cm,clip=true]{merit-order-effekt_neu1.png}


    \end{column}
  \end{columns}

\end{frame}

\begin{frame}
  \frametitle{Long-run efficiency}


  Long-run efficiency is concerned with the \alert{efficient operation} and \alert{the efficient dimensioning of investments} in the energy system.

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

      \alert{Example}: Power plant \alert{dispatch} $g_{s,t}$ (costs $o_s$) and \alert{capacities} $G_s$ (annualised costs $c_s$) are optimised over a year of hourly time periods $t$ with demand $d_t$:
      \begin{equation*}
        \min_{\{g_{s,t},G_s\}} \sum_{s,t} o_s g_{s,t} + \sum_s c_s G_s
      \end{equation*}
      with constraints
  \begin{align*}
    \sum_s g_{s,t} & = d_t\hspace{1cm} \leftrightarrow \hspace{1cm} \l_t \\
        g_{s,t}   & \leq  G_s  \hspace{1cm}\leftrightarrow\hspace{1cm} \bar{\m}_{s,t} \\
    - g_{s,t}  & \leq  0  \hspace{1cm}\leftrightarrow\hspace{1cm} \ubar{\m}_{s,t}
  \end{align*}
    \end{column}
    \begin{column}{7cm}

        \includegraphics[width=6cm]{screening-load-duration.png}

    \end{column}
  \end{columns}

\end{frame}


\section{Multi-horizon investment: Motivation}


\begin{frame}
  \frametitle{Multi-horizon investment}

  Dynamic multi-horizon investment is concerned with the \alert{changing capacities of investments} in the energy system over many years or even \alert{decades}.


  At which point in time should we invest in renewables/gas/storage?

  We consider several time horizons, typically years, in which plants can be dismantled or built.

  Why are we concerned with changes over decades?

  \pause

  Since many aspects of the energy system change over decades, e.g.:
  \begin{itemize}
  \item \alert{Energy consumption} (particularly in developing countries)
  \item \alert{Resource scarcity} (scarcity of oil, cobalt, rare earth metals, etc.)
  \item \alert{Political targets} (e.g. reduction of greenhouse gas emissions)
  \item \alert{Maturity, costs and other parameters} (e.g.. efficiency) of technologies
  \item \alert{Economic growth}
  \item \alert{Bahavioural change} (car sharing, online gaming, etc.)
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Example: political targets}

  \includegraphics[width=14cm]{co2_targets.png}

  \source{Agora Energiewende}

\end{frame}


\begin{frame}
  \frametitle{Example: Net-Zero Emissions by 2050}

  Paris-compliant 1.5$^\circ$~C scenarios from European Commission - \alert{net-zero GHG in EU by 2050}

  \vspace{.4cm}

  %Figure 6 from https://ec.europa.eu/clima/sites/clima/files/docs/pages/com_2018_733_en.pdf
  \includegraphics[width=14cm]{eu-lts-net-zero.png}


    \source{\href{https://ec.europa.eu/clima/sites/clima/files/docs/pages/com_2018_733_en.pdf}{European Commission `Clean Planet for All', 2018}}
\end{frame}


\begin{frame}
  \frametitle{Example: Cost Developments of Renewable Energy}

  LCOE = \alert{Levelised Cost of Energy} = Total Costs $/$ Energy Output
  \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}


\section{Multi-horizon investment: Theoretical formulation}


\begin{frame}
  \frametitle{Discounted Total Costs}

  We will consider the total costs over \alert{multiple years} $a = 1,\dots A$.


  How do we compare costs in 2020 to those in 2040?

  \pause

  The totals costs are expressed in their
  \alert{present value} using the
 \alert{discount rate} $r$ (see lecture 8), to allow comparison between different years.

 For costs (or income) in year $a$ we \alert{discount} the costs with a factor
  \begin{equation*}
    \frac{1}{(1+r)^a}
  \end{equation*}
  because we could have invested until this year $a$ with return $r$.

  Costs in the future are \alert{worth less} from today's point of view.

  For rate $r$ we optimised the \alert{discounted total costs}
  \begin{equation*}
     \sum_{a=1}^A \frac{1}{(1+r)^a} \left\{ \textrm{Total costs in year } a \right\}
  \end{equation*}

\end{frame}



\begin{frame}
  \frametitle{Warning: Discounting over long time periods}

  Over long time periods the discounting can have a very large effect....

  \begin{columns}[T]
\begin{column}{9cm}
  \centering
  \includegraphics[width=9.5cm]{discounting.pdf}
\end{column}
\begin{column}{5cm}
  \begin{itemize}
  \item Long-term benefits aren't seen, e.g. long production life of nuclear power plants or benefits of long-lived efficiency measures
  \item Long-term costs are also suppressed, e.g. decommissioning, waste disposal, climate damages
  \item This is a \alert{controversial topic!}
  \end{itemize}
\end{column}
  \end{columns}

\end{frame}


\begin{frame}
  \frametitle{Example of Electricity System until 2050}

We optimise the discounted total costs over 30 years from 2021 to 2050
  \begin{equation*}
              \min_{\{g_{s,t,a},Q_{s,a},G_{s,a}\}} \sum_{a=1}^A \frac{1}{(1+r)^a} \left\{ \sum_{s,t} o_{s,a} g_{s,t,a} + \sum_{s,b} c_{s,b} Q_{s,b} \mathbb{I}(a  \geq b) \mathbb{I}(a < b+L_s)
 \right\}
  \end{equation*}
  Here $Q_{s,a}$ is the new capacity built in year $a$, $G_{s,a}$ is the total capacity available in year $a$, $L_s$ is the lifetime  and $\mathbb{I}$ is an indicator function that is $1$ if the condition is fulfilled, $0$ otherwise. $Q_{s,a}$ may also have fixed values for $a<1$ to represent existing capacity. $Q_{s,a}$ and $G_{s,a}$ are related by
  \begin{equation*}
    G_{s,a} = \sum_{b = 1}^{L_s} Q_{s,a-b}
  \end{equation*}

  The old constraints apply for each year $a$
  \begin{align*}
    \sum_s g_{s,t,a} & = d_{s,a}\hspace{1cm} \leftrightarrow \hspace{1cm} \l_{t,a} \\
        g_{s,t,a}   & \leq  G_{s,a}  \hspace{1cm}\leftrightarrow\hspace{1cm} \bar{\m}_{s,t,a} \\
    - g_{s,t,a}  & \leq  0  \hspace{1cm}\leftrightarrow\hspace{1cm} \ubar{\m}_{s,t,a}
  \end{align*}

\end{frame}


\begin{frame}
  \frametitle{Global constraints}

  With a long-term perspective we can now set exciting constraints.

  For example, we can restrict total \alert{emissions} over the period:
  \begin{equation*}
    \sum_{s,t,a} e_i g_{s,t,a}\leq \textrm{CAP}_{\textrm{CO}_2}
  \end{equation*}
  where $e_s$ is the specific emissions of technology $s$ (tonnes of CO$_2$ per MWh$_{\textrm{el}}$).

  Or limit \alert{resource consumption} for a technology $s$:
  \begin{equation*}
    \sum_{t,a} g_{s,t,a}\leq \textrm{CAP}_{s}
  \end{equation*}
\end{frame}


\begin{frame}
  \frametitle{Learning effects}

  Technology costs sink with accumulated manufacturing experience, particularly for new immature technologies.

  We promote $c_{s,a}$ to an optimisation variable that depends on the cumulative generator capacity.

 A simple \alert{one-factor learning model} for the costs is
  \begin{equation*}
    c_{s,a} = c_{s,0} \left(\sum_{b=1}^a Q_{s,b} \right)^{-\gamma_s}
  \end{equation*}
  where $c_{s,0}$ is the initial cost, $Q_{s,b}$ is the capacity produced in year $b$ and $\gamma_s$ is the \alert{learning parameter}.

  The \alert{learning rate} $LR$ is the reduction in cost for every doubling of production
  \begin{equation*}
    LR_s = 1-2^{-\gamma_s}
  \end{equation*}

  Example for photovoltaics: $\gamma = 0.33$ $\implies$ if cumulative production doubles, the costs reduce by 20\% (\alert{Swanson's Law}).

\end{frame}


\begin{frame}
  \frametitle{Swanson's Law for photovoltaic modules}

  The underlying dynamic is a fast decay in costs with deployment (\alert{learning-by-doing}).

  \vspace{.2cm}

  \centering
      \includegraphics[width=9.5cm]{1024px-Swansons-law.png}
\end{frame}


\begin{frame}
  \frametitle{More complicated learning models}

  In the literature there are more sophisticated learning models than the one-factor model, e.g.
  \begin{itemize}
  \item \alert{Multi-component learning models}: different parts of the
    cost experience different learning rates, e.g. some parts of the
    cost do not experience learning, such as fixed material and labour
    costs, call it $c_{s,\textrm{base}}$. Only the remainder
    experiences learning:
  \begin{equation*}
    c_{s,a} = c_{s,\textrm{base}} + (c_{s,0}-c_{s,\textrm{base}}) \left(\sum_{b=1}^a Q_{s,b} \right)^{-\gamma_s}
  \end{equation*}
  In the case of PV, $c_{s,\textrm{base}}$ would include e.g. the labour costs of installation.
  \item \alert{Multi-factor learning models}: the cost depends not just on the cumulative capacity, but on other factors such as knowledge stock $KS$ through research and development
  \begin{equation*}
    c_{s,a} = c_{s,0}\left(\sum_{b=1}^a Q_{s,b} \right)^{-\gamma_{s,1}} \left(\sum_{b=1}^a KS_{s,b} \right)^{-\gamma_{s,2}}
  \end{equation*}


  \end{itemize}

\end{frame}

\section{Multi-horizon investment: Simplified example}



\begin{frame}
  \frametitle{Simplified example}

  \url{https://nworbmot.org/courses/esm-2019/lectures/notebooks/dynamic_investment.ipynb}

  Time period: 2021 until 2070. Discount rate: $r = 0.05$.

  Constant electricity demand $d_{t,a} = d = 100$ GW.

  At the start of the simulation there is already 100~GW of 20-year-old coal plants.

  3 generation technologies are available that are dispatchable (for Concentrating Solar Power (CSP) need good direct solar insolation, e.g. New Mexico or Morocco).


  \ra{1.1}
  \begin{table}[!t]
    \begin{tabular}{lrrrrrr}
      \toprule
      Tech & Capital costs & Marg. costs & LCOE & Cap & Emissions & Lifetime    \\
       &  (\euro MW$^{-1}$ a$^{-1}$) &  (\euro MWh$_{\textrm{el}}^{-1}$) &  (\euro MWh$_{\textrm{el}}^{-1}$) & factor & (tCO$_2$MWh$_{\textrm{el}}^{-1}$) & years \\
      \midrule
      Coal &30*8760 & 20 & 50 & 1 & 1 & 40\\
      Nuclear & 65*8760 & 10 & 75 & 1 & 0 & 40 \\
      CSP & 150*8760 & 0 & 150 & 1 & 0 & 30 \\
      \bottomrule
    \end{tabular}
  \end{table}



\end{frame}

\begin{frame}
  \frametitle{Simplified example}

  Since each technology can generate continuously and the demand is constant, we assume $g_{s,t,a}$ is constant for all $t$
   \begin{equation*}
    g_{s,t,a} = g_{s,a} \leq G_{s,a}
   \end{equation*}

  This simplifies the optimisation problem considerably:
  \begin{equation*}
              \min_{\{g_{s,t,a},Q_{s,a},G_{s,a}\}} \sum_{a=1}^A \frac{1}{(1+r)^a} \left\{ \sum_{s} o_{s,a} g_{s,a}\cdot 8760 + \sum_{s,b} c_{s,b} Q_{s,b} \mathbb{I}(a  \geq b) \mathbb{I}(a < b+L_s)
 \right\}
  \end{equation*}
  with constraints for each year $a$
  \begin{align*}
    \sum_s g_{s,a} & = d
  \end{align*}
\end{frame}


\begin{frame}
  \frametitle{Vanilla Version: No CO$_2$ budget, no learning, no discounting}

  Only new coal is built, since it's cheapest.

  Total costs without discounting: 50\euro/MWh $\cdot$ 8760 $\cdot$ 100 GW $\cdot$ 50 years = 2190 billion \euro

    \centering
  \includegraphics[width=11cm]{no_co2-no_learning-dispatch.pdf}
\end{frame}


\begin{frame}
  \frametitle{Vanilla Version: No CO$_2$ budget, no learning, discounting}

  Only coal is built, since it's cheapest.

  Total costs with discount rate 5\%: 840 billion \euro

   \centering
  \includegraphics[width=11cm]{no_co2-no_learning-dispatch.pdf}

\end{frame}




\begin{frame}
  \frametitle{CO$_2$ budget, no learning, discounting}

  Limit CO$_2$ to 20\% of coal emissions. Nuclear takes over before coal lifetimes are finished. Why is it built only later in the period (even when no existing plants assumed)? (Hint: discounting)

  Total costs with discount rate 5\%: 1147 billion \euro

  \centering
  \includegraphics[width=10cm]{co2-0p2-no_learning-dispatch.pdf}

\end{frame}



\begin{frame}
  \frametitle{CO$_2$ budget, learning for CSP, discounting}


  Limit CO$_2$ to 20\% of coal emissions. CSP has learning rate 20\%, $\gamma = 0.33$, and a base long-term potential LCOE of 35~\euro/MWh that represents material and labour costs.

  Total costs with discount rate 5\%: 1020 billion \euro

  \centering
  \includegraphics[width=10cm]{co2-0p2-learning-dispatch.pdf}

\end{frame}


\begin{frame}
  \frametitle{CO$_2$ budget, learning for CSP, discounting}

  LCOE needs subsidy initially to push down learning curve, since it is more expensive than incumbent technologies. But from 2034 onwards it is the most competitive technology.

  \centering
  \includegraphics[width=11cm]{co2-0p2-learning-lcoe.pdf}

\end{frame}

\begin{frame}
  \frametitle{Lessons from this example}

  \begin{itemize}
  \item Non-linear effects such as learning-by-doing make the results hard to predict
  \item It may be cost-effective in the long-run to subsidise technologies that are uncompetitive today
  \item Depending on how subsidy and policy is arranged, there could be \alert{path dependencies}
  \end{itemize}

  To improve the realism of this example we need to:
  \begin{itemize}
  \item Include more technologies, spatial resolution
  \item Consider more representative times per year to capture the variability of renewables and load
  \end{itemize}

\end{frame}

\begin{frame}{Copyright}


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

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

  \url{http://nworbmot.org/}

  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}



\end{document}
