2019-10-08 16:03:40 +02:00
#+TITLE : PhD Thesis
:DRAWER:
2021-05-19 19:21:46 +02:00
#+SUBTITLE : My subtitle
2019-10-08 16:03:40 +02:00
#+LANGUAGE : en
#+EMAIL : dehaeze.thomas@gmail.com
#+AUTHOR : Dehaeze Thomas
#+STARTUP : overview
#+DATE : {{{time(%Y-%m-%d)}}}
#+LATEX_CLASS : scrreprt
2021-12-09 15:56:34 +01:00
#+LATEX_CLASS_OPTIONS : [a4paper, twoside, 11pt, onecolumn, bibliography=totoc, openright, appendixprefix=true]
2019-10-08 16:03:40 +02:00
2021-12-09 17:22:40 +01:00
#+OPTIONS : num:t toc:nil ':t *:t -:t ::t <:nil author:t date:t tags:nil todo:nil |:t H:4 title:nil
2021-05-19 19:21:46 +02:00
#+SELECT_TAGS : export
#+EXCLUDE_TAGS : noexport
2021-05-19 17:32:47 +02:00
#+BIND : org-latex-bib-compiler "biber"
2019-10-08 16:03:40 +02:00
2021-05-19 17:32:47 +02:00
#+LATEX_HEADER : \input{config.tex}
#+LATEX_HEADER_EXTRA : \input{config_extra.tex}
2021-12-09 15:56:34 +01:00
#+LATEX_HEADER_EXTRA : \addbibresource{ref.bib}
#+PROPERTY : header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/tikz/org/}{config.tex}")
#+PROPERTY : header-args:latex+ :imagemagick t :fit yes
#+PROPERTY : header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY : header-args:latex+ :imoutoptions -quality 100
#+PROPERTY : header-args:latex+ :results file raw replace
#+PROPERTY : header-args:latex+ :buffer no
#+PROPERTY : header-args:latex+ :eval no-export
#+PROPERTY : header-args:latex+ :exports results
#+PROPERTY : header-args:latex+ :mkdirp yes
#+PROPERTY : header-args:latex+ :output-dir figs
#+PROPERTY : header-args:latex+ :post pdf2svg(file=*this*, ext="png")
2019-10-08 16:03:40 +02:00
:END:
2021-05-19 19:05:52 +02:00
* Build :noexport:
2019-10-08 16:03:40 +02:00
#+NAME : startblock
#+BEGIN_SRC emacs-lisp :results none
2021-05-19 17:32:47 +02:00
(add-to-list 'org-latex-classes
'("scrreprt"
"\\documentclass{scrreprt}"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
))
2021-12-09 17:22:40 +01:00
;; Remove automatic org heading labels
(defun my-latex-filter-removeOrgAutoLabels (text backend info)
"Org-mode automatically generates labels for headings despite explicit use of `#+LABEL`. This filter forcibly removes all automatically generated org-labels in headings."
(when (org-export-derived-backend-p backend 'latex)
(replace-regexp-in-string "\\\\label{sec:org[a-f0-9]+}\n" "" text)))
(add-to-list 'org-export-filter-headline-functions
'my-latex-filter-removeOrgAutoLabels)
2021-05-19 19:21:46 +02:00
;; Remove all org comments in the output LaTeX file
(defun delete-org-comments (backend)
(loop for comment in (reverse (org-element-map (org-element-parse-buffer)
'comment 'identity))
do
(setf (buffer-substring (org-element-property :begin comment)
(org-element-property :end comment))
"")))
(add-hook 'org-export-before-processing-hook 'delete-org-comments)
2021-05-19 17:32:47 +02:00
2021-05-19 19:21:46 +02:00
;; Use no package by default
(setq org-latex-packages-alist nil)
(setq org-latex-default-packages-alist nil)
2021-12-09 15:56:34 +01:00
;; Do not include the subtitle inside the title
2021-05-19 19:21:46 +02:00
(setq org-latex-subtitle-separate t)
(setq org-latex-subtitle-format "\\subtitle{%s}")
2021-05-19 17:32:47 +02:00
2021-12-09 16:54:14 +01:00
(setq org-export-before-parsing-hook '(org-ref-glossary-before-parsing
org-ref-acronyms-before-parsing))
#+END_SRC
2021-12-09 15:56:34 +01:00
2021-05-19 17:32:47 +02:00
* Glossary and Acronyms - Tables :ignore:
#+name : glossary
| label | name | description |
|-------+-------------------+-----------------------|
| ka | \ensuremath{k_a} | Actuator Stiffness in |
| phi | \ensuremath{\phi} | A woody bush |
#+name : acronyms
2021-12-09 15:56:34 +01:00
| key | abbreviation | full form |
|------+--------------+----------------------------------|
| mimo | MIMO | Multiple-Inputs Multiple-Outputs |
| siso | SISO | Single-Input Single-Output |
| nass | NASS | Nano Active Stabilization System |
| lti | LTI | Linear Time Invariant |
2021-05-19 17:32:47 +02:00
2021-05-19 19:21:46 +02:00
* Title Page :ignore:
#+begin_export latex
\begin{titlepage}
\vspace*{5cm}
\makeatletter
\begin{center}
\begin{Huge}
\@title
\end{Huge}\\[0.1cm]
%
\begin{Large}
\@subtitle
\end{Large}\\
%
\emph{by}\\
\@author
%
\vfill
A document submitted in partial fulfillment
of the requirements for the degree of\\
\emph{Technical Report}\\
at\\
\textsc{Miskatonic University}
\end{center}
\makeatother
\end{titlepage}
\newpage
\null
\thispagestyle{empty}
\newpage
#+end_export
2021-12-09 15:56:34 +01:00
* Abstract
:PROPERTIES:
:UNNUMBERED: notoc
:END:
* Résumé
:PROPERTIES:
:UNNUMBERED: notoc
:END:
* Acknowledgments
:PROPERTIES:
:UNNUMBERED: notoc
:END:
* Table of Contents :ignore:
#+begin_export latex
\dominitoc
\tableofcontents
\listoftables
\listoffigures
#+end_export
* Introduction
2021-05-19 17:32:47 +02:00
* Test
2021-12-09 15:56:34 +01:00
\minitoc
2021-12-09 17:22:40 +01:00
**** Abstract
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
2021-05-19 17:32:47 +02:00
** Test
2021-12-09 16:54:14 +01:00
A list:
2021-12-09 15:56:34 +01:00
- acronyms acrshort:nass acrshort:mimo acrshort:lti [[acrfull:siso ][Single-Input Single-Output (SISO) ]]
2021-05-19 17:32:47 +02:00
- glossary terms gls:ka, gls:phi.
2021-12-09 15:56:34 +01:00
- Bibliography citations: [[cite:&dehaeze21_activ_dampin_rotat_platf_using;&dehaeze21_mechat_approac_devel_nano_activ_stabil_system ]].
2021-12-09 16:54:14 +01:00
A definition list:
- this :: means that
- that :: means this
2021-12-09 15:56:34 +01:00
Some Footnote[fn: 1 ]
2021-05-19 17:32:47 +02:00
2021-12-09 17:22:40 +01:00
** Section
*** Sub section
2021-05-19 19:05:52 +02:00
2021-12-09 17:22:40 +01:00
This is a sub section.
*** Sub section
Start of the sub section
**** Paragraph
This is a paragraph
2021-05-19 19:05:52 +02:00
**** lksdfjasd
2021-12-09 17:22:40 +01:00
2021-05-19 19:05:52 +02:00
**** lksdfjasd
2021-12-09 17:22:40 +01:00
2021-05-19 19:05:52 +02:00
** blabla
2021-12-09 15:56:34 +01:00
* Source Blocks
2021-12-09 16:54:14 +01:00
\minitoc
2021-12-09 15:56:34 +01:00
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir >>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init >>
#+end_src
** Figures
#+begin_src matlab
t = 0:0.01:5; % Time [s]
x = sin(2*pi*t); % Output Voltage [V]
#+end_src
#+begin_src matlab
figure;
plot(t, x);
xlabel('Time [s]'); ylabel('Voltage [V]');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/matlab_fig_example.pdf', 'width', 'wide', 'height', 'normal');
#+end_src
#+name : fig:matlab_fig_example
#+caption : Matlab Figure
#+RESULTS :
[[file:figs/matlab_fig_example.png ]]
** Table Result
#+begin_src matlab
x = 1:10;
y = x.^2;
#+end_src
#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this* )
data2orgtable([x', y'], {}, {'$x$', '$y = x^2$'}, ' %.0f ');
#+end_src
#+name : tab:table_name
#+caption : Table caption
#+RESULTS :
| $x$ | $y = x^2$ |
|-----+-----------|
| 1 | 1 |
| 2 | 4 |
| 3 | 9 |
| 4 | 16 |
| 5 | 25 |
| 6 | 36 |
| 7 | 49 |
| 8 | 64 |
| 9 | 81 |
| 10 | 100 |
** Inline Results
Results can be automatically outputed as shown below.
#+begin_src matlab :results value replace
sqrt(2)
#+end_src
#+RESULTS :
: 1.4142
#+begin_src matlab :results output replace
y
#+end_src
#+RESULTS :
: y =
: 1 4 9 16 25 36 49 64 81 100
** Caption and Reference
Captions can be added to code blocks.
Moreover, we can link to specific bode blocks (Listing [[lst:matlab_figure ]] or [[lst:matlab_svd ]]).
#+name : lst:matlab_figure
#+caption : Code to produce a nice contour plot
#+begin_src matlab
figure;
[X,Y,Z] = peaks;
contour(X,Y,Z,20)
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/matlab_logo.pdf', 'width', 'small', 'height', 'normal');
#+end_src
#+name : fig:matlab_logo
#+caption : Obtained Contour Plot
#+RESULTS :
[[file:figs/matlab_logo.png ]]
#+name : lst:matlab_svd
#+caption : Code to compute the Singular Value Decomposition
#+begin_src matlab :results output replace
A = [1 2; 3 4; 5 6; 7 8]
[U,S,V] = svd(A)
#+end_src
#+RESULTS :
#+begin_example
A = [1 2; 3 4; 5 6; 7 8]
A =
1 2
3 4
5 6
7 8
[U,S,V] = svd(A)
U =
-0.152483233310201 -0.82264747222566 -0.394501022283829 -0.379959133877596
-0.349918371807964 -0.42137528768458 0.242796545704357 0.800655879510063
-0.547353510305727 -0.0201031031435029 0.697909975442776 -0.461434357387336
-0.74478864880349 0.381169081397575 -0.546205498863303 0.0407376117548695
S =
14.2690954992615 0
0 0.626828232417541
0 0
0 0
V =
-0.641423027995072 0.767187395072177
-0.767187395072177 -0.641423027995072
#+end_example
** Source Blocks with Line Numbers
Citation [[cite:&taghirad13_paral;&dehaeze21_activ_dampin_rotat_platf_using ]]
The Listing [[lst:matlab_line_numbers ]] has line numbers as the =-n= option was used.
Specific lines of codes can be referenced.
For instance, the code used to specify the wanted the vertical label is on line [[(test) ]].
#+name : lst:matlab_line_numbers
#+caption : Specify Labels
#+begin_src matlab +n -r
figure;
plot(t, x)
xlabel('Time [s]');
ylabel('Output [V]'); (ref:test)
#+end_src
Numbering can be continued by using =+n= option as shown below.
#+begin_src matlab +n
figure;
plot(t, u)
xlabel('Time [s]');
ylabel('Input [V]');
#+end_src
* Images
2021-12-09 16:54:14 +01:00
\minitoc
2021-12-09 15:56:34 +01:00
** Normal Image
Figure [[fig:general_control_names ]] shows the results of the Tikz code of listing [[lst:tikz_test ]].
#+name : lst:tikz_test
#+caption : Tikz code that is used to generate Figure [[fig:general_control_names]]
#+begin_src latex :file general_control_names.pdf :exports both
\begin{tikzpicture}
% Blocs
\node[block={2.0cm}{2.0cm}] (P) {$P$};
\node[block={1.5cm}{1.5cm}, below=0.7 of P] (K) {$K$};
% Input and outputs coordinates
\coordinate[] (inputw) at ($(P.south west)!0.75!(P.north west)$);
\coordinate[] (inputu) at ($(P.south west)!0.25!(P.north west)$);
\coordinate[] (outputz) at ($(P.south east)!0.75!(P.north east)$);
\coordinate[] (outputv) at ($(P.south east)!0.25!(P.north east)$);
% Connections and labels
\draw[<-] (inputw) node[above left, align=right]{(weighted)\\exogenous inputs\\$w$} -- ++(-1.5, 0);
\draw[<-] (inputu) -- ++(-0.8, 0) |- node[left, near start, align=right]{control signals\\$u$} (K.west);
\draw[->] (outputz) node[above right, align=left]{(weighted)\\exogenous outputs\\$z$} -- ++(1.5, 0);
\draw[->] (outputv) -- ++(0.8, 0) |- node[right, near start, align=left]{sensed output\\$v$} (K.east);
\end{tikzpicture}
#+end_src
#+name : fig:general_control_names
#+caption : General Control Configuration
#+RESULTS : lst:tikz_test
[[file:figs/general_control_names.png ]]
** Sub Images
Link to subfigure [[fig:general_control_names_1 ]].
#+name : fig:subfigure
#+caption : Subfigure Caption
#+attr_latex : :environment subfigure :width 0.49\linewidth :align c
| file:figs/general_control_names.png | file:figs/general_control_names.png |
| <<fig:general_control_names_1>> sub figure caption | <<fig:general_control_names_2>> sub figure caption |
* Tables
2021-12-09 16:54:14 +01:00
\minitoc
2021-12-09 15:56:34 +01:00
Table [[tab:table_with_equations ]] shows a table with some mathematics inside.
#+name : tab:table_with_equations
#+caption : A Simple table with included math
| $N$ | $N^2$ | $N^3$ | $N^4$ | $\sqrt n$ | $\sqrt[4]N$ |
|-----+-------+-------+-------+-----------+-------------|
| 1 | 1 | 1 | 1 | 1 | 1 |
| 2 | 4 | 8 | 16 | 1.4142136 | 1.1892071 |
| 3 | 9 | 27 | 81 | 1.7320508 | 1.3160740 |
#+TBLFM : $2=$1^2::$3=$1^3::$4=$1^4::$5=sqrt($1)::$6=sqrt(sqrt(($1)))
#+name : tab:table_without_head
#+caption : Table without Head
| | *1* | *2* | *3* | *4* | *5* |
| *1* | 1 | 2 | 3 | 4 | 5 |
| *2* | 2 | 4 | 6 | 8 | 10 |
| *3* | 3 | 6 | 9 | 12 | 15 |
| *4* | 4 | 8 | 12 | 16 | 20 |
| *5* | 5 | 10 | 15 | 20 | 25 |
#+name : tab:table_multiple_heads
#+ATTR_LATEX : :font \footnotesize
#+caption : Table with multiples groups
| | *Classical Control* | *Modern Control* | *Robust Control* |
| <l> | <c> | <c> | <c> |
|-------------------------+------------------------------------+--------------------------------------+-------------------------------------------------------------------------|
| *Date* | 1930- | 1960- | 1980- |
|-------------------------+------------------------------------+--------------------------------------+-------------------------------------------------------------------------|
| *Tools* | Transfer Functions | State Space formulation | Disk margin |
| | Nyquist Plots | Riccati Equations | Systems and Signals Norms ($\mathcal{H}_\infty$, $\mathcal{H}_2$ Norms) |
| | Bode Plots | | Closed Loop Transfer Functions |
| | Phase and Gain margins | | Weighting Functions |
|-------------------------+------------------------------------+--------------------------------------+-------------------------------------------------------------------------|
| *Control Architectures* | Proportional, Integral, Derivative | Full State Feedback | General Control Configuration |
| | Leads, Lags | LQR, LQG | |
| | | Kalman Filters | |
|-------------------------+------------------------------------+--------------------------------------+-------------------------------------------------------------------------|
| *Advantages* | Study Stability | Automatic Synthesis | Automatic Synthesis |
| | Simple | MIMO | MIMO |
| | Natural | Optimization Problem | Optimization Problem |
| | | | Guaranteed Robustness |
| | | | Easy specification of performances |
|-------------------------+------------------------------------+--------------------------------------+-------------------------------------------------------------------------|
| *Disadvantages* | Manual Method | No Guaranteed Robustness | Required knowledge of specific tools |
| | Only SISO | Difficult Rejection of Perturbations | Need a reasonably good model of the system |
2021-05-19 19:05:52 +02:00
2021-12-09 16:54:14 +01:00
* Appendix :ignore:
#+latex : \appendix
* Mathematical formulas
* Comments on something
2021-05-19 17:32:47 +02:00
* Bibliography :ignore:
2021-12-09 15:56:34 +01:00
#+latex : \printbibliography[heading=bibintoc,title={Bibliography}]
2021-12-09 16:54:14 +01:00
* List of Publications
:PROPERTIES:
:UNNUMBERED: notoc
:END:
#+begin_export latex
\begin{refsection}[ref.bib]
% List all papers even if not cited
\nocite{*}
% Sort by year
\newrefcontext[sorting=ynt]
% Articles
\printbibliography[keyword={publication},heading= {subbibliography},title={Articles},env=mypubs,type= {article}]
% Proceedings
\printbibliography[keyword={publication},heading= {subbibliography},title={In Proceedings},env=mypubs,type= {inproceedings}]
\end{refsection}
#+end_export
2021-05-19 17:32:47 +02:00
* Glossary :ignore:
#+latex : \printglossary[type=\acronymtype]
#+latex : \printglossary
2021-12-09 15:56:34 +01:00
* Footnotes
[fn:1]this is a footnote with citation [[cite:&dehaeze21_mechat_approac_devel_nano_activ_stabil_system ]].