diff --git a/figs/identification_comp_bot_stages.png b/figs/identification_comp_bot_stages.png index e230dd7..720237d 100644 Binary files a/figs/identification_comp_bot_stages.png and b/figs/identification_comp_bot_stages.png differ diff --git a/figs/identification_comp_mid_stages.png b/figs/identification_comp_mid_stages.png index e2c8e59..9d2225f 100644 Binary files a/figs/identification_comp_mid_stages.png and b/figs/identification_comp_mid_stages.png differ diff --git a/figs/identification_comp_top_stages.png b/figs/identification_comp_top_stages.png index 7cfc2d5..5b4f884 100644 Binary files a/figs/identification_comp_top_stages.png and b/figs/identification_comp_top_stages.png differ diff --git a/identification/index.html b/identification/index.html index 6fe712b..b5e14b9 100644 --- a/identification/index.html +++ b/identification/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Identification @@ -246,6 +246,31 @@ for the JavaScript code in this tag. } /*]]>*///--> + +
@@ -258,231 +283,94 @@ for the JavaScript code in this tag.

Table of Contents

-The goal here is to make an identification of the micro-station in order to compare the model with the measurements on the real micro-station. +The goal here is to tune the Simscape model of the station in order to have a good dynamical representation of the real system.

-In order to do so: +In order to do so, we reproduce the Modal Analysis done on the station using the Simscape model. +

+ +

+We can then compare the measured Frequency Response Functions with the identified dynamics of the model. +

+ +

+Finally, this should help to tune the parameters of the model such that the dynamics is closer to the measured FRF. +

+ +
+

1 Some notes about the Simscape Model

+
+

+The Simscape Model of the micro-station consists of several solid bodies:

-For the excitation, we can choose the same excitation points as the one used for the modal test. -For the measurement points, we can choose the Center of Mass of each solid body. -The center of mass of each solid body is not easily defined using Simscape. -Indeed, we can define the center of mass of any solid body but not of multiple solid bodies. However, one solid body is composed of multiple STEP files. -One solution could be to use one STEP file for one solid body. -However, the position of the center of mass can be exported using simulink and then defined on Simscape. +Each solid body has some characteristics: Center of Mass, mass, moment of inertia, etc… +These parameters are automatically computed from the geometry and from the density of the materials.

-
-

1 Identification of the Micro-Station

-
-
-
-

1.1 Compute the transfer functions

-

-We first define some parameters for the identification. -The simulink file for the identification is sim_micro_station_id.slx. +Then, the solid bodies are connected with springs and dampers. +Some of the springs and dampers values can be estimated from the joints/stages specifications, however, we here prefer to tune these values based on the measurements.

- -
-
open('identification/matlab/sim_micro_station_id.slx')
-
-
- -
-
%% Options for Linearized
-options = linearizeOptions;
-options.SampleTime = 0;
-
-%% Name of the Simulink File
-mdl = 'sim_micro_station_id';
-
-
- -
-
%% Micro-Hexapod
-% Input/Output definition
-io(1) = linio([mdl, '/Micro-Station/Fm_ext'],1,'openinput');
-io(2) = linio([mdl, '/Micro-Station/Fg_ext'],1,'openinput');
-io(3) = linio([mdl, '/Micro-Station/Dm_inertial'],1,'output');
-io(4) = linio([mdl, '/Micro-Station/Ty_inertial'],1,'output');
-io(5) = linio([mdl, '/Micro-Station/Ry_inertial'],1,'output');
-io(6) = linio([mdl, '/Micro-Station/Dg_inertial'],1,'output');
-
-
- -
-
% Run the linearization
-G_ms = linearize(mdl, io, 0);
-
-% Input/Output names
-G_ms.InputName  = {'Fmx', 'Fmy', 'Fmz',...
-                   'Fgx', 'Fgy', 'Fgz'};
-G_ms.OutputName = {'Dmx', 'Dmy', 'Dmz', ...
-                   'Tyx', 'Tyy', 'Tyz', ...
-                   'Ryx', 'Ryy', 'Ryz', ...
-                   'Dgx', 'Dgy', 'Dgz'};
-
-
- -
-
%% Save the obtained transfer functions
-save('./mat/id_micro_station.mat', 'G_ms');
-
-
-
-
- - -
-

1.2 Plots the transfer functions

-
- -
-

1.3 Compare with the measurements

- -
-

2 Modal Analysis of the Micro-Station

+
+

2 Compare with measurements at the CoM of each element

+

+here +

-
-

2.1 Simscape Model

+ +
+

2.1 Prepare the Simulation

+

+We load the configuration. +

-
open('identification/matlab/sim_micro_station_modal_analysis.slx')
+
load('mat/conf_simscape.mat');
 
+

+We set a small StopTime. +

-
%% Options for Linearized
-options = linearizeOptions;
-options.SampleTime = 0;
-
-%% Name of the Simulink File
-mdl = 'sim_micro_station_modal_analysis';
+
set_param(conf_simscape, 'StopTime', '0.5');
 
-
-
%% Micro-Hexapod
-% Input/Output definition
-io(1) = linio([mdl, '/Micro-Station/F_hammer'],1,'openinput');
-io(2) = linio([mdl, '/Micro-Station/acc9'],1,'output');
-io(3) = linio([mdl, '/Micro-Station/acc10'],1,'output');
-io(4) = linio([mdl, '/Micro-Station/acc11'],1,'output');
-io(5) = linio([mdl, '/Micro-Station/acc12'],1,'output');
-
-
- -
-
% Run the linearization
-G_ms = linearize(mdl, io, 0);
-
-% Input/Output names
-G_ms.InputName  = {'Fx', 'Fy', 'Fz'};
-G_ms.OutputName = {'x9', 'y9', 'z9', ...
-                   'x10', 'y10', 'z10', ...
-                   'x11', 'y11', 'z11', ...
-                   'x12', 'y12', 'z12'};
-
-
-
-
- -
-

2.2 Plot Results

-
-
-
figure;
-hold on;
-plot(freqs, abs(squeeze(freqresp(G_ms('x9', 'Fx'), freqs, 'Hz'))));
-set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
-ylabel('Amplitude [m/N]');
-hold off;
-
-
-
-
- -
-

2.3 Compare with measurements

-
-
-
load('../meas/modal-analysis/mat/frf_coh_matrices.mat', 'FRFs', 'COHs', 'freqs');
-
-
- -
-
dirs = {'x', 'y', 'z'};
-
-n_acc = 9;
-n_dir = 1; % x, y, z
-n_exc = 1; % x, y, z
-
-figure;
-hold on;
-plot(freqs, abs(squeeze(FRFs(3*(n_acc-1) + n_dir, n_exc, :)))./((2*pi*freqs).^2)');
-plot(freqs, abs(squeeze(freqresp(G_ms([dirs{n_dir}, num2str(n_acc)], ['F', dirs{n_dir}]), freqs, 'Hz'))));
-set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
-ylabel('Amplitude [m/N]');
-hold off;
-
-
-
-
-
- -
-

3 Compare with measurements at the CoM of each element

-
-
-
-

3.1 Init

-
+

+We initialize all the stages. +

initializeGround();
 initializeGranite();
@@ -491,21 +379,103 @@ initializeRy();
 initializeRz();
 initializeMicroHexapod();
 initializeAxisc();
+initializeMirror();
+initializeNanoHexapod(struct('actuator', 'piezo'));
+initializeSample(struct('mass', 50));
 
-
-

3.2 TODO Center of Mass of each solid body

-
-
    -
  • [ ] Verify that this is coherent with the simscape and with the measurements
  • -
+
+

2.2 Estimate the position of the CoM of each solid and compare with the one took for the Measurement Analysis

+
+
+
open('identification/matlab/sim_micro_station_com.slx')
+
+
+

+Thanks to the 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. +

- +
+
sim('sim_micro_station_com')
+
+
+

+The results are shown in the table 1. +

+ +
+ + +++ ++ ++ ++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1: Center of Mass of each solid body as defined in Simscape
 granite botgranite toptyryrzhexa
X [mm]52.451.70.9-0.10.0-0.0
Y [mm]190.4263.20.75.2-0.00.1
Z [mm]-1200.0-777.1-598.9-627.7-643.2-317.1
+ +

+We can compare the obtained center of mass (table 1) with the one used for the Modal Analysis shown in table 2. +

+ + +@@ -566,16 +536,143 @@ initializeAxisc();
Table 2: Estimated Center of Mass of each solid body using Solidworks
+

+The results are quite similar. +The differences can be explained by some differences in the chosen density of the materials or by the fact that not exactly all the same elements have been chosen for each stage. +

+ +

+For instance, on simscape, the fixed part of the translation stage counts for the top granite solid body. +However, in SolidWorks, this has probably not be included with the top granite. +

+
+
+ +
+

2.3 Create a frame at the CoM of each solid body

+
+

+Now we use one inertiasensor block connected on each solid body that measured the center of mass of this solid with respect to the same connected frame. +

+ +

+We do that in order to position an accelerometer on the Simscape model at this particular point. +

+ +
+
open('identification/matlab/sim_micro_station_com_estimation.slx')
+
+
+ +
+
sim('sim_micro_station_com_estimation')
+
+
+ + + + +++ ++ ++ ++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 granite botgranite toptyryrzhexa
X [mm]0.051.70.9-0.10.0-0.0
Y [mm]0.0753.20.75.2-0.00.1
Z [mm]-250.022.9-17.1-146.5-23.2-47.1
+ +

+We now same this for further use: +

+
+
granite_bot_com = granite_bot_com.Data(end, :)';
+granite_top_com = granite_top_com.Data(end, :)';
+ty_com = ty_com.Data(end, :)';
+ry_com = ry_com.Data(end, :)';
+rz_com = rz_com.Data(end, :)';
+hexa_com = hexa_com.Data(end, :)';
+
+save('mat/solids_com.mat', 'granite_bot_com', 'granite_top_com', 'ty_com', 'ry_com', 'rz_com', 'hexa_com');
+
+
+ +

+Then, we use the obtained results to add a rigidTransform block in order to create a new frame at the center of mass of each solid body. +

+
+
+ +
+

2.4 Identification of the dynamics of the Simscape Model

+
+

+We now use a new Simscape Model where 6DoF inertial sensors are located at the Center of Mass of each solid body. +

+ +
+
load('mat/solids_com.mat', 'granite_bot_com', 'granite_top_com', 'ty_com', 'ry_com', 'rz_com', 'hexa_com');
+
+
+
open('identification/matlab/sim_micro_station_modal_analysis_com.slx')
 
-
-
-
-

3.3 Simscape Model

-
+

+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. +

+
%% Options for Linearized
 options = linearizeOptions;
@@ -589,12 +686,12 @@ mdl = 'sim_micro_station_modal_analysis_com';
 
%% Micro-Hexapod
 % Input/Output definition
-io(1) = linio([mdl, '/Micro-Station/F_hammer'],1,'openinput');
-io(2) = linio([mdl, '/Micro-Station/acc_gtop'],1,'output');
-io(3) = linio([mdl, '/Micro-Station/acc_ty'],1,'output');
-io(4) = linio([mdl, '/Micro-Station/acc_ry'],1,'output');
-io(5) = linio([mdl, '/Micro-Station/acc_rz'],1,'output');
-io(6) = linio([mdl, '/Micro-Station/acc_hexa'],1,'output');
+io(1) = linio([mdl, '/F_hammer'],1,'openinput');
+io(2) = linio([mdl, '/acc_gtop'],1,'output');
+io(3) = linio([mdl, '/acc_ty'],1,'output');
+io(4) = linio([mdl, '/acc_ry'],1,'output');
+io(5) = linio([mdl, '/acc_rz'],1,'output');
+io(6) = linio([mdl, '/acc_hexa'],1,'output');
 
@@ -611,138 +708,53 @@ G_ms.OutputName = {'hexa_x', 'hexa_y', 'hexa_z', 'hexa_rx', 'hexa_ry', 'hexa_rz'};
+ +

+The output of G_ms is the acceleration of each solid body. +In order to obtain a displacement, we divide the obtained transfer function by \(1/s^{2}\); +

+
+
G_ms = G_ms/s^2;
+
+
-
-

3.4 Compare with measurements

-
+
+

2.5 Compare with measurements

+
+

+We now load the Frequency Response Functions measurements during the Modal Analysis (accessible here). +

+
load('../meas/modal-analysis/mat/frf_coh_matrices.mat', 'freqs');
 load('../meas/modal-analysis/mat/frf_com.mat', 'FRFs_CoM');
 
-
-
dirs = {'x', 'y', 'z', 'rx', 'ry', 'rz'};
-stages = {'gbot', 'gtop', 'ty', 'ry', 'rz', 'hexa'}
-
-n_stg = 2;
-n_dir = 5; % x, y, z, Rx, Ry, Rz
-n_exc = 2; % x, y, z
-
-f = logspace(0, 3, 1000);
-
-figure;
-hold on;
-plot(freqs, abs(squeeze(FRFs_CoM(6*(n_stg-1) + n_dir, n_exc, :)))./((2*pi*freqs).^2)');
-plot(f, abs(squeeze(freqresp(G_ms([stages{n_stg}, '_', dirs{n_dir}], ['F', dirs{n_exc}]), f, 'Hz'))));
-set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
-ylabel('Amplitude [m/N]');
-hold off;
-xlim([1, 200]);
-
-
- -
-
dirs = {'x', 'y', 'z', 'rx', 'ry', 'rz'};
-stages = {'gtop', 'ty', 'ry', 'rz', 'hexa'}
-
-f = logspace(1, 3, 1000);
-
-figure;
-for n_stg = 1:2
-  for n_dir = 1:3
-    subplot(3, 2, (n_dir-1)*2 + n_stg);
-    title(['F ', dirs{n_dir}, ' to ', stages{n_stg}, ' ', dirs{n_dir}]);
-    hold on;
-    plot(freqs, abs(squeeze(FRFs_CoM(6*(n_stg) + n_dir, n_dir, :)))./((2*pi*freqs).^2)');
-    plot(f, abs(squeeze(freqresp(G_ms([stages{n_stg}, '_', dirs{n_dir}], ['F', dirs{n_dir}]), f, 'Hz'))));
-    set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
-    ylabel('Amplitude [m/N]');
-    if n_dir == 3
-      xlabel('Frequency [Hz]');
-    end
-    hold off;
-    xlim([10, 1000]);
-    ylim([1e-12, 1e-6]);
-  end
-end
-
-
+

+We then compare the measurements with the identified transfer functions using the Simscape Model. +

-
+

identification_comp_bot_stages.png

Figure 1: caption (png, pdf)

-
-
dirs = {'x', 'y', 'z', 'rx', 'ry', 'rz'};
-stages = {'ry', 'rz', 'hexa'}
 
-f = logspace(1, 3, 1000);
-
-figure;
-for n_stg = 1:2
-  for n_dir = 1:3
-    subplot(3, 2, (n_dir-1)*2 + n_stg);
-    title(['F ', dirs{n_dir}, ' to ', stages{n_stg}, ' ', dirs{n_dir}]);
-    hold on;
-    plot(freqs, abs(squeeze(FRFs_CoM(6*(n_stg+2) + n_dir, n_dir, :)))./((2*pi*freqs).^2)');
-    plot(f, abs(squeeze(freqresp(G_ms([stages{n_stg}, '_', dirs{n_dir}], ['F', dirs{n_dir}]), f, 'Hz'))));
-    set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
-    ylabel('Amplitude [m/N]');
-    if n_dir == 3
-      xlabel('Frequency [Hz]');
-    end
-    hold off;
-    xlim([10, 1000]);
-    ylim([1e-12, 1e-6]);
-  end
-end
-
-
- - -
+

identification_comp_mid_stages.png

Figure 2: caption (png, pdf)

-
-
dirs = {'x', 'y', 'z', 'rx', 'ry', 'rz'};
-stages = {'hexa'}
 
-f = logspace(1, 3, 1000);
-
-figure;
-for n_stg = 1
-  for n_dir = 1:3
-    subplot(3, 1, (n_dir-1)*2 + n_stg);
-    title(['F ', dirs{n_dir}, ' to ', stages{n_stg}, ' ', dirs{n_dir}]);
-    hold on;
-    plot(freqs, abs(squeeze(FRFs_CoM(6*(n_stg+4) + n_dir, n_dir, :)))./((2*pi*freqs).^2)');
-    plot(f, abs(squeeze(freqresp(G_ms([stages{n_stg}, '_', dirs{n_dir}], ['F', dirs{n_dir}]), f, 'Hz'))));
-    set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
-    ylabel('Amplitude [m/N]');
-    if n_dir == 3
-      xlabel('Frequency [Hz]');
-    end
-    hold off;
-    xlim([10, 1000]);
-    ylim([1e-12, 1e-6]);
-  end
-end
-
-
- - -
+

identification_comp_top_stages.png

Figure 3: caption (png, pdf)

@@ -751,24 +763,22 @@ f = logspace( -

4 Other analysis

-
+ +
+

3 Conclusion

+
+
+

+For such a complex system, we believe that the Simscape Model represents the dynamics of the system with enough fidelity. +

+
-
-

4.1 Plot the obtained transfer functions

-
-
-

4.2 Compare with the modal measurements

-
-
-

4.3 Modal Identification of the micro station

Author: Dehaeze Thomas

-

Created: 2019-12-12 jeu. 13:54

+

Created: 2019-12-13 ven. 15:53

Validate

diff --git a/identification/index.org b/identification/index.org index 69ab46d..b34308e 100644 --- a/identification/index.org +++ b/identification/index.org @@ -42,21 +42,15 @@ :END: * Introduction :ignore: -The goal here is to make an identification of the *micro-station* in order to compare the model with the measurements on the real micro-station. +The goal here is to tune the Simscape model of the station in order to have a good dynamical representation of the real system. -In order to do so: -- Decide where to virtually excite the station and where to measure its motion -- Extract transfer functions from the excitation forces to the measured motion -- Compare those transfer functions with the modal analysis +In order to do so, we reproduce the Modal Analysis done on the station using the Simscape model. -For the excitation, we can choose the same excitation points as the one used for the modal test. -For the measurement points, we can choose the Center of Mass of each solid body. -The center of mass of each solid body is not easily defined using Simscape. -Indeed, we can define the center of mass of any solid body but not of multiple solid bodies. However, one solid body is composed of multiple STEP files. -One solution could be to use one STEP file for one solid body. -However, the position of the center of mass can be exported using simulink and then defined on Simscape. +We can then compare the measured Frequency Response Functions with the identified dynamics of the model. -* Identification of the Micro-Station +Finally, this should help to tune the parameters of the model such that the dynamics is closer to the measured FRF. + +* Identification of the Micro-Station :noexport: ** Introduction :ignore: ** Matlab Init :noexport:ignore: @@ -118,13 +112,12 @@ G_ms.OutputName = {'Dmx', 'Dmy', 'Dmz', ... save('./mat/id_micro_station.mat', 'G_ms'); #+end_src - ** Plots the transfer functions ** Compare with the measurements -* Modal Analysis of the Micro-Station +* Modal Analysis of the Micro-Station :noexport: ** Matlab Init :noexport:ignore: #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) <> @@ -205,6 +198,21 @@ io(5) = linio([mdl, '/Micro-Station/acc12'],1,'output'); hold off; #+end_src +* Some notes about the Simscape Model +The Simscape Model of the micro-station consists of several solid bodies: +- Bottom Granite +- Top Granite +- Translation Stage +- Tilt Stage +- Spindle +- Hexapod + +Each solid body has some characteristics: Center of Mass, mass, moment of inertia, etc... +These parameters are automatically computed from the geometry and from the density of the materials. + +Then, the solid bodies are connected with springs and dampers. +Some of the springs and dampers values can be estimated from the joints/stages specifications, however, we here prefer to tune these values based on the measurements. + * Compare with measurements at the CoM of each element ** Introduction :ignore: [[file:../../meas/modal-analysis/index.org][here]] @@ -247,15 +255,68 @@ We initialize all the stages. initializeSample(struct('mass', 50)); #+end_src +** Estimate the position of the CoM of each solid and compare with the one took for the Measurement Analysis #+begin_src matlab open('identification/matlab/sim_micro_station_com.slx') #+end_src -** Estimate the position of the CoM of each solid +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 sim('sim_micro_station_com') #+end_src +The results are shown in the table [[tab:com_simscape]]. + +#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*) + stages_com = 1e3*[granite_bot_com.Data(end, :) ; + granite_top_com.Data(end, :) ; + ty_com.Data(end, :) ; + ry_com.Data(end, :) ; + rz_com.Data(end, :) ; + hexa_com.Data(end, :) ]'; + + data2orgtable(stages_com, {'X [mm]', 'Y [mm]', 'Z [mm]'}, {'granite bot', 'granite top', 'ty', 'ry', 'rz', 'hexa'}, ' %.1f '); +#+end_src + +#+name: tab:com_simscape +#+caption: Center of Mass of each solid body as defined in Simscape +#+RESULTS: +| | granite bot | granite top | ty | ry | rz | hexa | +|--------+-------------+-------------+--------+--------+--------+--------| +| X [mm] | 52.4 | 51.7 | 0.9 | -0.1 | 0.0 | -0.0 | +| Y [mm] | 190.4 | 263.2 | 0.7 | 5.2 | -0.0 | 0.1 | +| Z [mm] | -1200.0 | -777.1 | -598.9 | -627.7 | -643.2 | -317.1 | + +We can compare the obtained center of mass (table [[tab:com_simscape]]) with the one used for the Modal Analysis shown in table [[tab:com_solidworks]]. + +#+name: tab:com_solidworks +#+caption: Estimated Center of Mass of each solid body using Solidworks +| | granite bot | granite top | ty | ry | rz | hexa | +|--------+-------------+-------------+------+------+------+------| +| X [mm] | 45 | 52 | 0 | 0 | 0 | -4 | +| Y [mm] | 144 | 258 | 14 | -5 | 0 | 6 | +| Z [mm] | -1251 | -778 | -600 | -628 | -580 | -319 | + +The results are quite similar. +The differences can be explained by some differences in the chosen density of the materials or by the fact that not exactly all the same elements have been chosen for each stage. + +For instance, on simscape, the fixed part of the translation stage counts for the top granite solid body. +However, in SolidWorks, this has probably not be included with the top granite. + +** Create a frame at the CoM of each solid body +Now we use one =inertiasensor= block connected on each solid body that measured the center of mass of this solid with respect to the same connected frame. + +We do that in order to position an accelerometer on the Simscape model at this particular point. + +#+begin_src matlab + open('identification/matlab/sim_micro_station_com_estimation.slx') +#+end_src + +#+begin_src matlab + sim('sim_micro_station_com_estimation') +#+end_src + #+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*) stages_com = 1e3*[granite_bot_com.Data(end, :) ; granite_top_com.Data(end, :) ; @@ -268,38 +329,39 @@ We initialize all the stages. #+end_src #+RESULTS: -| | granite bot | granite top | ty | ry | rz | hexa | -|--------+-------------+-------------+--------+--------+--------+--------| -| X [mm] | -52.4 | -51.7 | -0.9 | -0.1 | 0.0 | -0.0 | -| Y [mm] | -190.4 | -263.2 | -0.7 | 5.2 | -0.0 | 0.1 | -| Z [mm] | -1200.0 | -777.1 | -598.9 | -627.7 | -643.2 | -317.1 | +| | granite bot | granite top | ty | ry | rz | hexa | +|--------+-------------+-------------+-------+--------+-------+-------| +| X [mm] | 0.0 | 51.7 | 0.9 | -0.1 | 0.0 | -0.0 | +| Y [mm] | 0.0 | 753.2 | 0.7 | 5.2 | -0.0 | 0.1 | +| Z [mm] | -250.0 | 22.9 | -17.1 | -146.5 | -23.2 | -47.1 | -** Init -#+begin_src matlab :results none - initializeGround(); - initializeGranite(); - initializeTy(); - initializeRy(); - initializeRz(); - initializeMicroHexapod(); - initializeAxisc(); +We now same this for further use: +#+begin_src matlab + granite_bot_com = granite_bot_com.Data(end, :)'; + granite_top_com = granite_top_com.Data(end, :)'; + ty_com = ty_com.Data(end, :)'; + ry_com = ry_com.Data(end, :)'; + rz_com = rz_com.Data(end, :)'; + hexa_com = hexa_com.Data(end, :)'; + + save('mat/solids_com.mat', 'granite_bot_com', 'granite_top_com', 'ty_com', 'ry_com', 'rz_com', 'hexa_com'); #+end_src -** TODO Center of Mass of each solid body -- [ ] Verify that this is coherent with the simscape and with the measurements +Then, we use the obtained results to add a =rigidTransform= block in order to create a new frame at the center of mass of each solid body. +** Identification of the dynamics of the Simscape Model +We now use a new Simscape Model where 6DoF inertial sensors are located at the Center of Mass of each solid body. -| | granite bot | granite top | ty | ry | rz | hexa | -|--------+-------------+-------------+------+------+------+------| -| X [mm] | 45 | 52 | 0 | 0 | 0 | -4 | -| Y [mm] | 144 | 258 | 14 | -5 | 0 | 6 | -| Z [mm] | -1251 | -778 | -600 | -628 | -580 | -319 | +#+begin_src matlab + load('mat/solids_com.mat', 'granite_bot_com', 'granite_top_com', 'ty_com', 'ry_com', 'rz_com', 'hexa_com'); +#+end_src #+begin_src matlab open('identification/matlab/sim_micro_station_modal_analysis_com.slx') #+end_src -** Simscape Model +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 %% Options for Linearized options = linearizeOptions; @@ -312,12 +374,12 @@ We initialize all the stages. #+begin_src matlab %% Micro-Hexapod % Input/Output definition - io(1) = linio([mdl, '/Micro-Station/F_hammer'],1,'openinput'); - io(2) = linio([mdl, '/Micro-Station/acc_gtop'],1,'output'); - io(3) = linio([mdl, '/Micro-Station/acc_ty'],1,'output'); - io(4) = linio([mdl, '/Micro-Station/acc_ry'],1,'output'); - io(5) = linio([mdl, '/Micro-Station/acc_rz'],1,'output'); - io(6) = linio([mdl, '/Micro-Station/acc_hexa'],1,'output'); + io(1) = linio([mdl, '/F_hammer'],1,'openinput'); + io(2) = linio([mdl, '/acc_gtop'],1,'output'); + io(3) = linio([mdl, '/acc_ty'],1,'output'); + io(4) = linio([mdl, '/acc_ry'],1,'output'); + io(5) = linio([mdl, '/acc_rz'],1,'output'); + io(6) = linio([mdl, '/acc_hexa'],1,'output'); #+end_src #+begin_src matlab @@ -333,18 +395,28 @@ We initialize all the stages. 'hexa_x', 'hexa_y', 'hexa_z', 'hexa_rx', 'hexa_ry', 'hexa_rz'}; #+end_src +The output of =G_ms= is the acceleration of each solid body. +In order to obtain a displacement, we divide the obtained transfer function by $1/s^{2}$; +#+begin_src matlab + G_ms = G_ms/s^2; +#+end_src + ** Compare with measurements +We now load the Frequency Response Functions measurements during the Modal Analysis (accessible [[file:../../meas/modal-analysis/index.org][here]]). + #+begin_src matlab load('../meas/modal-analysis/mat/frf_coh_matrices.mat', 'freqs'); load('../meas/modal-analysis/mat/frf_com.mat', 'FRFs_CoM'); #+end_src -#+begin_src matlab +We then compare the measurements with the identified transfer functions using the Simscape Model. + +#+begin_src matlab :exports none dirs = {'x', 'y', 'z', 'rx', 'ry', 'rz'}; stages = {'gbot', 'gtop', 'ty', 'ry', 'rz', 'hexa'} - n_stg = 2; - n_dir = 5; % x, y, z, Rx, Ry, Rz + n_stg = 3; + n_dir = 6; % x, y, z, Rx, Ry, Rz n_exc = 2; % x, y, z f = logspace(0, 3, 1000); @@ -359,7 +431,7 @@ We initialize all the stages. xlim([1, 200]); #+end_src -#+begin_src matlab +#+begin_src matlab :exports none dirs = {'x', 'y', 'z', 'rx', 'ry', 'rz'}; stages = {'gtop', 'ty', 'ry', 'rz', 'hexa'} @@ -395,7 +467,7 @@ We initialize all the stages. [[file:figs/identification_comp_bot_stages.png]] -#+begin_src matlab +#+begin_src matlab :exports none dirs = {'x', 'y', 'z', 'rx', 'ry', 'rz'}; stages = {'ry', 'rz', 'hexa'} @@ -431,7 +503,7 @@ We initialize all the stages. [[file:figs/identification_comp_mid_stages.png]] -#+begin_src matlab +#+begin_src matlab :exports none dirs = {'x', 'y', 'z', 'rx', 'ry', 'rz'}; stages = {'hexa'} @@ -440,7 +512,7 @@ We initialize all the stages. figure; for n_stg = 1 for n_dir = 1:3 - subplot(3, 1, (n_dir-1)*2 + n_stg); + subplot(3, 1, (n_dir-1) + n_stg); title(['F ', dirs{n_dir}, ' to ', stages{n_stg}, ' ', dirs{n_dir}]); hold on; plot(freqs, abs(squeeze(FRFs_CoM(6*(n_stg+4) + n_dir, n_dir, :)))./((2*pi*freqs).^2)'); @@ -466,24 +538,8 @@ We initialize all the stages. #+CAPTION: caption ([[./figs/identification_comp_top_stages.png][png]], [[./figs/identification_comp_top_stages.pdf][pdf]]) [[file:figs/identification_comp_top_stages.png]] -* Other analysis -** Matlab Init :noexport:ignore: -#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) - <> -#+end_src -#+begin_src matlab :exports none :results silent :noweb yes - <> -#+end_src - -#+begin_src matlab - simulinkproject('../'); -#+end_src - -#+begin_src matlab - open('identification/matlab/sim_micro_station_id.slx') -#+end_src - -** Plot the obtained transfer functions -** Compare with the modal measurements -** Modal Identification of the micro station +* Conclusion +#+begin_important + For such a complex system, we believe that the Simscape Model represents the dynamics of the system with enough fidelity. +#+end_important diff --git a/identification/matlab/sim_micro_station_com.slx b/identification/matlab/sim_micro_station_com.slx new file mode 100644 index 0000000..9e370a6 Binary files /dev/null and b/identification/matlab/sim_micro_station_com.slx differ diff --git a/identification/matlab/sim_micro_station_com_estimation.slx b/identification/matlab/sim_micro_station_com_estimation.slx new file mode 100644 index 0000000..c257323 Binary files /dev/null and b/identification/matlab/sim_micro_station_com_estimation.slx differ diff --git a/identification/matlab/sim_micro_station_id.slx b/identification/matlab/sim_micro_station_id.slx index db20495..7c39521 100644 Binary files a/identification/matlab/sim_micro_station_id.slx and b/identification/matlab/sim_micro_station_id.slx differ diff --git a/identification/matlab/sim_micro_station_modal_analysis.slx b/identification/matlab/sim_micro_station_modal_analysis.slx index 69a181f..fdc8929 100644 Binary files a/identification/matlab/sim_micro_station_modal_analysis.slx and b/identification/matlab/sim_micro_station_modal_analysis.slx differ diff --git a/identification/matlab/sim_micro_station_modal_analysis_com.slx b/identification/matlab/sim_micro_station_modal_analysis_com.slx index bcc08f7..ebbe9ec 100644 Binary files a/identification/matlab/sim_micro_station_modal_analysis_com.slx and b/identification/matlab/sim_micro_station_modal_analysis_com.slx differ diff --git a/mat/solids_com.mat b/mat/solids_com.mat new file mode 100644 index 0000000..03c1e72 Binary files /dev/null and b/mat/solids_com.mat differ diff --git a/simscape_subsystems/axisc_weld.slx b/simscape_subsystems/axisc_weld.slx new file mode 100644 index 0000000..429b4e8 Binary files /dev/null and b/simscape_subsystems/axisc_weld.slx differ diff --git a/simscape_subsystems/granite_3dof.slx b/simscape_subsystems/granite_3dof.slx index 784c6ee..113e57c 100644 Binary files a/simscape_subsystems/granite_3dof.slx and b/simscape_subsystems/granite_3dof.slx differ diff --git a/simscape_subsystems/translation_stage_D.slx b/simscape_subsystems/translation_stage_D.slx index b84ca29..7fa7490 100644 Binary files a/simscape_subsystems/translation_stage_D.slx and b/simscape_subsystems/translation_stage_D.slx differ diff --git a/simscape_subsystems/translation_stage_modal_analysis.slx b/simscape_subsystems/translation_stage_modal_analysis.slx new file mode 100644 index 0000000..7495338 Binary files /dev/null and b/simscape_subsystems/translation_stage_modal_analysis.slx differ