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



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

\title{Energy System Modelling\\ Summer Semester 2020, Lecture 2}
%\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{}


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

\vspace{5.1cm}

  {\footnotesize

  Unless otherwise stated, graphics and text are Copyright \copyright Tom Brown, 2020.
  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}. \ccby}

}

\begin{document}

\maketitle


\begin{frame}

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



\section{Electricity Consumption}

\begin{frame}
  \frametitle{Why is electricity useful?}

  Electricity is a versatile form of energy carried by electrical
  charge which can be consumed in a wide variety of ways (with selected examples):
  \begin{itemize}
  \item Lighting (lightbulbs, halogen lamps, televisions)
  \item Mechanical work (hoovers, washing machines, electric vehicles)
  \item Heating (cooking, resistive room heating, heat pumps)
  \item Cooling (refrigerators, air conditioning)
  \item Electronics (computation, data storage, control systems)
  \item Industry (electrochemical processes)
  \end{itemize}

  Compare the convenience and versatility of electricity with another
  energy carrier: the chemical energy stored in natural gas (mostly methane),
  which can only be accessed by burning it.

\end{frame}



\begin{frame}
  \frametitle{Power: Flow of energy}

  \alert{Power} is the rate of consumption of energy.

  It is measured in \alert{Watts}:
  \begin{equation*}
     1 \textrm{ Watt } = 1 \textrm{ Joule per second }
  \end{equation*}
  The symbol for Watt is W, 1 W = 1 J/s.

  \centering
  1 kilo-Watt = 1 kW = 1,000 W

  1 mega-Watt = 1 MW = 1,000,000 W

  1 giga-Watt = 1 GW = 1,000,000,000 W

  1 tera-Watt = 1 TW = 1,000,000,000,000 W


\end{frame}



\begin{frame}
  \frametitle{Power: Examples of consumption}

  At full power, the following items consume:

  \ra{1.1}
  \begin{table}[!t]
    \begin{tabular}{lr}
      \toprule
      Item & Power\\
      \midrule
      New efficient lightbulb & 10 W \\
      Old-fashioned lightbulb & 70 W \\
      Single room air-conditioning & 1.5 kW \\
      Kettle & 2 kW \\
      Factory & $\sim$1-500 MW \\
      CERN & 200 MW \\
            Germany total demand & 35-80 GW \\
      \bottomrule
    \end{tabular}
  \end{table}

\end{frame}



\begin{frame}
  \frametitle{Energy}

  In the electricity sector, energy is usually measured in
  `Watt-hours', Wh.

  1 kWh = power consumption of 1 kW for one hour

  E.g. a 10 W lightbulb left on for two hours will consume

  10 W * 2 h = 20 Wh

  It is easy to convert this back to the SI unit for energy, Joules:

  1 kWh = (1000 W) * (1 h) = (1000 J/s)*(3600 s) = 3.6 MJ
\end{frame}



\begin{frame}
  \frametitle{Electricity spot market: trading of energy}

  Energy is traded in MWh; current price around 40-50~\euro/MWh. Was sinking until 2016 thanks to renewables and the \alert{merit order effect}, but rising since 2016 due to rising \alert{CO$_2$ price}:

  \centering
  \includegraphics[width=11.4cm]{strompreis-2019.png}

  \source{\href{https://www.agora-energiewende.de/fileadmin2/Projekte/2019/Jahresauswertung_2019/171_A-EW_Jahresauswertung_2019_WEB.pdf}{Agora Energiewende Jahresauswertung 2019}}
\end{frame}



\begin{frame}
  \frametitle{Consumption metering}

\begin{columns}[T]
\begin{column}{6.5cm}
\includegraphics[width=7.5cm,angle=270]{stromzaehler}
\end{column}
\begin{column}{4cm}

  \vspace{1cm}

  \begin{itemize}
  \item Look for your electricity meter at home
  \item Mine here shows 42470.3 kWh
  \item Check what the value is a week later
  \end{itemize}

\end{column}
\end{columns}


\end{frame}



\begin{frame}
  \frametitle{Electricity bill}

  My bill for 2014-5: 1900 kWh for a year, at a cost of \euro 570, which
  corresponds to 0.3 \euro/kWh or 300 \euro/MWh. But the spot market price is 30 \euro/MWh, so what's going on??

  \centering
  \includegraphics[width=10cm,angle=180]{bill}

\end{frame}



\begin{frame}
  \frametitle{Household price breakdown}

  Although the wholesale price is going down, other taxes, grid
  charges and renewables subsidy (EEG surcharge) have kept the price
  high.

  \centering
  \includegraphics[width=12cm]{electricity-residential-price-2019.png}

  \raggedright
  HOWEVER the EEG is only high because it is paying for solar panels
  bought at a time when they were still comparatively expensive; but
  through the German subsidy, production volumes were high and the
  learning curve has brought the costs down exponentially.

  \source{\href{https://www.agora-energiewende.de/fileadmin2/Projekte/2019/Jahresauswertung_2019/AGORA_State_of_Affairs_German_Power_Sector_2019_Webinar_28012020.pdf}{Agora Energiewende, 2019}}

\end{frame}



\begin{frame}
  \frametitle{Yearly energy to power}

  Germany consumes around 600 TWh per year, written 600 TWh/a.

  What is the \emph{average} power consumption?

  \begin{align*}
    600\textrm{ TWh/a} & = \frac{(600\textrm{ TW}) * (1\textrm{ h})}{(365*24 \textrm{ h})} \\
    & =  \frac{600}{8760} \textrm{ TW} \\
    & = 68.5 \textrm{ GW}
  \end{align*}

\end{frame}



\begin{frame}
  \frametitle{Discrete Consumers Aggregation}

  The discrete actions of individual consumers smooth out
  statistically if we aggregate over many consumers.

  \centering
  \includegraphics[width=10cm]{demand_smoothing}

\end{frame}


\begin{frame}
  \frametitle{Load curve properties}

  The Germany load curve (around 500 TWh/a) shows \alert{daily}, \alert{weekly} and
  \alert{seasonal} patterns; religious festivals are also visible.

  \centering
  \includegraphics[width=13cm]{DE-load-H}

\end{frame}



\begin{frame}
  \frametitle{Load duration curve}

  For some analysis it is useful to construct a \alert{duration curve}
  by stacking the hourly values from highest to lowest.

  \centering
  \includegraphics[width=13cm]{DE-load-duration}

\end{frame}




\begin{frame}
  \frametitle{Load density function}

  Similarly we can also build the \alert{probability density function} $pdf(x)$, $\int dx \, pdf(x) = 1$:

  \centering
  \includegraphics[width=13cm]{DE-load-density}

\end{frame}

\begin{frame}
  \frametitle{Fourier transform to see spectrum}

  For a periodic, continuous, complex signal $f(t)$, we can decompose it in  frequency space to see which frequencies dominate the signal. This is called a \alert{Fourier transform/series}.

  For period $T$ (in our case a year) the function $f: [0,T] \rightarrow \mathbb{C}$ can be decomposed
  \begin{equation*}
     f(t) = \sum_{n=-\infty}^{n=\infty} a_n e^{-\frac{i2\pi nt}{T}}
  \end{equation*}

  To recover the values of the \alert{frequency amplitudes} $a_n$, integrate over $T$
  \begin{equation*}
     a_n = \frac{1}{T} \int_0^T dt \left[ f(t)  e^{\frac{i2\pi nt}{T}} \right]
  \end{equation*}


  For a real-valued function $f: [0,T] \rightarrow \mathbb{R}$, $a_{-n} = a_n^*$.

  For a periodic, \alert{discrete} signal $f_n$, the \alert{Fast Fourier Transform} (FFT) is a computationally advantageous algorithm and is implemented in many programming libraries (see tutorial).

\end{frame}

\begin{frame}
  \frametitle{Fourier transform: exercise}

  To remind yourself of how Fourier transforms work, check the formula for $a_n$ by inserting the expansion of $f(t)$ into the formula for $a_n$.

  First hint: remember Euler's formula:
  \begin{equation*}
    e^{i\theta} = \cos \theta + i \sin \theta
  \end{equation*}

  Second hint: think about integrating a periodic signal over its period:
  \begin{equation*}
    \frac{1}{T} \int_0^T dt \cos  \frac{2\pi nt}{T} =  \left\{
    \begin{array}{@{}ll@{}}
      1, & \text{if}\ n=0 \\
      0, & \text{otherwise}
        \end{array}\right.
  \end{equation*}



\end{frame}

\begin{frame}
  \frametitle{Load spectrum}

  If we Fourier transform, the \alert{seasonal}, \alert{weekly} and \alert{daily} frequencies are clearly visible.

  \centering
  \includegraphics[width=13cm]{DE-load-spectrum}

\end{frame}



\section{Electricity Generation}


\begin{frame}
  \frametitle{How is electricity generated?}

  \alert{Conservation of Energy}: Energy cannot be created or destroyed:
  it can only be converted from one form to another.

  There are several `primary' sources of energy which are converted
  into electrical energy in modern power systems:
  \begin{itemize}
  \item Chemical energy, accessed by combustion (coal, gas, oil, biomass)
  \item Nuclear energy, accessed by fission reactions, perhaps one day by fusion too
  \item Hydroelectric energy, allowing water to flow downhill (gravitational potential energy)
  \item Wind energy (kinetic energy of air)
  \item Solar energy (accessed with photovoltaic (PV) panels or
    concentrating solar thermal power (CSP))
  \item Geothermal energy
  \end{itemize}
  NB: The definition of `primary' is somewhat arbitrary.

\end{frame}



\begin{frame}
  \frametitle{Power: Examples of generation}

  At full power, the following items generate:

  \ra{1.1}
  \begin{table}[!t]
    \begin{tabular}{lr}
      \toprule
      Item & Power\\
      \midrule
      Solar panel on house roof & 15 kW \\
      Wind turbine & 3 MW \\
      Coal power station & 1 GW \\
      \bottomrule
    \end{tabular}
  \end{table}

\end{frame}



\begin{frame}
  \frametitle{Generators}

  With the exception of solar photovoltaic panels (and electrochemical
  energy and a few other minor exceptions), all generators convert to
  electrical energy via rotational kinetic energy and electromagnetic
  induction in an \emph{alternating current generator}.

  %https://en.wikipedia.org/wiki/Fossil-fuel_power_station#/media/File:Coal_fired_power_plant_diagram.svg

  \centering
  \includegraphics[width=10cm]{Coal_fired_power_plant_diagram}

  \source{Wikipedia}
%  https://de.wikipedia.org/wiki/Drehstrom-Synchronmaschine#/media/File:Walchenseekraftwerk-1_Turbinenhalle.jpg
% Walchenseekraftwerk-1_Turbinenhalle.jpg



\end{frame}


\begin{frame}
  \frametitle{Example of electricity generation across major EU countries in 2013}


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


\end{frame}



\begin{frame}
  \frametitle{Renewables reached 40\% of gross electricity generation in Germany in 2019}

  \centering
    \includegraphics[width=11cm]{fig2-gross-power-production-germany-1990-2019.png}
\end{frame}




\begin{frame}
  \frametitle{Efficiency}

  When fuel is consumed, much/most of the energy of the fuel is lost
  as waste heat rather than being converted to electricity.

  The thermal energy, or calorific value, of the fuel is given in
  terms of MWh${}_{\textrm{th}}$, to distinguish it from the
  electrical energy MWh${}_{\textrm{el}}$.

  The ratio of input thermal energy to output electrical energy is the
  \alert{efficiency}.

  \ra{1.1}
  \begin{table}[!t]
    \begin{tabular}{lrrrrr}
      \toprule
      Fuel & Calorific energy & Per unit efficiency & Electrical energy \\
       & MWh\(_{\text{th}}\)/tonne & MWh\(_{\text{el}}\)/MWh\(_{\text{th}}\) & MWh\(_{\text{el}}\)/tonne \\
\midrule
Lignite & 2.5 & 0.4 & 1.0 \\
Hard Coal & 6.7 & 0.45 & 2.7\\
Gas (CCGT) & 15.4 & 0.58 & 8.9\\
Uranium (unenriched) & 150000 & 0.33 & 50000 \\
      \bottomrule
    \end{tabular}
  \end{table}




\end{frame}


\begin{frame}
  \frametitle{Fuel costs to marginal costs}


  The cost of a fuel is often given in \euro/kg or \euro/MWh\(_{\text{th}}\).

  Using the efficiency, we can convert this to
  \euro/MWh\(_{\text{el}}\).

  For the full marginal cost, we have to
  also add the CO$_2$ price and the variable operation and maintenance
  (VOM) costs.


  \ra{1.1}
  \begin{table}[!t]
    \begin{tabular}{lrrrrr}
      \toprule
      Fuel &  Per unit efficiency & Cost per thermal & Cost per elec. \\
      &  MWh\(_{\text{el}}\)/MWh\(_{\text{th}}\)  & \euro/MWh\(_{\text{th}}\) & \euro/MWh\(_{\text{el}}\)\\
\midrule
Lignite  & 0.4  & 4.5 & 11\\
Hard Coal  & 0.45   & 11 & 24\\
Gas (CCGT) & 0.58  & 19 & 33\\
Uranium & 0.33 & 3.3 & 10\\
      \bottomrule
    \end{tabular}
  \end{table}



\end{frame}




\begin{frame}
  \frametitle{CO2 emissions per MWh}

  The \co2 emissions of the fuel.

  \ra{1.1}
  \begin{table}[!t]
    \begin{tabular}{lrrr}
      \toprule
Fuel & t\(_{\text{CO2}}\)/t & t\(_{\text{C02}}\)/MWh\(_{\text{th}}\) & t\(_{\text{CO2}}\)/MWh\(_{\text{el}}\)\\
\midrule
Lignite &  0.9 & 0.36 & 0.9 \\
Hard Coal  & 2.4 & 0.36 & 0.8 \\
Gas (CCGT) & 3.1 & 0.2 & 0.35\\
Uranium & 0 & 0 & 0 \\
      \bottomrule
    \end{tabular}
  \end{table}

  Current \co2 price in EU Emissions Trading Scheme (ETS) is around \euro 25/t${}_{\textrm{CO2}}$

\end{frame}


\begin{frame}
  \frametitle{You calculate: What CO$_2$ price to switch gas and lignite?}

  What CO$_2$ price, i.e. x \euro/t${}_{\textrm{CO2}}$, is required so
  that the marginal cost of gas (CCGT) is lower than lignite?

  NB: It helps to track units.

  \pause

  We need to solve for the switch point by adding the CO$_2$ price to the fuel cost.  Left is lignite, right is gas:
  \begin{equation*}
    11 \textrm{ \euro/MWh}_{\textrm{el}} + (0.9 \textrm{ tCO}_2/\textrm{MWh}_{\textrm{el}}) \cdot (x \textrm{ \euro/tCO}_2)
    =    33 \textrm{ \euro/MWh}_{\textrm{el}} + (0.35 \textrm{ tCO}_2/\textrm{MWh}_{\textrm{el}}) \cdot (x \textrm{ \euro/tCO}_2)
  \end{equation*}

  Solve:
  \begin{equation*}
    x = \frac{33 - 11}{0.9 - 0.35} = 40
  \end{equation*}

\end{frame}


\begin{frame}
  \frametitle{CO2 and import costs change over time...}

  \centering
  \includegraphics[width=14cm]{import_costs-2019.png}

 \source{\href{https://www.agora-energiewende.de/fileadmin2/Projekte/2019/Jahresauswertung_2019/AGORA_State_of_Affairs_German_Power_Sector_2019_Webinar_28012020.pdf}{Agora Energiewende, 2019}}
\end{frame}

\begin{frame}
  \frametitle{...which affects the marginal costs of generation}

    \centering
  \includegraphics[width=14cm]{marginal_costs-2019.png}

\source{\href{https://www.agora-energiewende.de/fileadmin2/Projekte/2019/Jahresauswertung_2019/AGORA_State_of_Affairs_German_Power_Sector_2019_Webinar_28012020.pdf}{Agora Energiewende, 2019}}
\end{frame}


\begin{frame}
  \frametitle{CO2 emissions from electricity sector}

  \co2
  emissions in electricity generation stagnated for years because of coal, which is slowly being pushed out by the \co2 price and in the longer term by the Kohleausstieg.

  \centering
  \includegraphics[width=11cm]{co2-strom-2019.png}
  \source{\href{https://www.agora-energiewende.de/fileadmin2/Projekte/2019/Jahresauswertung_2019/171_A-EW_Jahresauswertung_2019_WEB.pdf}{Agora Energiewende Jahresauswertung 2019}}
\end{frame}





\begin{frame}
  \frametitle{Capacity Factors and Full Load Hours}


  A generator's \alert{capacity factor} is the average power generation divided by the power capacity.

  For variable renewable generators it depends on weather, generator model and
  curtailment; for dispatchable generators it depends on market
  conditions and maintenance schedules.

  A generator's \alert{full load hours} are the equivalent number of hours at full capacity the generator required to produce its yearly energy yield.  The two quantities are related:
  \begin{equation*}
    \textrm{full load hours} = \textrm{per unit capacity factor} \cdot 365 \cdot 24 = \textrm{per unit capacity factor} \cdot 8760
  \end{equation*}


  Typical values for Germany:
  \begin{table}[!t]
    \begin{tabular}{lrr}
      \toprule
Fuel & capacity factor [\%] & full load hours \\
\midrule
wind & 20-35 & 1600-3000 \\
solar & 10-12 & 800-1000 \\
nuclear & 70-90 & 6000-8000 \\
open-cycle gas & 20 & 1500 \\
      \bottomrule
    \end{tabular}
  \end{table}


\end{frame}




\section{Variable Renewable Energy (VRE)}



\begin{frame}
  \frametitle{Solar time series}

  Unlike the load, the solar feed-in is much more variable, dropping to zero and not reaching full output (when aggregated over all of Germany).


  \centering
  \includegraphics[width=13cm]{DE-solar-H}

\end{frame}


\begin{frame}
  \frametitle{How do we derive solar time series?}

  We take times series weather data for the solar radiation (also
  called irradiation or insolation) at each location in W/m$^2$.  This
  is often provided for a horizontal surface, so we need to convert
  for the angles of the solar panel to the horizontal, and account for
  factors that affect the energy conversion (losses, outside
  temperature). We have a software library \alert{atlite} that takes
  care of this. See \url{https://model.energy} or
  \url{https://renewables.ninja} for live examples.

  \centering
  \includegraphics[width=10cm]{figure5.png}

  \source{\href{https://www.volker-quaschning.de/articles/fundamentals1/index.php}{Volker Quaschning}}


\end{frame}

\begin{frame}
  \frametitle{Solar time series: weekly}

  If we take a weekly average we see higher solar in the summer.

  \centering
  \includegraphics[width=13cm]{DE-solar-W}

\end{frame}



\begin{frame}
  \frametitle{Solar duration curve}



  \centering
  \includegraphics[width=13cm]{DE-solar-duration}

\end{frame}




\begin{frame}
  \frametitle{Solar density function}

  \centering
  \includegraphics[width=13cm]{DE-solar-density}

\end{frame}




\begin{frame}
  \frametitle{Solar spectrum}

  If we Fourier transform, the \alert{seasonal} and \alert{daily} patterns become visible.

  \centering
  \includegraphics[width=13cm]{DE-solar-spectrum}

\end{frame}



\begin{frame}
  \frametitle{Wind time series}

  Wind is variable, like solar, but the variations are on different time scales. It drops close to zero and rarely reaches full output (when aggregated over all of Germany).

  \centering
  \includegraphics[width=13cm]{DE-onwind-H}

\end{frame}



\begin{frame}
  \frametitle{How do we derive wind time series?}

  We take times series weather data for the wind speeds at hub height (e.g. 60-100m) at each
  location in ms$^{-1}$. In theory the power in the wind goes like
  $v^3$, but in practice high wind speeds are rare and it is not
  economic to build the generator so large.

  \centering
  \includegraphics[width=10cm]{1200px-Powercurve.png}

  \source{\href{https://de.wikipedia.org/wiki/Datei:Powercurve.png}{Wikipedia}}


\end{frame}


\begin{frame}
  \frametitle{How do we derive wind time series?}

  Wind speeds are typically distributed according to a Weibull probability distribution.
  Although the wind speeds are clustered at the lower end, most of the energy is generated between 5 and 15 ms$^{-1}$.

  \centering
  \includegraphics[width=10cm]{Lee_Ranch_Wind_Speed_Frequency.png}

  \source{\href{https://commons.wikimedia.org/wiki/File:Lee_Ranch_Wind_Speed_Frequency.svg}{Wikipedia}}


\end{frame}



\begin{frame}
  \frametitle{Wind time series: weekly}

  If we take a weekly average we see higher wind in the winter and
  some periodic patterns over 2-3 weeks (\alert{synoptic scale}).

  \centering
  \includegraphics[width=13cm]{DE-onwind-W}

\end{frame}



\begin{frame}
  \frametitle{Wind duration curve}



  \centering
  \includegraphics[width=13cm]{DE-onwind-duration}

\end{frame}




\begin{frame}
  \frametitle{Wind density function}

  \centering
  \includegraphics[width=13cm]{DE-onwind-density}

\end{frame}




\begin{frame}
  \frametitle{Wind spectrum}

  If we Fourier transform, the \alert{seasonal}, \alert{synoptic} (2-3 weeks) and \alert{daily} patterns become visible.

  \centering
  \includegraphics[width=13cm]{DE-onwind-spectrum}

\end{frame}


\section{Balancing a Single Country}



\begin{frame}
  \frametitle{Power mismatch}

  Suppose we now try and cover the electrical demand with the
  generation from wind and solar.

  How much wind and solar do we need? We have three time series:
  \begin{itemize}
  \item $\{ d_t\}, d_t \in \R$ the load (varying between 35 GW and 80 GW)
  \item $\{ w_t\}, w_t \in [0,1]$ the wind availability (how much a 1 MW wind turbine produces)
  \item $\{ s_t\}, s_t \in [0,1]$ the solar availability  (how much a 1 MW solar turbine produces)
  \end{itemize}

  We try $W$ MW of wind and $S$ MW of solar. Now the effective \alert{residual load} or \alert{mismatch} is
  \begin{equation*}
    m_t = d_t - Ww_t - Ss_t
  \end{equation*}

  We choose $W$ and $S$ such that on \alert{average} we cover all the load
  \begin{equation*}
    \langle m_t \rangle = 0
  \end{equation*}
  and so that the 70\% of the energy comes from wind and 30\% from solar ($W = 147$ GW and $S = 135$ GW).

\end{frame}




\begin{frame}
  \frametitle{Mismatch time series}


  \centering
  \includegraphics[width=13cm]{DE-mismatch-H}

\end{frame}



\begin{frame}
  \frametitle{Mismatch duration curve}



  \centering
  \includegraphics[width=13cm]{DE-mismatch-duration}

\end{frame}




\begin{frame}
  \frametitle{Mismatch density function}

  \centering
  \includegraphics[width=13cm]{DE-mismatch-density}

\end{frame}




\begin{frame}
  \frametitle{Mismatch spectrum}

  If we Fourier transform, the synoptic (from wind) and daily patterns (from demand and solar) become visible. Seasonal variations appear to cancel out.

  \centering
  \includegraphics[width=13cm]{DE-mismatch-spectrum}

\end{frame}



\begin{frame}
  \frametitle{How to deal with the mismatch?}

  The problem is that
    \begin{equation*}
    \langle m_t \rangle = 0
  \end{equation*}
    is not good enough! We need to meet the demand in every single hour.

    This means:
    \begin{itemize}
      \item If $m_t > 0$, i.e. we have unmet demand, then we need
        backup generation from \alert{dispatchable} sources
        e.g. hydroelectricity reservoirs, fossil/biomass fuels.
      \item If $m_t < 0$, i.e. we have over-supply, then we have to
        shed / spill / \alert{curtail} the renewable energy.
    \end{itemize}


\end{frame}


\begin{frame}
  \frametitle{Mismatch}


  \centering
  \includegraphics[width=13cm]{mismatch-2011-03-01-2011-03-31}


\end{frame}

\begin{frame}
  \frametitle{Mismatch}


  \centering
  \includegraphics[width=13cm]{mismatch-2011-07-01-2011-07-31}


\end{frame}

\begin{frame}
  \frametitle{Mismatch}


  \centering
  \includegraphics[width=13cm]{mismatch-2011-12-01-2011-12-31}


\end{frame}



\begin{frame}
  \frametitle{Mismatch duration curve}


  \centering
  \includegraphics[width=13cm]{mismatch-duration}


\end{frame}



\begin{frame}
  \frametitle{What to do?}

  Backup energy costs money and may also cause CO${}_2$ emissions.

  Curtailing renewable energy is also a waste.

  We'll look in the next lectures at \alert{four other solutions}:
  \begin{enumerate}
  \item \alert{Smoothing} stochastic variations of renewable feed-in \alert{over continental areas}, e.g. the whole of Europe.
  \item Using \alert{electricity storage} to shift energy from times of surplus to times of deficit.
  \item Shifting demand to different times, when renewables are abundant, i.e. \alert{demand-side management} (DSM).
    \item Consuming the electricity in \alert{other sectors}, e.g. transport or heating, where there are further possibilities for DSM (battery electric vehicles, heat pumps)  and cheap storage possibilities (e.g. thermal storage or power-to-gas as hydrogen or methane).
  \end{enumerate}



\end{frame}



\end{document}
