#+TITLE: Tikz Figures
:DRAWER:
#+HTML_LINK_HOME: ../index.html
#+HTML_LINK_UP: ../index.html
#+HTML_HEAD:
#+HTML_HEAD:
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{/home/thomas/Cloud/thesis/papers/dehaeze21_mechatronics_approach_nass/tikz/}{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+ :eval no-export
#+PROPERTY: header-args:latex+ :exports both
#+PROPERTY: header-args:latex+ :mkdirp yes
#+PROPERTY: header-args:latex+ :output-dir figs
#+PROPERTY: header-args:latex+ :post pdf2svg(file=*this*, ext="png")
:END:
* Mechatronic Approach
#+begin_src latex :file nass_mechatronics_approach.pdf
\graphicspath{ {/home/thomas/Cloud/thesis/papers/dehaeze21_mechatronics_approach_nass/tikz/figs-tikz} }
\begin{tikzpicture}
% Styles
\tikzset{myblock/.style= {draw, fill=white, text width=3cm, align=center, minimum height=1.8cm}};
\tikzset{mylabel/.style= {anchor=north, below, font=\bfseries\small, color=black, text width=3cm, align=center}};
\tikzset{mymodel/.style= {anchor=south, above, font=\small, color=black, text width=3cm, align=center}};
\tikzset{mystep/.style= {->, ultra thick}};
% Blocks
\node[myblock, fill=lightblue, draw, label={[mylabel, text width=9.8cm] Dynamical Models / Simulations / Control}, minimum height = 6cm, text width = 9.8cm] (model) at (0, 0) {};
\node[myblock, fill=lightgreen, label={[mylabel] $\mu$ Station}, left = 3 of model.south west, anchor=south east] (mustation) {};
\node[myblock, fill=lightgreen, label={[mylabel] Disturbances}, left = 3 of model.west] (dist) {};
\node[myblock, fill=lightgreen, label={[mylabel] $\nu$ Hexapod}, left = 3 of model.north west, anchor=north east] (nanohexapod) {};
\node[myblock, fill=lightyellow, label={[mylabel] Mech. Design}, above = 1 of model.north] (mechanical) {};
\node[myblock, fill=lightyellow, label={[mylabel] Instrumentation}, left = 1 of mechanical] (instrumentation) {};
\node[myblock, fill=lightyellow, label={[mylabel] FEM}, right = 1 of mechanical] (fem) {};
\node[myblock, fill=lightred, label={[mylabel] Assembly}, right = 3 of model.north east, anchor=north west] (mounting) {};
\node[myblock, fill=lightred, label={[mylabel] Test Benches}, right = 3 of model.east] (testbenches) {};
\node[myblock, fill=lightred, label={[mylabel] Implementation}, right = 3 of model.south east, anchor=south west] (implementation) {};
% Text
\node[mymodel] at (mustation.south) {Multiple stages\\Complex dynamics\\Solid bodies};
\node[mymodel] at (dist.south) {Ground motion\\Vibrations\\Position errors};
\node[mymodel] at (nanohexapod.south) {Different concepts\\ Optimal geometry \\ Choice of sensors};
\node[mymodel] at (instrumentation.south) {Sensors, Actuators\\Amplifiers\\Control electronics};
\node[mymodel] at (mechanical.south) {Parts optimization\\Proper integration\\Ease of assembly};
\node[mymodel] at (fem.south) {Optimize key parts:\\Flexible joints\\Plates};
\node[mymodel] at (mounting.south) {Mounting Tools:\\Struts\\ Nano-Hexapod};
\node[mymodel] at (testbenches.south) {Instrumentation\\APA, Struts\\Hexapod};
\node[mymodel] at (implementation.south) {Test Benches\\$\mu$ Station};
% Links
\draw[->] (dist.east) -- node[above, midway]{Measurements} node[below,midway]{} (dist.east-|model.west);
\draw[->] (mustation.east) -- node[above, midway]{Measurements} node[below, midway]{CAD Model} (mustation.east-|model.west);
\draw[->] ($(nanohexapod.east-|model.west)+(0, 0.2)$) -- node[above, midway]{Optimization} ($(nanohexapod.east)+(0, 0.2)$);
\draw[<-] ($(nanohexapod.east-|model.west)-(0, 0.2)$) -- node[below, midway]{Model} ($(nanohexapod.east)-(0, 0.2)$);
\draw[->] ($(fem.south|-model.north)+(0.2, 0)$) -- node[right, midway]{Specif.} ($(fem.south)+(0.2,0)$);
\draw[<-] ($(fem.south|-model.north)-(0.2, 0)$) -- node[left, midway,align=right]{Super\\Element} ($(fem.south)-(0.2,0)$);
\draw[->] ($(mechanical.south|-model.north)+(0.2, 0)$) -- node[right, midway]{Specif.} ($(mechanical.south)+(0.2,0)$);
\draw[<-] ($(mechanical.south|-model.north)-(0.2, 0)$) -- node[left, midway]{3D parts} ($(mechanical.south)-(0.2,0)$);
\draw[->] ($(instrumentation.south|-model.north)+(0.2, 0)$) -- node[right, midway]{Specif.} ($(instrumentation.south)+(0.2,0)$);
\draw[<-] ($(instrumentation.south|-model.north)-(0.2, 0)$) -- node[left, midway]{Model} ($(instrumentation.south)-(0.2,0)$);
\draw[->] ($(testbenches.west-|model.east)+(0, 0.2)$) -- node[above, midway]{Control Laws} ($(testbenches.west)+(0, 0.2)$);
\draw[<-] ($(testbenches.west-|model.east)-(0, 0.2)$) -- node[below, midway]{Refinement} ($(testbenches.west)-(0, 0.2)$);
\draw[->] ($(implementation.west-|model.east)+(0, 0.2)$) -- node[above, midway]{Control Laws} ($(implementation.west)+(0, 0.2)$);
\draw[<-] ($(implementation.west-|model.east)-(0, 0.2)$) -- node[below, midway]{Refinement} ($(implementation.west)-(0, 0.2)$);
% Main steps
\node[font=\bfseries, rotate=90, anchor=south, above] (conceptual_phase_node) at (dist.west) {Conceptual Phase};
\node[font=\bfseries, above] (detailed_phase_node) at (mechanical.north) {Detail Design Phase};
\node[font=\bfseries, rotate=-90, anchor=south, above] (implementation_phase_node) at (testbenches.east) {Experimental Phase};
\begin{scope}[on background layer]
\node[fit={(conceptual_phase_node.north|-nanohexapod.north) (mustation.south east)}, fill=lightgreen!50!white, draw, dashed, inner sep=2pt] (conceptual_phase) {};
\node[fit={(detailed_phase_node.north-|instrumentation.west) (fem.south east)}, fill=lightyellow!50!white, draw, dashed, inner sep=2pt] (detailed_phase) {};
\node[fit={(implementation_phase_node.north|-mounting.north) (implementation.south west)}, fill=lightred!50!white, draw, dashed, inner sep=2pt] (implementation_phase) {};
% \node[above left] at (dob.south east) {DOB};
\end{scope}
% Between main steps
\draw[mystep, dashed, postaction={decorate,decoration={raise=1ex,text along path,text align=center,text={Concept Validation}}}] (conceptual_phase.north) to[out=90, in=180] (detailed_phase.west);
\draw[mystep, dashed, postaction={decorate,decoration={raise=1ex,text along path,text align=center,text={Procurement}}}] (detailed_phase.east) to[out=0, in=90] (implementation_phase.north);
% % Inside Model
% \node[inner sep=1pt, outer sep=6pt, anchor=north west, draw, fill=white, thin] (multibodymodel) at ($(model.north west) - (0, 0.5)$)
% {\includegraphics[width=5.6cm]{simscape_nano_hexapod.png}};
% \node[inner sep=1pt, outer sep=6pt, anchor=south west, draw, fill=white, thin] (simscape) at (model.south west)
% {\includegraphics[width=5.6cm]{simscape_picture.jpg}};
% % Feedback Model
% \node[inner sep=3pt, outer sep=6pt, anchor=north east, draw, fill=white, thin] (simscape_sim) at ($(model.north east) - (0, 0.5)$)
% {\includegraphics[width=3.6cm]{simscape_simulations.pdf}};
% % FeedBack
% \node[inner sep=3pt, outer sep=6pt, anchor=south east, draw, fill=white, thin] (feedback) at (model.south east)
% {\includegraphics[width=3.6cm]{classical_feedback_small.pdf}};
\end{tikzpicture}
#+end_src
#+RESULTS:
[[file:figs/nass_mechatronics_approach.png]]
* Schematic Representation - NASS
#+begin_src latex :file nass_concept_schematic.pdf
\begin{tikzpicture}
% Parameters
\def\blockw{6.0cm}
\def\blockh{1.2cm}
% Translation Stage
\begin{scope}
% Translation Stage - fixed part
\draw[fill=black!40] (-0.5*\blockw, 0) coordinate[](tyb) rectangle (0.5*\blockw, 0.15*\blockh);
\coordinate[] (measposbot) at (0.5*\blockw, 0);
% Tilt
\path[] ([shift=(-120:4*\blockh)]0, 4.9*\blockh) coordinate(beginarc) arc (-120:-110:4*\blockh) %
-- ([shift=(-70:4*\blockh)]0, 4.9*\blockh) arc (-70:-60:4*\blockh)%
|- ++(-0.15*\blockw, 0.6*\blockh) coordinate (spindlene)%
|- ($(beginarc) + (0.15*\blockw, 0.2*\blockh)$) coordinate (spindlesw) -- ++(0, 0.4*\blockh) coordinate(tiltte) -| cycle;
% Spindle
\coordinate[] (spindlese) at (spindlesw-|spindlene);
\draw[fill=black!30] ($(spindlese)+(-0.1,0.1)+(-0.1*\blockw, 0)$) -| ($(spindlene)+(-0.1, 0)$) -| coordinate[pos=0.25](spindletop) ($(spindlesw)+(0.1,0.1)$) -| ++(0.1*\blockw, -\blockh) -| coordinate[pos=0.25](spindlebot) cycle;
\draw[dashed, color=black!60] ($(spindletop)+(0, 0.2)$) -- ($(spindlebot)+(0,-0.2)$);
% Tilt
\draw[fill=black!60] ([shift=(-120:4*\blockh)]0, 4.9*\blockh) coordinate(beginarc) arc (-120:-110:4*\blockh) %
-- ([shift=(-70:4*\blockh)]0, 4.9*\blockh) arc (-70:-60:4*\blockh)%
|- ++(-0.15*\blockw, 0.6*\blockh) coordinate (spindlene)%
|- ($(beginarc) + (0.15*\blockw, 0.2*\blockh)$) coordinate (spindlesw) -- ++(0, 0.4*\blockh) -| cycle;
% Translation Stage - mobile part
\draw[fill=black!10, fill opacity=0.5] (-0.5*\blockw, 0.2*\blockh) -- (-0.5*\blockw, 1.5*\blockh) coordinate[](tyt) -- (0.5*\blockw, 1.5*\blockh) -- (0.5*\blockw, 0.2*\blockh) -- (0.35*\blockw, 0.2*\blockh) -- (0.35*\blockw, 0.8*\blockh) -- (-0.35*\blockw, 0.8*\blockh) -- (-0.35*\blockw, 0.2*\blockh) -- cycle;
% Translation Guidance
\draw[dashed, color=black!60] ($(-0.5*\blockw, 0)+( 0.075*\blockw,0.5*\blockh)$) circle (0.2*\blockh);
\draw[dashed, color=black!60] ($( 0.5*\blockw, 0)+(-0.075*\blockw,0.5*\blockh)$) circle (0.2*\blockh);
% Tilt Guidance
\draw[dashed, color=black!60] ([shift=(-110:4*\blockh)]0, 4.8*\blockh) arc (-110:-120:4*\blockh);
\draw[dashed, color=black!60] ([shift=( -70:4*\blockh)]0, 4.8*\blockh) arc (-70:-60:4*\blockh);
\end{scope}
% Micro-Hexapod
\begin{scope}[shift={(spindletop)}]
% Parameters definitions
\def\baseh{0.2*\blockh} % Height of the base
\def\naceh{0.2*\blockh} % Height of the nacelle
\def\baser{0.22*\blockw} % Radius of the base
\def\nacer{0.18*\blockw} % Radius of the nacelle
\def\armr{0.2*\blockh} % Radius of the arms
\def\basearmborder{0.2}
\def\nacearmborder{0.2}
\def\xnace{0} \def\ynace{\blockh-\naceh} \def\anace{0}
\def\xbase{0} \def\ybase{0} \def\abase{0}
% Hexapod1
\begin{scope}[shift={(\xbase, \ybase)}, rotate=\abase]
% Base
\draw[fill=white] (-\baser, 0) coordinate[](uhexabot) rectangle (\baser, \baseh);
\coordinate[] (armbasel) at (-\baser+\basearmborder+\armr, \baseh);
\coordinate[] (armbasec) at (0, \baseh);
\coordinate[] (armbaser) at (\baser-\basearmborder-\armr, \baseh);
% Nacelle1
\begin{scope}[shift={(\xnace, \ynace)}, rotate=\anace]
\draw[fill=white] (-\nacer, 0) rectangle (\nacer, \naceh);
\coordinate[] (uhexatop) at (0, \naceh);
\coordinate[] (armnacel) at (-\nacer+\nacearmborder+\armr, 0);
\coordinate[] (armnacec) at (0, 0);
\coordinate[] (armnacer) at (\nacer-\nacearmborder-\armr, 0);
\end{scope}
% Nacelle1 END
\draw[] (armbasec) -- (armnacer);
\draw[] (armbasec) -- (armnacel);
\draw[] (armbasel) -- (armnacel);
\draw[] (armbasel) -- (armnacec);
\draw[] (armbaser) -- (armnacec);
\draw[] (armbaser) -- (armnacer);
\end{scope}
\end{scope}
% NASS
\begin{scope}[shift={(uhexatop)}]
% Parameters definitions
\def\baseh{0.1*\blockh} % Height of the base
\def\naceh{0.1*\blockh} % Height of the nacelle
\def\baser{0.16*\blockw} % Radius of the base
\def\nacer{0.14*\blockw} % Radius of the nacelle
\def\armr{0.1*\blockh} % Radius of the arms
\def\basearmborder{0.2}
\def\nacearmborder{0.2}
\def\xnace{0} \def\ynace{0.6*\blockh-\naceh} \def\anace{0}
\def\xbase{0} \def\ybase{0} \def\abase{0}
% Hexapod1
\begin{scope}[shift={(\xbase, \ybase)}, rotate=\abase]
% Base
\draw[fill=red!50!black] (-\baser, 0) coordinate[](nhexabot) rectangle (\baser, \baseh);
\coordinate[] (armbasel) at (-\baser+\basearmborder+\armr, \baseh);
\coordinate[] (armbasec) at (0, \baseh);
\coordinate[] (armbaser) at (\baser-\basearmborder-\armr, \baseh);
% Nacelle1
\begin{scope}[shift={(\xnace, \ynace)}, rotate=\anace]
\draw[fill=red!50!black] (-\nacer, 0) rectangle (\nacer, \naceh);
\coordinate[] (nhexatop) at (0, \naceh);
\coordinate[] (armnacel) at (-\nacer+\nacearmborder+\armr, 0);
\coordinate[] (armnacec) at (0, 0);
\coordinate[] (armnacer) at (\nacer-\nacearmborder-\armr, 0);
\coordinate[] (measpostop) at (\nacer, \naceh);
\end{scope}
% Nacelle1 END
\draw[color=red!50!black] (armbasec) -- (armnacer);
\draw[color=red!50!black] (armbasec) -- (armnacel);
\draw[color=red!50!black] (armbasel) -- (armnacel);
\draw[color=red!50!black] (armbasel) -- (armnacec);
\draw[color=red!50!black] (armbaser) -- (armnacec);
\draw[color=red!50!black] (armbaser) -- (armnacer);
% Force actuator
\coordinate[] (nassfbot) at (0.8*\baser, \baseh);
\coordinate[] (nassftop) at (armnacec-|nassfbot);
\end{scope}
\end{scope}
% Sample
\begin{scope}[shift={(nhexatop)}]
\draw[fill=white] (-0.1*\blockw, 0) coordinate[](samplebot) rectangle coordinate[pos=0.5](samplecenter) (0.1*\blockw, \blockh) coordinate[](sampletop);
\end{scope}
% Laser
\begin{scope}[shift={(samplecenter)}]
\draw[color=red, -<-=0.5] (samplecenter) node[circle, fill=red, inner sep=0pt, minimum size=3pt]{} -- node[midway, above, color=black]{X-ray} ($(samplecenter)+(0.5*\blockw,0)$);
\end{scope}
%% Measurement
\draw[dashed, color=black!50] (measposbot) -- ++(0.8,0) coordinate (measposbotend);
\draw[dashed, color=black!50] (measpostop) -- (measpostop-|measposbotend) coordinate (measpostopend);
\draw[<->, dashed] ($(measposbotend)+(-0.2, 0)$) -- node[midway, left](d){$d$} ($(measpostopend)+(-0.2, 0)$);
%% Control
\draw[<->, line width=0.5pt] (nassfbot) -- node[midway, right](F){$F$} (nassftop);
\node[draw, block={2.3em}{1.7em}, right=0.3 of F] (K){$K$};
\draw[->] (d.west) -| ($(K.east)+(0.5, 0)$) -- (K.east);
\draw[->] (K.west) -- (F.east);
\end{tikzpicture}
#+end_src