Remove model name

This commit is contained in:
Thomas Dehaeze 2020-02-18 13:58:27 +01:00
parent 87bdd8f0e2
commit 56e8a120fa
4 changed files with 46 additions and 56 deletions

View File

@ -72,9 +72,8 @@ The document in organized as follow:
* Simscape Model
<<sec:simscape_model>>
The simulink file to do tomography experiments is =sim_nano_station_tomo.slx=.
#+begin_src matlab
open('experiment_tomography/matlab/sim_nano_station_tomo.slx')
open('nass_model.slx');
#+end_src
We load the shared simulink configuration and we set the =StopTime=.
@ -122,7 +121,7 @@ And we initialize the disturbances to be equal to zero.
We simulate the model.
#+begin_src matlab
sim('sim_nano_station_tomo');
sim('nass_model');
#+end_src
And we save the obtained data.
@ -232,7 +231,7 @@ We now activate the disturbances.
We simulate the model.
#+begin_src matlab
sim('sim_nano_station_tomo');
sim('nass_model');
#+end_src
And we save the obtained data.
@ -356,7 +355,7 @@ And we initialize the disturbances to zero.
We simulate the model.
#+begin_src matlab
sim('sim_nano_station_tomo');
sim('nass_model');
#+end_src
And we save the obtained data.
@ -484,7 +483,7 @@ And we initialize the disturbances to zero.
We simulate the model.
#+begin_src matlab
sim('sim_nano_station_tomo');
sim('nass_model');
#+end_src
And we save the obtained data.

View File

@ -7,9 +7,8 @@ s = zpk('s');
% Simscape Model
% <<sec:simscape_model>>
% The simulink file to do tomography experiments is =sim_nano_station_tomo.slx=.
open('experiment_tomography/matlab/sim_nano_station_tomo.slx')
open('nass_model.slx');
@ -30,20 +29,20 @@ initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
initializeNanoHexapod(struct('actuator', 'piezo'));
initializeSample(struct('mass', 1));
initializeNanoHexapod('actuator', 'piezo');
initializeSample('mass', 1);
% We initialize the reference path for all the stages.
% All stage is set to its zero position except the Spindle which is rotating at 60rpm.
initializeReferences(struct('Rz_type', 'rotating', 'Rz_period', 1));
initializeReferences('Rz_type', 'rotating', 'Rz_period', 1);
% Simulation Setup
% And we initialize the disturbances to be equal to zero.
opts = struct(...
initializeDisturbances(...
'Dwx', false, ... % Ground Motion - X direction
'Dwy', false, ... % Ground Motion - Y direction
'Dwz', false, ... % Ground Motion - Z direction
@ -51,13 +50,12 @@ opts = struct(...
'Fty_z', false, ... % Translation Stage - Z direction
'Frz_z', false ... % Spindle - Z direction
);
initDisturbances(opts);
% We simulate the model.
sim('sim_nano_station_tomo');
sim('nass_model');
@ -96,7 +94,7 @@ plot(t, Edz, 'DisplayName', '$\epsilon_{z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x');
xlim([1, inf]);
xlim([2, inf]);
@ -121,12 +119,12 @@ plot(t, Erz, 'DisplayName', '$\epsilon_{\theta z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x');
xlim([1, inf]);
xlim([2, inf]);
% Simulation Setup
% We now activate the disturbances.
opts = struct(...
initializeDisturbances(...
'Dwx', true, ... % Ground Motion - X direction
'Dwy', true, ... % Ground Motion - Y direction
'Dwz', true, ... % Ground Motion - Z direction
@ -134,13 +132,12 @@ opts = struct(...
'Fty_z', true, ... % Translation Stage - Z direction
'Frz_z', true ... % Spindle - Z direction
);
initDisturbances(opts);
% We simulate the model.
sim('sim_nano_station_tomo');
sim('nass_model');
@ -179,7 +176,7 @@ plot(t, Edz, 'DisplayName', '$\epsilon_{z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x');
xlim([1, inf]);
xlim([2, inf]);
@ -204,7 +201,7 @@ plot(t, Erz, 'DisplayName', '$\epsilon_{\theta z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x');
xlim([1, inf]);
xlim([2, inf]);
% Simulation Setup
% We first set the wanted translation of the Micro Hexapod.
@ -215,19 +212,19 @@ P_micro_hexapod = [0.01; 0; 0]; % [m]
% We initialize the reference path.
initializeReferences(struct('Dh_pos', [P_micro_hexapod; 0; 0; 0], 'Rz_type', 'rotating', 'Rz_period', 1));
initializeReferences('Dh_pos', [P_micro_hexapod; 0; 0; 0], 'Rz_type', 'rotating', 'Rz_period', 1);
% We initialize the stages.
initializeMicroHexapod(struct('AP', P_micro_hexapod));
initializeMicroHexapod('AP', P_micro_hexapod);
% And we initialize the disturbances to zero.
opts = struct(...
initializeDisturbances(...
'Dwx', false, ... % Ground Motion - X direction
'Dwy', false, ... % Ground Motion - Y direction
'Dwz', false, ... % Ground Motion - Z direction
@ -235,13 +232,12 @@ opts = struct(...
'Fty_z', false, ... % Translation Stage - Z direction
'Frz_z', false ... % Spindle - Z direction
);
initDisturbances(opts);
% We simulate the model.
sim('sim_nano_station_tomo');
sim('nass_model');
@ -280,7 +276,7 @@ plot(t, Edz, 'DisplayName', '$\epsilon_{z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x');
xlim([1, inf]);
xlim([2, inf]);
@ -305,12 +301,12 @@ plot(t, Erz, 'DisplayName', '$\epsilon_{\theta z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x');
xlim([1, inf]);
xlim([2, inf]);
% Simulation Setup
% We set the reference path.
initializeReferences(struct('Dy_type', 'triangular', 'Dy_amplitude', 10e-3, 'Dy_period', 1));
initializeReferences('Dy_type', 'triangular', 'Dy_amplitude', 10e-3, 'Dy_period', 1);
@ -324,14 +320,14 @@ initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
initializeNanoHexapod(struct('actuator', 'piezo'));
initializeSample(struct('mass', 1));
initializeNanoHexapod('actuator', 'piezo');
initializeSample('mass', 1);
% And we initialize the disturbances to zero.
opts = struct(...
initializeDisturbances(...
'Dwx', false, ... % Ground Motion - X direction
'Dwy', false, ... % Ground Motion - Y direction
'Dwz', false, ... % Ground Motion - Z direction
@ -339,13 +335,12 @@ opts = struct(...
'Fty_z', false, ... % Translation Stage - Z direction
'Frz_z', false ... % Spindle - Z direction
);
initDisturbances(opts);
% We simulate the model.
sim('sim_nano_station_tomo');
sim('nass_model');
@ -384,7 +379,7 @@ plot(t, Edz, 'DisplayName', '$\epsilon_{z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x');
xlim([1, inf]);
xlim([2, inf]);
@ -409,4 +404,4 @@ plot(t, Erz, 'DisplayName', '$\epsilon_{\theta z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x');
xlim([1, inf]);
xlim([2, inf]);

View File

@ -60,7 +60,7 @@
#+end_src
#+begin_src matlab
open('hac_lac/matlab/sim_nass_hac_lac.slx')
open('nass_model.slx')
#+end_src
** Identification of the plant
@ -106,12 +106,12 @@ First, we identify the dynamics of the system using the =linearize= function.
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'sim_nass_hac_lac';
mdl = 'nass_model';
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/HAC'], 1, 'openinput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/Compute Error in NASS base'], 2, 'openoutput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Inputs
io(io_i) = linio([mdl, '/Tracking Error'], 1, 'openoutput', [], 'En'); io_i = io_i + 1; % Metrology Outputs
%% Run the linearization
G = linearize(mdl, io, options);
@ -130,11 +130,6 @@ First, we identify the dynamics of the system using the =linearize= function.
G_legs.OutputName = {'e1', 'e2', 'e3', 'e4', 'e5', 'e6'};
#+end_src
# And we save them for further analysis.
# #+begin_src matlab
# save('./hac_lac/mat/undamped_plant.mat', 'G');
# #+end_src
*** Display TF
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
@ -329,7 +324,7 @@ We change the simulation stop time.
And we simulate the system.
#+begin_src matlab
sim('sim_nass_active_damping');
sim('nass_model');
#+end_src
Finally, we save the simulation results for further analysis
@ -384,6 +379,7 @@ We load the results of tomography experiments.
#+NAME: fig:nass_act_damp_undamped_sim_tomo_rot
#+CAPTION: Position Error during tomography experiment - Rotations ([[./figs/nass_act_damp_undamped_sim_tomo_rot.png][png]], [[./figs/nass_act_damp_undamped_sim_tomo_rot.pdf][pdf]])
[[file:figs/nass_act_damp_undamped_sim_tomo_rot.png]]
** Verification of the transfer function from nano hexapod to metrology
*** Initialize the Simulation
We initialize all the stages with the default parameters.
@ -427,12 +423,12 @@ First, we identify the dynamics of the system using the =linearize= function.
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'sim_nass_hac_lac';
mdl = 'nass_model';
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/HAC'], 1, 'openinput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/Compute Error in NASS base'], 2, 'openoutput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Inputs
io(io_i) = linio([mdl, '/Tracking Error'], 1, 'openoutput', [], 'En'); io_i = io_i + 1; % Metrology Outputs
%% Run the linearization
G = linearize(mdl, io, options);

View File

@ -97,7 +97,7 @@ The three rotations that we define thus corresponds to the Euler U-V-W angles.
We should have the *same behavior* for the Micro-Hexapod on Simscape (same inputs at least).
However, the Bushing Joint makes rotations around mobiles axes (X, Y' and then Z'') and not fixed axes (X, Y and Z).
*** Using Inverse Kinematics and Leg Actuators
*** TODO Using Inverse Kinematics and Leg Actuators
Here, we can use the Inverse Kinematic of the Hexapod to determine the length of each leg in order to obtain some defined translation and rotation of the mobile platform.
The advantages are:
@ -147,7 +147,7 @@ Otherwise, when the limbs' lengths derived yield complex numbers, then the posit
**** Matlab Implementation
We open the Simulink file.
#+begin_src matlab
open('kinematics/matlab/hexapod_tests.slx')
#+end_src
We load the configuration and set a small =StopTime=.
@ -182,7 +182,7 @@ We define the wanted position/orientation of the Hexapod under study.
We run the simulation.
#+begin_src matlab
sim('hexapod_tests')
sim()
#+end_src
And we verify that we indeed succeed to go to the wanted position.