Commit 5e6102b5 authored by sp2668's avatar sp2668

clean tex files

parent 591cf4f9
......@@ -90,30 +90,30 @@ page\footnote{\url{https://nworbmot.org/courses/complex_renewable_energy_network
They describe (quasi-real) time series for wind power generation \(W(t)\), solar power generation \(S(t)\) and load \(L(t)\) in Great Britain (GB), Germany (DE) and Europe (EU). The time step is \(1\e{h}\) and the time series are several years long.
\begin{enumerate}[(a)]
\item Check that the wind and solar time series are normalized to 'per-unit of installed \mbox{capacity}', and that the load time series is normalized to MW.
\item For all three regions, calculate the maximum, mean, and variance of the time series.
\item For all three regions, plot the time series \(W(t)\),
\item Check that the wind and solar time series are normalized to 'per-unit of installed \mbox{capacity}', and that the load time series is normalized to MW.
\item For all three regions, calculate the maximum, mean, and variance of the time series.
\item For all three regions, plot the time series \(W(t)\),
\(S(t)\),
\(L(t)\) for a winter month (January) and a summer month (July).
\item For all three regions, plot the duration curve for \(W(t)\), \(S(t)\), \(L(t)\).
\item For all three regions, plot the probability density function of \(W(t)\), \(S(t)\), \(L(t)\).
\item Apply a (Fast) Fourier Transform to the the three time series $X \in W(t), S(t), L(t)$:
\begin{equation*}
\item For all three regions, plot the duration curve for \(W(t)\), \(S(t)\), \(L(t)\).
\item For all three regions, plot the probability density function of \(W(t)\), \(S(t)\), \(L(t)\).
\item Apply a (Fast) Fourier Transform to the the three time series $X \in W(t), S(t), L(t)$:
\begin{equation*}
\tilde{X}(\omega) = \int_0^T X(t) e^{\i \omega t} \,\ud t \, .
\end{equation*}
For all three regions, plot the energy spectrum
$\left| \tilde{\Delta}(\omega) \right|^2$ as a function of
$\omega$. Discuss the relationship of these results with the
findings obtained in (b)-(e).
\item Normalize the time series to one, so that \(\expect{W} = \expect{S} = \expect{L} = 1\).
Now, for all three regions, plot the mismatch time series
\end{equation*}
For all three regions, plot the energy spectrum
$\left| \tilde{\Delta}(\omega) \right|^2$ as a function of
$\omega$. Discuss the relationship of these results with the
findings obtained in (b)-(e).
\item Normalize the time series to one, so that \(\expect{W} = \expect{S} = \expect{L} = 1\).
Now, for all three regions, plot the mismatch time series
\begin{equation*}
\Delta(t) = \gamma \alpha W(t) + \gamma (1 - \alpha) S(t) - L(t)
\end{equation*}
for the same winter and summer months as in (c). Choose
\(\alpha \in \{0.0, 0.5, 0.75, 1.0\}\) with \(\gamma = 1\),
and $\gamma \in \{0.5, 0.75, 1.0, 1.25, 1.5\} $ with $\alpha = 0.75$.
\item For all three regions, repeat (b)-(f) for the mismatch time series.
\item For all three regions, repeat (b)-(f) for the mismatch time series.
\end{enumerate}
\pagebreak
......@@ -145,17 +145,17 @@ Figure \ref{fig:seasonalvariations} shows approximations to the
seasonal variations of wind and solar power generation \(W(t)\)
and \(S(t)\) and load \(L(t)\):
\begin{align*}
W(t) & = 1 + A_W \cos \omega t \\
S(t) & = 1 - A_S \cos \omega t \\
L(t) & = 1 + A_L \cos \omega t
W(t) & = 1 + A_W \cos \omega t \\
S(t) & = 1 - A_S \cos \omega t \\
L(t) & = 1 + A_L \cos \omega t
\end{align*}
The time series are normalized to
\(\expect{W} = \expect{S} = \expect{L} := \frac{1}{T} \int_0^T L(t)
\ud t = 1\), and the constants have the values
\begin{align*}
\omega & = \frac{2\pi}{T} & T & = 1 \e{year} \\
A_W & = 0.4 & A_S & = 0.75 & A_L & = 0.1
\omega & = \frac{2\pi}{T} & T & = 1 \e{year} \\
A_W & = 0.4 & A_S & = 0.75 & A_L & = 0.1
\end{align*}
~\\
......@@ -188,21 +188,21 @@ A_W & = 0.4 & A_S & = 0.75 & A_L & = 0.1
I found the python notebook based notes of Robert Johansson to be a
comprehensive kick starter\footnote{\url{http://nbviewer.jupyter.org/github/jrjohansson/scientific-python-lectures/tree/master/}}.
\begin{itemize}
\item
\item
\href{http://nbviewer.jupyter.org/github/jrjohansson/scientific-python-lectures/blob/master/Lecture-0-Scientific-Computing-with-Python.ipynb}{Lecture~0} covers installation and getting ready.
\item
\item
\href{http://nbviewer.jupyter.org/github/jrjohansson/scientific-python-lectures/blob/master/Lecture-1-Introduction-to-Python-Programming.ipynb}{Lecture~1}
zooms through most basic general python control structures (only
brush over it and stop reading early, i.e. if you read the word
\verb+classes+ you already know too much).
\item \href{http://nbviewer.jupyter.org/github/jrjohansson/scientific-python-lectures/blob/master/Lecture-2-Numpy.ipynb}{Lecture~2} is the most important and closely connected to the exercises.
\item You might as well stop now, but if you \emph{are} hooked, I recommend \href{http://nbviewer.jupyter.org/github/jrjohansson/scientific-python-lectures/blob/master/Lecture-3-Scipy.ipynb}{Lecture~3} for more physics and \href{http://nbviewer.jupyter.org/github/jrjohansson/scientific-python-lectures/blob/master/Lecture-4-Matplotlib.ipynb}{Lecture~4} for prettier graphs.
\item \href{http://nbviewer.jupyter.org/github/jrjohansson/scientific-python-lectures/blob/master/Lecture-2-Numpy.ipynb}{Lecture~2} is the most important and closely connected to the exercises.
\item You might as well stop now, but if you \emph{are} hooked, I recommend \href{http://nbviewer.jupyter.org/github/jrjohansson/scientific-python-lectures/blob/master/Lecture-3-Scipy.ipynb}{Lecture~3} for more physics and \href{http://nbviewer.jupyter.org/github/jrjohansson/scientific-python-lectures/blob/master/Lecture-4-Matplotlib.ipynb}{Lecture~4} for prettier graphs.
\end{itemize}
Further reference material of help is:
\begin{itemize}
\item The website-books \url{http://python-course.eu/} (english), \url{http://python-kurs.eu/} (german); especially if you only \emph{very} quickly skim over the \href{http://www.python-course.eu/course.php}{python2 tutorial} and switch over to the \href{http://www.python-course.eu/numerical_programming.php}{numerical python} stuff early; especially of interest might be the \href{http://www.python-course.eu/pandas.php}{pandas} bit in the end, which will make the exercises a breeze at the expense of yet another package to learn.
\item the exhaustive (overly so) official python tutorial\footnote{\url{https://docs.python.org/2/tutorial/}} available in \href{https://docs.python.org/2/tutorial/}{english} and \href{https://py-tutorial-de.readthedocs.org/de/python-3.3/index.html}{german}; which will NOT introduce you to numpy or scipy.
\item The website-books \url{http://python-course.eu/} (english), \url{http://python-kurs.eu/} (german); especially if you only \emph{very} quickly skim over the \href{http://www.python-course.eu/course.php}{python2 tutorial} and switch over to the \href{http://www.python-course.eu/numerical_programming.php}{numerical python} stuff early; especially of interest might be the \href{http://www.python-course.eu/pandas.php}{pandas} bit in the end, which will make the exercises a breeze at the expense of yet another package to learn.
\item the exhaustive (overly so) official python tutorial\footnote{\url{https://docs.python.org/2/tutorial/}} available in \href{https://docs.python.org/2/tutorial/}{english} and \href{https://py-tutorial-de.readthedocs.org/de/python-3.3/index.html}{german}; which will NOT introduce you to numpy or scipy.
\end{itemize}
......
No preview for this file type
......@@ -125,17 +125,17 @@ to feed their load $L_N$. Figure \ref{fig:variations} shows approximations to th
\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}.
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}}. \\
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.
......@@ -160,7 +160,7 @@ For now, assume the stores are lossless. Losses will be considered in III.2.
\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.
Now we lift the restriction against transmission and allow them to bridge their 500 km separation with a transmission line.
\begin{enumerate}[(e)]
% (e)
......
......@@ -122,17 +122,17 @@ Imagine a two-node Germany. The South can install solar panels with a capacity f
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)\):
\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}.
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
\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}}. \\
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*}
For now, assume the stores are lossless. Losses will be considered in III.2.
......@@ -167,23 +167,23 @@ For now, assume the stores are lossless. Losses will be considered in III.2.
In the North:
\begin{align*}
G_{s,storage,dispatch}^N &= \max ( \pm g_s^N(t)) \\
&= \max (\pm [L_N(t) - G_{N,w} \cdot G_{N,w}(t)]) \\
&= \max (\pm [L_N(t) - \frac{A_{l,N}}{Cf_w}\cdot Cf_w\cdot (1+A_w \sin \omega_w t)]) \\
&= \max (\pm [L_N(t) - A_{l,N} + A_{l,N} A_w \sin \omega_w t)]) \\
&= \max (\pm [A_{l,N} A_w \sin \omega_w t)]) \\
&= A_{l,N} A_w = 0.9 \cdot 20 \si{\giga\watt} = 18 \si{\giga\watt}
G_{s,storage,dispatch}^N & = \max ( \pm g_s^N(t)) \\
& = \max (\pm [L_N(t) - G_{N,w} \cdot G_{N,w}(t)]) \\
& = \max (\pm [L_N(t) - \frac{A_{l,N}}{Cf_w}\cdot Cf_w\cdot (1+A_w \sin \omega_w t)]) \\
& = \max (\pm [L_N(t) - A_{l,N} + A_{l,N} A_w \sin \omega_w t)]) \\
& = \max (\pm [A_{l,N} A_w \sin \omega_w t)]) \\
& = A_{l,N} A_w = 0.9 \cdot 20 \si{\giga\watt} = 18 \si{\giga\watt}
\end{align*}
In the South:
\begin{align*}
G_{s,storage,dispatch}^S &= \max ( \pm g_s^S(t)) \\
&= \max (\pm [L_S(t) - G_{S,s} \cdot G_{S,s}(t)^{m(t)}]) \\
&= \max (\pm [L_S(t) - \frac{A_{l,S}}{Cf_s}\cdot Cf_s\cdot (1+A_s \sin \omega_s t)]) \\
&= \max (\pm [L_S(t) - A_{l,S} + A_{l,S} A_s \sin \omega_s t)]) \\
&= \max (\pm [A_{l,S} A_s \sin \omega_s t)]) \\
&= A_{l,S} A_s = 1.0 \cdot 30 \si{\giga\watt} = 30 \si{\giga\watt}
G_{s,storage,dispatch}^S & = \max ( \pm g_s^S(t)) \\
& = \max (\pm [L_S(t) - G_{S,s} \cdot G_{S,s}(t)^{m(t)}]) \\
& = \max (\pm [L_S(t) - \frac{A_{l,S}}{Cf_s}\cdot Cf_s\cdot (1+A_s \sin \omega_s t)]) \\
& = \max (\pm [L_S(t) - A_{l,S} + A_{l,S} A_s \sin \omega_s t)]) \\
& = \max (\pm [A_{l,S} A_s \sin \omega_s t)]) \\
& = A_{l,S} A_s = 1.0 \cdot 30 \si{\giga\watt} = 30 \si{\giga\watt}
\end{align*}
% (c)
......@@ -193,13 +193,13 @@ For now, assume the stores are lossless. Losses will be considered in III.2.
E_s = \max_t e_s(t) = \max_t \int_{0}^{t} (-g_s(t')) \;\mathrm{d}t'
\end{equation}
\end{shaded}
\end{shaded}
In the North:
\begin{align*}
e_s^N(t) &= \int_{0}^{t} -g_s^N(t') \;\mathrm{d}t' = \int_{0}^{t} A_{l,N} A_w \sin \omega_w t' \;\mathrm{d}t' \\
&= A_{l,N} A_w \frac{-\cos(\omega_w t')}{\omega_w}\Big|_0^t = A_{l,N} A_w \frac{1-\cos(\omega_w t')}{\omega_w}
e_s^N(t) & = \int_{0}^{t} -g_s^N(t') \;\mathrm{d}t' = \int_{0}^{t} A_{l,N} A_w \sin \omega_w t' \;\mathrm{d}t' \\
& = A_{l,N} A_w \frac{-\cos(\omega_w t')}{\omega_w}\Big|_0^t = A_{l,N} A_w \frac{1-\cos(\omega_w t')}{\omega_w}
\end{align*}
\begin{equation*}
......@@ -209,8 +209,8 @@ For now, assume the stores are lossless. Losses will be considered in III.2.
In the South:
\begin{align*}
e_s^S(t) &= \int_{0}^{t} -g_s^S(t') \;\mathrm{d}t' = \int_{0}^{t} A_{l,S} A_s \sin \omega_s t' \;\mathrm{d}t' \\
&= A_{l,S} A_s \frac{-\cos(\omega_s t')}{\omega_s}\Big|_0^t = A_{l,S} A_s \frac{1-\cos(\omega_s t')}{\omega_s}
e_s^S(t) & = \int_{0}^{t} -g_s^S(t') \;\mathrm{d}t' = \int_{0}^{t} A_{l,S} A_s \sin \omega_s t' \;\mathrm{d}t' \\
& = A_{l,S} A_s \frac{-\cos(\omega_s t')}{\omega_s}\Big|_0^t = A_{l,S} A_s \frac{1-\cos(\omega_s t')}{\omega_s}
\end{align*}
\begin{equation*}
......@@ -229,17 +229,17 @@ For now, assume the stores are lossless. Losses will be considered in III.2.
The minimal (lossless) corresponding cost to supply constant demand by using hydrogen as storage technology are
\begin{align*}
P_h^N &= 750 \text{\EUR{}}\si{\per\kilo\watt} \cdot G_{s,storage,dispatch}^N + 10 \text{\EUR{}}\si{\per\kilo\watt\hour} \cdot E_s^N \\
&= 13.5 \cdot 10^9 \eur + 10 \cdot 10^9 \eur \\
&= 23.5 \cdot 10^9 \eur
P_h^N & = 750 \text{\EUR{}}\si{\per\kilo\watt} \cdot G_{s,storage,dispatch}^N + 10 \text{\EUR{}}\si{\per\kilo\watt\hour} \cdot E_s^N \\
& = 13.5 \cdot 10^9 \eur + 10 \cdot 10^9 \eur \\
& = 23.5 \cdot 10^9 \eur
\end{align*}
The minimal (lossless) corresponding cost to supply constant demand by using batteries as storage technology are:
\begin{align*}
P_b^N &= 300 \text{\EUR{}}\si{\per\kilo\watt} \cdot G_{s,storage,dispatch}^N + 200 \text{\EUR{}}\si{\per\kilo\watt\hour} \cdot E_s^N \\
&= 5.4 \cdot 10^9 \eur + 200 \cdot 10^9 \eur \\
&= 205.4 \cdot 10^9 \eur
P_b^N & = 300 \text{\EUR{}}\si{\per\kilo\watt} \cdot G_{s,storage,dispatch}^N + 200 \text{\EUR{}}\si{\per\kilo\watt\hour} \cdot E_s^N \\
& = 5.4 \cdot 10^9 \eur + 200 \cdot 10^9 \eur \\
& = 205.4 \cdot 10^9 \eur
\end{align*}
The minimal (lossless) total system cost using hydrogen storages accumulates to
......@@ -261,17 +261,17 @@ For now, assume the stores are lossless. Losses will be considered in III.2.
The minimal (lossless) corresponding cost to supply constant demand by using hydrogen as storage technology are
\begin{align*}
P_h^S &= 1200 \text{\EUR{}}\si{\per\kilo\watt} \cdot G_{s,storage,dispatch}^S + 10 \text{\EUR{}}\si{\per\kilo\watt\hour} \cdot E_s^S \\
&= 22.5 \cdot 10^9 \eur + 2.3 \cdot 10^9 \eur \\
&= 24.8 \cdot 10^9 \eur
P_h^S & = 1200 \text{\EUR{}}\si{\per\kilo\watt} \cdot G_{s,storage,dispatch}^S + 10 \text{\EUR{}}\si{\per\kilo\watt\hour} \cdot E_s^S \\
& = 22.5 \cdot 10^9 \eur + 2.3 \cdot 10^9 \eur \\
& = 24.8 \cdot 10^9 \eur
\end{align*}
The minimal (lossless) corresponding cost to supply constant demand by using batteries as storage technology are:
\begin{align*}
P_b^S &= 300 \text{\EUR{}}\si{\per\kilo\watt} \cdot G_{s,storage,dispatch}^S + 200 \text{\EUR{}}\si{\per\kilo\watt\hour} \cdot E_s^S \\
&= 9 \cdot 10^9 \eur + 46 \cdot 10^9 \eur \\
&= 54 \cdot 10^9 \eur
P_b^S & = 300 \text{\EUR{}}\si{\per\kilo\watt} \cdot G_{s,storage,dispatch}^S + 200 \text{\EUR{}}\si{\per\kilo\watt\hour} \cdot E_s^S \\
& = 9 \cdot 10^9 \eur + 46 \cdot 10^9 \eur \\
& = 54 \cdot 10^9 \eur
\end{align*}
The minimal (lossless) total system cost using hydrogen storages accumulates to
......@@ -309,29 +309,29 @@ For now, assume the stores are lossless. Losses will be considered in III.2.
The total price of electricity is given by
\begin{align*}
P_{tot} &=\frac{ E^N \cdot \tilde{P}_{w+h}^N + E^S \cdot \tilde{P}_{s+h}^S + (E^N - E^S)\cdot 200 \eur\si{\per\kilo\watt}}{E^N + E^S} \\
&= \frac{E^N \cdot \tilde{P}_{w+h}^N + (50\si{\giga\watt} - E^N) \cdot \tilde{P}_{s+h}^S + (2E^N - 50\si{\giga\watt})\cdot 200 \eur\si{\per\kilo\watt}}{E^N + E^S} \\
&= \frac{E^N (\tilde{P}_{w+h}^N - \tilde{P}_{s+h}^S + 400 \eur \si{\per\kilo\watt}) + 50 \si{\giga\watt} (\tilde{P}_{s+h}^S - 200 \eur \si{\per\kilo\watt})}{E^N + E^S} \\
P_{tot} & =\frac{ E^N \cdot \tilde{P}_{w+h}^N + E^S \cdot \tilde{P}_{s+h}^S + (E^N - E^S)\cdot 200 \eur\si{\per\kilo\watt}}{E^N + E^S} \\
& = \frac{E^N \cdot \tilde{P}_{w+h}^N + (50\si{\giga\watt} - E^N) \cdot \tilde{P}_{s+h}^S + (2E^N - 50\si{\giga\watt})\cdot 200 \eur\si{\per\kilo\watt}}{E^N + E^S} \\
& = \frac{E^N (\tilde{P}_{w+h}^N - \tilde{P}_{s+h}^S + 400 \eur \si{\per\kilo\watt}) + 50 \si{\giga\watt} (\tilde{P}_{s+h}^S - 200 \eur \si{\per\kilo\watt})}{E^N + E^S} \\
\end{align*}
Now, minimising the term for a choice of $E^N$ will yield
\begin{align*}
E^N &= 50 \si{\giga\watt}
E^N & = 50 \si{\giga\watt}
\end{align*}
such that all power would be produced from wind in the North and the total system cost is
\begin{align*}
\min P_{tot} &= \frac{-0.6 \cdot 50 \cdot 10^9 \eur + 5.8 \cdot 50 \cdot 10^9 \eur}{50 \si{\giga\watt}} \\
&= \frac{260 \cdot 10^9 \eur}{50 \si{\giga\watt}} = 5.2 \cdot 10^9 \eur \si{\per\giga\watt}
\min P_{tot} & = \frac{-0.6 \cdot 50 \cdot 10^9 \eur + 5.8 \cdot 50 \cdot 10^9 \eur}{50 \si{\giga\watt}} \\
& = \frac{260 \cdot 10^9 \eur}{50 \si{\giga\watt}} = 5.2 \cdot 10^9 \eur \si{\per\giga\watt}
\end{align*}
Compared to the weighted electricity cost of North and South without transmission
\begin{align*}
\min \tilde{P}_{tot} &= \frac{20\si{\giga\watt}\cdot 5 \cdot 10^9 \eur \si{\per\giga\watt} + 30\si{\giga\watt}\cdot 6 \cdot 10^9 \eur \si{\per\giga\watt}}{50 \si{\giga\watt}} \\
&= \frac{280 \cdot 10^9 \eur}{50 \si{\giga\watt}} = 5.6 \cdot 10^9 \eur \si{\per\giga\watt}
\min \tilde{P}_{tot} & = \frac{20\si{\giga\watt}\cdot 5 \cdot 10^9 \eur \si{\per\giga\watt} + 30\si{\giga\watt}\cdot 6 \cdot 10^9 \eur \si{\per\giga\watt}}{50 \si{\giga\watt}} \\
& = \frac{280 \cdot 10^9 \eur}{50 \si{\giga\watt}} = 5.6 \cdot 10^9 \eur \si{\per\giga\watt}
\end{align*}
the system cost could be reduced by approx.\ 7 \%.
......
No preview for this file type
......@@ -101,82 +101,69 @@
%=====================================================================
\begin{document}
\begin{center}
\begin{center}
\textbf{\Large Energy System Modelling }\\
{SS 2018, Karlsruhe Institute of Technology}\\
{Institute of Automation and Applied Informatics}\\ [1em]
\textbf{\textsc{\Large Tutorial IV: Electricity Markets}}\\
\small Will be worked on in the exercise session on Tuesday, 17 July 2018.\\[1.5em]
\end{center}
\end{center}
\vspace{1em}
\vspace{1em}
%=============== ======================================================
\paragraph{Problem IV.1 \normalsize (Shadow prices of limits on consumption).}~\\
%=====================================================================
%=============== ======================================================
\paragraph{Problem IV.1 \normalsize (Shadow prices of limits on consumption).}~\\
%=====================================================================
Suppose that the utility for the electricity consumption of an industrial company is given by
\[
Suppose that the utility for the electricity consumption of an industrial company is given by
\[
U(q) = 70q - 3q^2 [\textrm{\euro}/h] \quad , \quad q_{min}=2\leq q \leq q_{max}=10,
\]
where $q$ is the demand in MW and $q_{min}, q_{max}$ are the minimum and maximum demand. \\
[1em]
Assume that the company is maximising its net surplus for a given electricity price $\pi$, i.e. it maximises $\max_{q} \left[U(q) -
\]
where $q$ is the demand in MW and $q_{min}, q_{max}$ are the minimum and maximum demand. \\
[1em]
Assume that the company is maximising its net surplus for a given electricity price $\pi$, i.e. it maximises $\max_{q} \left[U(q) -
\pi q\right]$.
\begin{enumerate}[(a)]
\begin{enumerate}[(a)]
\item If the price is $\pi = 5$~\euro/MWh, what is the optimal
demand $q^*$? What is the value of the KKT multiplier $\mu_{max}$
for the constraint $q \leq q_{max}=10$ at this optimal solution?
What is the value of $\mu_{min}$ for $q \geq q_{min} = 2$?
\item Suppose now the electricity price is $\pi = 60$~\euro/MWh. What are
the optimal demand $q^*$, $\mu_{max}$ and $\mu_{min}$ now?
\end{enumerate}
\end{enumerate}
%=============== ======================================================
\paragraph{Problem VI.2 \normalsize (Economic dispatch in a single bidding zone).}~\\
%=====================================================================
%=============== ======================================================
\paragraph{Problem VI.2 \normalsize (Economic dispatch in a single bidding zone).}~\\
%=====================================================================
Consider an electricity market with two generator types, one with variable cost $c = 20\emwh$, capacity $K = 300\mw$ and a dispatch rate of $Q_1$~[MW] and another with variable cost $c=50\emwh$, capacity $K=400\mw$ and a dispatch rate of $Q_2$~[MW]. The demand has utility function $U(Q) = 8000Q - 5Q^2$~[\euro/h] for a consumption rate of $Q$~[MW].
\begin{enumerate}[(a)]
Consider an electricity market with two generator types, one with variable cost $c = 20\emwh$, capacity $K = 300\mw$ and a dispatch rate of $Q_1$~[MW] and another with variable cost $c=50\emwh$, capacity $K=400\mw$ and a dispatch rate of $Q_2$~[MW]. The demand has utility function $U(Q) = 8000Q - 5Q^2$~[\euro/h] for a consumption rate of $Q$~[MW].
\begin{enumerate}[(a)]
\item What are the objective function and constraints required for an optimisation problem to maximise short-run social welfare in this market?
\item Write down the Karush-Kuhn-Tucker (KKT) conditions for this problem.
\item Determine the optimal rate of production of the generators and the value of all KKT multipliers. What is the interpretation of the respective KKT multipliers?
\end{enumerate}
\end{enumerate}
%%=============== ======================================================
%\paragraph{Problem II.3 \normalsize (Revenue, profit and consumer surplus).}~\\
%%=====================================================================
%
%Consider the example of bids and offers in an electricity market from
%slides 28 to 31 from Lecture 2 on 18.04.2016 (taken from the book
%Kirschen and Strbac pages 56-58).
%
%\begin{enumerate}[(a)]
% \item Compute the revenue and profit of each generating company and the net
% surplus of each consuming company.
% \item If consumer company ``Orange'' withdraws its offers from the market, how do the market price and the profits/surpluses of generators and consumers change?
%\end{enumerate}
%=============== ======================================================
\paragraph{Problem IV.3 \normalsize (efficient dispatch in a two-bus power system).}~\\
%=====================================================================
\begin{figure}[h]
%=============== ======================================================
\paragraph{Problem IV.3 \normalsize (efficient dispatch in a two-bus power system).}~\\
%=====================================================================
\begin{figure}[h]
\centering
\includegraphics[width=14cm]{two-bus}
\label{fig:two-bus}
\caption{A simple two-bus power system.}
\end{figure}
\label{test}
\end{figure}
Consider the two-bus power system shown in Figure \ref{fig:two-bus}, where the two nodes represent two markets, each with different total demand, and one generator at each node. At node A the demand is $D_A = 2000 \si{\mega\watt}$, whereas at node B the demand is $D_B = 1000 \si{\mega\watt}$. Furthermore, there is a transmission line with a capacity denoted by $F_{AB}$. The marginal cost of production of the generators connected to buses A and B are given respectively by the following expressions:
\begin{align*}
Consider the two-bus power system shown in Figure \ref{test}, where the two nodes represent two markets, each with different total demand, and one generator at each node. At node A the demand is $D_A = 2000 \si{\mega\watt}$, whereas at node B the demand is $D_B = 1000 \si{\mega\watt}$. Furthermore, there is a transmission line with a capacity denoted by $F_{AB}$. The marginal cost of production of the generators connected to buses A and B are given respectively by the following expressions:
\begin{align*}
MC_A & = 20 + 0.03 P_A \hspace{1cm}\eur/\si{\mega\watt\hour} \\
MC_B & = 15 + 0.02 P_B \hspace{1cm} \eur/\si{\mega\watt\hour}
\end{align*}
\end{align*}
Assume that the demand $D_*$ is constant and insensitive to price, that energy is sold at its marginal cost of production and that there are no limits on the output of the generators.
Assume that the demand $D_*$ is constant and insensitive to price, that energy is sold at its marginal cost of production and that there are no limits on the output of the generators.
\begin{enumerate}[(a)]
\begin{enumerate}[(a)]
\item Calculate the price of electricity at each bus, the production
of each generator, the flow on the line, and the value of any KKT
multipliers for the following cases:
......@@ -189,11 +176,11 @@
\end{enumerate}
\item Calculate the generator revenues, generator profits, consumer payments and consumer net surplus for all the cases considered in the above problem. Who benefits from the line connecting these two buses?
\item Calculate the congestion surplus for case (v). For what values of the flow on the line between buses A and B is the congestion surplus equal to zero?
\end{enumerate}
\end{enumerate}
%=============== ======================================================
\paragraph{Problem IV.4 \normalsize (bidding in africa with pypsa).}~\\
%=====================================================================
%=============== ======================================================
\paragraph{Problem IV.4 \normalsize (bidding in africa with pypsa).}~\\
%=====================================================================
......
......@@ -6,12 +6,6 @@
"source": [
"# Simple electricity market examples\n",
"\n",
"This Jupyter notebook is meant for teaching purposes. To use it, you need to install a Python environment with Jupyter notebooks, and the Python for Power System Analysis (PyPSA) library. See\n",
"\n",
"https://pypsa.org/doc/installation.html\n",
"\n",
"for tips on installation.\n",
"\n",
"It gradually builds up more and more complicated energy-only electricity markets in PyPSA, starting from a single bidding zone, going up to multiple bidding zones connected with transmission (NTCs) along with variable renewables and storage.\n",
"\n",
"Available as a Jupyter notebook at http://www.pypsa.org/examples/simple-electricity-market-examples.ipynb."
......@@ -29,9 +23,7 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import pypsa, numpy as np"
......@@ -40,18 +32,25 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"#marginal costs in EUR/MWh\n",
"marginal_costs = {\"Wind\" : 0,\n",
" \"Hydro\" : 0,\n",
" \"Solar\" : 0,\n",
" \"Coal\" : 30,\n",
" \"Gas\" : 60,\n",
" \"Oil\" : 80}\n",
"\n",
"#capital costs in EUR/kW\n",
"capital_costs = {\"Wind\" : 10000,\n",
" \"Hydro\" : 3000,\n",
" \"Solar\" : 6000,\n",
" \"Coal\" : 35000,\n",
" \"Gas\" : 8000,\n",
" \"Oil\" : 20000}\n",
"\n",
"#power plant capacities (nominal powers in MW) in each country (not necessarily realistic)\n",
"power_plant_p_nom = {\"South Africa\" : {\"Coal\" : 35000,\n",
" \"Wind\" : 3000,\n",
......@@ -79,26 +78,26 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Single bidding zone with fixed load, one period\n",
"\n",
"In this example we consider a single market bidding zone, South Africa.\n",
"## Three bidding zones connected by transmission, one period\n",
"\n",
"The inelastic load has essentially infinite marginal utility (or higher than the marginal cost of any generator)."
"In this example we have bidirectional transmission capacity between three bidding zones. The power transfer is treated as controllable (like an A/NTC (Available/Net Transfer Capacity) or HVDC line). Note that in the physical grid, power flows passively according to the network impedances."
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"country = \"South Africa\"\n",
"\n",
"network = pypsa.Network()\n",
"\n",
"network.add(\"Bus\",country)\n",
"countries = [\"Swaziland\", \"Mozambique\", \"South Africa\"]\n",
"\n",
"for country in countries:\n",
" \n",
" network.add(\"Bus\",country)\n",
"\n",
"for tech in power_plant_p_nom[country]:\n",
" for tech in power_plant_p_nom[country]:\n",
" network.add(\"Generator\",\n",
" \"{} {}\".format(country,tech),\n",
" bus=country,\n",
......@@ -106,76 +105,147 @@
" marginal_cost=marginal_costs[tech])\n",
"\n",
"\n",
"network.add(\"Load\",\n",
" network.add(\"Load\",\n",
" \"{} load\".format(country),\n",
" bus=country,\n",
" p_set=loads[country])"
" p_set=loads[country])\n",
" \n",
" #add transmission as controllable Link\n",
" if country not in transmission:\n",
" continue\n",
" \n",
" for other_country in countries:\n",
" if other_country not in transmission[country]:\n",
" continue\n",
" \n",
" #NB: Link is by default unidirectional, so have to set p_min_pu = -1\n",
" #to allow bidirectional (i.e. also negative) flow\n",
" network.add(\"Link\",\n",
" \"{} - {} link\".format(country, other_country),\n",
" bus0=country,\n",
" bus1=other_country,\n",
" p_nom=transmission[country][other_country],\n",
" p_min_pu=-1)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"INFO:pypsa.pf:Slack bus for sub-network 0 is South Africa\n",
"INFO:pypsa.pf:Slack bus for sub-network 0 is Swaziland\n",
"INFO:pypsa.pf:Slack bus for sub-network 1 is Mozambique\n",
"INFO:pypsa.pf:Slack bus for sub-network 2 is South Africa\n",
"INFO:pypsa.opf:Performed preliminary steps\n",
"INFO:pypsa.opf:Building pyomo model using `angles` formulation\n",
"/home/ws/sp2668/software/anaconda3/lib/python3.6/site-packages/pypsa/components.py:758: FutureWarning:\n",
"\n",
"Sorting because non-concatenation axis is not aligned. A future version\n",
"of pandas will change to not sort by default.\n",
"\n",
"To accept the future behavior, pass 'sort=True'.\n",
"\n",
"To retain the current behavior and silence the warning, pass sort=False\n",
"\n",
"\n",
"INFO:pypsa.opf:Solving model using glpk\n",
"INFO:pypsa.opf:Optimization successful\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"# ==========================================================\n",
"# = Solver Results =\n",
"# ==========================================================\n",
"# ----------------------------------------------------------\n",
"# Problem Information\n",
"# ----------------------------------------------------------\n",
"Problem: \n",
"- Name: unknown\n",
" Lower bound: 1245000.0\n",
" Upper bound: 1245000.0\n",
" Number of objectives: 1\n",
" Number of constraints: 13\n",
" Number of variables: 13\n",
" Number of nonzeros: 22\n",
" Sense: minimize\n",
"# ----------------------------------------------------------\n",