Start the standardize the folder. Add org-mode files.
@ -0,0 +1,2 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<Info Type="Shutdown" Visible="0" Icon="" File="src/project_shutdown.m" Name="project_shutdown" />
|
@ -1,2 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<Info Type="Shutdown" Visible="0" Icon="" File="project_shutdown.m" Name="project_shutdown" />
|
|
@ -1,2 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<Info Type="StartUp" Visible="0" Icon="" File="project_startup.m" Name="project_startup" />
|
|
@ -0,0 +1,2 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<Info Type="StartUp" Visible="0" Icon="" File="src/project_startup.m" Name="project_startup" />
|
2
.SimulinkProject/Root.type.Files/src.type.File.xml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<Info />
|
@ -0,0 +1,2 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<Info />
|
14
.gitignore
vendored
@ -1,3 +1,11 @@
|
|||||||
|
auto/
|
||||||
|
*.tex
|
||||||
|
|
||||||
|
**/figs/*.pdf
|
||||||
|
**/figs/*.svg
|
||||||
|
**/figs/*.tex
|
||||||
|
|
||||||
|
|
||||||
# Windows default autosave extension
|
# Windows default autosave extension
|
||||||
*.asv
|
*.asv
|
||||||
|
|
||||||
@ -26,9 +34,3 @@ octave-workspace
|
|||||||
|
|
||||||
# Simulink Cache
|
# Simulink Cache
|
||||||
*.slxc
|
*.slxc
|
||||||
|
|
||||||
# Custom
|
|
||||||
Assemblage_grt_rtw/
|
|
||||||
Figures/
|
|
||||||
data/
|
|
||||||
movies/
|
|
||||||
|
42
active_damping/index.org
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#+TITLE:
|
||||||
|
: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/MEGA/These/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:
|
42
analysis/index.org
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#+TITLE: Some analysis
|
||||||
|
: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/MEGA/These/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:
|
30
config.tex
@ -1,30 +0,0 @@
|
|||||||
% ======================
|
|
||||||
% New Commands
|
|
||||||
% ======================
|
|
||||||
% H Infini
|
|
||||||
\newcommand{\hinf}{\mathcal{H}_\infty}
|
|
||||||
% H 2
|
|
||||||
\newcommand{\htwo}{\mathcal{H}_2}
|
|
||||||
% Omega
|
|
||||||
\newcommand{\w}{\omega}
|
|
||||||
% H-Infinity Norm
|
|
||||||
\newcommand{\hnorm}[1]{\|#1\|_\infty}
|
|
||||||
% H-2 Norm
|
|
||||||
\newcommand{\normtwo}[1]{\|#1\|_2}
|
|
||||||
% Norm
|
|
||||||
\newcommand{\abs}[1]{\vert #1 \vert}
|
|
||||||
% Minimum Subscript
|
|
||||||
\newcommand{\smin}{_{\text{min}}}
|
|
||||||
% Maximum Subscript
|
|
||||||
\newcommand{\smax}{_{\text{max}}}
|
|
||||||
% Power Spectral Density
|
|
||||||
\newcommand{\psd}[1]{\Phi_{#1}}
|
|
||||||
% Amplitude Spectral Density
|
|
||||||
\newcommand{\asd}[1]{\phi_{#1}}
|
|
||||||
% Cumulative Power Spectrum
|
|
||||||
\newcommand{\cps}[1]{\Sigma_{#1}}
|
|
||||||
% Cumulative Amplitude Spectrum
|
|
||||||
\newcommand{\cas}[1]{\sigma_{#1}}
|
|
||||||
% Root Mean Square Value
|
|
||||||
\newcommand{\rms}[1]{\sigma_{#1}}
|
|
||||||
% ======================
|
|
42
control/index.org
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#+TITLE:
|
||||||
|
: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/MEGA/These/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:
|
42
hac_lac/index.org
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#+TITLE:
|
||||||
|
: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/MEGA/These/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:
|
64
identification/index.org
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
#+TITLE: Identification
|
||||||
|
: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/MEGA/These/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:
|
||||||
|
|
||||||
|
* ZIP file containing the data and matlab files :ignore:
|
||||||
|
#+begin_src bash :exports none :results none
|
||||||
|
if [ matlab/identification_micro_station.m -nt data/identification_micro_station.zip ]; then
|
||||||
|
cp matlab/identification_micro_station.m identification_micro_station.m;
|
||||||
|
zip data/identification_micro_station \
|
||||||
|
mat/data.mat \
|
||||||
|
identification_micro_station.m
|
||||||
|
rm identification_micro_station.m;
|
||||||
|
fi
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_note
|
||||||
|
All the files (data and Matlab scripts) are accessible [[file:data/identification_micro_station.zip][here]].
|
||||||
|
#+end_note
|
||||||
|
|
||||||
|
|
||||||
|
* Identification of the micro-station
|
||||||
|
|
||||||
|
* Plot the obtained transfer functions
|
||||||
|
|
||||||
|
* Compare with the modal measurements
|
@ -1,11 +0,0 @@
|
|||||||
function [ground] = initializeGround()
|
|
||||||
%%
|
|
||||||
ground = struct();
|
|
||||||
|
|
||||||
ground.shape = [2, 2, 0.5]; % [m]
|
|
||||||
ground.density = 2800; % [kg/m3]
|
|
||||||
ground.color = [0.5, 0.5, 0.5];
|
|
||||||
|
|
||||||
%% Save
|
|
||||||
save('./mat/stages.mat', 'ground', '-append');
|
|
||||||
end
|
|
68
kinematics/index.org
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
#+TITLE: Kinematics of the station
|
||||||
|
: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/MEGA/These/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:
|
||||||
|
|
||||||
|
* ZIP file containing the data and matlab files :ignore:
|
||||||
|
#+begin_src bash :exports none :results none
|
||||||
|
if [ matlab/kinematics.m -nt data/kinematics.zip ]; then
|
||||||
|
cp matlab/kinematics.m kinematics.m;
|
||||||
|
zip data/kinematics \
|
||||||
|
mat/data.mat \
|
||||||
|
kinematics.m
|
||||||
|
rm kinematics.m;
|
||||||
|
fi
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_note
|
||||||
|
All the files (data and Matlab scripts) are accessible [[file:data/kinematics.zip][here]].
|
||||||
|
#+end_note
|
||||||
|
|
||||||
|
* 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
|
BIN
kinematics/sim_nano_station_disp.slx
Normal file
71
kinematics/test2.m
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
%% Compute position angle from R and Q
|
||||||
|
thetas_R = zeros(length(pos.Time), 3);
|
||||||
|
thetas_Q = zeros(length(pos.Time), 3);
|
||||||
|
|
||||||
|
for i = 1:length(pos.Time)
|
||||||
|
[thetax, thetay, thetaz] = RM2angle(R.Data(:, :, i));
|
||||||
|
thetas_R(i, 1) = thetax; thetas_R(i, 2) = thetay; thetas_R(i, 3) = thetaz;
|
||||||
|
|
||||||
|
[thetax, thetay, thetaz] = quaternionToEulerAngles(Q.Data(i, :));
|
||||||
|
thetas_Q(i, 1) = thetax; thetas_Q(i, 2) = thetay; thetas_Q(i, 3) = thetaz;
|
||||||
|
end
|
||||||
|
|
||||||
|
%% Compute setpoint
|
||||||
|
setpoint_c = zeros(length(pos.Time), 6);
|
||||||
|
|
||||||
|
for i = 1:length(pos.Time)
|
||||||
|
setpoint_c(i, :) = computeSetpoint(ty.Data(i), ry.Data(i), rz.Data(i));
|
||||||
|
end
|
||||||
|
|
||||||
|
%%
|
||||||
|
figure;
|
||||||
|
hold on;
|
||||||
|
plot(pos.Time, pos.Data(:, 1), 'k-', 'DisplayName', 'position');
|
||||||
|
plot(pos.Time, setpoint_c(:, 1), '--', 'DisplayName', 'Computed setpoint');
|
||||||
|
hold off;
|
||||||
|
legend();
|
||||||
|
xlabel('Time (s)'); ylabel('Translation (m)');
|
||||||
|
|
||||||
|
%%
|
||||||
|
figure;
|
||||||
|
hold on;
|
||||||
|
plot(pos.Time, pos.Data(:, 2), 'k-', 'DisplayName', 'position');
|
||||||
|
plot(pos.Time, setpoint_c(:, 2), '--', 'DisplayName', 'Computed setpoint');
|
||||||
|
hold off;
|
||||||
|
legend();
|
||||||
|
xlabel('Time (s)'); ylabel('Translation (m)');
|
||||||
|
%%
|
||||||
|
figure;
|
||||||
|
hold on;
|
||||||
|
plot(pos.Time, pos.Data(:, 3), 'k-', 'DisplayName', 'position');
|
||||||
|
plot(pos.Time, setpoint_c(:, 3), '--', 'DisplayName', 'Computed setpoint');
|
||||||
|
hold off;
|
||||||
|
legend();
|
||||||
|
xlabel('Time (s)'); ylabel('Translation (m)');
|
||||||
|
|
||||||
|
%%
|
||||||
|
figure;
|
||||||
|
hold on;
|
||||||
|
plot(pos.Time, pos.Data(:, 4), 'k-', 'DisplayName', 'position');
|
||||||
|
plot(pos.Time, setpoint_c(:, 4), '--', 'DisplayName', 'Computed setpoint');
|
||||||
|
hold off;
|
||||||
|
legend();
|
||||||
|
xlabel('Time (s)'); ylabel('Rotation (rad)');
|
||||||
|
|
||||||
|
%%
|
||||||
|
figure;
|
||||||
|
hold on;
|
||||||
|
plot(pos.Time, pos.Data(:, 5), 'k-', 'DisplayName', 'position');
|
||||||
|
plot(pos.Time, setpoint_c(:, 5), '--', 'DisplayName', 'Computed setpoint');
|
||||||
|
hold off;
|
||||||
|
legend();
|
||||||
|
xlabel('Time (s)'); ylabel('Rotation (rad)');
|
||||||
|
|
||||||
|
%%
|
||||||
|
figure;
|
||||||
|
hold on;
|
||||||
|
plot(pos.Time, pos.Data(:, 6), 'k-', 'DisplayName', 'position');
|
||||||
|
plot(pos.Time, setpoint_c(:, 6), '--', 'DisplayName', 'Computed setpoint');
|
||||||
|
hold off;
|
||||||
|
legend();
|
||||||
|
xlabel('Time (s)'); ylabel('Rotation (rad)');
|
27
main.m
@ -1,27 +0,0 @@
|
|||||||
%%
|
|
||||||
clear; close all; clc;
|
|
||||||
|
|
||||||
%% Open the project
|
|
||||||
simulinkproject('./');
|
|
||||||
|
|
||||||
%% Initialization
|
|
||||||
% Initialize the perturbations
|
|
||||||
run init_perturbations.m
|
|
||||||
|
|
||||||
% Initialize all the stages parameters
|
|
||||||
run init_data.m
|
|
||||||
|
|
||||||
%% Demonstration of displacement of all the stages
|
|
||||||
run demonstration_main.m
|
|
||||||
|
|
||||||
%% Identification
|
|
||||||
open id_main.m
|
|
||||||
|
|
||||||
%% Active Damping Control
|
|
||||||
open act_damp_main.m
|
|
||||||
|
|
||||||
%% Control With the Undamped System
|
|
||||||
open control_main.m
|
|
||||||
|
|
||||||
%% HAC-LAC Control
|
|
||||||
open hac_lac_main.m
|
|
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 20 KiB |
@ -1,85 +0,0 @@
|
|||||||
#+TITLE: Simscape model - Report
|
|
||||||
#+LATEX_CLASS: cleanreport
|
|
||||||
#+LaTeX_CLASS_OPTIONS: [tocnp, secbreak]
|
|
||||||
#+STARTUP: overview
|
|
||||||
#+DATE: 11-2018
|
|
||||||
#+LaTeX_HEADER: \newcommand{\authorFirstName}{Thomas}
|
|
||||||
#+LaTeX_HEADER: \newcommand{\authorLastName}{Dehaeze}
|
|
||||||
#+LaTeX_HEADER: \newcommand{\authorEmail}{dehaeze.thomas@gmail.com}
|
|
||||||
#+LaTeX_HEADER: \input{config.tex}
|
|
||||||
|
|
||||||
* Simscape files for identification
|
|
||||||
|------------------------+----+----+----+------+------|
|
|
||||||
| Simscape Name | Ty | Ry | Rz | Hexa | NASS |
|
|
||||||
|------------------------+----+----+----+------+------|
|
|
||||||
| id micro station | F | F | F | F | |
|
|
||||||
| id nano station stages | F | F | F | F | F |
|
|
||||||
| id nano station config | D | D | D | D | F |
|
|
||||||
| control nano station | D | D | D | D | F |
|
|
||||||
|------------------------+----+----+----+------+------|
|
|
||||||
|
|
||||||
* Inputs
|
|
||||||
** Perturbations
|
|
||||||
|----------+--------------------------------------+------+------|
|
|
||||||
| Variable | Meaning | Size | Unit |
|
|
||||||
|----------+--------------------------------------+------+------|
|
|
||||||
| ~Dw~ | Ground motion | 3 | [m] |
|
|
||||||
| ~Fg~ | External force applied on granite | 3 | [N] |
|
|
||||||
| ~Fs~ | External force applied on the Sample | 3 | [N] |
|
|
||||||
|----------+--------------------------------------+------+------|
|
|
||||||
|
|
||||||
** Measurement Noise
|
|
||||||
|----------+---------+------+------|
|
|
||||||
| Variable | Meaning | Size | Unit |
|
|
||||||
|----------+---------+------+------|
|
|
||||||
| | | | |
|
|
||||||
|----------+---------+------+------|
|
|
||||||
|
|
||||||
** Control Inputs
|
|
||||||
|----------+-------------------------------------------+------+----------|
|
|
||||||
| Variable | Meaning | Size | Unit |
|
|
||||||
|----------+-------------------------------------------+------+----------|
|
|
||||||
| ~Fy~ | Actuation force for Ty | 1 | [N] |
|
|
||||||
| ~Dy~ | Imposed displacement for Ty | 1 | [m] |
|
|
||||||
|----------+-------------------------------------------+------+----------|
|
|
||||||
| ~My~ | Actuation torque for Ry | 1 | [N.m] |
|
|
||||||
| ~Ry~ | Imposed rotation for Ry | 1 | [rad] |
|
|
||||||
|----------+-------------------------------------------+------+----------|
|
|
||||||
| ~Mz~ | Actuation torque for Rz | 1 | [N.m] |
|
|
||||||
| ~Rz~ | Imposed rotation for Rz | 1 | [rad] |
|
|
||||||
|----------+-------------------------------------------+------+----------|
|
|
||||||
| ~Fh~ | Actuation force/torque for hexapod (cart) | 6 | [N, N.m] |
|
|
||||||
| ~Fhl~ | Actuation force/torque for hexapod (legs) | 6 | [N] |
|
|
||||||
| ~Dh~ | Imposed position for hexapod (cart) | 6 | [m, rad] |
|
|
||||||
|----------+-------------------------------------------+------+----------|
|
|
||||||
| ~Rm~ | Position of the two masses | 2 | [rad] |
|
|
||||||
|----------+-------------------------------------------+------+----------|
|
|
||||||
| ~Fn~ | Actuation force for the NASS (cart) | 6 | [N, N.m] |
|
|
||||||
| ~Fnl~ | Actuation force for the NASS's legs | 6 | [N] |
|
|
||||||
| ~Dn~ | Imposed position for the NASS (cart) | 6 | [m, rad] |
|
|
||||||
|----------+-------------------------------------------+------+----------|
|
|
||||||
|
|
||||||
* Outputs
|
|
||||||
|
|
||||||
|----------+---------------------------------------------+------+--------------|
|
|
||||||
| Variable | Meaning | Size | Unit |
|
|
||||||
|----------+---------------------------------------------+------+--------------|
|
|
||||||
| ~Dgm~ | Absolute displacement of the granite | 3 | [m] |
|
|
||||||
| ~Vgm~ | Absolute Velocity of the granite | 3 | [m/s] |
|
|
||||||
|----------+---------------------------------------------+------+--------------|
|
|
||||||
| ~Dym~ | Measured displacement of Ty | 1 | [m] |
|
|
||||||
|----------+---------------------------------------------+------+--------------|
|
|
||||||
| ~Rym~ | Measured rotation of Ry | 1 | [rad] |
|
|
||||||
|----------+---------------------------------------------+------+--------------|
|
|
||||||
| ~Rzm~ | Measured rotation of Rz | 1 | [rad] |
|
|
||||||
|----------+---------------------------------------------+------+--------------|
|
|
||||||
| ~Dhm~ | Measured position of hexapod (cart) | 6 | [m, rad] |
|
|
||||||
|----------+---------------------------------------------+------+--------------|
|
|
||||||
| ~Fnlm~ | Measured force of NASS's legs | 6 | [N] |
|
|
||||||
| ~Dnlm~ | Measured elongation of NASS's legs | 6 | [m] |
|
|
||||||
| ~Dnm~ | Measured position of NASS w.r.t NASS's base | 6 | [m, rad] |
|
|
||||||
| ~Vnm~ | Measured absolute velocity of NASS platform | 6 | [m/s, rad/s] |
|
|
||||||
| ~Vnlm~ | Measured absolute velocity of NASS's legs | 6 | [m/s] |
|
|
||||||
|----------+---------------------------------------------+------+--------------|
|
|
||||||
| ~Dsm~ | Position of Sample w.r.t. granite frame | 6 | [m, rad] |
|
|
||||||
|----------+---------------------------------------------+------+--------------|
|
|
@ -1 +0,0 @@
|
|||||||
Simulink.fileGenControl('reset');
|
|
@ -1,41 +0,0 @@
|
|||||||
%% Open Loop simulation and save the final state
|
|
||||||
steady_time = 10;
|
|
||||||
|
|
||||||
initializeSimConf(struct('Tsim', steady_time, 'cl_time', steady_time));
|
|
||||||
|
|
||||||
set_param('sim_nano_station_ctrl',...
|
|
||||||
'SaveFinalState','on',...
|
|
||||||
'FinalStateName','myOperPoint',...
|
|
||||||
'SaveCompleteFinalSimState','on'...
|
|
||||||
);
|
|
||||||
|
|
||||||
sim('sim_nano_station_ctrl');
|
|
||||||
|
|
||||||
save('./data/myOperPoint.mat', 'myOperPoint');
|
|
||||||
|
|
||||||
set_param('sim_nano_station_ctrl',...
|
|
||||||
'SaveFinalState','off',...
|
|
||||||
'SaveCompleteFinalSimState','off'...
|
|
||||||
);
|
|
||||||
|
|
||||||
save('./data/exp_open_loop.mat', 'Dmeas');
|
|
||||||
|
|
||||||
%% Close the Loop and start from steady state
|
|
||||||
sim_time = 10;
|
|
||||||
|
|
||||||
initializeSimConf(struct('Tsim', steady_time+sim_time, 'cl_time', steady_time));
|
|
||||||
|
|
||||||
load('./data/myOperPoint.mat', 'myOperPoint');
|
|
||||||
|
|
||||||
set_param('sim_nano_station_ctrl',...
|
|
||||||
'LoadInitialState','on',...
|
|
||||||
'InitialState','myOperPoint'...
|
|
||||||
);
|
|
||||||
|
|
||||||
sim('sim_nano_station_ctrl');
|
|
||||||
|
|
||||||
set_param('sim_nano_station_ctrl',...
|
|
||||||
'LoadInitialState','off' ...
|
|
||||||
);
|
|
||||||
|
|
||||||
save('./data/exp_close_loop_xyz.mat', 'Dmeas');
|
|
@ -1,2 +0,0 @@
|
|||||||
Simulink Coder project marker file. Please don't change it.
|
|
||||||
slprjVersion: 9.0_037
|
|
@ -1,3 +1,14 @@
|
|||||||
|
% computePsdDispl
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/computePsdDispl.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:computePsdDispl>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/computePsdDispl.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [psd_object] = computePsdDispl(sys_data, t_init, n_av)
|
function [psd_object] = computePsdDispl(sys_data, t_init, n_av)
|
||||||
i_init = find(sys_data.time > t_init, 1);
|
i_init = find(sys_data.time > t_init, 1);
|
||||||
|
|
||||||
|
70
src/computeSetpoint.m
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
% computeSetpoint
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/computeSetpoint.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:computeSetpoint>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/computeSetpoint.m][here]].
|
||||||
|
|
||||||
|
|
||||||
|
function setpoint = computeSetpoint(ty, ry, rz)
|
||||||
|
%%
|
||||||
|
setpoint = zeros(6, 1);
|
||||||
|
|
||||||
|
%% Ty
|
||||||
|
Ty = [1 0 0 0 ;
|
||||||
|
0 1 0 ty ;
|
||||||
|
0 0 1 0 ;
|
||||||
|
0 0 0 1 ];
|
||||||
|
|
||||||
|
% Tyinv = [1 0 0 0 ;
|
||||||
|
% 0 1 0 -ty ;
|
||||||
|
% 0 0 1 0 ;
|
||||||
|
% 0 0 0 1 ];
|
||||||
|
|
||||||
|
%% Ry
|
||||||
|
Ry = [ cos(ry) 0 sin(ry) 0 ;
|
||||||
|
0 1 0 0 ;
|
||||||
|
-sin(ry) 0 cos(ry) 0 ;
|
||||||
|
0 0 0 1 ];
|
||||||
|
|
||||||
|
% TMry = Ty*Ry*Tyinv;
|
||||||
|
|
||||||
|
%% Rz
|
||||||
|
Rz = [cos(rz) -sin(rz) 0 0 ;
|
||||||
|
sin(rz) cos(rz) 0 0 ;
|
||||||
|
0 0 1 0 ;
|
||||||
|
0 0 0 1 ];
|
||||||
|
|
||||||
|
% TMrz = Ty*TMry*Rz*TMry'*Tyinv;
|
||||||
|
|
||||||
|
%% All stages
|
||||||
|
% TM = TMrz*TMry*Ty;
|
||||||
|
|
||||||
|
TM = Ty*Ry*Rz;
|
||||||
|
|
||||||
|
[thetax, thetay, thetaz] = RM2angle(TM(1:3, 1:3));
|
||||||
|
|
||||||
|
setpoint(1:3) = TM(1:3, 4);
|
||||||
|
setpoint(4:6) = [thetax, thetay, thetaz];
|
||||||
|
|
||||||
|
%% Custom Functions
|
||||||
|
function [thetax, thetay, thetaz] = RM2angle(R)
|
||||||
|
if abs(abs(R(3, 1)) - 1) > 1e-6 % R31 != 1 and R31 != -1
|
||||||
|
thetay = -asin(R(3, 1));
|
||||||
|
thetax = atan2(R(3, 2)/cos(thetay), R(3, 3)/cos(thetay));
|
||||||
|
thetaz = atan2(R(2, 1)/cos(thetay), R(1, 1)/cos(thetay));
|
||||||
|
else
|
||||||
|
thetaz = 0;
|
||||||
|
if abs(R(3, 1)+1) < 1e-6 % R31 = -1
|
||||||
|
thetay = pi/2;
|
||||||
|
thetax = thetaz + atan2(R(1, 2), R(1, 3));
|
||||||
|
else
|
||||||
|
thetay = -pi/2;
|
||||||
|
thetax = -thetaz + atan2(-R(1, 2), -R(1, 3));
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
136
src/converErrorBasis.m
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
% converErrorBasis
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/converErrorBasis.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:converErrorBasis>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/converErrorBasis.m][here]].
|
||||||
|
|
||||||
|
|
||||||
|
function error_nass = convertErrorBasis(pos, setpoint, ty, ry, rz)
|
||||||
|
% convertErrorBasis -
|
||||||
|
%
|
||||||
|
% Syntax: convertErrorBasis(p_error, ty, ry, rz)
|
||||||
|
%
|
||||||
|
% Inputs:
|
||||||
|
% - p_error - Position error of the sample w.r.t. the granite [m, rad]
|
||||||
|
% - ty - Measured translation of the Ty stage [m]
|
||||||
|
% - ry - Measured rotation of the Ry stage [rad]
|
||||||
|
% - rz - Measured rotation of the Rz stage [rad]
|
||||||
|
%
|
||||||
|
% Outputs:
|
||||||
|
% - P_nass - Position error of the sample w.r.t. the NASS base [m]
|
||||||
|
% - R_nass - Rotation error of the sample w.r.t. the NASS base [rad]
|
||||||
|
%
|
||||||
|
% Example:
|
||||||
|
%
|
||||||
|
|
||||||
|
%% If line vector => column vector
|
||||||
|
if size(pos, 2) == 6
|
||||||
|
pos = pos';
|
||||||
|
end
|
||||||
|
|
||||||
|
if size(setpoint, 2) == 6
|
||||||
|
setpoint = setpoint';
|
||||||
|
end
|
||||||
|
|
||||||
|
%% Position of the sample in the frame fixed to the Granite
|
||||||
|
P_granite = [pos(1:3); 1]; % Position [m]
|
||||||
|
R_granite = [setpoint(1:3); 1]; % Reference [m]
|
||||||
|
|
||||||
|
%% Transformation matrices of the stages
|
||||||
|
% T-y
|
||||||
|
TMty = [1 0 0 0 ;
|
||||||
|
0 1 0 ty ;
|
||||||
|
0 0 1 0 ;
|
||||||
|
0 0 0 1 ];
|
||||||
|
|
||||||
|
% R-y
|
||||||
|
TMry = [ cos(ry) 0 sin(ry) 0 ;
|
||||||
|
0 1 0 0 ;
|
||||||
|
-sin(ry) 0 cos(ry) 0 ;
|
||||||
|
0 0 0 1 ];
|
||||||
|
|
||||||
|
% R-z
|
||||||
|
TMrz = [cos(rz) -sin(rz) 0 0 ;
|
||||||
|
sin(rz) cos(rz) 0 0 ;
|
||||||
|
0 0 1 0 ;
|
||||||
|
0 0 0 1 ];
|
||||||
|
|
||||||
|
%% Compute Point coordinates in the new reference fixed to the NASS base
|
||||||
|
% P_nass = TMrz*TMry*TMty*P_granite;
|
||||||
|
P_nass = TMrz\TMry\TMty\P_granite;
|
||||||
|
R_nass = TMrz\TMry\TMty\R_granite;
|
||||||
|
|
||||||
|
dx = R_nass(1)-P_nass(1);
|
||||||
|
dy = R_nass(2)-P_nass(2);
|
||||||
|
dz = R_nass(3)-P_nass(3);
|
||||||
|
|
||||||
|
%% Compute new basis vectors linked to the NASS base
|
||||||
|
% ux_nass = TMrz*TMry*TMty*[1; 0; 0; 0];
|
||||||
|
% ux_nass = ux_nass(1:3);
|
||||||
|
% uy_nass = TMrz*TMry*TMty*[0; 1; 0; 0];
|
||||||
|
% uy_nass = uy_nass(1:3);
|
||||||
|
% uz_nass = TMrz*TMry*TMty*[0; 0; 1; 0];
|
||||||
|
% uz_nass = uz_nass(1:3);
|
||||||
|
|
||||||
|
ux_nass = TMrz\TMry\TMty\[1; 0; 0; 0];
|
||||||
|
ux_nass = ux_nass(1:3);
|
||||||
|
uy_nass = TMrz\TMry\TMty\[0; 1; 0; 0];
|
||||||
|
uy_nass = uy_nass(1:3);
|
||||||
|
uz_nass = TMrz\TMry\TMty\[0; 0; 1; 0];
|
||||||
|
uz_nass = uz_nass(1:3);
|
||||||
|
|
||||||
|
%% Rotations error w.r.t. granite Frame
|
||||||
|
% Rotations error w.r.t. granite Frame
|
||||||
|
rx_nass = pos(4);
|
||||||
|
ry_nass = pos(5);
|
||||||
|
rz_nass = pos(6);
|
||||||
|
|
||||||
|
% Rotation matrices of the Sample w.r.t. the Granite
|
||||||
|
Mrx_error = [1 0 0 ;
|
||||||
|
0 cos(-rx_nass) -sin(-rx_nass) ;
|
||||||
|
0 sin(-rx_nass) cos(-rx_nass)];
|
||||||
|
|
||||||
|
Mry_error = [ cos(-ry_nass) 0 sin(-ry_nass) ;
|
||||||
|
0 1 0 ;
|
||||||
|
-sin(-ry_nass) 0 cos(-ry_nass)];
|
||||||
|
|
||||||
|
Mrz_error = [cos(-rz_nass) -sin(-rz_nass) 0 ;
|
||||||
|
sin(-rz_nass) cos(-rz_nass) 0 ;
|
||||||
|
0 0 1];
|
||||||
|
|
||||||
|
% Rotation matrix of the Sample w.r.t. the Granite
|
||||||
|
Mr_error = Mrz_error*Mry_error*Mrx_error;
|
||||||
|
|
||||||
|
%% Use matrix to solve
|
||||||
|
R = Mr_error/[ux_nass, uy_nass, uz_nass]; % Rotation matrix from NASS base to Sample
|
||||||
|
|
||||||
|
[thetax, thetay, thetaz] = RM2angle(R);
|
||||||
|
|
||||||
|
error_nass = [dx; dy; dz; thetax; thetay; thetaz];
|
||||||
|
|
||||||
|
%% Custom Functions
|
||||||
|
function [thetax, thetay, thetaz] = RM2angle(R)
|
||||||
|
if abs(abs(R(3, 1)) - 1) > 1e-6 % R31 != 1 and R31 != -1
|
||||||
|
thetay = -asin(R(3, 1));
|
||||||
|
% thetaybis = pi-thetay;
|
||||||
|
thetax = atan2(R(3, 2)/cos(thetay), R(3, 3)/cos(thetay));
|
||||||
|
% thetaxbis = atan2(R(3, 2)/cos(thetaybis), R(3, 3)/cos(thetaybis));
|
||||||
|
thetaz = atan2(R(2, 1)/cos(thetay), R(1, 1)/cos(thetay));
|
||||||
|
% thetazbis = atan2(R(2, 1)/cos(thetaybis), R(1, 1)/cos(thetaybis));
|
||||||
|
else
|
||||||
|
thetaz = 0;
|
||||||
|
if abs(R(3, 1)+1) < 1e-6 % R31 = -1
|
||||||
|
thetay = pi/2;
|
||||||
|
thetax = thetaz + atan2(R(1, 2), R(1, 3));
|
||||||
|
else
|
||||||
|
thetay = -pi/2;
|
||||||
|
thetax = -thetaz + atan2(-R(1, 2), -R(1, 3));
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
@ -1,3 +1,14 @@
|
|||||||
|
% generateDiagPidControl
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/generateDiagPidControl.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:generateDiagPidControl>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/generateDiagPidControl.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [K] = generateDiagPidControl(G, fs)
|
function [K] = generateDiagPidControl(G, fs)
|
||||||
%%
|
%%
|
||||||
pid_opts = pidtuneOptions(...
|
pid_opts = pidtuneOptions(...
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
% identifyPlant
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/identifyPlant.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:identifyPlant>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/identifyPlant.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [sys] = identifyPlant(opts_param)
|
function [sys] = identifyPlant(opts_param)
|
||||||
%% Default values for opts
|
%% Default values for opts
|
||||||
opts = struct();
|
opts = struct();
|
||||||
|
19
src/init_simulation.m
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
% Simulation Initialization
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/init_simulation.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:init_simulation>>
|
||||||
|
|
||||||
|
% This Matlab script is accessible [[file:src/init_simulation.m][here]].
|
||||||
|
|
||||||
|
% This script runs just before the simulation is started.
|
||||||
|
% It is used to load the simulation configuration and the controllers used for the simulation.
|
||||||
|
|
||||||
|
|
||||||
|
%% Load all the data used for the simulation
|
||||||
|
load('./mat/sim_conf.mat');
|
||||||
|
|
||||||
|
%% Load Controller
|
||||||
|
load('./mat/controllers.mat');
|
@ -1,3 +1,14 @@
|
|||||||
|
% Center of gravity compensation
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/initializeAxisc.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:initializeAxisc>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/initializeAxisc.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [axisc] = initializeAxisc()
|
function [axisc] = initializeAxisc()
|
||||||
%%
|
%%
|
||||||
axisc = struct();
|
axisc = struct();
|
@ -1,3 +1,14 @@
|
|||||||
|
% Experiment
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/initializeExperiment.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:initializeExperiment>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/initializeExperiment.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [] = initializeExperiment(exp_name, sys_mass)
|
function [] = initializeExperiment(exp_name, sys_mass)
|
||||||
if strcmp(exp_name, 'tomography')
|
if strcmp(exp_name, 'tomography')
|
||||||
opts_sim = struct(...
|
opts_sim = struct(...
|
@ -1,3 +1,14 @@
|
|||||||
|
% Granite
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/initializeGranite.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:initializeGranite>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/initializeGranite.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [granite] = initializeGranite()
|
function [granite] = initializeGranite()
|
||||||
%%
|
%%
|
||||||
granite = struct();
|
granite = struct();
|
22
src/initializeGround.m
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
% Ground
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/initializeGround.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:initializeGround>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/initializeGround.m][here]].
|
||||||
|
|
||||||
|
|
||||||
|
function [ground] = initializeGround()
|
||||||
|
%%
|
||||||
|
ground = struct();
|
||||||
|
|
||||||
|
ground.shape = [2, 2, 0.5]; % [m]
|
||||||
|
ground.density = 2800; % [kg/m3]
|
||||||
|
ground.color = [0.5, 0.5, 0.5];
|
||||||
|
|
||||||
|
%% Save
|
||||||
|
save('./mat/stages.mat', 'ground', '-append');
|
||||||
|
end
|
@ -1,3 +1,14 @@
|
|||||||
|
% Inputs
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/initializeInputs.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:initializeInputs>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/initializeInputs.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [inputs] = initializeInputs(opts_param)
|
function [inputs] = initializeInputs(opts_param)
|
||||||
%% Default values for opts
|
%% Default values for opts
|
||||||
opts = struct( ...
|
opts = struct( ...
|
||||||
@ -136,7 +147,7 @@ function [inputs] = initializeInputs(opts_param)
|
|||||||
|
|
||||||
%% Ry
|
%% Ry
|
||||||
TMRy = [ cos(ry) 0 sin(ry) 0 ;
|
TMRy = [ cos(ry) 0 sin(ry) 0 ;
|
||||||
0 1 0 0 ;
|
0 1 0 0 ;
|
||||||
-sin(ry) 0 cos(ry) 0 ;
|
-sin(ry) 0 cos(ry) 0 ;
|
||||||
0 0 0 1 ];
|
0 0 0 1 ];
|
||||||
|
|
@ -1,3 +1,14 @@
|
|||||||
|
% Micro Hexapod
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/initializeMicroHexapod.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:initializeMicroHexapod>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/initializeMicroHexapod.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [micro_hexapod] = initializeMicroHexapod(opts_param)
|
function [micro_hexapod] = initializeMicroHexapod(opts_param)
|
||||||
%% Default values for opts
|
%% Default values for opts
|
||||||
opts = struct();
|
opts = struct();
|
||||||
@ -107,7 +118,7 @@ function [micro_hexapod] = initializeMicroHexapod(opts_param)
|
|||||||
stewart.pos_base = zeros(6, 3);
|
stewart.pos_base = zeros(6, 3);
|
||||||
stewart.pos_top = zeros(6, 3);
|
stewart.pos_top = zeros(6, 3);
|
||||||
|
|
||||||
alpha_b = stewart.BP.leg.ang*pi/180; % angle de décalage par rapport à 120 deg (pour positionner les supports bases)
|
alpha_b = stewart.BP.leg.ang*pi/180; % angle de décalage par rapport à 120 deg (pour positionner les supports bases)
|
||||||
alpha_t = stewart.TP.leg.ang*pi/180; % +- offset angle from 120 degree spacing on top
|
alpha_t = stewart.TP.leg.ang*pi/180; % +- offset angle from 120 degree spacing on top
|
||||||
|
|
||||||
height = (stewart.h-stewart.BP.thickness-stewart.TP.thickness-stewart.Leg.sphere.bottom-stewart.Leg.sphere.top-stewart.SP.thickness.bottom-stewart.SP.thickness.top)*0.001; % TODO
|
height = (stewart.h-stewart.BP.thickness-stewart.TP.thickness-stewart.Leg.sphere.bottom-stewart.Leg.sphere.top-stewart.SP.thickness.bottom-stewart.SP.thickness.top)*0.001; % TODO
|
||||||
@ -145,11 +156,11 @@ function [micro_hexapod] = initializeMicroHexapod(opts_param)
|
|||||||
|
|
||||||
stewart.Leg.lenght = 1000*leg_length(1)/1.5;
|
stewart.Leg.lenght = 1000*leg_length(1)/1.5;
|
||||||
stewart.Leg.shape.bot = [0 0; ...
|
stewart.Leg.shape.bot = [0 0; ...
|
||||||
stewart.Leg.rad.bottom 0; ...
|
stewart.Leg.rad.bottom 0; ...
|
||||||
stewart.Leg.rad.bottom stewart.Leg.lenght; ...
|
stewart.Leg.rad.bottom stewart.Leg.lenght; ...
|
||||||
stewart.Leg.rad.top stewart.Leg.lenght; ...
|
stewart.Leg.rad.top stewart.Leg.lenght; ...
|
||||||
stewart.Leg.rad.top 0.2*stewart.Leg.lenght; ...
|
stewart.Leg.rad.top 0.2*stewart.Leg.lenght; ...
|
||||||
0 0.2*stewart.Leg.lenght];
|
0 0.2*stewart.Leg.lenght];
|
||||||
|
|
||||||
%% Calculate revolute and cylindrical axes
|
%% Calculate revolute and cylindrical axes
|
||||||
rev1 = zeros(6, 3);
|
rev1 = zeros(6, 3);
|
@ -1,3 +1,14 @@
|
|||||||
|
% Mirror
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/initializeMirror.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:initializeMirror>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/initializeMirror.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [] = initializeMirror(opts_param)
|
function [] = initializeMirror(opts_param)
|
||||||
%% Default values for opts
|
%% Default values for opts
|
||||||
opts = struct(...
|
opts = struct(...
|
@ -1,3 +1,14 @@
|
|||||||
|
% Nano Hexapod
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/initializeNanoHexapod.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:initializeNanoHexapod>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/initializeNanoHexapod.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [nano_hexapod] = initializeNanoHexapod(opts_param)
|
function [nano_hexapod] = initializeNanoHexapod(opts_param)
|
||||||
%% Default values for opts
|
%% Default values for opts
|
||||||
opts = struct('actuator', 'piezo');
|
opts = struct('actuator', 'piezo');
|
||||||
@ -114,7 +125,7 @@ function [nano_hexapod] = initializeNanoHexapod(opts_param)
|
|||||||
stewart.pos_base = zeros(6, 3);
|
stewart.pos_base = zeros(6, 3);
|
||||||
stewart.pos_top = zeros(6, 3);
|
stewart.pos_top = zeros(6, 3);
|
||||||
|
|
||||||
alpha_b = stewart.BP.leg.ang*pi/180; % angle de décalage par rapport à 120 deg (pour positionner les supports bases)
|
alpha_b = stewart.BP.leg.ang*pi/180; % angle de décalage par rapport à 120 deg (pour positionner les supports bases)
|
||||||
alpha_t = stewart.TP.leg.ang*pi/180; % +- offset angle from 120 degree spacing on top
|
alpha_t = stewart.TP.leg.ang*pi/180; % +- offset angle from 120 degree spacing on top
|
||||||
|
|
||||||
height = (stewart.h-stewart.BP.thickness-stewart.TP.thickness-stewart.Leg.sphere.bottom-stewart.Leg.sphere.top-stewart.SP.thickness.bottom-stewart.SP.thickness.top)*0.001; % TODO
|
height = (stewart.h-stewart.BP.thickness-stewart.TP.thickness-stewart.Leg.sphere.bottom-stewart.Leg.sphere.top-stewart.SP.thickness.bottom-stewart.SP.thickness.top)*0.001; % TODO
|
||||||
@ -152,11 +163,11 @@ function [nano_hexapod] = initializeNanoHexapod(opts_param)
|
|||||||
|
|
||||||
stewart.Leg.lenght = 1000*leg_length(1)/1.5;
|
stewart.Leg.lenght = 1000*leg_length(1)/1.5;
|
||||||
stewart.Leg.shape.bot = [0 0; ...
|
stewart.Leg.shape.bot = [0 0; ...
|
||||||
stewart.Leg.rad.bottom 0; ...
|
stewart.Leg.rad.bottom 0; ...
|
||||||
stewart.Leg.rad.bottom stewart.Leg.lenght; ...
|
stewart.Leg.rad.bottom stewart.Leg.lenght; ...
|
||||||
stewart.Leg.rad.top stewart.Leg.lenght; ...
|
stewart.Leg.rad.top stewart.Leg.lenght; ...
|
||||||
stewart.Leg.rad.top 0.2*stewart.Leg.lenght; ...
|
stewart.Leg.rad.top 0.2*stewart.Leg.lenght; ...
|
||||||
0 0.2*stewart.Leg.lenght];
|
0 0.2*stewart.Leg.lenght];
|
||||||
|
|
||||||
%% Calculate revolute and cylindrical axes
|
%% Calculate revolute and cylindrical axes
|
||||||
rev1 = zeros(6, 3);
|
rev1 = zeros(6, 3);
|
@ -1,3 +1,14 @@
|
|||||||
|
% Tilt Stage
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/initializeRy.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:initializeRy>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/initializeRy.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [ry] = initializeRy(opts_param)
|
function [ry] = initializeRy(opts_param)
|
||||||
%% Default values for opts
|
%% Default values for opts
|
||||||
opts = struct('rigid', false);
|
opts = struct('rigid', false);
|
||||||
@ -47,7 +58,7 @@ function [ry] = initializeRy(opts_param)
|
|||||||
ry.c.rad = 10*(1/5)*sqrt(ry.k.rad/ry.m);
|
ry.c.rad = 10*(1/5)*sqrt(ry.k.rad/ry.m);
|
||||||
ry.c.rrad = 10*(1/5)*sqrt(ry.k.rrad/ry.m);
|
ry.c.rrad = 10*(1/5)*sqrt(ry.k.rrad/ry.m);
|
||||||
ry.c.tilt = 10*(1/1)*sqrt(ry.k.tilt/ry.m);
|
ry.c.tilt = 10*(1/1)*sqrt(ry.k.tilt/ry.m);
|
||||||
|
|
||||||
%% Positioning parameters
|
%% Positioning parameters
|
||||||
ry.z_offset = 0.58178; % Z-Offset so that the center of rotation matches the sample center [m]
|
ry.z_offset = 0.58178; % Z-Offset so that the center of rotation matches the sample center [m]
|
||||||
|
|
@ -1,3 +1,14 @@
|
|||||||
|
% Spindle
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/initializeRz.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:initializeRz>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/initializeRz.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [rz] = initializeRz(opts_param)
|
function [rz] = initializeRz(opts_param)
|
||||||
%% Default values for opts
|
%% Default values for opts
|
||||||
opts = struct('rigid', false);
|
opts = struct('rigid', false);
|
@ -1,3 +1,14 @@
|
|||||||
|
% Sample
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/initializeSample.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:initializeSample>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/initializeSample.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [sample] = initializeSample(opts_param)
|
function [sample] = initializeSample(opts_param)
|
||||||
%% Default values for opts
|
%% Default values for opts
|
||||||
sample = struct('radius', 100, ...
|
sample = struct('radius', 100, ...
|
||||||
@ -13,7 +24,7 @@ function [sample] = initializeSample(opts_param)
|
|||||||
sample.(opt{1}) = opts_param.(opt{1});
|
sample.(opt{1}) = opts_param.(opt{1});
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
%%
|
%%
|
||||||
sample.k.x = 1e8;
|
sample.k.x = 1e8;
|
||||||
sample.c.x = sqrt(sample.k.x*sample.mass)/10;
|
sample.c.x = sqrt(sample.k.x*sample.mass)/10;
|
@ -1,3 +1,14 @@
|
|||||||
|
% Simulation Configuration
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/initializeSimConf.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:initializeSimConf>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/initializeSimConf.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [] = initializeSimConf(opts_param)
|
function [] = initializeSimConf(opts_param)
|
||||||
%% Default values for opts
|
%% Default values for opts
|
||||||
opts = struct('Ts', 1e-4, ... % Sampling time [s]
|
opts = struct('Ts', 1e-4, ... % Sampling time [s]
|
@ -1,3 +1,14 @@
|
|||||||
|
% Translation Stage
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/initializeTy.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:initializeTy>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/initializeTy.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [ty] = initializeTy(opts_param)
|
function [ty] = initializeTy(opts_param)
|
||||||
%% Default values for opts
|
%% Default values for opts
|
||||||
opts = struct('rigid', false);
|
opts = struct('rigid', false);
|
||||||
@ -8,7 +19,7 @@ function [ty] = initializeTy(opts_param)
|
|||||||
opts.(opt{1}) = opts_param.(opt{1});
|
opts.(opt{1}) = opts_param.(opt{1});
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
%%
|
%%
|
||||||
ty = struct();
|
ty = struct();
|
||||||
|
|
5
src/project_shutdown.m
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
% When the project closes, it runs the =project_shutdown.m= script defined below.
|
||||||
|
|
||||||
|
Simulink.fileGenControl('reset');
|
@ -1,3 +1,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
% When the project opens, a startup script is ran.
|
||||||
|
% The startup script is defined below and is exported to the =project_startup.m= script.
|
||||||
|
|
||||||
%%
|
%%
|
||||||
freqs = logspace(-1, 3, 1000);
|
freqs = logspace(-1, 3, 1000);
|
||||||
save_fig = false;
|
save_fig = false;
|
@ -1,3 +1,14 @@
|
|||||||
|
% runSimulation
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args:matlab+: :tangle src/runSimulation.m
|
||||||
|
% :header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
% :header-args:matlab+: :eval no :results none
|
||||||
|
% :END:
|
||||||
|
% <<sec:runSimulation>>
|
||||||
|
|
||||||
|
% This Matlab function is accessible [[file:src/runSimulation.m][here]].
|
||||||
|
|
||||||
|
|
||||||
function [] = runSimulation(sys_name, sys_mass, ctrl_type, act_damp)
|
function [] = runSimulation(sys_name, sys_mass, ctrl_type, act_damp)
|
||||||
%% Load the controller and save it for the simulation
|
%% Load the controller and save it for the simulation
|
||||||
if strcmp(ctrl_type, 'cl') && strcmp(act_damp, 'none')
|
if strcmp(ctrl_type, 'cl') && strcmp(act_damp, 'none')
|
||||||
@ -27,7 +38,7 @@ function [] = runSimulation(sys_name, sys_mass, ctrl_type, act_damp)
|
|||||||
|
|
||||||
%%
|
%%
|
||||||
if strcmp(sys_name, 'pz')
|
if strcmp(sys_name, 'pz')
|
||||||
initializeNanoHexapod(struct('actuator', 'piezo'));
|
initializeNanoHexapod(struct('actuator', 'piezo'));
|
||||||
elseif strcmp(sys_name, 'vc')
|
elseif strcmp(sys_name, 'vc')
|
||||||
initializeNanoHexapod(struct('actuator', 'lorentz'));
|
initializeNanoHexapod(struct('actuator', 'lorentz'));
|
||||||
else
|
else
|
||||||
@ -35,7 +46,7 @@ function [] = runSimulation(sys_name, sys_mass, ctrl_type, act_damp)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if strcmp(sys_mass, 'light')
|
if strcmp(sys_mass, 'light')
|
||||||
initializeSample(struct('mass', 1));
|
initializeSample(struct('mass', 1));
|
||||||
elseif strcmp(sys_mass, 'heavy')
|
elseif strcmp(sys_mass, 'heavy')
|
||||||
initializeSample(struct('mass', 50));
|
initializeSample(struct('mass', 50));
|
||||||
else
|
else
|
||||||
|