Add "init" type to nano-hexapod
correct init type of sample add file to initialize the stages under gravity
This commit is contained in:
parent
23e7129687
commit
f816c80906
Binary file not shown.
@ -1229,7 +1229,7 @@ The =mirror= structure is saved.
|
||||
:END:
|
||||
#+begin_src matlab
|
||||
arguments
|
||||
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible'
|
||||
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'init'})} = 'flexible'
|
||||
% initializeFramesPositions
|
||||
args.H (1,1) double {mustBeNumeric, mustBePositive} = 90e-3
|
||||
args.MO_B (1,1) double {mustBeNumeric} = 175e-3
|
||||
@ -1303,6 +1303,8 @@ The =mirror= structure is saved.
|
||||
nano_hexapod.type = 1;
|
||||
case 'flexible'
|
||||
nano_hexapod.type = 2;
|
||||
case 'init'
|
||||
nano_hexapod.type = 4;
|
||||
end
|
||||
#+end_src
|
||||
|
||||
|
151
org/stage_initialization.org
Normal file
151
org/stage_initialization.org
Normal file
@ -0,0 +1,151 @@
|
||||
#+TITLE: Evaluating the Plant Uncertainty in various experimental conditions
|
||||
: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 no
|
||||
#+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/org/}{config.tex}")
|
||||
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
|
||||
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
|
||||
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100
|
||||
#+PROPERTY: header-args:latex+ :results 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:
|
||||
|
||||
* 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('nass_model.slx')
|
||||
#+end_src
|
||||
|
||||
* Initialization
|
||||
#+begin_src matlab
|
||||
initializeGround();
|
||||
initializeGranite('type', 'init');
|
||||
initializeTy('type', 'init');
|
||||
initializeRy('type', 'init');
|
||||
initializeRz('type', 'init');
|
||||
initializeMicroHexapod('type', 'init');
|
||||
initializeAxisc();
|
||||
initializeMirror();
|
||||
initializeNanoHexapod('type', 'init');
|
||||
initializeSample('type', 'init');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
initializeReferences();
|
||||
initializeDisturbances('enable', false);
|
||||
initializeController();
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
initializeSimscapeConfiguration('gravity', true);
|
||||
initializeLoggingConfiguration('log', 'all');
|
||||
#+end_src
|
||||
|
||||
* Simulation
|
||||
#+begin_src matlab
|
||||
load('mat/conf_simulink.mat');
|
||||
set_param(conf_simulink, 'StopTime', '0.5');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
sim('nass_model');
|
||||
#+end_src
|
||||
|
||||
Verification that nothing is moving
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
ax1 = subplot(2, 3, 1);
|
||||
hold on;
|
||||
plot(simout.Em.En.Time, simout.Em.En.Data(:, 1))
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Dx [m]');
|
||||
|
||||
ax2 = subplot(2, 3, 2);
|
||||
hold on;
|
||||
plot(simout.Em.En.Time, simout.Em.En.Data(:, 2))
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Dy [m]');
|
||||
|
||||
ax3 = subplot(2, 3, 3);
|
||||
hold on;
|
||||
plot(simout.Em.En.Time, simout.Em.En.Data(:, 3))
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Dz [m]');
|
||||
|
||||
ax4 = subplot(2, 3, 4);
|
||||
hold on;
|
||||
plot(simout.Em.En.Time, simout.Em.En.Data(:, 4))
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Rx [rad]');
|
||||
|
||||
ax5 = subplot(2, 3, 5);
|
||||
hold on;
|
||||
plot(simout.Em.En.Time, simout.Em.En.Data(:, 5))
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Ry [rad]');
|
||||
|
||||
ax6 = subplot(2, 3, 6);
|
||||
hold on;
|
||||
plot(simout.Em.En.Time, simout.Em.En.Data(:, 6))
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Rz [rad]');
|
||||
#+end_src
|
||||
|
||||
Measured Force in each leg
|
||||
#+begin_src matlab
|
||||
Fgm
|
||||
Ftym
|
||||
Fym
|
||||
Fzm
|
||||
Fhm
|
||||
Fnm
|
||||
Fsm
|
||||
#+end_src
|
@ -1,7 +1,7 @@
|
||||
function [nano_hexapod] = initializeNanoHexapod(args)
|
||||
|
||||
arguments
|
||||
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible'
|
||||
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'init'})} = 'flexible'
|
||||
% initializeFramesPositions
|
||||
args.H (1,1) double {mustBeNumeric, mustBePositive} = 90e-3
|
||||
args.MO_B (1,1) double {mustBeNumeric} = 175e-3
|
||||
@ -61,6 +61,8 @@ switch args.type
|
||||
nano_hexapod.type = 1;
|
||||
case 'flexible'
|
||||
nano_hexapod.type = 2;
|
||||
case 'init'
|
||||
nano_hexapod.type = 4;
|
||||
end
|
||||
|
||||
save('./mat/stages.mat', 'nano_hexapod', '-append');
|
||||
|
Loading…
Reference in New Issue
Block a user