Homework Solution Template (Advanced Control, UPB, 2021)
Author
Oliver Wallscheid
Last Updated
4 years ago
License
Creative Commons CC BY 4.0
Abstract
Homework Solution Template (Advanced Control, UPB, 2021)
\documentclass[journal]{IEEEtran}
% Some very useful LaTeX packages include:
% (uncomment the ones you want to load)
% *** MISC UTILITY PACKAGES ***
\usepackage{url} % Insert URL addresses within the document
\usepackage[colorlinks=false]{hyperref} % Makes internal and external references to clickable links within the PDF document
% *** GRAPHICS RELATED PACKAGES ***
\usepackage[pdftex]{graphicx} % Basic commands to include graphics
% *** MATH PACKAGES ***
\usepackage{amsmath} % Basic commands to depict math equations
\usepackage{bm} % bold font math symbols
% *** CORRECT REPRESENTATION OF SI UNITS ***
\usepackage{siunitx}
% *** ALIGNMENT PACKAGES ***
\usepackage{array} % nicer lookig tables and
% *** TABLE PACKAGES ***
\usepackage{booktabs} % nicer tables
\usepackage{multirow} % multi-row cells in tables
% correct bad hyphenation here
\hyphenation{op-tical net-works semi-conduc-tor}
\begin{document}
% Check for correct title
\title{Solution to Homework Assignment I/II}
% Insert your name and student ID here
\author{First Name Last Name, Student ID}
%%%% Do not change this %%%%
\markboth{Advanced Control: Homework Assignment}{Advanced Control: Homework Assignment}
\maketitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Some instruction words (delete this section for your submission) %%%%
\section{Introduction}
Use this \LaTeX\ template to document your homework assignment solution. The template is based on the IEEE journal format standard, which is widespread for scientific papers in the engineering community. If you are not an advanced \LaTeX\ user, do not be afraid since all relevant commands needed to insert your solutions in this document will be briefly explained next.
\subsection{Equations}
You can insert equations with numbering
\begin{equation}
\label{eq:arbitrary_label}
a^2+b^2=c^2
\end{equation}
or without
$$
c = \pm\sqrt{a^2+b^2}.
$$
Multi line equations are also possible
\begin{equation}
\begin{split}
\frac{\mathrm{d}}{\mathrm{d}t}\bm{x}(t) = \bm{A}\bm{x}(t) + \bm{B}\bm{u}(t),\\
\bm{y}(t) = \bm{C}\bm{x}(t) + \bm{D}\bm{u}(t).
\end{split}
\end{equation}
Here, vectors and matrices have been depicted in bold font using the \verb!\bm{}! command in math mode. Although many symbols in mathematical formulae are depicted in italic font, on the contrary, some require upright font such as
\begin{itemize}
\item mathematical operators (e.g. the differential $\mathrm{d}/\mathrm{d}t$),
\item unit symbols such as ampere, volt, seconds, newton, etc. (e.g., \SI{1}{\newton} = \SI{1}{\kilo\gram\metre\per\square\second}),
\item function names like $\cos, \sin$ and
\item descriptive sub and superscripts (e.g. $\bm{x}_{\mathrm{start}}$).
\end{itemize}
In this context, the \verb!\mathrm{}! command can be very helpful. Equations can be also inserted within the text lines (e.g., $x=y$) using the dollar sign notation \verb!$x=y$!. You can also reference equations, e.g. \eqref{eq:arbitrary_label}, by using the \verb!\eqref{}! command which automatically adjusts the equation reference number in case the equation order is changed at a later date. Please also note that equations are considered regular parts of a grammatically correct English sentence, i.e., they require the usual punctuation with commas, full stops, etc.
Additional resources on mathematical representations:
\begin{itemize}
\item List of most common math commands and symbols: \url{https://en.wikibooks.org/wiki/LaTeX/Mathematics}
\item Typographical conventions: \url{https://en.wikipedia.org/wiki/Typographical_conventions_in_mathematical_formulae}
\end{itemize}
\subsection{Figures}
Figures and plots can be inserted using the \verb!\includegraphics[]{}! command which is normally encapsulated within a floating area defined by \verb!\begin{figure}\end{figure}!. Likewise equations, figures can be labeled and referenced automatically within the document, cf. Fig.~\ref{fig:Wanted}.
\begin{figure}
\centering
\includegraphics[width=0.5\columnwidth]{fig/Wanted.png} % Here comes the figure file path
\caption{Who knows that guy?}
\label{fig:Wanted}
\end{figure}
In engineering documents many figures are representing technical information such as block diagrams (cf. Fig.~\ref{fig:PI_Output}) or results from simulations (cf. Fig.~\ref{fig:Step_DQN_MPC_75}). In such cases it is highly recommended to use vector graphic formats which are normally embedded within pdf files. Compared to pixel-based graphics the resulting figure quality is crystal clear and requires (in most cases) much less data space.
\begin{figure}
\centering
\includegraphics[width=0.8\columnwidth]{fig/PI_Output.pdf}
\caption{Example of a block diagram (vector graphic)}
\label{fig:PI_Output}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\columnwidth]{fig/Step_DQN_MPC_75.pdf}
\caption{Example of a simulation result (also vector graphic)}
\label{fig:Step_DQN_MPC_75}
\end{figure}
Additional resources on figures:
\begin{itemize}
\item Some general information on importing graphics in \LaTeX: \url{https://en.wikibooks.org/wiki/LaTeX/Importing_Graphics}
\item Exporting figures from Matlab with \verb!print()!: \url{https://www.mathworks.com/help/matlab/ref/print.html}
\item External toolbox for Matlab figure exporting: \url{https://github.com/altmany/export_fig}
\item For drawing own vector graphics (e.g. for block diagrams) the open-source software Inkscape (\url{https://inkscape.org/}) is highly recommended.
\item With TikZ (\url{https://texample.net/tikz/examples/}) exists also an alternative to "draw" figures within \LaTeX. But it requires some time to get used to command line drawing.
\end{itemize}
\subsection{Tables}
Tables are also encapsulated in floats called via \verb!\begin{table}\end{table}! by default. An example can be found in Tab.~\ref{tab:fancy_Table}. There it should be noted that vertical lines are avoided -- which is a very good rule of thumb to create nice, easy readable tables. Additional resources:
\begin{itemize}
\item Background information on table types and definitions: \url{https://de.overleaf.com/learn/latex/tables}
\item Particular nice tables with \verb!booktabs!: \url{https://nhigham.com/2019/11/19/better-latex-tables-with-booktabs/}
\end{itemize}
\begin{table}[htb] % Position priority h = here, t = top next page and b = bottom next page
\centering
\caption{Fancy table}
\begin{tabular}{lcccc} % table with 5 columns, the first flush left the other 4 centered
\toprule
Models & precision & $\|\bm{x}\|_2$ & $\|\bm{x}\|_1$ & $\|\bm{x}\|_\infty$ \\
\midrule
model 1 & 0.67 & 0.8 & 0.729 & 0.75 \\
model 2 & 0.8 & 0.9 & 0.847 & 0.85 \\
\bottomrule
\end{tabular}
\label{tab:fancy_Table}
\end{table}
\subsection{Further specifications and hints}
\begin{itemize}
\item In most scientific papers American English is used. Stick to this convention for your solution.
\item Use concise, to the point sentences that guide the reader through the text. Most scientific publishers only accept papers of certain maximum length, so text space is precious. Also, nobody has time to read lengthy documents.
\item Avoid unobjective, emotional language -- remain neutral in your evaluation and factual in your choice of words.
\item Use Google (or another search engine of your choice): \LaTeX\ is the default typesetting framework for scientific texts. If you have any question on how to do something within \LaTeX\ or getting some compilation errors or searching for a beginners tutorial: you will find it with a simple internet research in no time.
\item You can write your solution in your free-of-charge Overleaf account or you can download the template and install a local \LaTeX\ distribution (cf. \url{https://www.latex-project.org/get/}) on your personal machine. In either case, just submit the final pdf as your homework solution and not the source files.
\item Be independent and get to the bottom of things. When starting to work in industry or academia your boss wants to see a solution solver and not problem deliverer (which includes writing nice texts in \LaTeX).
\end{itemize}
% End of introduction which should be deleted for your submission
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Your actual solution starts here %%%%
\section{Task 1}
Your solution goes here
\section{Task 2}
Your solution goes here
\section{Task ...}
Your solution goes here
\end{document}