\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 for Automation and Applied Informatics}\\ [1em]
\textbf{\textsc{\Large Tutorial VI: Clustering Large Power Systems\\}}
\small Will be worked on in the exercise session on Wednesday, 18 July 2018.\\[1.5em]
\end{center}
\vspace{1em}
%=============== ======================================================
\paragraph{Problem VI.1 \normalsize (clustering the European grid).}~\\
%=====================================================================
In the preceding tutorials we have seen that the integration of renewable energy is cheaper when they are integrated over a large geographical area and that its variability requires a fine temporal resolution. In consequence, however, the computational power needed for the optimization of the whole energy system is immense and could be prohibitively high. In this tutorial, we will first compare 2 basic clustering solutions to reduce the grid model size and thereby alleviate the computational burden. Then we will observe the impact of clustering on the lowest installed capacity required to feed the demand.
\begin{figure}[h]
\centering
\includegraphics[width=\linewidth,trim={3cm 5cm 3cm 5cm},clip]{europeangrid}
\caption{The European power grid.}
\label{test}
\end{figure}
\begin{enumerate}[(a)]
\item The file \texttt{network\_data/base.nc} contains a detailed representation of the European power grid, including the various high voltage AC lines and the DC links.
\begin{enumerate}[(i)]
\item Load the file into the provided Jupyter notebook and plot it. The \textit{colours} of the lines represent the voltage type and level, whereas the \textit{width }of the lines are proportional to their transmission capacity.
\item Calculate the order and the size of this graph. You will need to include AC lines and DC links.
\item To cluster this network, we will use a simplified version of this grid, by considering all AC lines to have the same voltage. The simplified version also groups buses which are very close to each other.
Import the simplified version (\texttt{network\_data/elec\_s.nc}).
\item Calculate the order and the size of the simplified graph.
\end{enumerate}
\item We will now turn to clustering the European power network using \textit{Sklearn}. Sklearn is a library which allows the clustering of data. For the sake of exposition, we will cluster the network simply by grouping buses according to their geographical locations. There are, of course, more elaborate approaches which, however, exceed the scope of the tutorial.
\begin{enumerate}[(i)]
\item Perform various clustering configurations of the network by altering the clustering algorithms and the number of clusters k. Find the available clustering algorithms at \url{http://scikit-learn.org/stable/modules/clustering.html}.
\item Use the \texttt{plot\_clusters} function of the package \texttt{tutorial6utilities.py} to observe the outcome of the clustering.
\item Are the buses adequately clustered? Which algorithm is giving the best outcome? What are the limits of using geographically based data clustering on the electrical grid? Comment on your findings!
\end{enumerate}
\item We will now look at the interaction between the clustering configuration and minimum installed capacity in the network. The network file \texttt{network\_data/elec\_s.nc} also provides solar and wind energy hourly profile per bus for the year 2013 as well as an hourly load profile per bus. The run-of-river hydropower is also fixed.
We will make use of the functions \texttt{tutorial6utilities.find\_kmeans\_busmap(.)} and \texttt{pypsa.networkclustering.get\_clustering\_from\_busmap(.)} to cluster the European power grid according to the K-Means algorithm, with weights corresponding to the maximum load at the respective bus. These functions aggregate the bus data (i.e.\ load, renewable energy potential, etc.) to the cluster nodes and group lines from the initial network to form the edges of the clustered graph.
The clustered network is missing some installed capacities for renewables at each bus to be able to run a linear optimal power flow (LOPF). In order to set a capacity of solar, onshore wind and\/or offshore wind to each bus in a simple way, we use the function \texttt{tutorial6utilities.P\_nom\_re(network)} to attribute an installed capacity proportional to the load at each bus. The proportionality coefficients for solar \texttt{w\_s}, onshore wind \texttt{w\_on} and offshore wind \texttt{w\_of} could be changed independently. Keep in might, this is just for illustrative purposes probably not very accurate in reality.
\begin{enumerate}[(i)]
\item For a graph with a small number of clusters (e.g.\ between 10 and 25), determine minimum proportionality coefficients \texttt{w\_s}, \texttt{w\_on} and \texttt{w\_of} to have a feasible solution for the LOPF at a specific day and hour.
\item If you try the same coefficients with a higher number of clusters (e.g.\ between 100 and 200), is the LOPF still feasible. If not, could you find an explanation?
\end{enumerate}
\end{enumerate}
\end{document}