sheet03.tex 9.11 KB
Newer Older
sp2668's avatar
sp2668 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
\documentclass[11pt,a4paper,fleqn]{scrartcl}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[colorlinks=true, citecolor=blue, linkcolor=blue, filecolor=blue,urlcolor=blue]{hyperref}
\hypersetup{
     colorlinks   = true,
     citecolor    = gray
}
\usepackage{wrapfig}

\usepackage{caption}
\captionsetup{format=plain, indent=5pt, font=footnotesize, labelfont=bf}

\setkomafont{disposition}{\scshape\bfseries}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{bbm}
\usepackage{mathtools}
% \usepackage{epsfig}
% \usepackage{grffile}
%\usepackage{times}
%\usepackage{babel}
\usepackage{tikz}
\usepackage{paralist}
\usepackage{color}
\usepackage[top=3cm, bottom=2.5cm, left=2.5cm, right=3cm]{geometry}
%\setlength{\mathindent}{1ex}

% PGF
\usepackage{pgfplots}
\usepackage{pgf}
\usepackage{siunitx}
\usepackage{xfrac}
\usepackage{calculator}
\usepackage{calculus}
\usepackage{eurosym}
\usepackage{booktabs}
%\sisetup{per-mode=fraction,%
%	fraction-function=\sfrac}

%\newcommand{\eur}[1]{\EUR{#1}\si{\per\kilo\meter}}
\pgfplotsset{
  compat=newest,
  every axis/.append style={small, minor tick num=3}
}

%\usepackage[backend=biber,style=alphabetic,url=false,doi=false]{biblatex}
%\addbibresource{sheet01_biber.bib}
% \addbibresource{/home/coroa/papers/refs.bib}

\newcommand{\id}{\mathbbm{1}}
\newcommand{\NN}{{\mathbbm{N}}}
\newcommand{\ZZ}{{\mathbbm{Z}}}
\newcommand{\RR}{{\mathbbm{R}}}
\newcommand{\CC}{{\mathbbm{C}}}
\renewcommand{\vec}[1]{{\boldsymbol{#1}}}

\renewcommand{\i}{\mathrm{i}}

\newcommand{\expect}[1]{\langle\,#1\,\rangle}
\newcommand{\e}[1]{\ensuremath{\,\mathrm{#1}}}

\renewcommand{\O}{\mc{O}}
\newcommand{\veps}{\varepsilon}
\newcommand{\ud}[1]{\textup{d}#1\,}

\newcommand{\unclear}[1]{\color{green}#1}
\newcommand{\problem}[1]{\color{red}#1}
\newcommand{\rd}[1]{\num[round-mode=places,round-precision=1]{#1}}

%\DeclareSIUnit{\euro}{\EUR}
\DeclareSIUnit{\dollar}{\$}
\newcommand{\eur}{\text{\EUR{}}}

\usepackage{palatino}
\usepackage{mathpazo}
\setlength\parindent{0pt}
\usepackage{xcolor}
\usepackage{framed}
\definecolor{shadecolor}{rgb}{.9,.9,.9}

%=====================================================================
%=====================================================================
\begin{document}

\begin{center}
	\textbf{\Large Energy System Modelling }\\
	{SS 2018, Karlsruhe Institute of Technology}\\
	{Institute of Automation and Applied Informatics}\\ [1em]
	\textbf{\textsc{\Large Tutorial III: Storage Optimisation}}\\
	\small Will be worked on in the exercise session on Monday, 16 July 2018.\\[1.5em]
\end{center}

\vspace{.5em}

%=============== ======================================================
\paragraph{Problem III.1 \normalsize (storage adequacy).}~\\
%=====================================================================

\begin{wrapfigure}[11]{r}{0pt}
	\begin{tikzpicture}
	\begin{axis}[
	domain=0:14, no markers, samples=200
	% xlabel = $x$, ylabel = $f(x)$
	]
	\addplot+[dashed] {0.3 * (1 + 0.9 * sin(deg(2*pi*x/7)))}; \label{figref:w}
	\addplot+[densely dotted] {0.12*(1 + sin(deg(2*pi*x))}; \label{figref:s}
	\addplot+[solid] {1}; \label{figref:l}
	\end{axis}
	\end{tikzpicture}
	\caption{Diurnal and synoptic variations of wind and solar power generation
		\(G_{N,w}(t)\)
		\autoref{figref:w} and \(G_{S,s}(t)\)
		\autoref{figref:s}, and a constant load (all in per-unit) \(L(t)\)
		\autoref{figref:l}.}
	\label{fig:variations}
\end{wrapfigure}

Imagine a two-node Germany. The South can install solar panels with a capacity factor $Cf_s$ to cover its load $L_S$, while the North uses wind turbines that have a capacity factor $Cf_w$
to feed their load $L_N$. Figure \ref{fig:variations} shows approximations to the daily and synoptic variations of per-unit wind and solar power generation \(G_{N,w}(t)\) and \(G_{S,s}(t)\) and a constant load \(L_{N/S}(t)\):

\vspace{-0.5em}

\begin{align*}
	G_{N,w}(t) &= Cf_w(1+A_w \sin \omega_w t), \\
	G_{S,s}(t) &= Cf_s(1+A_s \sin \omega_s t), \\
	L_{N/S}(t) &= A_{l,N/S}.
\end{align*}

The capacity factors and constants are
\vspace{-0.25em}
\begin{align*}
	A_{l,N} &= 20 \si{\giga\watt}, &A_{l,S}&= 30 \si{\giga\watt},\\
	Cf_w &= 0.3, &A_w &= 0.9, &\omega_w &= \frac{2\pi}{7 \text{d}}, \\
	Cf_s &= 0.12, &A_s &= 1.0, &\omega_s &= \frac{2\pi}{1 \text{d}}. \\
\end{align*}
\vspace{-0.3em}
For now, assume the stores are lossless. Losses will be considered in III.2.

\begin{enumerate}[(a)]
	% (a)
	\item How much wind capacity $G_{N,w}$ must be installed in the North and solar capacity $G_{S,s}$ in the South?
	
	% (b)
	\item What is the amount of store and dispatch power capacity $G_{s,store}=\max(-g_s(t))$ and $G_{s,dispatch}= \max g_s(t)$ the storages must have in the North and in the South?

	% (c)
	\item What is the amount of energy capacity one needs in the North and in the South?
	
	\begin{equation*}
		E_s = \max_t e_s(t) = \max_t \int_{0}^{t} (-g_s(t')) \;\mathrm{d}t'
	\end{equation*}	

	% (d)
	\item Should they choose hydrogen or battery storages? And how much would it cost them with the prices in Table 1? Is the South or the North paying more for their energy?
	
	\item What do you imagine would change if you considered the storage losses given in Table 1 in your results (a)-(d)? Support your statement with a graphical illustration.
	
\end{enumerate}
	Now we lift the restriction against transmission and allow them to bridge their 500 km separation with a transmission line.
	
\begin{enumerate}[(e)]
		% (e)
	\item  Estimate the cost-optimal technology mix by assuming wind energy in the North is only stored in the North and solar energy in the South is likewise only stored in the South! What would happen if you dropped that assumption?
\end{enumerate}

\begin{table}[]
	\centering
	\label{tab:prices}
	\begin{tabular}{@{}lrrrr@{}}
		\toprule
		& \eur per kW & \eur per kWh & $\eta_{store}$ & $\eta_{dispatch}$ \\ \midrule
		Battery                    & 300                        & 200                         & 0.9            & 0.9               \\
		Hydrogen                   & 750                        & 10                          & 0.75           & 0.58              \\
		Solar                      & 600                        &                             &                &                   \\
		Wind                       & 1200                       &                             &                &                   \\
		Transmission line (500 km) & 200                        &                             &                &                   \\ \bottomrule
	\end{tabular}
	\caption{Investment costs of renewable energy infrastructure.}
\end{table}

%=============== ======================================================
\paragraph{Problem III.2 \normalsize (storage optimization with PyPSA).}~\\
%=====================================================================

Python for Power System Analysis (PyPSA) is a free software toolbox for optimising modern power systems that include features such as variable wind and solar generation, storage units, etc\.. Use the toolbox to extend on your findings in Problem III.1.

\begin{enumerate}[(a)]
	\item Build a network in PyPSA with the two buses North and South and attach the load at each bus and attach the wind and solar generators with availability according to $G_{N,w}(t) = Cf_w(1+A_w\sin \omega_w t)$ and $G_{S,s}(t) = Cf_s(1+A_s\sin \omega_s t)$ for a year (you have to call \texttt{set\_snapshots} for the year) and with \texttt{p\_nom\_extendable} set to True. As help you should have a look at the minimal LOPF example\footnote{\url{https://www.pypsa.org/examples/minimal_example_lopf.html}}, understand what the components documentation\footnote{\url{https://pypsa.org/doc/components.html}} of PyPSA gives you and that you can find the underlying objective function and constraints in the LOPF documentation\footnote{\url{https://pypsa.org/doc/optimal_power_flow.html\#linear-optimal-power-flow}}.
	\item Attach extendable storages at the North and the South! The storages have to be modelled as an \texttt{H2-bus} (a bus with \texttt{carrier='H2'}) linked to the \texttt{AC-bus} North with a \texttt{Link} where \texttt{p\_nom\_extendable=True} with the \texttt{capital\_cost} of the power capacity and an also extendable \texttt{Store} with the \texttt{capital\_cost} of the energy capacity, for instance. The losses can be set on the links as \texttt{efficiency}.
	\item Run an investment optimization by calling the \texttt{lopf} function.
	\item How do your results \texttt{objective} and \texttt{{generators,stores,links}.p\_nom\_opt} compare with the results of III.1(d)?
	\item Now lift the restriction against transmission and allow North and South to bridge their 500 km separation with a transmission line. How does the cost optimal technology mix change compared to III.1(f)?
	\item Replace the approximated availability time-series of the wind and the solar generators with the ones from \texttt{availability.csv} computed from reanalysis weather data available on the course homepage\footnote{\url{https://nworbmot.org/courses/complex_renewable_energy_networks/}} and re-run the LOPF. Compare the results! Explain the differences by looking at the cumulative variations relative to the mean of the availability time-series!
\end{enumerate}
\end{document}