Add modal-analysis type to all stages

This commit is contained in:
Thomas Dehaeze 2020-02-18 16:46:35 +01:00
parent b40079d6e6
commit f5056db788
12 changed files with 121 additions and 43 deletions

View File

@ -136,7 +136,6 @@ save('./mat/id_micro_station.mat', 'G_ms');
** Compare with the measurements ** Compare with the measurements
* Modal Analysis of the Micro-Station :noexport: * Modal Analysis of the Micro-Station :noexport:
** Matlab Init :noexport:ignore: ** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
@ -274,7 +273,7 @@ Some of the springs and dampers values can be estimated from the joints/stages s
** Prepare the Simulation ** Prepare the Simulation
#+begin_src matlab #+begin_src matlab
open('identification/matlab/sim_micro_station_com.slx') open('nass_model.slx')
#+end_src #+end_src
We load the configuration. We load the configuration.
@ -289,23 +288,31 @@ We set a small =StopTime=.
We initialize all the stages. We initialize all the stages.
#+begin_src matlab #+begin_src matlab
initializeGround(); initializeGround( 'type', 'rigid');
initializeGranite(); initializeGranite( 'type', 'modal-analysis');
initializeTy(); initializeTy( 'type', 'modal-analysis');
initializeRy(); initializeRy( 'type', 'modal-analysis');
initializeRz(); initializeRz( 'type', 'modal-analysis');
initializeMicroHexapod(); initializeMicroHexapod('type', 'flexible');
initializeAxisc(); initializeAxisc( 'type', 'modal-analysis');
initializeMirror();
initializeNanoHexapod('actuator', 'piezo'); initializeMirror( 'type', 'none');
initializeSample('mass', 50); initializeNanoHexapod( 'type', 'none');
initializeSample( 'type', 'none');
initializeController( 'type', 'open-loop');
initializeLoggingConfiguration('log', 'none');
initializeReferences();
initializeDisturbances('enable', false);
#+end_src #+end_src
** Estimate the position of the CoM of each solid and compare with the one took for the Measurement Analysis ** Estimate the position of the CoM of each solid and compare with the one took for the Measurement Analysis
Thanks to the [[https://fr.mathworks.com/help/physmod/sm/ref/inertiasensor.html][Inertia Sensor]] simscape block, it is possible to estimate the position of the Center of Mass of a solid body with respect to a defined frame. Thanks to the [[https://fr.mathworks.com/help/physmod/sm/ref/inertiasensor.html][Inertia Sensor]] simscape block, it is possible to estimate the position of the Center of Mass of a solid body with respect to a defined frame.
#+begin_src matlab #+begin_src matlab
sim('sim_micro_station_com') sim('nass_model')
#+end_src #+end_src
The results are shown in the table [[tab:com_simscape]]. The results are shown in the table [[tab:com_simscape]].
@ -395,40 +402,38 @@ Then, we use the obtained results to add a =rigidTransform= block in order to cr
We now use a new Simscape Model where 6DoF inertial sensors are located at the Center of Mass of each solid body. We now use a new Simscape Model where 6DoF inertial sensors are located at the Center of Mass of each solid body.
#+begin_src matlab #+begin_src matlab
load('mat/solids_com.mat', 'granite_bot_com', 'granite_top_com', 'ty_com', 'ry_com', 'rz_com', 'hexa_com'); % load('mat/solids_com.mat', 'granite_bot_com', 'granite_top_com', 'ty_com', 'ry_com', 'rz_com', 'hexa_com');
#+end_src #+end_src
#+begin_src matlab #+begin_src matlab
open('identification/matlab/sim_micro_station_modal_analysis_com.slx') open('nass_model.slx')
#+end_src #+end_src
We use the =linearize= function in order to estimate the dynamics from forces applied on the Translation stage at the same position used for the real modal analysis to the inertial sensors. We use the =linearize= function in order to estimate the dynamics from forces applied on the Translation stage at the same position used for the real modal analysis to the inertial sensors.
#+begin_src matlab #+begin_src matlab
%% Options for Linearized %% Options for Linearized
options = linearizeOptions; options = linearizeOptions;
options.SampleTime = 0; options.SampleTime = 0;
%% Name of the Simulink File %% Name of the Simulink File
mdl = 'sim_micro_station_modal_analysis_com'; mdl = 'nass_model';
#+end_src
#+begin_src matlab %% Input/Output definition
%% Micro-Hexapod clear io; io_i = 1;
% Input/Output definition io(io_i) = linio([mdl, '/Micro-Station/Translation Stage/Modal Analysis/F_hammer'], 1, 'openinput'); io_i = io_i + 1;
io(1) = linio([mdl, '/F_hammer'],1,'openinput'); io(io_i) = linio([mdl, '/Micro-Station/Granite/Modal Analysis/accelerometer'], 1, 'openoutput'); io_i = io_i + 1;
io(2) = linio([mdl, '/acc_gtop'],1,'output'); io(io_i) = linio([mdl, '/Micro-Station/Translation Stage/Modal Analysis/accelerometer'], 1, 'openoutput'); io_i = io_i + 1;
io(3) = linio([mdl, '/acc_ty'],1,'output'); io(io_i) = linio([mdl, '/Micro-Station/Tilt Stage/Modal Analysis/accelerometer'], 1, 'openoutput'); io_i = io_i + 1;
io(4) = linio([mdl, '/acc_ry'],1,'output'); io(io_i) = linio([mdl, '/Micro-Station/Spindle/Modal Analysis/accelerometer'], 1, 'openoutput'); io_i = io_i + 1;
io(5) = linio([mdl, '/acc_rz'],1,'output'); io(io_i) = linio([mdl, '/Micro-Station/CoM Alignement System/Modal Analysis/accelerometer'], 1, 'openoutput'); io_i = io_i + 1;
io(6) = linio([mdl, '/acc_hexa'],1,'output');
#+end_src #+end_src
#+begin_src matlab #+begin_src matlab
% Run the linearization % Run the linearization
G_ms = linearize(mdl, io, 0); G_ms = linearize(mdl, io, 0);
% Input/Output names %% Input/Output definition
clear io; io_i = 1;
G_ms.InputName = {'Fx', 'Fy', 'Fz'}; G_ms.InputName = {'Fx', 'Fy', 'Fz'};
G_ms.OutputName = {'gtop_x', 'gtop_y', 'gtop_z', 'gtop_rx', 'gtop_ry', 'gtop_rz', ... G_ms.OutputName = {'gtop_x', 'gtop_y', 'gtop_z', 'gtop_rx', 'gtop_ry', 'gtop_rz', ...
'ty_x', 'ty_y', 'ty_z', 'ty_rx', 'ty_ry', 'ty_rz', ... 'ty_x', 'ty_y', 'ty_z', 'ty_rx', 'ty_ry', 'ty_rz', ...

Binary file not shown.

View File

@ -211,7 +211,7 @@ The model of the Ground is composed of:
:END: :END:
#+begin_src matlab #+begin_src matlab
arguments arguments
args.type char {mustBeMember(args.type,{'none', 'solid'})} = 'solid' args.type char {mustBeMember(args.type,{'none', 'rigid'})} = 'rigid'
end end
#+end_src #+end_src
@ -232,7 +232,7 @@ First, we initialize the =granite= structure.
switch args.type switch args.type
case 'none' case 'none'
ground.type = 0; ground.type = 0;
case 'solid' case 'rigid'
ground.type = 1; ground.type = 1;
end end
#+end_src #+end_src
@ -298,7 +298,7 @@ The output =sample_pos= corresponds to the impact point of the X-ray.
:END: :END:
#+begin_src matlab #+begin_src matlab
arguments arguments
args.type char {mustBeMember(args.type,{'rigid', 'flexible', 'none'})} = 'flexible' args.type char {mustBeMember(args.type,{'rigid', 'flexible', 'none', 'modal-analysis'})} = 'flexible'
args.density (1,1) double {mustBeNumeric, mustBeNonnegative} = 2800 % Density [kg/m3] args.density (1,1) double {mustBeNumeric, mustBeNonnegative} = 2800 % Density [kg/m3]
args.x0 (1,1) double {mustBeNumeric} = 0 % Rest position of the Joint in the X direction [m] args.x0 (1,1) double {mustBeNumeric} = 0 % Rest position of the Joint in the X direction [m]
args.y0 (1,1) double {mustBeNumeric} = 0 % Rest position of the Joint in the Y direction [m] args.y0 (1,1) double {mustBeNumeric} = 0 % Rest position of the Joint in the Y direction [m]
@ -328,6 +328,8 @@ First, we initialize the =granite= structure.
granite.type = 1; granite.type = 1;
case 'flexible' case 'flexible'
granite.type = 2; granite.type = 2;
case 'modal-analysis'
granite.type = 3;
end end
#+end_src #+end_src
@ -421,7 +423,7 @@ The Simscape model of the Translation stage consist of:
:END: :END:
#+begin_src matlab #+begin_src matlab
arguments arguments
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible' args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'modal-analysis'})} = 'flexible'
args.x11 (1,1) double {mustBeNumeric} = 0 % [m] args.x11 (1,1) double {mustBeNumeric} = 0 % [m]
args.z11 (1,1) double {mustBeNumeric} = 0 % [m] args.z11 (1,1) double {mustBeNumeric} = 0 % [m]
args.x21 (1,1) double {mustBeNumeric} = 0 % [m] args.x21 (1,1) double {mustBeNumeric} = 0 % [m]
@ -455,6 +457,8 @@ First, we initialize the =ty= structure.
ty.type = 1; ty.type = 1;
case 'flexible' case 'flexible'
ty.type = 2; ty.type = 2;
case 'modal-analysis'
ty.type = 3;
end end
#+end_src #+end_src
@ -580,7 +584,7 @@ The Simscape model of the Tilt stage is composed of:
:END: :END:
#+begin_src matlab #+begin_src matlab
arguments arguments
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible' args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'modal-analysis'})} = 'flexible'
args.x11 (1,1) double {mustBeNumeric} = 0 % [m] args.x11 (1,1) double {mustBeNumeric} = 0 % [m]
args.y11 (1,1) double {mustBeNumeric} = 0 % [m] args.y11 (1,1) double {mustBeNumeric} = 0 % [m]
args.z11 (1,1) double {mustBeNumeric} = 0 % [m] args.z11 (1,1) double {mustBeNumeric} = 0 % [m]
@ -618,6 +622,8 @@ First, we initialize the =ry= structure.
ry.type = 1; ry.type = 1;
case 'flexible' case 'flexible'
ry.type = 2; ry.type = 2;
case 'modal-analysis'
ry.type = 3;
end end
#+end_src #+end_src
@ -733,7 +739,7 @@ The Simscape model of the Spindle is composed of:
:END: :END:
#+begin_src matlab #+begin_src matlab
arguments arguments
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible' args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'modal-analysis'})} = 'flexible'
args.x0 (1,1) double {mustBeNumeric} = 0 % Equilibrium position of the Joint [m] args.x0 (1,1) double {mustBeNumeric} = 0 % Equilibrium position of the Joint [m]
args.y0 (1,1) double {mustBeNumeric} = 0 % Equilibrium position of the Joint [m] args.y0 (1,1) double {mustBeNumeric} = 0 % Equilibrium position of the Joint [m]
args.z0 (1,1) double {mustBeNumeric} = 0 % Equilibrium position of the Joint [m] args.z0 (1,1) double {mustBeNumeric} = 0 % Equilibrium position of the Joint [m]
@ -764,6 +770,8 @@ First, we initialize the =rz= structure.
rz.type = 1; rz.type = 1;
case 'flexible' case 'flexible'
rz.type = 2; rz.type = 2;
case 'modal-analysis'
rz.type = 3;
end end
#+end_src #+end_src
@ -856,6 +864,7 @@ The =rz= structure is saved.
:END: :END:
#+begin_src matlab #+begin_src matlab
arguments arguments
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible'
% initializeFramesPositions % initializeFramesPositions
args.H (1,1) double {mustBeNumeric, mustBePositive} = 350e-3 args.H (1,1) double {mustBeNumeric, mustBePositive} = 350e-3
args.MO_B (1,1) double {mustBeNumeric} = 270e-3 args.MO_B (1,1) double {mustBeNumeric} = 270e-3
@ -913,6 +922,22 @@ Equilibrium position of the each joint.
micro_hexapod.dLeq = args.dLeq; micro_hexapod.dLeq = args.dLeq;
#+end_src #+end_src
** Add Type
:PROPERTIES:
:UNNUMBERED: t
:END:
#+begin_src matlab
switch args.type
case 'none'
micro_hexapod.type = 0;
case 'rigid'
micro_hexapod.type = 1;
case 'flexible'
micro_hexapod.type = 2;
end
#+end_src
** Save the Structure ** Save the Structure
:PROPERTIES: :PROPERTIES:
:UNNUMBERED: t :UNNUMBERED: t
@ -962,7 +987,7 @@ The Simscape model of the Center of gravity compensator is composed of:
:END: :END:
#+begin_src matlab #+begin_src matlab
arguments arguments
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible' args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'modal-analysis'})} = 'flexible'
end end
#+end_src #+end_src
@ -987,6 +1012,8 @@ First, we initialize the =axisc= structure.
axisc.type = 1; axisc.type = 1;
case 'flexible' case 'flexible'
axisc.type = 2; axisc.type = 2;
case 'modal-analysis'
axisc.type = 3;
end end
#+end_src #+end_src
@ -1197,6 +1224,7 @@ The =mirror= structure is saved.
:END: :END:
#+begin_src matlab #+begin_src matlab
arguments arguments
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible'
% initializeFramesPositions % initializeFramesPositions
args.H (1,1) double {mustBeNumeric, mustBePositive} = 90e-3 args.H (1,1) double {mustBeNumeric, mustBePositive} = 90e-3
args.MO_B (1,1) double {mustBeNumeric} = 175e-3 args.MO_B (1,1) double {mustBeNumeric} = 175e-3
@ -1258,6 +1286,21 @@ The =mirror= structure is saved.
nano_hexapod.dLeq = args.dLeq; nano_hexapod.dLeq = args.dLeq;
#+end_src #+end_src
** Add Type
:PROPERTIES:
:UNNUMBERED: t
:END:
#+begin_src matlab
switch args.type
case 'none'
nano_hexapod.type = 0;
case 'rigid'
nano_hexapod.type = 1;
case 'flexible'
nano_hexapod.type = 2;
end
#+end_src
** Save the Structure ** Save the Structure
:PROPERTIES: :PROPERTIES:
:UNNUMBERED: t :UNNUMBERED: t

View File

@ -1,7 +1,7 @@
function [axisc] = initializeAxisc(args) function [axisc] = initializeAxisc(args)
arguments arguments
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible' args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'modal-analysis'})} = 'flexible'
end end
axisc = struct(); axisc = struct();
@ -13,6 +13,8 @@ switch args.type
axisc.type = 1; axisc.type = 1;
case 'flexible' case 'flexible'
axisc.type = 2; axisc.type = 2;
case 'modal-analysis'
axisc.type = 3;
end end
% Structure % Structure

View File

@ -1,7 +1,7 @@
function [granite] = initializeGranite(args) function [granite] = initializeGranite(args)
arguments arguments
args.type char {mustBeMember(args.type,{'rigid', 'flexible', 'none'})} = 'flexible' args.type char {mustBeMember(args.type,{'rigid', 'flexible', 'none', 'modal-analysis'})} = 'flexible'
args.density (1,1) double {mustBeNumeric, mustBeNonnegative} = 2800 % Density [kg/m3] args.density (1,1) double {mustBeNumeric, mustBeNonnegative} = 2800 % Density [kg/m3]
args.x0 (1,1) double {mustBeNumeric} = 0 % Rest position of the Joint in the X direction [m] args.x0 (1,1) double {mustBeNumeric} = 0 % Rest position of the Joint in the X direction [m]
args.y0 (1,1) double {mustBeNumeric} = 0 % Rest position of the Joint in the Y direction [m] args.y0 (1,1) double {mustBeNumeric} = 0 % Rest position of the Joint in the Y direction [m]
@ -17,6 +17,8 @@ switch args.type
granite.type = 1; granite.type = 1;
case 'flexible' case 'flexible'
granite.type = 2; granite.type = 2;
case 'modal-analysis'
granite.type = 3;
end end
granite.density = args.density; % [kg/m3] granite.density = args.density; % [kg/m3]

View File

@ -1,7 +1,7 @@
function [ground] = initializeGround(args) function [ground] = initializeGround(args)
arguments arguments
args.type char {mustBeMember(args.type,{'none', 'solid'})} = 'solid' args.type char {mustBeMember(args.type,{'none', 'rigid'})} = 'rigid'
end end
ground = struct(); ground = struct();
@ -9,7 +9,7 @@ ground = struct();
switch args.type switch args.type
case 'none' case 'none'
ground.type = 0; ground.type = 0;
case 'solid' case 'rigid'
ground.type = 1; ground.type = 1;
end end

View File

@ -1,6 +1,7 @@
function [micro_hexapod] = initializeMicroHexapod(args) function [micro_hexapod] = initializeMicroHexapod(args)
arguments arguments
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible'
% initializeFramesPositions % initializeFramesPositions
args.H (1,1) double {mustBeNumeric, mustBePositive} = 350e-3 args.H (1,1) double {mustBeNumeric, mustBePositive} = 350e-3
args.MO_B (1,1) double {mustBeNumeric} = 270e-3 args.MO_B (1,1) double {mustBeNumeric} = 270e-3
@ -48,4 +49,13 @@ micro_hexapod.dLi = dLi;
micro_hexapod.dLeq = args.dLeq; micro_hexapod.dLeq = args.dLeq;
switch args.type
case 'none'
micro_hexapod.type = 0;
case 'rigid'
micro_hexapod.type = 1;
case 'flexible'
micro_hexapod.type = 2;
end
save('./mat/stages.mat', 'micro_hexapod', '-append'); save('./mat/stages.mat', 'micro_hexapod', '-append');

View File

@ -1,6 +1,7 @@
function [nano_hexapod] = initializeNanoHexapod(args) function [nano_hexapod] = initializeNanoHexapod(args)
arguments arguments
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible'
% initializeFramesPositions % initializeFramesPositions
args.H (1,1) double {mustBeNumeric, mustBePositive} = 90e-3 args.H (1,1) double {mustBeNumeric, mustBePositive} = 90e-3
args.MO_B (1,1) double {mustBeNumeric} = 175e-3 args.MO_B (1,1) double {mustBeNumeric} = 175e-3
@ -53,4 +54,13 @@ nano_hexapod.dLi = dLi;
nano_hexapod.dLeq = args.dLeq; nano_hexapod.dLeq = args.dLeq;
switch args.type
case 'none'
nano_hexapod.type = 0;
case 'rigid'
nano_hexapod.type = 1;
case 'flexible'
nano_hexapod.type = 2;
end
save('./mat/stages.mat', 'nano_hexapod', '-append'); save('./mat/stages.mat', 'nano_hexapod', '-append');

View File

@ -1,7 +1,7 @@
function [ry] = initializeRy(args) function [ry] = initializeRy(args)
arguments arguments
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible' args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'modal-analysis'})} = 'flexible'
args.x11 (1,1) double {mustBeNumeric} = 0 % [m] args.x11 (1,1) double {mustBeNumeric} = 0 % [m]
args.y11 (1,1) double {mustBeNumeric} = 0 % [m] args.y11 (1,1) double {mustBeNumeric} = 0 % [m]
args.z11 (1,1) double {mustBeNumeric} = 0 % [m] args.z11 (1,1) double {mustBeNumeric} = 0 % [m]
@ -25,6 +25,8 @@ switch args.type
ry.type = 1; ry.type = 1;
case 'flexible' case 'flexible'
ry.type = 2; ry.type = 2;
case 'modal-analysis'
ry.type = 3;
end end
% Ry - Guide for the tilt stage % Ry - Guide for the tilt stage

View File

@ -1,7 +1,7 @@
function [rz] = initializeRz(args) function [rz] = initializeRz(args)
arguments arguments
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible' args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'modal-analysis'})} = 'flexible'
args.x0 (1,1) double {mustBeNumeric} = 0 % Equilibrium position of the Joint [m] args.x0 (1,1) double {mustBeNumeric} = 0 % Equilibrium position of the Joint [m]
args.y0 (1,1) double {mustBeNumeric} = 0 % Equilibrium position of the Joint [m] args.y0 (1,1) double {mustBeNumeric} = 0 % Equilibrium position of the Joint [m]
args.z0 (1,1) double {mustBeNumeric} = 0 % Equilibrium position of the Joint [m] args.z0 (1,1) double {mustBeNumeric} = 0 % Equilibrium position of the Joint [m]
@ -18,6 +18,8 @@ switch args.type
rz.type = 1; rz.type = 1;
case 'flexible' case 'flexible'
rz.type = 2; rz.type = 2;
case 'modal-analysis'
rz.type = 3;
end end
% Spindle - Slip Ring % Spindle - Slip Ring

View File

@ -1,7 +1,7 @@
function [ty] = initializeTy(args) function [ty] = initializeTy(args)
arguments arguments
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible' args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'modal-analysis'})} = 'flexible'
args.x11 (1,1) double {mustBeNumeric} = 0 % [m] args.x11 (1,1) double {mustBeNumeric} = 0 % [m]
args.z11 (1,1) double {mustBeNumeric} = 0 % [m] args.z11 (1,1) double {mustBeNumeric} = 0 % [m]
args.x21 (1,1) double {mustBeNumeric} = 0 % [m] args.x21 (1,1) double {mustBeNumeric} = 0 % [m]
@ -21,6 +21,8 @@ switch args.type
ty.type = 1; ty.type = 1;
case 'flexible' case 'flexible'
ty.type = 2; ty.type = 2;
case 'modal-analysis'
ty.type = 3;
end end
% Ty Granite frame % Ty Granite frame