182 lines
7.0 KiB
Org Mode
182 lines
7.0 KiB
Org Mode
|
#+TITLE: Simscape Model - Nano Hexapod
|
||
|
:DRAWER:
|
||
|
#+LANGUAGE: en
|
||
|
#+EMAIL: dehaeze.thomas@gmail.com
|
||
|
#+AUTHOR: Dehaeze Thomas
|
||
|
|
||
|
#+HTML_LINK_HOME: ../index.html
|
||
|
#+HTML_LINK_UP: ../index.html
|
||
|
|
||
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
|
||
|
#+HTML_HEAD: <script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
|
||
|
|
||
|
#+BIND: org-latex-image-default-option "scale=1"
|
||
|
#+BIND: org-latex-image-default-width ""
|
||
|
|
||
|
#+LaTeX_CLASS: scrreprt
|
||
|
#+LaTeX_CLASS_OPTIONS: [a4paper, 10pt, DIV=12, parskip=full, bibliography=totoc]
|
||
|
#+LaTeX_HEADER_EXTRA: \input{preamble.tex}
|
||
|
#+LATEX_HEADER_EXTRA: \bibliography{simscape-nano-hexapod.bib}
|
||
|
|
||
|
#+BIND: org-latex-bib-compiler "biber"
|
||
|
|
||
|
#+PROPERTY: header-args:matlab :session *MATLAB*
|
||
|
#+PROPERTY: header-args:matlab+ :comments org
|
||
|
#+PROPERTY: header-args:matlab+ :exports none
|
||
|
#+PROPERTY: header-args:matlab+ :results none
|
||
|
#+PROPERTY: header-args:matlab+ :eval no-export
|
||
|
#+PROPERTY: header-args:matlab+ :noweb yes
|
||
|
#+PROPERTY: header-args:matlab+ :mkdirp yes
|
||
|
#+PROPERTY: header-args:matlab+ :output-dir figs
|
||
|
#+PROPERTY: header-args:matlab+ :tangle no
|
||
|
|
||
|
#+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+ :tangle 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")
|
||
|
:END:
|
||
|
|
||
|
#+begin_export html
|
||
|
<hr>
|
||
|
<p>This report is also available as a <a href="./simscape-nano-hexapod.pdf">pdf</a>.</p>
|
||
|
<hr>
|
||
|
#+end_export
|
||
|
|
||
|
#+latex: \clearpage
|
||
|
|
||
|
* Build :noexport:
|
||
|
#+NAME: startblock
|
||
|
#+BEGIN_SRC emacs-lisp :results none :tangle no
|
||
|
(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}")
|
||
|
))
|
||
|
|
||
|
|
||
|
;; 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)
|
||
|
|
||
|
;; 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)
|
||
|
|
||
|
;; Use no package by default
|
||
|
(setq org-latex-packages-alist nil)
|
||
|
(setq org-latex-default-packages-alist nil)
|
||
|
|
||
|
;; Do not include the subtitle inside the title
|
||
|
(setq org-latex-subtitle-separate t)
|
||
|
(setq org-latex-subtitle-format "\\subtitle{%s}")
|
||
|
|
||
|
(setq org-export-before-parsing-hook '(org-ref-glossary-before-parsing
|
||
|
org-ref-acronyms-before-parsing))
|
||
|
#+END_SRC
|
||
|
|
||
|
* Notes :noexport:
|
||
|
|
||
|
Based on:
|
||
|
- [ ] Add some sections from here: [[file:~/Cloud/work-projects/ID31-NASS/matlab/stewart-simscape/org/index.org]]
|
||
|
For instance:
|
||
|
- [ ] [[file:~/Cloud/work-projects/ID31-NASS/matlab/stewart-simscape/org/stewart-architecture.org][stewart architecture]]
|
||
|
- [ ] [[file:~/Cloud/work-projects/ID31-NASS/matlab/stewart-simscape/org/kinematic-study.org][kinematic study]]
|
||
|
- [ ] [[file:~/Cloud/work-projects/ID31-NASS/matlab/stewart-simscape/org/identification.org][stewart platform - dynamics]]
|
||
|
- [ ] [[file:~/Cloud/work-projects/ID31-NASS/matlab/stewart-simscape/org/cubic-configuration.org][cubic configuration]]
|
||
|
- [ ] Look at the [[file:~/Cloud/work-projects/ID31-NASS/documents/state-of-thesis-2020/index.org][NASS 2020 report]]
|
||
|
- [ ] [[file:~/Cloud/work-projects/ID31-NASS/matlab/nass-simscape/org/amplified_piezoelectric_stack.org][amplified_piezoelectric_stack]] (Just use 2DoF here)
|
||
|
- [ ] [[file:~/Cloud/work-projects/ID31-NASS/matlab/nass-simscape/org/nano_hexapod.org][nano_hexapod]] (it seems this report is already after the detailed design phase)
|
||
|
- [ ] Should the study of effect of flexible joints be included here?
|
||
|
|
||
|
* Introduction :ignore:
|
||
|
|
||
|
Goal of this report is:
|
||
|
- show what is an hexapod, how we can define its geometry, stiffness, etc...
|
||
|
- Some kinematics: stiffness matrix, mass matrix, etc...
|
||
|
- talk about cubic architecture?
|
||
|
|
||
|
#+name: tab:simscape_nhexapod_section_matlab_code
|
||
|
#+caption: Report sections and corresponding Matlab files
|
||
|
#+attr_latex: :environment tabularx :width 0.6\linewidth :align lX
|
||
|
#+attr_latex: :center t :booktabs t
|
||
|
| *Sections* | *Matlab File* |
|
||
|
|------------------+--------------------------|
|
||
|
| Section ref:sec: | =simscape_nhexapod_1_.m= |
|
||
|
|
||
|
* Nano-Hexapod Kinematics
|
||
|
:PROPERTIES:
|
||
|
:HEADER-ARGS:matlab+: :tangle matlab/.m
|
||
|
:END:
|
||
|
<<sec:simscape_nhexapod_kinematics>>
|
||
|
** Introduction :ignore:
|
||
|
|
||
|
** 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
|
||
|
|
||
|
#+begin_src matlab :tangle no :noweb yes
|
||
|
<<m-init-path>>
|
||
|
#+end_src
|
||
|
|
||
|
#+begin_src matlab :eval no :noweb yes
|
||
|
<<m-init-path-tangle>>
|
||
|
#+end_src
|
||
|
|
||
|
#+begin_src matlab :noweb yes
|
||
|
<<m-init-other>>
|
||
|
#+end_src
|
||
|
|
||
|
* Conclusion
|
||
|
<<sec:simscape_nhexapod_conclusion>>
|
||
|
|
||
|
* Bibliography :ignore:
|
||
|
#+latex: \printbibliography[heading=bibintoc,title={Bibliography}]
|
||
|
|
||
|
* Helping Functions :noexport:
|
||
|
** Initialize Path
|
||
|
#+NAME: m-init-path
|
||
|
#+BEGIN_SRC matlab
|
||
|
%% Path for functions, data and scripts
|
||
|
addpath('./matlab/mat/'); % Path for data
|
||
|
addpath('./matlab/'); % Path for scripts
|
||
|
#+END_SRC
|
||
|
|
||
|
#+NAME: m-init-path-tangle
|
||
|
#+BEGIN_SRC matlab
|
||
|
%% Path for functions, data and scripts
|
||
|
addpath('./mat/'); % Path for data
|
||
|
#+END_SRC
|
||
|
|
||
|
** Initialize other elements
|
||
|
#+NAME: m-init-other
|
||
|
#+BEGIN_SRC matlab
|
||
|
%% Colors for the figures
|
||
|
colors = colororder;
|
||
|
#+END_SRC
|