nass-simscape/uniaxial/index.org

2602 lines
100 KiB
Org Mode
Raw Normal View History

#+TITLE: Simscape Uniaxial Model
:DRAWER:
#+STARTUP: overview
#+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="../css/htmlize.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../css/readtheorg.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../css/zenburn.css"/>
#+HTML_HEAD: <script type="text/javascript" src="../js/jquery.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="../js/bootstrap.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="../js/jquery.stickytableheaders.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="../js/readtheorg.js"></script>
#+HTML_MATHJAX: align: center tagside: right font: TeX
#+PROPERTY: header-args:matlab :session *MATLAB*
#+PROPERTY: header-args:matlab+ :comments org
#+PROPERTY: header-args:matlab+ :results none
#+PROPERTY: header-args:matlab+ :exports both
#+PROPERTY: header-args:matlab+ :eval no-export
#+PROPERTY: header-args:matlab+ :output-dir figs
#+PROPERTY: header-args:matlab+ :tangle matlab/modal_frf_coh.m
#+PROPERTY: header-args:matlab+ :mkdirp yes
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{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 raw replace :buffer no
#+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
:END:
* Introduction :ignore:
The idea is to use the same model as the full Simscape Model but to restrict the motion only in the vertical direction.
This is done in order to more easily study the system and evaluate control techniques.
2019-10-25 12:33:08 +02:00
* Simscape Model
A schematic of the uniaxial model used for simulations is represented in figure [[fig:uniaxial-model-nass-flexible]].
The perturbations $w$ are:
- $F_s$: direct forces applied to the sample such as inertia forces and cable forces
- $F_{rz}$: parasitic forces due to the rotation of the spindle
- $F_{ty}$: parasitic forces due to scans with the translation stage
- $D_w$: ground motion
The quantity to $z$ to control is:
- $D$: the position of the sample with respect to the granite
The measured quantities $v$ are:
- $D$: the position of the sample with respect to the granite
We study the use of an additional sensor:
- $F_n$: a force sensor located in the nano-hexapod
- $v_n$: an absolute velocity sensor located on the top platform of the nano-hexapod
- $d_r$: a relative motion sensor located in the nano-hexapod
The control signal $u$ is:
- $F$ the force applied by the nano-hexapod actuator
#+begin_src latex :file uniaxial-model-nass-flexible.pdf :post pdf2svg(file=*this*, ext="png") :exports results
\begin{tikzpicture}
% ====================
% Parameters
% ====================
\def\massw{2.2} % Width of the masses
\def\massh{0.8} % Height of the masses
\def\spaceh{1.2} % Height of the springs/dampers
\def\dispw{0.4} % Width of the dashed line for the displacement
\def\disph{0.3} % Height of the arrow for the displacements
\def\bracs{0.05} % Brace spacing vertically
\def\brach{-12pt} % Brace shift horizontaly
\def\fsensh{0.2} % Height of the force sensor
\def\velsize{0.2} % Size of the velocity sensor
% ====================
% ====================
% Ground
% ====================
\draw (-0.5*\massw, 0) -- (0.5*\massw, 0);
\draw[dashed] (0.5*\massw, 0) -- ++(1, 0);
\draw[->, dasehd] (0.5*\massw+0.8, 0) -- ++(0, 0.5) node[right]{$D_{w}$};
% ====================
% ====================
% Marble
\begin{scope}[shift={(0, 0)}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{m}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{m}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{m}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Marble};
% Displacements
\draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(2*\dispw, 0) coordinate(xm) -- ++(2.2*\dispw, 0) coordinate(dbot);
\end{scope}
% ====================
% ====================
% Ty
\begin{scope}[shift={(0, \spaceh+\massh)}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{t}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{t}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{t}$};
\draw[actuator={0.45}{0.2}] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](ft){$F_{ty}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Ty};
\end{scope}
% ====================
% ====================
% Rz
\begin{scope}[shift={(0, 2*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{z}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{z}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{z}$};
\draw[actuator] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](F){$F_{rz}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Rz};
\end{scope}
% ====================
% ====================
% Hexapod
\begin{scope}[shift={(0, 3*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{h}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{h}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{h}$};
% Displacements
% \draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(3*\dispw, 0) coordinate(drbot);
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Hexapod};
\end{scope}
% ====================
% ====================
% NASS
\begin{scope}[shift={(0, 4*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{n}$};
% % Force Sensor
% \node[forcesensor={\massw}{\fsensh}] (fsensn) at (0, \spaceh-\fsensh){};
% \node[right] at (fsensn.east) {$F_n$};
% % Velocity Sensor
% \node[inertialsensor={\velsize}] (veln) at (0.5*\massw, \spaceh+\massh) {};
% \node[right] at (veln.north east) {$v_n$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{n}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{n}$};
\draw[actuator] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](F){$F$};
% % Displacements
% \draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(2*\dispw, 0) coordinate(xn) -- ++(\dispw, 0) coordinate(drtop);
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{NASS};
\end{scope}
% ====================
% ====================
% sample
\begin{scope}[shift={(0, 5*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{s}$};
% External Force
\draw[->] (0, \spaceh+\massh) node[]{$\bullet$} -- ++(0, 0.5*\massh) node[right]{$F_s$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{s}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{s}$};
% Displacements
\draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(2*\dispw, 0) coordinate(xs) -- ++(2.2*\dispw, 0) coordinate(dtop);
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Sample};
\end{scope}
% ====================
\draw[<->] ($(dbot)+(-0.3,0)$) --node[midway, right]{$D$} ($(dtop)+(-0.3,0)$);
\end{tikzpicture}
#+end_src
#+name: fig:uniaxial-model-nass-flexible
#+caption: Schematic of the uniaxial model used
#+RESULTS:
[[file:figs/uniaxial-model-nass-flexible.png]]
Few active damping techniques will be compared in order to decide which sensor is to be included in the system.
Schematics of the active damping techniques are displayed in figure [[fig:uniaxial-model-nass-flexible-active-damping]].
#+begin_src latex :file uniaxial-model-nass-flexible-active-damping.pdf :post pdf2svg(file=*this*, ext="png") :exports results
\begin{tikzpicture}
% ====================
% Parameters
% ====================
\def\massw{2.2} % Width of the masses
\def\massh{0.8} % Height of the masses
\def\spaceh{1.2} % Height of the springs/dampers
\def\dispw{0.4} % Width of the dashed line for the displacement
\def\disph{0.3} % Height of the arrow for the displacements
\def\bracs{0.05} % Brace spacing vertically
\def\brach{-12pt} % Brace shift horizontaly
\def\fsensh{0.2} % Height of the force sensor
\def\velsize{0.2} % Size of the velocity sensor
% ====================
\begin{scope}
% ====================
% Ground
% ====================
\draw (-0.5*\massw, 0) -- (0.5*\massw, 0);
\draw[dashed] (0.5*\massw, 0) -- ++(1, 0);
\draw[->, dasehd] (0.5*\massw+0.8, 0) -- ++(0, 0.5) node[right]{$D_{w}$};
% ====================
% ====================
% Marble
\begin{scope}[shift={(0, 0)}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{m}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{m}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{m}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Marble};
\end{scope}
% ====================
% ====================
% Ty
\begin{scope}[shift={(0, \spaceh+\massh)}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{t}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{t}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{t}$};
\draw[actuator={0.45}{0.2}] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](ft){$F_{ty}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Ty};
\end{scope}
% ====================
% ====================
% Rz
\begin{scope}[shift={(0, 2*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{z}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{z}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{z}$};
\draw[actuator] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](F){$F_{rz}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Rz};
\end{scope}
% ====================
% ====================
% Hexapod
\begin{scope}[shift={(0, 3*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{h}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{h}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{h}$};
% Displacements
% \draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(3*\dispw, 0) coordinate(drbot);
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Hexapod};
\end{scope}
% ====================
% ====================
% NASS
\begin{scope}[shift={(0, 4*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{n}$};
% Force Sensor
\node[forcesensor={\massw}{\fsensh}] (fsensn) at (0, \spaceh-\fsensh){};
\node[right] (fn) at (fsensn.east) {$F_n$};
% % Velocity Sensor
% \node[inertialsensor={\velsize}] (veln) at (0.5*\massw, \spaceh+\massh) {};
% \node[right] at (veln.north east) {$v_n$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh-\fsensh) node[midway, left=0.1]{$k_{n}$};
\draw[damper] (0, 0) -- ( 0, \spaceh-\fsensh) node[midway, left=0.2]{$c_{n}$};
\draw[actuator] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh-\fsensh) node[midway, right=0.1](F){$F$};
% % Displacements
% \draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(2*\dispw, 0) coordinate(xn) -- ++(\dispw, 0) coordinate(drtop);
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{NASS};
\end{scope}
% ====================
% ====================
% sample
\begin{scope}[shift={(0, 5*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{s}$};
% External Force
\draw[->] (0, \spaceh+\massh) node[]{$\bullet$} -- ++(0, 0.5*\massh) node[right]{$F_s$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{s}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{s}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Sample};
\end{scope}
% ====================
% ====================
% IFF Control
\node[block={2em}{2em}, right=0.3 of fn] (iff) {$K_{\text{IFF}}$};
\draw[->] (fn.east) -- (iff.west);
\draw[->] (iff.south) |- (F.east);
% ====================
\end{scope}
\begin{scope}[shift={(5,0)}]
% ====================
% Ground
% ====================
\draw (-0.5*\massw, 0) -- (0.5*\massw, 0);
\draw[dashed] (0.5*\massw, 0) -- ++(1, 0);
\draw[->, dasehd] (0.5*\massw+0.8, 0) -- ++(0, 0.5) node[right]{$D_{w}$};
% ====================
% ====================
% Marble
\begin{scope}[shift={(0, 0)}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{m}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{m}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{m}$};
\end{scope}
% ====================
% ====================
% Ty
\begin{scope}[shift={(0, \spaceh+\massh)}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{t}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{t}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{t}$};
\draw[actuator={0.45}{0.2}] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](ft){$F_{ty}$};
\end{scope}
% ====================
% ====================
% Rz
\begin{scope}[shift={(0, 2*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{z}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{z}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{z}$};
\draw[actuator] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](F){$F_{rz}$};
\end{scope}
% ====================
% ====================
% Hexapod
\begin{scope}[shift={(0, 3*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{h}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{h}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{h}$};
% Displacements
% \draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(3*\dispw, 0) coordinate(drbot);
\end{scope}
% ====================
% ====================
% NASS
\begin{scope}[shift={(0, 4*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{n}$};
% % Force Sensor
% \node[forcesensor={\massw}{\fsensh}] (fsensn) at (0, \spaceh-\fsensh){};
% \node[right] (fn) at (fsensn.east) {$F_n$};
% Velocity Sensor
\node[inertialsensor={\velsize}] (veln) at (0.5*\massw, \spaceh+\massh) {};
\node[above right] at (veln.east) {$v_n$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{n}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{n}$};
\draw[actuator] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](F){$F$};
% % Displacements
% \draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(2*\dispw, 0) coordinate(xn) -- ++(\dispw, 0) coordinate(drtop);
\end{scope}
% ====================
% ====================
% sample
\begin{scope}[shift={(0, 5*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{s}$};
% External Force
\draw[->] (0, \spaceh+\massh) node[]{$\bullet$} -- ++(0, 0.5*\massh) node[right]{$F_s$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{s}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{s}$};
\end{scope}
% ====================
% ====================
% DVF Control
\node[block={2em}{2em}, below right=0.4 and 0.4 of veln] (ppf) {$K_{\text{DVF}}$};
\draw[->] (veln.east) -| (ppf.north);
\draw[->] (ppf.south) |- (F.east);
% ====================
\end{scope}
\begin{scope}[shift={(10,0)}]
% ====================
% Ground
% ====================
\draw (-0.5*\massw, 0) -- (0.5*\massw, 0);
\draw[dashed] (0.5*\massw, 0) -- ++(1, 0);
\draw[->, dasehd] (0.5*\massw+0.8, 0) -- ++(0, 0.5) node[right]{$D_{w}$};
% ====================
% ====================
% Marble
\begin{scope}[shift={(0, 0)}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{m}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{m}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{m}$};
\end{scope}
% ====================
% ====================
% Ty
\begin{scope}[shift={(0, \spaceh+\massh)}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{t}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{t}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{t}$};
\draw[actuator={0.45}{0.2}] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](ft){$F_{ty}$};
\end{scope}
% ====================
% ====================
% Rz
\begin{scope}[shift={(0, 2*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{z}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{z}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{z}$};
\draw[actuator] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](F){$F_{rz}$};
\end{scope}
% ====================
% ====================
% Hexapod
\begin{scope}[shift={(0, 3*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{h}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{h}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{h}$};
% Displacements
\draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(3*\dispw, 0) coordinate(drbot);
\end{scope}
% ====================
% ====================
% NASS
\begin{scope}[shift={(0, 4*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{n}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{n}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{n}$};
\draw[actuator] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](F){$F$};
% Displacements
\draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(2*\dispw, 0) coordinate(xn) -- ++(\dispw, 0) coordinate(drtop);
\end{scope}
% ====================
% ====================
% sample
\begin{scope}[shift={(0, 5*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{s}$};
% External Force
\draw[->] (0, \spaceh+\massh) node[]{$\bullet$} -- ++(0, 0.5*\massh) node[right]{$F_s$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{s}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{s}$};
\end{scope}
% ====================
% ====================
% RMC Control
\draw[<->, dashed] ($(drbot)+(-0.1, 0)$) -- ($(drtop)+(-0.1, 0)$) node[right](dr){$d_r$};
\node[block={2em}{2em}, below right=0.2 and 0.2 of dr] (rmc) {$K_{\text{RMC}}$};
\draw[->] (dr.east) -| (rmc.north);
\draw[->] (rmc.south) |- (F.east);
% ====================
\end{scope}
\end{tikzpicture}
#+end_src
#+name: fig:uniaxial-model-nass-flexible-active-damping
#+caption: Comparison of used active damping techniques
#+RESULTS:
[[file:figs/uniaxial-model-nass-flexible-active-damping.png]]
* Undamped System
2019-10-25 12:33:08 +02:00
** Introduction :ignore:
Let's start by study the undamped system.
** 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
simulinkproject('../');
#+end_src
#+begin_src matlab
open 'simscape/sim_nano_station_uniaxial.slx'
#+end_src
** Init
We initialize all the stages with the default parameters.
The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.
2019-10-25 12:33:08 +02:00
#+begin_src matlab :exports none
initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
initializeNanoHexapod(struct('actuator', 'piezo'));
initializeSample(struct('mass', 50));
#+end_src
2019-10-25 12:33:08 +02:00
All the controllers are set to 0 (Open Loop).
#+begin_src matlab :exports none
K = tf(0);
save('./mat/controllers.mat', 'K', '-append');
K_iff = tf(0);
save('./mat/controllers.mat', 'K_iff', '-append');
K_rmc = tf(0);
save('./mat/controllers.mat', 'K_rmc', '-append');
K_dvf = tf(0);
save('./mat/controllers.mat', 'K_dvf', '-append');
#+end_src
** Identification
2019-10-25 12:33:08 +02:00
We identify the dynamics of the system.
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'sim_nano_station_uniaxial';
#+end_src
2019-10-25 12:33:08 +02:00
The inputs and outputs are defined below and corresponds to the name of simulink blocks.
#+begin_src matlab
%% Input/Output definition
2019-10-25 12:33:08 +02:00
io(1) = linio([mdl, '/Dw'], 1, 'input'); % Ground Motion
io(2) = linio([mdl, '/Fs'], 1, 'input'); % Force applied on the sample
io(3) = linio([mdl, '/Fnl'], 1, 'input'); % Force applied by the NASS
io(4) = linio([mdl, '/Fdty'], 1, 'input'); % Parasitic force Ty
io(5) = linio([mdl, '/Fdrz'], 1, 'input'); % Parasitic force Rz
io(6) = linio([mdl, '/Dsm'], 1, 'output'); % Displacement of the sample
io(7) = linio([mdl, '/Fnlm'], 1, 'output'); % Force sensor in NASS's legs
io(8) = linio([mdl, '/Dnlm'], 1, 'output'); % Displacement of NASS's legs
io(9) = linio([mdl, '/Dgm'], 1, 'output'); % Absolute displacement of the granite
io(10) = linio([mdl, '/Vlm'], 1, 'output'); % Measured absolute velocity of the top NASS platform
#+end_src
2019-10-25 12:33:08 +02:00
Finally, we use the =linearize= Matlab function to extract a state space model from the simscape model.
#+begin_src matlab
%% Run the linearization
G = linearize(mdl, io, options);
G.InputName = {'Dw', ... % Ground Motion [m]
'Fs', ... % Force Applied on Sample [N]
'Fn', ... % Force applied by NASS [N]
'Fty', ... % Parasitic Force Ty [N]
'Frz'}; % Parasitic Force Rz [N]
G.OutputName = {'D', ... % Measured sample displacement x.r.t. granite [m]
'Fnm', ... % Force Sensor in NASS [N]
'Dnm', ... % Displacement Sensor in NASS [m]
'Dgm', ... % Asbolute displacement of Granite [m]
'Vlm'}; ... % Absolute Velocity of NASS [m/s]
#+end_src
2019-10-25 12:33:08 +02:00
Finally, we save the identified system dynamics for further analysis.
#+begin_src matlab
save('./uniaxial/mat/plants.mat', 'G');
#+end_src
** Sensitivity to Disturbances
2019-10-25 12:33:08 +02:00
We show several plots representing the sensitivity to disturbances:
- in figure [[fig:uniaxial-sensitivity-disturbances]] the transfer functions from ground motion $D_w$ to the sample position $D$ and the transfer function from direct force on the sample $F_s$ to the sample position $D$ are shown
- in figure [[fig:uniaxial-sensitivity-force-dist]], it is the effect of parasitic forces of the positioning stages ($F_{ty}$ and $F_{rz}$) on the position $D$ of the sample that are shown
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
subplot(2, 1, 1);
title('$D_w$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Dw'), freqs, 'Hz'))), 'k-');
% plot(freqs, abs(squeeze(freqresp(G('Dgm', 'Dw'), freqs, 'Hz'))), 'k--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/m]'); xlabel('Frequency [Hz]');
subplot(2, 1, 2);
title('$F_s$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Fs'), freqs, 'Hz'))), 'k-');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial-sensitivity-disturbances.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial-sensitivity-disturbances
#+CAPTION: Sensitivity to disturbances ([[./figs/uniaxial-sensitivity-disturbances.png][png]], [[./figs/uniaxial-sensitivity-disturbances.pdf][pdf]])
[[file:figs/uniaxial-sensitivity-disturbances.png]]
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
subplot(2, 1, 1);
title('$F_{ty}$ to $D$');
plot(freqs, abs(squeeze(freqresp(G('D', 'Fty'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
subplot(2, 1, 2);
title('$F_{rz}$ to $D$');
plot(freqs, abs(squeeze(freqresp(G('D', 'Frz'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial-sensitivity-force-dist.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial-sensitivity-force-dist
#+CAPTION: Sensitivity to disturbances ([[./figs/uniaxial-sensitivity-force-dist.png][png]], [[./figs/uniaxial-sensitivity-force-dist.pdf][pdf]])
[[file:figs/uniaxial-sensitivity-force-dist.png]]
** Plant
2019-10-25 12:33:08 +02:00
The transfer function from the force $F$ applied by the nano-hexapod to the position of the sample $D$ is shown in figure [[fig:uniaxial-plant]].
It corresponds to the plant to control.
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
plot(freqs, abs(squeeze(freqresp(G('D', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
plot(freqs, 180/pi*angle(squeeze(freqresp(G('D', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial-plant.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial-plant
#+CAPTION: Bode plot of the Plant ([[./figs/uniaxial-plant.png][png]], [[./figs/uniaxial-plant.pdf][pdf]])
[[file:figs/uniaxial-plant.png]]
* Integral Force Feedback
<<sec:iff>>
** Introduction :ignore:
2019-10-25 12:33:08 +02:00
#+begin_src latex :file uniaxial-model-nass-flexible-iff.pdf :post pdf2svg(file=*this*, ext="png") :exports results
\begin{tikzpicture}
% ====================
% Parameters
% ====================
\def\massw{2.2} % Width of the masses
\def\massh{0.8} % Height of the masses
\def\spaceh{1.2} % Height of the springs/dampers
\def\dispw{0.4} % Width of the dashed line for the displacement
\def\disph{0.3} % Height of the arrow for the displacements
\def\bracs{0.05} % Brace spacing vertically
\def\brach{-12pt} % Brace shift horizontaly
\def\fsensh{0.2} % Height of the force sensor
\def\velsize{0.2} % Size of the velocity sensor
% ====================
% ====================
% Ground
% ====================
\draw (-0.5*\massw, 0) -- (0.5*\massw, 0);
\draw[dashed] (0.5*\massw, 0) -- ++(1, 0);
\draw[->, dasehd] (0.5*\massw+0.8, 0) -- ++(0, 0.5) node[right]{$D_{w}$};
% ====================
% ====================
% Marble
\begin{scope}[shift={(0, 0)}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{m}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{m}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{m}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Marble};
\end{scope}
% ====================
% ====================
% Ty
\begin{scope}[shift={(0, \spaceh+\massh)}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{t}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{t}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{t}$};
\draw[actuator={0.45}{0.2}] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](ft){$F_{ty}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Ty};
\end{scope}
% ====================
% ====================
% Rz
\begin{scope}[shift={(0, 2*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{z}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{z}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{z}$};
\draw[actuator] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](F){$F_{rz}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Rz};
\end{scope}
% ====================
% ====================
% Hexapod
\begin{scope}[shift={(0, 3*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{h}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{h}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{h}$};
% Displacements
% \draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(3*\dispw, 0) coordinate(drbot);
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Hexapod};
\end{scope}
% ====================
% ====================
% NASS
\begin{scope}[shift={(0, 4*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{n}$};
% Force Sensor
\node[forcesensor={\massw}{\fsensh}] (fsensn) at (0, \spaceh-\fsensh){};
\node[right] (fn) at (fsensn.east) {$F_n$};
% % Velocity Sensor
% \node[inertialsensor={\velsize}] (veln) at (0.5*\massw, \spaceh+\massh) {};
% \node[right] at (veln.north east) {$v_n$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh-\fsensh) node[midway, left=0.1]{$k_{n}$};
\draw[damper] (0, 0) -- ( 0, \spaceh-\fsensh) node[midway, left=0.2]{$c_{n}$};
\draw[actuator] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh-\fsensh) node[midway, right=0.1](F){$F$};
% % Displacements
% \draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(2*\dispw, 0) coordinate(xn) -- ++(\dispw, 0) coordinate(drtop);
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{NASS};
\end{scope}
% ====================
% ====================
% sample
\begin{scope}[shift={(0, 5*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{s}$};
% External Force
\draw[->] (0, \spaceh+\massh) node[]{$\bullet$} -- ++(0, 0.5*\massh) node[right]{$F_s$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{s}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{s}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Sample};
\end{scope}
% ====================
% ====================
% IFF Control
\node[block={2em}{2em}, right=0.3 of fn] (iff) {$K_{\text{IFF}}$};
\draw[->] (fn.east) -- (iff.west);
\draw[->] (iff.south) |- (F.east);
% ====================
\end{tikzpicture}
#+end_src
#+name: fig:iff_schematic
#+caption: Uniaxial IFF Control Schematic
#+RESULTS:
[[file:figs/uniaxial-model-nass-flexible-iff.png]]
** 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
simulinkproject('../');
#+end_src
#+begin_src matlab
open 'simscape/sim_nano_station_uniaxial.slx'
#+end_src
** Control Design
#+begin_src matlab
load('./uniaxial/mat/plants.mat', 'G');
#+end_src
Let's look at the transfer function from actuator forces in the nano-hexapod to the force sensor in the nano-hexapod legs for all 6 pairs of actuator/sensor.
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
plot(freqs, abs(squeeze(freqresp(G('Fnm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
plot(freqs, 180/pi*angle(squeeze(freqresp(G('Fnm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_iff_plant.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_iff_plant
#+CAPTION: Transfer function from forces applied in the legs to force sensor ([[./figs/uniaxial_iff_plant.png][png]], [[./figs/uniaxial_iff_plant.pdf][pdf]])
[[file:figs/uniaxial_iff_plant.png]]
The controller for each pair of actuator/sensor is:
#+begin_src matlab
K_iff = -1000/s;
#+end_src
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
plot(freqs, abs(squeeze(freqresp(K_iff*G('Fnm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
plot(freqs, 180/pi*angle(squeeze(freqresp(K_iff*G('Fnm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_iff_open_loop.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_iff_open_loop
#+CAPTION: Loop Gain for the Integral Force Feedback ([[./figs/uniaxial_iff_open_loop.png][png]], [[./figs/uniaxial_iff_open_loop.pdf][pdf]])
[[file:figs/uniaxial_iff_open_loop.png]]
** Identification
Let's initialize the system prior to identification.
#+begin_src matlab
initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
initializeNanoHexapod(struct('actuator', 'piezo'));
initializeSample(struct('mass', 50));
#+end_src
All the controllers are set to 0.
#+begin_src matlab
K = tf(0);
save('./mat/controllers.mat', 'K', '-append');
K_iff = -K_iff;
save('./mat/controllers.mat', 'K_iff', '-append');
K_rmc = tf(0);
save('./mat/controllers.mat', 'K_rmc', '-append');
K_dvf = tf(0);
save('./mat/controllers.mat', 'K_dvf', '-append');
#+end_src
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'sim_nano_station_uniaxial';
#+end_src
#+begin_src matlab
%% Input/Output definition
io(1) = linio([mdl, '/Dw'], 1, 'input'); % Ground Motion
io(2) = linio([mdl, '/Fs'], 1, 'input'); % Force applied on the sample
io(3) = linio([mdl, '/Fnl'], 1, 'input'); % Force applied by the NASS
io(4) = linio([mdl, '/Fdty'], 1, 'input'); % Parasitic force Ty
io(5) = linio([mdl, '/Fdrz'], 1, 'input'); % Parasitic force Rz
io(6) = linio([mdl, '/Dsm'], 1, 'output'); % Displacement of the sample
io(7) = linio([mdl, '/Fnlm'], 1, 'output'); % Force sensor in NASS's legs
io(8) = linio([mdl, '/Dnlm'], 1, 'output'); % Displacement of NASS's legs
io(9) = linio([mdl, '/Dgm'], 1, 'output'); % Absolute displacement of the granite
io(10) = linio([mdl, '/Vlm'], 1, 'output'); % Measured absolute velocity of the top NASS platform
#+end_src
#+begin_src matlab
%% Run the linearization
G_iff = linearize(mdl, io, options);
G_iff.InputName = {'Dw', ... % Ground Motion [m]
'Fs', ... % Force Applied on Sample [N]
'Fn', ... % Force applied by NASS [N]
'Fty', ... % Parasitic Force Ty [N]
'Frz'}; % Parasitic Force Rz [N]
G_iff.OutputName = {'D', ... % Measured sample displacement x.r.t. granite [m]
'Fnm', ... % Force Sensor in NASS [N]
'Dnm', ... % Displacement Sensor in NASS [m]
'Dgm', ... % Asbolute displacement of Granite [m]
'Vlm'}; ... % Absolute Velocity of NASS [m/s]
#+end_src
2019-10-25 12:33:08 +02:00
#+begin_src matlab
save('./uniaxial/mat/plants.mat', 'G_iff', '-append');
#+end_src
** Sensitivity to Disturbance
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
subplot(2, 1, 1);
title('$D_w$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Dw'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_iff('D', 'Dw'), freqs, 'Hz'))), 'k--', 'DisplayName', 'IFF');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/m]'); xlabel('Frequency [Hz]');
legend('location', 'northeast');
subplot(2, 1, 2);
title('$F_s$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Fs'), freqs, 'Hz'))), 'k-');
plot(freqs, abs(squeeze(freqresp(G_iff('D', 'Fs'), freqs, 'Hz'))), 'k--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_sensitivity_dist_iff.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_sensitivity_dist_iff
#+CAPTION: Sensitivity to disturbance once the IFF controller is applied to the system ([[./figs/uniaxial_sensitivity_dist_iff.png][png]], [[./figs/uniaxial_sensitivity_dist_iff.pdf][pdf]])
[[file:figs/uniaxial_sensitivity_dist_iff.png]]
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
subplot(2, 1, 1);
title('$F_{ty}$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Fty'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_iff('D', 'Fty'), freqs, 'Hz'))), 'k--', 'DisplayName', 'IFF');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
legend('location', 'northeast');
subplot(2, 1, 2);
title('$F_{rz}$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Frz'), freqs, 'Hz'))), 'k-');
plot(freqs, abs(squeeze(freqresp(G_iff('D', 'Frz'), freqs, 'Hz'))), 'k--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
2019-10-25 12:33:08 +02:00
#+begin_src matlab :var filepath="figs/uniaxial_sensitivity_dist_stages_iff.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_sensitivity_dist_stages_iff
#+CAPTION: Sensitivity to force disturbances in various stages when IFF is applied ([[./figs/uniaxial_sensitivity_dist_stages_iff.png][png]], [[./figs/uniaxial_sensitivity_dist_stages_iff.pdf][pdf]])
[[file:figs/uniaxial_sensitivity_dist_stages_iff.png]]
** Damped Plant
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Fn'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_iff('D', 'Fn'), freqs, 'Hz'))), 'k--', 'DisplayName', 'IFF');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
legend('location', 'northeast');
ax2 = subplot(2, 1, 2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G('D', 'Fn'), freqs, 'Hz'))), 'k-');
plot(freqs, 180/pi*angle(squeeze(freqresp(G_iff('D', 'Fn'), freqs, 'Hz'))), 'k--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_plant_iff_damped.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_plant_iff_damped
#+CAPTION: Damped Plant after IFF is applied ([[./figs/uniaxial_plant_iff_damped.png][png]], [[./figs/uniaxial_plant_iff_damped.pdf][pdf]])
[[file:figs/uniaxial_plant_iff_damped.png]]
** Conclusion
#+begin_important
Integral Force Feedback:
#+end_important
* Relative Motion Control
<<sec:rmc>>
** Introduction :ignore:
In the Relative Motion Control (RMC), a derivative feedback is applied between the measured actuator displacement to the actuator force input.
2019-10-25 12:33:08 +02:00
#+begin_src latex :file uniaxial-model-nass-flexible-rmc.pdf :post pdf2svg(file=*this*, ext="png") :exports results
\begin{tikzpicture}
% ====================
% Parameters
% ====================
\def\massw{2.2} % Width of the masses
\def\massh{0.8} % Height of the masses
\def\spaceh{1.2} % Height of the springs/dampers
\def\dispw{0.4} % Width of the dashed line for the displacement
\def\disph{0.3} % Height of the arrow for the displacements
\def\bracs{0.05} % Brace spacing vertically
\def\brach{-12pt} % Brace shift horizontaly
\def\fsensh{0.2} % Height of the force sensor
\def\velsize{0.2} % Size of the velocity sensor
% ====================
% ====================
% Ground
% ====================
\draw (-0.5*\massw, 0) -- (0.5*\massw, 0);
\draw[dashed] (0.5*\massw, 0) -- ++(1, 0);
\draw[->, dasehd] (0.5*\massw+0.8, 0) -- ++(0, 0.5) node[right]{$D_{w}$};
% ====================
% ====================
% Marble
\begin{scope}[shift={(0, 0)}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{m}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{m}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{m}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Marble};
\end{scope}
% ====================
% ====================
% Ty
\begin{scope}[shift={(0, \spaceh+\massh)}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{t}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{t}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{t}$};
\draw[actuator={0.45}{0.2}] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](ft){$F_{ty}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Ty};
\end{scope}
% ====================
% ====================
% Rz
\begin{scope}[shift={(0, 2*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{z}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{z}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{z}$};
\draw[actuator] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](F){$F_{rz}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Rz};
\end{scope}
% ====================
% ====================
% Hexapod
\begin{scope}[shift={(0, 3*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{h}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{h}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{h}$};
% Displacements
\draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(3*\dispw, 0) coordinate(drbot);
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Hexapod};
\end{scope}
% ====================
% ====================
% NASS
\begin{scope}[shift={(0, 4*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{n}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{n}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{n}$};
\draw[actuator] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](F){$F$};
% Displacements
\draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(2*\dispw, 0) coordinate(xn) -- ++(\dispw, 0) coordinate(drtop);
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{NASS};
\end{scope}
% ====================
% ====================
% sample
\begin{scope}[shift={(0, 5*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{s}$};
% External Force
\draw[->] (0, \spaceh+\massh) node[]{$\bullet$} -- ++(0, 0.5*\massh) node[right]{$F_s$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{s}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{s}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Sample};
\end{scope}
% ====================
% ====================
% RMC Control
\draw[<->, dashed] ($(drbot)+(-0.1, 0)$) -- ($(drtop)+(-0.1, 0)$) node[right](dr){$d_r$};
\node[block={2em}{2em}, below right=0.2 and 0.2 of dr] (rmc) {$K_{\text{RMC}}$};
\draw[->] (dr.east) -| (rmc.north);
\draw[->] (rmc.south) |- (F.east);
% ====================
\end{tikzpicture}
#+end_src
#+name: fig:rmc_schematic
#+caption: Uniaxial RMC Control Schematic
#+RESULTS:
[[file:figs/uniaxial-model-nass-flexible-rmc.png]]
** 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
simulinkproject('../');
#+end_src
#+begin_src matlab
open 'simscape/sim_nano_station_uniaxial.slx'
#+end_src
** Control Design
#+begin_src matlab
load('./uniaxial/mat/plants.mat', 'G');
#+end_src
Let's look at the transfer function from actuator forces in the nano-hexapod to the measured displacement of the actuator for all 6 pairs of actuator/sensor.
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
plot(freqs, abs(squeeze(freqresp(G('Dnm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
plot(freqs, 180/pi*angle(squeeze(freqresp(G('Dnm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_rmc_plant.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_rmc_plant
#+CAPTION: Transfer function from forces applied in the legs to leg displacement sensor ([[./figs/uniaxial_rmc_plant.png][png]], [[./figs/uniaxial_rmc_plant.pdf][pdf]])
[[file:figs/uniaxial_rmc_plant.png]]
The Relative Motion Controller is defined below.
A Low pass Filter is added to make the controller transfer function proper.
#+begin_src matlab
K_rmc = s*50000/(1 + s/2/pi/10000);
#+end_src
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
plot(freqs, abs(squeeze(freqresp(K_rmc*G('Dnm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
plot(freqs, 180/pi*angle(squeeze(freqresp(K_rmc*G('Dnm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_rmc_open_loop.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_rmc_open_loop
#+CAPTION: Loop Gain for the Integral Force Feedback ([[./figs/uniaxial_rmc_open_loop.png][png]], [[./figs/uniaxial_rmc_open_loop.pdf][pdf]])
[[file:figs/uniaxial_rmc_open_loop.png]]
** Identification
Let's initialize the system prior to identification.
#+begin_src matlab
initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
initializeNanoHexapod(struct('actuator', 'piezo'));
initializeSample(struct('mass', 50));
#+end_src
And initialize the controllers.
#+begin_src matlab
K = tf(0);
save('./mat/controllers.mat', 'K', '-append');
K_iff = tf(0);
save('./mat/controllers.mat', 'K_iff', '-append');
K_rmc = -K_rmc;
save('./mat/controllers.mat', 'K_rmc', '-append');
K_dvf = tf(0);
save('./mat/controllers.mat', 'K_dvf', '-append');
#+end_src
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'sim_nano_station_uniaxial';
#+end_src
#+begin_src matlab
%% Input/Output definition
io(1) = linio([mdl, '/Dw'], 1, 'input'); % Ground Motion
io(2) = linio([mdl, '/Fs'], 1, 'input'); % Force applied on the sample
io(3) = linio([mdl, '/Fnl'], 1, 'input'); % Force applied by the NASS
io(4) = linio([mdl, '/Fdty'], 1, 'input'); % Parasitic force Ty
io(5) = linio([mdl, '/Fdrz'], 1, 'input'); % Parasitic force Rz
io(6) = linio([mdl, '/Dsm'], 1, 'output'); % Displacement of the sample
io(7) = linio([mdl, '/Fnlm'], 1, 'output'); % Force sensor in NASS's legs
io(8) = linio([mdl, '/Dnlm'], 1, 'output'); % Displacement of NASS's legs
io(9) = linio([mdl, '/Dgm'], 1, 'output'); % Absolute displacement of the granite
io(10) = linio([mdl, '/Vlm'], 1, 'output'); % Measured absolute velocity of the top NASS platform
#+end_src
#+begin_src matlab
%% Run the linearization
G_rmc = linearize(mdl, io, options);
G_rmc.InputName = {'Dw', ... % Ground Motion [m]
'Fs', ... % Force Applied on Sample [N]
'Fn', ... % Force applied by NASS [N]
'Fty', ... % Parasitic Force Ty [N]
'Frz'}; % Parasitic Force Rz [N]
G_rmc.OutputName = {'D', ... % Measured sample displacement x.r.t. granite [m]
'Fnm', ... % Force Sensor in NASS [N]
'Dnm', ... % Displacement Sensor in NASS [m]
'Dgm', ... % Asbolute displacement of Granite [m]
'Vlm'}; ... % Absolute Velocity of NASS [m/s]
#+end_src
2019-10-25 12:33:08 +02:00
#+begin_src matlab
save('./uniaxial/mat/plants.mat', 'G_rmc', '-append');
#+end_src
** Sensitivity to Disturbance
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
subplot(2, 1, 1);
title('$D_w$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Dw'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_rmc('D', 'Dw'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/m]'); xlabel('Frequency [Hz]');
legend('location', 'northeast');
subplot(2, 1, 2);
title('$F_s$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Fs'), freqs, 'Hz'))), 'k-');
plot(freqs, abs(squeeze(freqresp(G_rmc('D', 'Fs'), freqs, 'Hz'))), 'k--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_sensitivity_dist_rmc.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_sensitivity_dist_rmc
#+CAPTION: Sensitivity to disturbance once the RMC controller is applied to the system ([[./figs/uniaxial_sensitivity_dist_rmc.png][png]], [[./figs/uniaxial_sensitivity_dist_rmc.pdf][pdf]])
[[file:figs/uniaxial_sensitivity_dist_rmc.png]]
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
subplot(2, 1, 1);
title('$F_{ty}$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Fty'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_rmc('D', 'Fty'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
legend('location', 'northeast');
subplot(2, 1, 2);
title('$F_{rz}$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Frz'), freqs, 'Hz'))), 'k-');
plot(freqs, abs(squeeze(freqresp(G_rmc('D', 'Frz'), freqs, 'Hz'))), 'k--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
2019-10-25 12:33:08 +02:00
#+begin_src matlab :var filepath="figs/uniaxial_sensitivity_dist_stages_rmc.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_sensitivity_dist_stages_rmc
#+CAPTION: Sensitivity to force disturbances in various stages when RMC is applied ([[./figs/uniaxial_sensitivity_dist_stages_rmc.png][png]], [[./figs/uniaxial_sensitivity_dist_stages_rmc.pdf][pdf]])
[[file:figs/uniaxial_sensitivity_dist_stages_rmc.png]]
** Damped Plant
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Fn'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_rmc('D', 'Fn'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
legend('location', 'northeast');
ax2 = subplot(2, 1, 2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G('D', 'Fn'), freqs, 'Hz'))), 'k-');
plot(freqs, 180/pi*angle(squeeze(freqresp(G_rmc('D', 'Fn'), freqs, 'Hz'))), 'k--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_plant_rmc_damped.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_plant_rmc_damped
#+CAPTION: Damped Plant after RMC is applied ([[./figs/uniaxial_plant_rmc_damped.png][png]], [[./figs/uniaxial_plant_rmc_damped.pdf][pdf]])
[[file:figs/uniaxial_plant_rmc_damped.png]]
** Conclusion
#+begin_important
Relative Motion Control:
#+end_important
* Direct Velocity Feedback
<<sec:dvf>>
** Introduction :ignore:
In the Relative Motion Control (RMC), a feedback is applied between the measured velocity of the platform to the actuator force input.
2019-10-25 12:33:08 +02:00
#+begin_src latex :file uniaxial-model-nass-flexible-dvf.pdf :post pdf2svg(file=*this*, ext="png") :exports results
\begin{tikzpicture}
% ====================
% Parameters
% ====================
\def\massw{2.2} % Width of the masses
\def\massh{0.8} % Height of the masses
\def\spaceh{1.2} % Height of the springs/dampers
\def\dispw{0.4} % Width of the dashed line for the displacement
\def\disph{0.3} % Height of the arrow for the displacements
\def\bracs{0.05} % Brace spacing vertically
\def\brach{-12pt} % Brace shift horizontaly
\def\fsensh{0.2} % Height of the force sensor
\def\velsize{0.2} % Size of the velocity sensor
% ====================
% ====================
% Ground
% ====================
\draw (-0.5*\massw, 0) -- (0.5*\massw, 0);
\draw[dashed] (0.5*\massw, 0) -- ++(1, 0);
\draw[->, dasehd] (0.5*\massw+0.8, 0) -- ++(0, 0.5) node[right]{$D_{w}$};
% ====================
% ====================
% Marble
\begin{scope}[shift={(0, 0)}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{m}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{m}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{m}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Marble};
\end{scope}
% ====================
% ====================
% Ty
\begin{scope}[shift={(0, \spaceh+\massh)}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{t}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{t}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{t}$};
\draw[actuator={0.45}{0.2}] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](ft){$F_{ty}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Ty};
\end{scope}
% ====================
% ====================
% Rz
\begin{scope}[shift={(0, 2*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{z}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{z}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{z}$};
\draw[actuator] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](F){$F_{rz}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Rz};
\end{scope}
% ====================
% ====================
% Hexapod
\begin{scope}[shift={(0, 3*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{h}$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{h}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{h}$};
% Displacements
% \draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(3*\dispw, 0) coordinate(drbot);
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Hexapod};
\end{scope}
% ====================
% ====================
% NASS
\begin{scope}[shift={(0, 4*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{n}$};
% % Force Sensor
% \node[forcesensor={\massw}{\fsensh}] (fsensn) at (0, \spaceh-\fsensh){};
% \node[right] (fn) at (fsensn.east) {$F_n$};
% Velocity Sensor
\node[inertialsensor={\velsize}] (veln) at (0.5*\massw, \spaceh+\massh) {};
\node[above right] at (veln.east) {$v_n$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{n}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{n}$};
\draw[actuator] ( 0.4*\massw, 0) -- ( 0.4*\massw, \spaceh) node[midway, right=0.1](F){$F$};
% % Displacements
% \draw[dashed] (0.5*\massw, \spaceh+\massh) -- ++(2*\dispw, 0) coordinate(xn) -- ++(\dispw, 0) coordinate(drtop);
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{NASS};
\end{scope}
% ====================
% ====================
% sample
\begin{scope}[shift={(0, 5*(\spaceh+\massh))}]
% Mass
\draw[fill=white] (-0.5*\massw, \spaceh) rectangle (0.5*\massw, \spaceh+\massh) node[pos=0.5]{$m_{s}$};
% External Force
\draw[->] (0, \spaceh+\massh) node[]{$\bullet$} -- ++(0, 0.5*\massh) node[right]{$F_s$};
% Spring, Damper, and Actuator
\draw[spring] (-0.4*\massw, 0) -- (-0.4*\massw, \spaceh) node[midway, left=0.1]{$k_{s}$};
\draw[damper] (0, 0) -- ( 0, \spaceh) node[midway, left=0.2]{$c_{s}$};
% Legend
\draw[decorate, decoration={brace, amplitude=8pt}, xshift=\brach] %
(-0.5*\massw, \bracs) -- (-0.5*\massw, \spaceh+\massh-\bracs) node[midway,rotate=90,anchor=south,yshift=10pt]{Sample};
\end{scope}
% ====================
% ====================
% DVF Control
\node[block={2em}{2em}, below right=0.4 and 0.4 of veln] (ppf) {$K_{\text{DVF}}$};
\draw[->] (veln.east) -| (ppf.north);
\draw[->] (ppf.south) |- (F.east);
% ====================
\end{tikzpicture}
#+end_src
#+name: fig:dvf_schematic
#+caption: Uniaxial DVF Control Schematic
#+RESULTS:
[[file:figs/uniaxial-model-nass-flexible-dvf.png]]
** 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
simulinkproject('../');
#+end_src
#+begin_src matlab
open 'simscape/sim_nano_station_uniaxial.slx'
#+end_src
** Control Design
#+begin_src matlab
load('./uniaxial/mat/plants.mat', 'G');
#+end_src
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
plot(freqs, abs(squeeze(freqresp(G('Vlm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
plot(freqs, 180/pi*angle(squeeze(freqresp(G('Vlm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_dvf_plant.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_dvf_plant
#+CAPTION: Transfer function from forces applied in the legs to leg velocity sensor ([[./figs/uniaxial_dvf_plant.png][png]], [[./figs/uniaxial_dvf_plant.pdf][pdf]])
[[file:figs/uniaxial_dvf_plant.png]]
#+begin_src matlab
K_dvf = tf(5e4);
#+end_src
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
plot(freqs, abs(squeeze(freqresp(K_dvf*G('Vlm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
plot(freqs, 180/pi*angle(squeeze(freqresp(K_dvf*G('Vlm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_dvf_loop_gain.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_dvf_loop_gain
#+CAPTION: Transfer function from forces applied in the legs to leg velocity sensor ([[./figs/uniaxial_dvf_loop_gain.png][png]], [[./figs/uniaxial_dvf_loop_gain.pdf][pdf]])
[[file:figs/uniaxial_dvf_loop_gain.png]]
** Identification
Let's initialize the system prior to identification.
#+begin_src matlab
initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
initializeNanoHexapod(struct('actuator', 'piezo'));
initializeSample(struct('mass', 50));
#+end_src
And initialize the controllers.
#+begin_src matlab
K = tf(0);
save('./mat/controllers.mat', 'K', '-append');
K_iff = tf(0);
save('./mat/controllers.mat', 'K_iff', '-append');
K_rmc = tf(0);
save('./mat/controllers.mat', 'K_rmc', '-append');
K_dvf = -K_dvf;
save('./mat/controllers.mat', 'K_dvf', '-append');
#+end_src
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'sim_nano_station_uniaxial';
#+end_src
#+begin_src matlab
%% Input/Output definition
io(1) = linio([mdl, '/Dw'], 1, 'input'); % Ground Motion
io(2) = linio([mdl, '/Fs'], 1, 'input'); % Force applied on the sample
io(3) = linio([mdl, '/Fnl'], 1, 'input'); % Force applied by the NASS
io(4) = linio([mdl, '/Fdty'], 1, 'input'); % Parasitic force Ty
io(5) = linio([mdl, '/Fdrz'], 1, 'input'); % Parasitic force Rz
io(6) = linio([mdl, '/Dsm'], 1, 'output'); % Displacement of the sample
io(7) = linio([mdl, '/Fnlm'], 1, 'output'); % Force sensor in NASS's legs
io(8) = linio([mdl, '/Dnlm'], 1, 'output'); % Displacement of NASS's legs
io(9) = linio([mdl, '/Dgm'], 1, 'output'); % Absolute displacement of the granite
io(10) = linio([mdl, '/Vlm'], 1, 'output'); % Measured absolute velocity of the top NASS platform
#+end_src
#+begin_src matlab
%% Run the linearization
G_dvf = linearize(mdl, io, options);
G_dvf.InputName = {'Dw', ... % Ground Motion [m]
'Fs', ... % Force Applied on Sample [N]
'Fn', ... % Force applied by NASS [N]
'Fty', ... % Parasitic Force Ty [N]
'Frz'}; % Parasitic Force Rz [N]
G_dvf.OutputName = {'D', ... % Measured sample displacement x.r.t. granite [m]
'Fnm', ... % Force Sensor in NASS [N]
'Dnm', ... % Displacement Sensor in NASS [m]
'Dgm', ... % Asbolute displacement of Granite [m]
'Vlm'}; ... % Absolute Velocity of NASS [m/s]
#+end_src
2019-10-25 12:33:08 +02:00
#+begin_src matlab
save('./uniaxial/mat/plants.mat', 'G_dvf', '-append');
#+end_src
** Sensitivity to Disturbance
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
subplot(2, 1, 1);
title('$D_w$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Dw'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_dvf('D', 'Dw'), freqs, 'Hz'))), 'k--', 'DisplayName', 'DVF');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/m]'); xlabel('Frequency [Hz]');
legend('location', 'northeast');
subplot(2, 1, 2);
title('$F_s$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Fs'), freqs, 'Hz'))), 'k-');
plot(freqs, abs(squeeze(freqresp(G_dvf('D', 'Fs'), freqs, 'Hz'))), 'k--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_sensitivity_dist_dvf.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_sensitivity_dist_dvf
#+CAPTION: Sensitivity to disturbance once the DVF controller is applied to the system ([[./figs/uniaxial_sensitivity_dist_dvf.png][png]], [[./figs/uniaxial_sensitivity_dist_dvf.pdf][pdf]])
[[file:figs/uniaxial_sensitivity_dist_dvf.png]]
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
subplot(2, 1, 1);
title('$F_{ty}$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Fty'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_dvf('D', 'Fty'), freqs, 'Hz'))), 'k--', 'DisplayName', 'DVF');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
legend('location', 'northeast');
subplot(2, 1, 2);
title('$F_{rz}$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Frz'), freqs, 'Hz'))), 'k-');
plot(freqs, abs(squeeze(freqresp(G_dvf('D', 'Frz'), freqs, 'Hz'))), 'k--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
2019-10-25 12:33:08 +02:00
#+begin_src matlab :var filepath="figs/uniaxial_sensitivity_dist_stages_dvf.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_sensitivity_dist_stages_dvf
#+CAPTION: Sensitivity to force disturbances in various stages when DVF is applied ([[./figs/uniaxial_sensitivity_dist_stages_dvf.png][png]], [[./figs/uniaxial_sensitivity_dist_stages_dvf.pdf][pdf]])
[[file:figs/uniaxial_sensitivity_dist_stages_dvf.png]]
** Damped Plant
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Fn'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_dvf('D', 'Fn'), freqs, 'Hz'))), 'k--', 'DisplayName', 'DVF');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
legend('location', 'northeast');
ax2 = subplot(2, 1, 2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G('D', 'Fn'), freqs, 'Hz'))), 'k-');
plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf('D', 'Fn'), freqs, 'Hz'))), 'k--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_plant_dvf_damped.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_plant_dvf_damped
#+CAPTION: Damped Plant after DVF is applied ([[./figs/uniaxial_plant_dvf_damped.png][png]], [[./figs/uniaxial_plant_dvf_damped.pdf][pdf]])
[[file:figs/uniaxial_plant_dvf_damped.png]]
** Conclusion
#+begin_important
Direct Velocity Feedback:
#+end_important
2019-10-28 17:36:20 +01:00
* With Cedrat Piezo-electric Actuators
** 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
simulinkproject('../');
#+end_src
#+begin_src matlab
open 'simscape/sim_nano_station_uniaxial_cedrat.slx'
#+end_src
** Identification
We identify the dynamics of the system.
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'sim_nano_station_uniaxial_cedrat';
#+end_src
The inputs and outputs are defined below and corresponds to the name of simulink blocks.
#+begin_src matlab
%% Input/Output definition
io(1) = linio([mdl, '/Dw'], 1, 'input'); % Ground Motion
io(2) = linio([mdl, '/Fs'], 1, 'input'); % Force applied on the sample
io(3) = linio([mdl, '/Fnl'], 1, 'input'); % Force applied by the NASS
io(4) = linio([mdl, '/Fdty'], 1, 'input'); % Parasitic force Ty
io(5) = linio([mdl, '/Fdrz'], 1, 'input'); % Parasitic force Rz
io(6) = linio([mdl, '/Dsm'], 1, 'output'); % Displacement of the sample
io(7) = linio([mdl, '/Fnlm'], 1, 'output'); % Force sensor in NASS's legs
io(8) = linio([mdl, '/Dnlm'], 1, 'output'); % Displacement of NASS's legs
io(9) = linio([mdl, '/Dgm'], 1, 'output'); % Absolute displacement of the granite
io(10) = linio([mdl, '/Vlm'], 1, 'output'); % Measured absolute velocity of the top NASS platform
#+end_src
Finally, we use the =linearize= Matlab function to extract a state space model from the simscape model.
#+begin_src matlab
%% Run the linearization
G = linearize(mdl, io, options);
G.InputName = {'Dw', ... % Ground Motion [m]
'Fs', ... % Force Applied on Sample [N]
'Fn', ... % Force applied by NASS [N]
'Fty', ... % Parasitic Force Ty [N]
'Frz'}; % Parasitic Force Rz [N]
G.OutputName = {'D', ... % Measured sample displacement x.r.t. granite [m]
'Fnm', ... % Force Sensor in NASS [N]
'Dnm', ... % Displacement Sensor in NASS [m]
'Dgm', ... % Asbolute displacement of Granite [m]
'Vlm'}; ... % Absolute Velocity of NASS [m/s]
#+end_src
** Control Design
Let's look at the transfer function from actuator forces in the nano-hexapod to the force sensor in the nano-hexapod legs for all 6 pairs of actuator/sensor.
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
plot(freqs, abs(squeeze(freqresp(G('Fnm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
plot(freqs, 180/pi*angle(squeeze(freqresp(G('Fnm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_cedrat_plant.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_cedrat_plant
#+CAPTION: Transfer function from forces applied in the legs to force sensor ([[./figs/uniaxial_cedrat_plant.png][png]], [[./figs/uniaxial_cedrat_plant.pdf][pdf]])
[[file:figs/uniaxial_cedrat_plant.png]]
The controller for each pair of actuator/sensor is:
#+begin_src matlab
K_cedrat = 1000/s;
#+end_src
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
plot(freqs, abs(squeeze(freqresp(K_cedrat*G('Fnm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
plot(freqs, 180/pi*angle(squeeze(freqresp(K_cedrat*G('Fnm', 'Fn'), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_cedrat_open_loop.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_cedrat_open_loop
#+CAPTION: Loop Gain for the Integral Force Feedback ([[./figs/uniaxial_cedrat_open_loop.png][png]], [[./figs/uniaxial_cedrat_open_loop.pdf][pdf]])
[[file:figs/uniaxial_cedrat_open_loop.png]]
** Identification
Let's initialize the system prior to identification.
#+begin_src matlab
initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
initializeNanoHexapod(struct('actuator', 'piezo'));
initializeSample(struct('mass', 50));
#+end_src
All the controllers are set to 0.
#+begin_src matlab
K = tf(0);
save('./mat/controllers.mat', 'K', '-append');
K_iff = -K_cedrat;
save('./mat/controllers.mat', 'K_iff', '-append');
K_rmc = tf(0);
save('./mat/controllers.mat', 'K_rmc', '-append');
K_dvf = tf(0);
save('./mat/controllers.mat', 'K_dvf', '-append');
#+end_src
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'sim_nano_station_uniaxial_cedrat';
#+end_src
#+begin_src matlab
%% Input/Output definition
io(1) = linio([mdl, '/Dw'], 1, 'input'); % Ground Motion
io(2) = linio([mdl, '/Fs'], 1, 'input'); % Force applied on the sample
io(3) = linio([mdl, '/Fnl'], 1, 'input'); % Force applied by the NASS
io(4) = linio([mdl, '/Fdty'], 1, 'input'); % Parasitic force Ty
io(5) = linio([mdl, '/Fdrz'], 1, 'input'); % Parasitic force Rz
io(6) = linio([mdl, '/Dsm'], 1, 'output'); % Displacement of the sample
io(7) = linio([mdl, '/Fnlm'], 1, 'output'); % Force sensor in NASS's legs
io(8) = linio([mdl, '/Dnlm'], 1, 'output'); % Displacement of NASS's legs
io(9) = linio([mdl, '/Dgm'], 1, 'output'); % Absolute displacement of the granite
io(10) = linio([mdl, '/Vlm'], 1, 'output'); % Measured absolute velocity of the top NASS platform
#+end_src
#+begin_src matlab
%% Run the linearization
G_cedrat = linearize(mdl, io, options);
G_cedrat.InputName = {'Dw', ... % Ground Motion [m]
'Fs', ... % Force Applied on Sample [N]
'Fn', ... % Force applied by NASS [N]
'Fty', ... % Parasitic Force Ty [N]
'Frz'}; % Parasitic Force Rz [N]
G_cedrat.OutputName = {'D', ... % Measured sample displacement x.r.t. granite [m]
'Fnm', ... % Force Sensor in NASS [N]
'Dnm', ... % Displacement Sensor in NASS [m]
'Dgm', ... % Asbolute displacement of Granite [m]
'Vlm'}; ... % Absolute Velocity of NASS [m/s]
#+end_src
#+begin_src matlab
save('./uniaxial/mat/plants.mat', 'G_cedrat', '-append');
#+end_src
** Sensitivity to Disturbance
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
subplot(2, 1, 1);
title('$D_w$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Dw'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_cedrat('D', 'Dw'), freqs, 'Hz'))), 'k--', 'DisplayName', 'CEDRAT');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/m]'); xlabel('Frequency [Hz]');
legend('location', 'northeast');
subplot(2, 1, 2);
title('$F_s$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Fs'), freqs, 'Hz'))), 'k-');
plot(freqs, abs(squeeze(freqresp(G_cedrat('D', 'Fs'), freqs, 'Hz'))), 'k--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_sensitivity_dist_cedrat.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_sensitivity_dist_cedrat
#+CAPTION: Sensitivity to disturbance once the CEDRAT controller is applied to the system ([[./figs/uniaxial_sensitivity_dist_cedrat.png][png]], [[./figs/uniaxial_sensitivity_dist_cedrat.pdf][pdf]])
[[file:figs/uniaxial_sensitivity_dist_cedrat.png]]
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
subplot(2, 1, 1);
title('$F_{ty}$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Fty'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_cedrat('D', 'Fty'), freqs, 'Hz'))), 'k--', 'DisplayName', 'CEDRAT');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
legend('location', 'northeast');
subplot(2, 1, 2);
title('$F_{rz}$ to $D$');
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Frz'), freqs, 'Hz'))), 'k-');
plot(freqs, abs(squeeze(freqresp(G_cedrat('D', 'Frz'), freqs, 'Hz'))), 'k--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_sensitivity_dist_stages_cedrat.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_sensitivity_dist_stages_cedrat
#+CAPTION: Sensitivity to force disturbances in various stages when CEDRAT is applied ([[./figs/uniaxial_sensitivity_dist_stages_cedrat.png][png]], [[./figs/uniaxial_sensitivity_dist_stages_cedrat.pdf][pdf]])
[[file:figs/uniaxial_sensitivity_dist_stages_cedrat.png]]
** Damped Plant
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Fn'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_cedrat('D', 'Fn'), freqs, 'Hz'))), 'k--', 'DisplayName', 'CEDRAT');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
legend('location', 'northeast');
ax2 = subplot(2, 1, 2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G('D', 'Fn'), freqs, 'Hz'))), 'k-');
plot(freqs, 180/pi*angle(squeeze(freqresp(G_cedrat('D', 'Fn'), freqs, 'Hz'))), 'k--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_plant_cedrat_damped.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_plant_cedrat_damped
#+CAPTION: Damped Plant after CEDRAT is applied ([[./figs/uniaxial_plant_cedrat_damped.png][png]], [[./figs/uniaxial_plant_cedrat_damped.pdf][pdf]])
[[file:figs/uniaxial_plant_cedrat_damped.png]]
** Conclusion
#+begin_important
This gives similar results than with a classical force sensor.
#+end_important
* Comparison of Active Damping Techniques
<<sec:comparison>>
** 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
simulinkproject('../');
#+end_src
#+begin_src matlab
open 'simscape/sim_nano_station_uniaxial.slx'
#+end_src
** Load the plants
#+begin_src matlab
load('./uniaxial/mat/plants.mat', 'G', 'G_iff', 'G_rmc', 'G_dvf');
#+end_src
** Sensitivity to Disturbance
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
title('$D_w$ to $D$');
hold on;
2019-10-25 12:33:08 +02:00
plot(freqs, abs(squeeze(freqresp(G ('D', 'Dw'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_iff('D', 'Dw'), freqs, 'Hz'))), 'k:', 'DisplayName', 'IFF');
plot(freqs, abs(squeeze(freqresp(G_rmc('D', 'Dw'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC');
plot(freqs, abs(squeeze(freqresp(G_dvf('D', 'Dw'), freqs, 'Hz'))), 'k-.', 'DisplayName', 'DVF');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/m]'); xlabel('Frequency [Hz]');
legend('location', 'northeast');
2019-10-25 12:33:08 +02:00
#+end_src
2019-10-25 12:33:08 +02:00
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_sensitivity_ground_motion.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_sensitivity_ground_motion
#+CAPTION: Sensitivity to Ground Motion - Comparison ([[./figs/uniaxial_sensitivity_ground_motion.png][png]], [[./figs/uniaxial_sensitivity_ground_motion.pdf][pdf]])
[[file:figs/uniaxial_sensitivity_ground_motion.png]]
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
title('$F_s$ to $D$');
hold on;
2019-10-25 12:33:08 +02:00
plot(freqs, abs(squeeze(freqresp(G ('D', 'Fs'), freqs, 'Hz'))), 'k-' , 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_iff('D', 'Fs'), freqs, 'Hz'))), 'k:' , 'DisplayName', 'IFF');
plot(freqs, abs(squeeze(freqresp(G_rmc('D', 'Fs'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC');
plot(freqs, abs(squeeze(freqresp(G_dvf('D', 'Fs'), freqs, 'Hz'))), 'k-.', 'DisplayName', 'DVF');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
2019-10-25 12:33:08 +02:00
legend('location', 'northeast');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
2019-10-25 12:33:08 +02:00
#+begin_src matlab :var filepath="figs/uniaxial_sensitivity_direct_force.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
2019-10-25 12:33:08 +02:00
#+NAME: fig:uniaxial_sensitivity_direct_force
#+CAPTION: Sensitivity to disturbance - Comparison ([[./figs/uniaxial_sensitivity_direct_force.png][png]], [[./figs/uniaxial_sensitivity_direct_force.pdf][pdf]])
[[file:figs/uniaxial_sensitivity_direct_force.png]]
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
title('$F_{ty}$ to $D$');
hold on;
2019-10-25 12:33:08 +02:00
plot(freqs, abs(squeeze(freqresp(G ('D', 'Fty'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_iff('D', 'Fty'), freqs, 'Hz'))), 'k:', 'DisplayName', 'IFF');
plot(freqs, abs(squeeze(freqresp(G_rmc('D', 'Fty'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC');
plot(freqs, abs(squeeze(freqresp(G_dvf('D', 'Fty'), freqs, 'Hz'))), 'k-.', 'DisplayName', 'DVF');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
legend('location', 'northeast');
2019-10-25 12:33:08 +02:00
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_sensitivity_fty.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_sensitivity_fty
#+CAPTION: Sensitivity to force disturbances - Comparison ([[./figs/uniaxial_sensitivity_fty.png][png]], [[./figs/uniaxial_sensitivity_fty.pdf][pdf]])
[[file:figs/uniaxial_sensitivity_fty.png]]
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
title('$F_{rz}$ to $D$');
hold on;
2019-10-25 12:33:08 +02:00
plot(freqs, abs(squeeze(freqresp(G ('D', 'Frz'), freqs, 'Hz'))), 'k-' , 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_iff('D', 'Frz'), freqs, 'Hz'))), 'k:' , 'DisplayName', 'IFF');
2019-10-25 12:33:08 +02:00
plot(freqs, abs(squeeze(freqresp(G_rmc('D', 'Frz'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC');
plot(freqs, abs(squeeze(freqresp(G_dvf('D', 'Frz'), freqs, 'Hz'))), 'k-.', 'DisplayName', 'DVF');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
2019-10-25 12:33:08 +02:00
legend('location', 'northeast');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
2019-10-25 12:33:08 +02:00
#+begin_src matlab :var filepath="figs/uniaxial_sensitivity_frz.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
2019-10-25 12:33:08 +02:00
#+NAME: fig:uniaxial_sensitivity_frz
#+CAPTION: Sensitivity to force disturbances - Comparison ([[./figs/uniaxial_sensitivity_frz.png][png]], [[./figs/uniaxial_sensitivity_frz.pdf][pdf]])
[[file:figs/uniaxial_sensitivity_frz.png]]
** Damped Plant
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(freqs, abs(squeeze(freqresp(G('D', 'Fn'), freqs, 'Hz'))), 'k-', 'DisplayName', 'OL');
plot(freqs, abs(squeeze(freqresp(G_iff('D', 'Fn'), freqs, 'Hz'))), 'k:', 'DisplayName', 'IFF');
plot(freqs, abs(squeeze(freqresp(G_rmc('D', 'Fn'), freqs, 'Hz'))), 'k--', 'DisplayName', 'RMC');
plot(freqs, abs(squeeze(freqresp(G_dvf('D', 'Fn'), freqs, 'Hz'))), 'k-.', 'DisplayName', 'DVF');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
legend('location', 'northeast');
ax2 = subplot(2, 1, 2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G('D', 'Fn'), freqs, 'Hz'))), 'k-');
plot(freqs, 180/pi*angle(squeeze(freqresp(G_iff('D', 'Fn'), freqs, 'Hz'))), 'k:');
plot(freqs, 180/pi*angle(squeeze(freqresp(G_rmc('D', 'Fn'), freqs, 'Hz'))), 'k--');
plot(freqs, 180/pi*angle(squeeze(freqresp(G_dvf('D', 'Fn'), freqs, 'Hz'))), 'k-.');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/uniaxial_plant_damped_comp.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:uniaxial_plant_damped_comp
#+CAPTION: Damped Plant - Comparison ([[./figs/uniaxial_plant_damped_comp.png][png]], [[./figs/uniaxial_plant_damped_comp.pdf][pdf]])
[[file:figs/uniaxial_plant_damped_comp.png]]
2019-10-25 12:33:08 +02:00
** Conclusion
2019-10-25 12:33:08 +02:00
2019-10-28 17:36:20 +01:00
#name: tab:active_damping_comparison
2019-10-25 12:33:08 +02:00
#+caption: Comparison of proposed active damping techniques
| | IFF | RMC | DVF |
|---------------------------+-----------------+-----------------+----------|
| Sensor Type | Force sensor | Relative Motion | Inertial |
| Guaranteed Stability | + | + | - |
| Sensitivity ($D_w$) | - | + | - |
| Sensitivity ($F_s$) | - (at low freq) | + | + |
| Sensitivity ($F_{ty,rz}$) | + | - | + |
#+begin_important
The next step is to take into account the power spectral density of each disturbance.
#+end_important