diff --git a/identification/index.html b/identification/index.html index 7652f1f..6fe712b 100644 --- a/identification/index.html +++ b/identification/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Identification @@ -258,16 +258,41 @@ 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 make an identification of the micro-station in order to compare the model with the measurements on the real micro-station.

@@ -288,41 +313,462 @@ 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.

-
+
+

1 Identification of the Micro-Station

+
+
+
+

1.1 Compute the transfer functions

+

-All the files (data and Matlab scripts) are accessible here. +We first define some parameters for the identification. +The simulink file for the identification is sim_micro_station_id.slx.

-
- -
-

1 Identification of the micro-station

-
-
simulinkproject('../');
+
open('identification/matlab/sim_micro_station_id.slx')
 
-
open 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');
 
-
-

2 Plot the obtained transfer functions

+ +
+

1.2 Plots the transfer functions

-
-

3 Compare with the modal measurements

+ +
+

1.3 Compare with the measurements

+
+
+ + +
+

2 Modal Analysis of the Micro-Station

+
+
+
+

2.1 Simscape Model

+
+
+
open('identification/matlab/sim_micro_station_modal_analysis.slx')
+
+
+ +
+
%% Options for Linearized
+options = linearizeOptions;
+options.SampleTime = 0;
+
+%% Name of the Simulink File
+mdl = 'sim_micro_station_modal_analysis';
+
+
+ +
+
%% 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

+
+
+
initializeGround();
+initializeGranite();
+initializeTy();
+initializeRy();
+initializeRz();
+initializeMicroHexapod();
+initializeAxisc();
+
+
+
+
+ +
+

3.2 TODO Center of Mass of each solid body

+
+
    +
  • [ ] Verify that this is coherent with the simscape and with the measurements
  • +
+ + + + + +++ ++ ++ ++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 granite botgranite toptyryrzhexa
X [mm]4552000-4
Y [mm]14425814-506
Z [mm]-1251-778-600-628-580-319
+ +
+
open('identification/matlab/sim_micro_station_modal_analysis_com.slx')
+
+
+
+
+ +
+

3.3 Simscape Model

+
+
+
%% Options for Linearized
+options = linearizeOptions;
+options.SampleTime = 0;
+
+%% Name of the Simulink File
+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');
+
+
+ +
+
% Run the linearization
+G_ms = linearize(mdl, io, 0);
+
+% Input/Output names
+G_ms.InputName  = {'Fx', 'Fy', 'Fz'};
+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', ...
+                   'ry_x', 'ry_y', 'ry_z', 'ry_rx', 'ry_ry', 'ry_rz', ...
+                   'rz_x', 'rz_y', 'rz_z', 'rz_rx', 'rz_ry', 'rz_rz', ...
+                   'hexa_x', 'hexa_y', 'hexa_z', 'hexa_rx', 'hexa_ry', 'hexa_rz'};
+
+
+
+
+ +
+

3.4 Compare with measurements

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

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)

+
+
+
+
+ +
+

4 Other analysis

+
+
+
+

4.1 Plot the obtained transfer functions

+
+
+

4.2 Compare with the modal measurements

+
+
+

4.3 Modal Identification of the micro station

-
-

4 Modal Identification of the micro station

Author: Dehaeze Thomas

-

Created: 2019-10-08 mar. 11:13

+

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

Validate

diff --git a/identification/index.org b/identification/index.org index 3f5a0ac..69ab46d 100644 --- a/identification/index.org +++ b/identification/index.org @@ -176,12 +176,12 @@ io(5) = linio([mdl, '/Micro-Station/acc12'],1,'output'); ** Plot Results #+begin_src matlab -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; + 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; #+end_src ** Compare with measurements @@ -206,6 +206,9 @@ hold off; #+end_src * Compare with measurements at the CoM of each element +** Introduction :ignore: +[[file:../../meas/modal-analysis/index.org][here]] + ** Matlab Init :noexport:ignore: #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) <> @@ -219,6 +222,58 @@ hold off; simulinkproject('../'); #+end_src +** Prepare the Simulation +We load the configuration. +#+begin_src matlab + load('mat/conf_simscape.mat'); +#+end_src + +We set a small =StopTime=. +#+begin_src matlab + set_param(conf_simscape, 'StopTime', '0.5'); +#+end_src + +We initialize all the stages. +#+begin_src matlab + initializeGround(); + initializeGranite(); + initializeTy(); + initializeRy(); + initializeRz(); + initializeMicroHexapod(); + initializeAxisc(); + initializeMirror(); + initializeNanoHexapod(struct('actuator', 'piezo')); + initializeSample(struct('mass', 50)); +#+end_src + +#+begin_src matlab + open('identification/matlab/sim_micro_station_com.slx') +#+end_src + +** Estimate the position of the CoM of each solid +#+begin_src matlab + sim('sim_micro_station_com') +#+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, :) ; + 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 + +#+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 | + ** Init #+begin_src matlab :results none initializeGround(); diff --git a/identification/matlab/sim_micro_station_modal_analysis.slx b/identification/matlab/sim_micro_station_modal_analysis.slx index 0814fcf..69a181f 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/mat/nass_references.mat b/mat/nass_references.mat index 376daf3..154080e 100644 Binary files a/mat/nass_references.mat and b/mat/nass_references.mat differ diff --git a/positioning_error/index.org b/positioning_error/index.org index 4696a1a..44b4f22 100644 --- a/positioning_error/index.org +++ b/positioning_error/index.org @@ -87,11 +87,6 @@ The goal here is to perfectly move the station and verify that there is no misma #+end_src ** Prepare the Simulation -We load the configuration. -#+begin_src matlab - load('mat/conf_simscape.mat'); -#+end_src - We set a small =StopTime=. #+begin_src matlab set_param(conf_simscape, 'StopTime', '0.5'); @@ -133,7 +128,7 @@ We setup the reference path to be constant. ); - initializeReferences(); + initializeReferences(opts); #+end_src No position error for now (perfect positioning). @@ -196,14 +191,14 @@ Or are least: #+begin_example WTr(1:3, 4, end)-WTm(1:3, 4, end) ans = - -8.22065745307538e-15 - -1.74128279577812e-15 - -8.3754490393689e-16 + 8.53830894875784e-15 + -5.58580959264532e-15 + -5.89805981832114e-17 WTr(1:3, 1:3, end)'*WTm(1:3, 1:3, end)-eye(3) ans = - 2.66453525910038e-15 6.12072360433062e-16 2.08519182823275e-16 - -6.12072360433062e-16 2.66453525910038e-15 3.83905507244395e-16 - -2.08519182823275e-16 -3.83905507244395e-16 2.66453525910038e-15 + 1.62092561595273e-14 -1.59832000065641e-14 1.11022302462516e-16 + 1.61295672998496e-14 1.62092561595273e-14 -1.72431513512095e-15 + -1.65492619608187e-15 -9.8879238130678e-16 9.41469124882133e-14 #+end_example ** Conclusion @@ -432,9 +427,9 @@ Verify that the pose error is small. #+end_src #+RESULTS: -| | Edx [m] | Edy [m] | Edz [m] | Erx [rad] | Ery [rad] | Erz [rad] | -|-------+---------+----------+---------+-----------+-----------+-----------| -| Error | 1.0e-16 | -1.1e-18 | 3.3e-20 | 1.5e-16 | 5.8e-17 | -6.1e-16 | +| | Edx [m] | Edy [m] | Edz [m] | Erx [rad] | Ery [rad] | Erz [rad] | +|-------+---------+---------+---------+-----------+-----------+-----------| +| Error | 2.0e-16 | 1.1e-16 | 3.2e-18 | -1.1e-17 | 1.0e-17 | -9.5e-16 | ** Conclusion #+begin_important diff --git a/positioning_error/matlab/sim_nano_station_metrology.slx b/positioning_error/matlab/sim_nano_station_metrology.slx index 9ae293a..16b8858 100644 Binary files a/positioning_error/matlab/sim_nano_station_metrology.slx and b/positioning_error/matlab/sim_nano_station_metrology.slx differ diff --git a/simscape_subsystems/granite_rigid.slx b/simscape_subsystems/granite_rigid.slx index 43fced9..ce1c7a8 100644 Binary files a/simscape_subsystems/granite_rigid.slx and b/simscape_subsystems/granite_rigid.slx differ diff --git a/simscape_subsystems/ground.slx b/simscape_subsystems/ground.slx index e54dcb5..4c49ae6 100644 Binary files a/simscape_subsystems/ground.slx and b/simscape_subsystems/ground.slx differ diff --git a/simscape_subsystems/spindle_rigid.slx b/simscape_subsystems/spindle_rigid.slx index c97c9c3..8ee9ce3 100644 Binary files a/simscape_subsystems/spindle_rigid.slx and b/simscape_subsystems/spindle_rigid.slx differ diff --git a/simscape_subsystems/tilt_stage_rigid.slx b/simscape_subsystems/tilt_stage_rigid.slx index 0470183..e2000c8 100644 Binary files a/simscape_subsystems/tilt_stage_rigid.slx and b/simscape_subsystems/tilt_stage_rigid.slx differ diff --git a/simscape_subsystems/translation_stage_D.slx b/simscape_subsystems/translation_stage_D.slx index 6125385..c29257b 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_rigid.slx b/simscape_subsystems/translation_stage_rigid.slx index 5791465..320c811 100644 Binary files a/simscape_subsystems/translation_stage_rigid.slx and b/simscape_subsystems/translation_stage_rigid.slx differ diff --git a/simulink_project/index.org b/simulink_project/index.org index 44a310f..9d3ce3c 100644 --- a/simulink_project/index.org +++ b/simulink_project/index.org @@ -72,6 +72,9 @@ The startup script is defined below and is exported to the =project_startup.m= s 'CacheFolder', myCacheFolder,... 'CodeGenFolder', myCodeFolder,... 'createDir', true); + + %% Load the Simscape Configuration + load('mat/conf_simscape.mat'); #+end_src When the project closes, it runs the =project_shutdown.m= script defined below. diff --git a/src/project_startup.m b/src/project_startup.m index f7204f9..0cca35e 100644 --- a/src/project_startup.m +++ b/src/project_startup.m @@ -13,3 +13,6 @@ Simulink.fileGenControl('set',... 'CacheFolder', myCacheFolder,... 'CodeGenFolder', myCodeFolder,... 'createDir', true); + +%% Load the Simscape Configuration +load('mat/conf_simscape.mat');