2020-03-17 11:23:39 +01:00
#+TITLE : Simulation of Scientific Experiments
2020-04-17 10:25:44 +02:00
#+SETUPFILE : ./setup/org-setup-file.org
2019-12-04 10:43:38 +01:00
2019-12-13 19:07:54 +01:00
* Introduction :ignore:
2020-03-17 11:23:39 +01:00
The goal here is to simulate some scientific experiments with the Simscape model when no control is applied to the nano-hexapod.
2019-12-17 18:03:21 +01:00
This has several goals:
- Validate the model
- Estimate the expected error motion for the experiments
- Estimate the stroke that we may need for the nano-hexapod
2020-03-17 11:23:39 +01:00
- Compare with experiments when control is applied
2019-12-17 18:03:21 +01:00
The document in organized as follow:
- In section [[sec:simscape_model ]] the Simscape model is initialized
- In section [[sec:tomo_no_dist ]] a tomography experiment is performed where the sample is aligned with the rotation axis. No disturbance is included
- In section [[sec:tomo_dist ]], the same is done but with disturbance included
- In section [[sec:tomo_hexa_trans ]] the micro-hexapod translate the sample such that its center of mass is no longer aligned with the rotation axis. No disturbance is included
- In section [[sec:ty_scans ]], scans with the translation stage are simulated with no perturbation included
2019-12-04 10:43:38 +01:00
* 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
2020-02-18 13:58:27 +01:00
open('nass_model.slx');
2019-12-04 10:43:38 +01:00
#+end_src
2020-03-17 11:23:39 +01:00
* Simscape Model
<<sec:simscape_model >>
2019-12-17 08:28:20 +01:00
We load the shared simulink configuration and we set the =StopTime= .
2019-12-13 19:07:54 +01:00
#+begin_src matlab
2020-02-18 11:33:04 +01:00
load('mat/conf_simulink.mat');
2020-03-17 11:23:39 +01:00
set_param(conf_simulink, 'StopTime', '2');
2019-12-13 19:07:54 +01:00
#+end_src
2019-12-06 12:03:16 +01:00
We first initialize all the stages.
2020-03-17 11:23:39 +01:00
The nano-hexapod is considered to be a rigid body.
2019-12-04 10:43:38 +01:00
#+begin_src matlab
initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
2020-03-17 11:23:39 +01:00
initializeNanoHexapod('type', 'rigid');
2020-01-13 11:42:31 +01:00
initializeSample('mass', 1);
2019-12-04 10:43:38 +01:00
#+end_src
2020-03-17 11:23:39 +01:00
No controller is used (Open Loop).
#+begin_src matlab
initializeController('type', 'open-loop');
#+end_src
2020-04-14 17:22:53 +02:00
We don't gravity.
2020-03-17 11:23:39 +01:00
#+begin_src matlab
2020-03-17 12:32:31 +01:00
initializeSimscapeConfiguration('gravity', false);
2020-03-17 11:23:39 +01:00
#+end_src
We log the signals for further analysis.
#+begin_src matlab
initializeLoggingConfiguration('log', 'all');
#+end_src
2019-12-17 18:03:21 +01:00
* Tomography Experiment with no disturbances
<<sec:tomo_no_dist >>
** Introduction :ignore:
2020-03-17 11:23:39 +01:00
In this section, a tomography experiment is performed with the sample aligned with the rotation axis.
No disturbance is included.
2019-12-17 18:03:21 +01:00
** Simulation Setup
2019-12-17 08:28:20 +01:00
And we initialize the disturbances to be equal to zero.
2019-12-04 10:43:38 +01:00
#+begin_src matlab
2020-01-21 15:49:02 +01:00
initializeDisturbances(...
2019-12-13 19:07:54 +01:00
'Dwx', false, ... % Ground Motion - X direction
'Dwy', false, ... % Ground Motion - Y direction
'Dwz', false, ... % Ground Motion - Z direction
'Fty_x', false, ... % Translation Stage - X direction
'Fty_z', false, ... % Translation Stage - Z direction
'Frz_z', false ... % Spindle - Z direction
2020-01-13 11:42:31 +01:00
);
2019-12-04 10:43:38 +01:00
#+end_src
2020-04-14 17:22:53 +02:00
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.
#+begin_src matlab
initializeReferences('Rz_type', 'rotating', 'Rz_period', 1);
#+end_src
2019-12-17 08:28:20 +01:00
We simulate the model.
2019-12-04 10:43:38 +01:00
#+begin_src matlab
2020-02-18 13:58:27 +01:00
sim('nass_model');
2019-12-13 19:07:54 +01:00
#+end_src
2019-12-17 08:28:20 +01:00
And we save the obtained data.
2019-12-13 19:07:54 +01:00
#+begin_src matlab
2020-03-17 11:23:39 +01:00
tomo_align_no_dist = simout;
2020-03-13 17:40:22 +01:00
save('./mat/experiment_tomography.mat', 'tomo_align_no_dist', '-append');
2019-12-13 19:07:54 +01:00
#+end_src
2019-12-17 08:28:20 +01:00
** Analysis
2019-12-17 18:03:21 +01:00
#+begin_src matlab
2020-03-13 17:40:22 +01:00
load('./mat/experiment_tomography.mat', 'tomo_align_no_dist');
2019-12-17 08:28:20 +01:00
#+end_src
#+begin_src matlab :exports none
2019-12-13 19:07:54 +01:00
figure;
2020-03-17 12:32:31 +01:00
ax1 = subplot(2, 3, 1);
hold on;
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 1))
hold off;
ylabel('Displacement $\epsilon_x$ [m]');
ax2 = subplot(2, 3, 2);
hold on;
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 2))
hold off;
ylabel('Displacement $\epsilon_y$ [m]');
ax3 = subplot(2, 3, 3);
hold on;
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 3))
hold off;
ylabel('Displacement $\epsilon_z$ [m]');
ax4 = subplot(2, 3, 4);
hold on;
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 4))
hold off;
ylabel('Rotation $\epsilon_{R_x}$ [rad]');
ax5 = subplot(2, 3, 5);
hold on;
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 5))
hold off;
2019-12-17 18:03:21 +01:00
xlabel('Time [s]');
2020-03-17 12:32:31 +01:00
ylabel('Rotation $\epsilon_{R_y}$ [rad]');
2019-12-17 18:03:21 +01:00
2020-03-17 12:32:31 +01:00
ax6 = subplot(2, 3, 6);
hold on;
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 6))
hold off;
ylabel('Rotation $\epsilon_{R_z}$ [rad]');
2019-12-17 18:03:21 +01:00
2019-12-04 10:43:38 +01:00
2020-03-17 12:32:31 +01:00
linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
xlim([0.5, inf]);
2019-12-17 08:28:20 +01:00
#+end_src
#+HEADER : :tangle no :exports results :results none :noweb yes
2020-03-17 12:32:31 +01:00
#+begin_src matlab :var filepath="figs/exp_tomo_without_dist.pdf" :var figsize= "full-tall" :post pdf2svg(file=*this*, ext= "png")
2019-12-17 08:28:20 +01:00
<<plt-matlab >>
#+end_src
2019-12-13 19:07:54 +01:00
2020-03-17 12:32:31 +01:00
#+NAME : fig:exp_tomo_without_dist
#+CAPTION : X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_tomo_without_dist.png][png]], [[./figs/exp_tomo_without_dist.pdf][pdf]])
[[file:figs/exp_tomo_without_dist.png ]]
2019-12-13 19:07:54 +01:00
2019-12-17 18:03:21 +01:00
** Conclusion
#+begin_important
When everything is aligned, the resulting error motion is very small (nm range) and is quite negligible with respect to the error when disturbances are included.
This residual error motion probably comes from a small misalignment somewhere.
#+end_important
* Tomography Experiment with included perturbations
<<sec:tomo_dist >>
** Introduction :ignore:
2020-03-17 11:23:39 +01:00
In this section, we also perform a tomography experiment with the sample's center of mass aligned with the rotation axis.
However this time, we include perturbations such as ground motion and stage vibrations.
2019-12-17 18:03:21 +01:00
2020-04-15 18:15:02 +02:00
** Simulation Setup
2019-12-17 08:28:20 +01:00
We now activate the disturbances.
2019-12-04 10:43:38 +01:00
#+begin_src matlab
2020-01-21 15:49:02 +01:00
initializeDisturbances(...
2019-12-13 19:07:54 +01:00
'Dwx', true, ... % Ground Motion - X direction
'Dwy', true, ... % Ground Motion - Y direction
'Dwz', true, ... % Ground Motion - Z direction
2020-04-14 17:22:53 +02:00
'Fty_x', false, ... % Translation Stage - X direction
'Fty_z', false, ... % Translation Stage - Z direction
2019-12-13 19:07:54 +01:00
'Frz_z', true ... % Spindle - Z direction
2020-01-13 11:42:31 +01:00
);
2019-12-04 10:43:38 +01:00
#+end_src
2020-04-14 17:22:53 +02:00
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.
#+begin_src matlab
initializeReferences('Rz_type', 'rotating', 'Rz_period', 1);
#+end_src
2019-12-17 08:28:20 +01:00
We simulate the model.
2019-12-04 10:43:38 +01:00
#+begin_src matlab
2020-02-18 13:58:27 +01:00
sim('nass_model');
2019-12-04 10:43:38 +01:00
#+end_src
2019-12-17 08:28:20 +01:00
And we save the obtained data.
2019-12-13 19:07:54 +01:00
#+begin_src matlab
2020-03-17 12:32:31 +01:00
tomo_align_dist = simout;
2020-03-13 17:40:22 +01:00
save('./mat/experiment_tomography.mat', 'tomo_align_dist', '-append');
2019-12-17 08:28:20 +01:00
#+end_src
** Analysis
2019-12-17 18:03:21 +01:00
#+begin_src matlab
2020-03-17 12:32:31 +01:00
load('./mat/experiment_tomography.mat', 'tomo_align_dist', 'tomo_align_no_dist');
2019-12-17 08:28:20 +01:00
#+end_src
#+begin_src matlab :exports none
2019-12-13 19:07:54 +01:00
figure;
2020-03-17 12:32:31 +01:00
ax1 = subplot(2, 3, 1);
hold on;
plot(tomo_align_dist.Em.Eg.Time, tomo_align_dist.Em.Eg.Data(:, 1))
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 1))
hold off;
ylabel('Displacement $\epsilon_x$ [m]');
ax2 = subplot(2, 3, 2);
hold on;
plot(tomo_align_dist.Em.Eg.Time, tomo_align_dist.Em.Eg.Data(:, 2))
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 2))
hold off;
ylabel('Displacement $\epsilon_y$ [m]');
ax3 = subplot(2, 3, 3);
hold on;
plot(tomo_align_dist.Em.Eg.Time, tomo_align_dist.Em.Eg.Data(:, 3))
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 3))
hold off;
ylabel('Displacement $\epsilon_z$ [m]');
ax4 = subplot(2, 3, 4);
hold on;
plot(tomo_align_dist.Em.En.Time, tomo_align_dist.Em.En.Data(:, 4))
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 4))
hold off;
ylabel('Rotation $\epsilon_{R_x}$ [rad]');
ax5 = subplot(2, 3, 5);
hold on;
plot(tomo_align_dist.Em.En.Time, tomo_align_dist.Em.En.Data(:, 5))
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 5))
hold off;
2019-12-17 18:03:21 +01:00
xlabel('Time [s]');
2020-03-17 12:32:31 +01:00
ylabel('Rotation $\epsilon_{R_y}$ [rad]');
ax6 = subplot(2, 3, 6);
hold on;
plot(tomo_align_dist.Em.En.Time, tomo_align_dist.Em.En.Data(:, 6), 'DisplayName', 'Dist')
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 6), 'DisplayName', 'Ideal')
hold off;
ylabel('Rotation $\epsilon_{R_z}$ [rad]');
2019-12-17 18:03:21 +01:00
legend('location', 'northeast');
2020-03-17 12:32:31 +01:00
linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
xlim([0.5, inf]);
2019-12-13 19:07:54 +01:00
#+end_src
#+HEADER : :tangle no :exports results :results none :noweb yes
2020-03-17 12:32:31 +01:00
#+begin_src matlab :var filepath="figs/exp_tomo_dist.pdf" :var figsize= "full-tall" :post pdf2svg(file=*this*, ext= "png")
2019-12-13 19:07:54 +01:00
<<plt-matlab >>
#+end_src
2019-12-04 10:43:38 +01:00
2020-03-17 12:32:31 +01:00
#+NAME : fig:exp_tomo_dist
#+CAPTION : X-Y-Z translations and rotations of the sample w.r.t. the granite when performing tomography experiment with disturbances ([[./figs/exp_tomo_dist.png][png]], [[./figs/exp_tomo_dist.pdf][pdf]])
[[file:figs/exp_tomo_dist.png ]]
2019-12-17 08:28:20 +01:00
2019-12-17 18:03:21 +01:00
** Conclusion
#+begin_important
2020-04-17 10:25:44 +02:00
Here, no vibration is included in the X and Y directions.
2019-12-17 18:03:21 +01:00
#+end_important
2020-04-14 17:22:53 +02:00
* Tomography Experiment with Ty raster scans
<<sec:tomo_dist_ty_scans >>
** Introduction :ignore:
In this section, we also perform a tomography experiment with scans of the Translation stage.
All the perturbations are included.
** Simulation Setup
We now activate the disturbances.
#+begin_src matlab
initializeDisturbances(...
'Dwx', true, ... % Ground Motion - X direction
'Dwy', true, ... % Ground Motion - Y direction
'Dwz', true, ... % Ground Motion - Z direction
'Fty_x', true, ... % Translation Stage - X direction
'Fty_z', true, ... % Translation Stage - Z direction
'Frz_z', true ... % Spindle - Z direction
);
#+end_src
2020-04-17 10:25:44 +02:00
2020-04-14 17:22:53 +02:00
We initialize the reference path for all the stages.
2020-04-17 10:25:44 +02:00
The Spindle which is rotating at 60rpm and the translation stage not moving as it would take a long time to simulate.
However, vibrations of the Ty stage are included.
2020-04-14 17:22:53 +02:00
#+begin_src matlab
2020-04-17 10:25:44 +02:00
initializeReferences('Rz_type', 'rotating', 'Rz_period', 1);
2020-04-14 17:22:53 +02:00
#+end_src
We simulate the model.
#+begin_src matlab
sim('nass_model');
#+end_src
And we save the obtained data.
#+begin_src matlab
scan s_rz_align_dist = simout;
save('./mat/experiment_tomography.mat', 'scans_rz_align_dist', '-append');
#+end_src
** Analysis
#+begin_src matlab
load('./mat/experiment_tomography.mat', 'scans_rz_align_dist');
#+end_src
#+begin_src matlab :exports none
figure;
ax1 = subplot(2, 3, 1);
hold on;
2020-05-04 10:27:41 +02:00
plot(scans_rz_align_dist.Em.En.Time, scans_rz_align_dist.Em.En.Data(:, 1))
2020-04-14 17:22:53 +02:00
hold off;
ylabel('Displacement $\epsilon_x$ [m]');
ax2 = subplot(2, 3, 2);
hold on;
2020-05-04 10:27:41 +02:00
plot(scans_rz_align_dist.Em.En.Time, scans_rz_align_dist.Em.En.Data(:, 2))
2020-04-14 17:22:53 +02:00
hold off;
ylabel('Displacement $\epsilon_y$ [m]');
ax3 = subplot(2, 3, 3);
hold on;
2020-05-04 10:27:41 +02:00
plot(scans_rz_align_dist.Em.En.Time, scans_rz_align_dist.Em.En.Data(:, 3))
2020-04-14 17:22:53 +02:00
hold off;
ylabel('Displacement $\epsilon_z$ [m]');
ax4 = subplot(2, 3, 4);
hold on;
plot(scans_rz_align_dist.Em.En.Time, scans_rz_align_dist.Em.En.Data(:, 4))
hold off;
ylabel('Rotation $\epsilon_{R_x}$ [rad]');
ax5 = subplot(2, 3, 5);
hold on;
plot(scans_rz_align_dist.Em.En.Time, scans_rz_align_dist.Em.En.Data(:, 5))
hold off;
xlabel('Time [s]');
ylabel('Rotation $\epsilon_{R_y}$ [rad]');
ax6 = subplot(2, 3, 6);
hold on;
plot(scans_rz_align_dist.Em.En.Time, scans_rz_align_dist.Em.En.Data(:, 6))
hold off;
ylabel('Rotation $\epsilon_{R_z}$ [rad]');
linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
xlim([0.5, inf]);
#+end_src
2020-04-17 10:25:44 +02:00
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/exp_scans_rz_dist.pdf', 'width', 'full', 'height', 'full')
2020-04-14 17:22:53 +02:00
#+end_src
2020-04-17 10:25:44 +02:00
#+name : fig:exp_scans_rz_dist
#+CAPTION : X-Y-Z translations and rotations of the sample w.r.t. the granite when performing tomography experiment and scans with the translation stage at the same time
#+RESULTS :
2020-04-14 17:22:53 +02:00
[[file:figs/exp_scans_rz_dist.png ]]
** Conclusion
2019-12-17 18:03:21 +01:00
* Tomography when the micro-hexapod is not centered
<<sec:tomo_hexa_trans >>
** Introduction :ignore:
2020-03-17 11:23:39 +01:00
In this section, the sample's center of mass is not aligned with the rotation axis anymore.
This is due to the fact that the micro-hexapod has performed some displacement.
No disturbances are included.
2019-12-17 18:03:21 +01:00
2019-12-17 08:28:20 +01:00
** Simulation Setup
We first set the wanted translation of the Micro Hexapod.
#+begin_src matlab
P_micro_hexapod = [0.01; 0; 0]; % [m]
#+end_src
We initialize the reference path.
#+begin_src matlab
2020-01-13 11:42:31 +01:00
initializeReferences('Dh_pos', [P_micro_hexapod; 0; 0; 0], 'Rz_type', 'rotating', 'Rz_period', 1);
2019-12-17 08:28:20 +01:00
#+end_src
We initialize the stages.
#+begin_src matlab
2020-01-13 11:42:31 +01:00
initializeMicroHexapod('AP', P_micro_hexapod);
2019-12-17 08:28:20 +01:00
#+end_src
And we initialize the disturbances to zero.
#+begin_src matlab
2020-01-21 15:49:02 +01:00
initializeDisturbances(...
2019-12-17 08:28:20 +01:00
'Dwx', false, ... % Ground Motion - X direction
'Dwy', false, ... % Ground Motion - Y direction
'Dwz', false, ... % Ground Motion - Z direction
'Fty_x', false, ... % Translation Stage - X direction
'Fty_z', false, ... % Translation Stage - Z direction
'Frz_z', false ... % Spindle - Z direction
2020-01-13 11:42:31 +01:00
);
2019-12-17 08:28:20 +01:00
#+end_src
We simulate the model.
#+begin_src matlab
2020-02-18 13:58:27 +01:00
sim('nass_model');
2019-12-17 08:28:20 +01:00
#+end_src
And we save the obtained data.
#+begin_src matlab
2020-03-17 12:32:31 +01:00
tomo_not_align = simout;
2020-03-13 17:40:22 +01:00
save('./mat/experiment_tomography.mat', 'tomo_not_align', '-append');
2019-12-17 08:28:20 +01:00
#+end_src
** Analysis
2019-12-17 18:03:21 +01:00
#+begin_src matlab
2020-03-17 12:32:31 +01:00
load('./mat/experiment_tomography.mat', 'tomo_not_align', 'tomo_align_no_dist');
2019-12-17 08:28:20 +01:00
#+end_src
#+begin_src matlab :exports none
figure;
2020-03-17 12:32:31 +01:00
ax1 = subplot(2, 3, 1);
hold on;
plot(tomo_not_align.Em.Eg.Time, tomo_not_align.Em.Eg.Data(:, 1))
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 1))
hold off;
ylabel('Displacement $\epsilon_x$ [m]');
ax2 = subplot(2, 3, 2);
hold on;
plot(tomo_not_align.Em.Eg.Time, tomo_not_align.Em.Eg.Data(:, 2))
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 2))
hold off;
ylabel('Displacement $\epsilon_y$ [m]');
ax3 = subplot(2, 3, 3);
hold on;
plot(tomo_not_align.Em.Eg.Time, tomo_not_align.Em.Eg.Data(:, 3))
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 3))
hold off;
ylabel('Displacement $\epsilon_z$ [m]');
ax4 = subplot(2, 3, 4);
hold on;
plot(tomo_not_align.Em.En.Time, tomo_not_align.Em.En.Data(:, 4))
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 4))
hold off;
ylabel('Rotation $\epsilon_{R_x}$ [rad]');
ax5 = subplot(2, 3, 5);
hold on;
plot(tomo_not_align.Em.En.Time, tomo_not_align.Em.En.Data(:, 5))
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 5))
hold off;
2019-12-17 18:03:21 +01:00
xlabel('Time [s]');
2020-03-17 12:32:31 +01:00
ylabel('Rotation $\epsilon_{R_y}$ [rad]');
ax6 = subplot(2, 3, 6);
hold on;
plot(tomo_not_align.Em.En.Time, tomo_not_align.Em.En.Data(:, 6), 'DisplayName', 'Offset')
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 6), 'DisplayName', 'Ideal')
hold off;
ylabel('Rotation $\epsilon_{R_z}$ [rad]');
2019-12-17 18:03:21 +01:00
legend('location', 'northeast');
2020-03-17 12:32:31 +01:00
linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
xlim([0.5, inf]);
2019-12-17 08:28:20 +01:00
#+end_src
#+HEADER : :tangle no :exports results :results none :noweb yes
2020-03-17 12:32:31 +01:00
#+begin_src matlab :var filepath="figs/exp_tomo_offset.pdf" :var figsize= "full-normal" :post pdf2svg(file=*this*, ext= "png")
2019-12-17 08:28:20 +01:00
<<plt-matlab >>
#+end_src
2020-03-17 12:32:31 +01:00
#+NAME : fig:exp_tomo_offset
#+CAPTION : X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_tomo_offset.png][png]], [[./figs/exp_tomo_offset.pdf][pdf]])
[[file:figs/exp_tomo_offset.png ]]
2019-12-17 08:28:20 +01:00
2019-12-17 18:03:21 +01:00
** Conclusion
#+begin_important
2020-03-17 12:32:31 +01:00
The main motion error are 1Hz X-Y translations and constant Ry error.
This is mainly due to finite stiffness of the elements.
2019-12-17 18:03:21 +01:00
#+end_important
2019-12-04 10:43:38 +01:00
2019-12-17 18:03:21 +01:00
* Raster Scans with the translation stage
<<sec:ty_scans >>
** Introduction :ignore:
2020-03-17 11:23:39 +01:00
In this section, scans with the translation stage are performed.
2019-12-04 10:43:38 +01:00
2019-12-17 18:03:21 +01:00
** Simulation Setup
We initialize the stages.
2019-12-04 10:43:38 +01:00
#+begin_src matlab
2019-12-17 18:03:21 +01:00
initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
2020-03-17 12:32:31 +01:00
initializeNanoHexapod('type', 'rigid');
2020-01-13 11:42:31 +01:00
initializeSample('mass', 1);
2019-12-04 10:43:38 +01:00
#+end_src
2019-12-17 18:03:21 +01:00
And we initialize the disturbances to zero.
2019-12-04 10:43:38 +01:00
#+begin_src matlab
2020-01-21 15:49:02 +01:00
initializeDisturbances(...
2019-12-17 18:03:21 +01:00
'Dwx', false, ... % Ground Motion - X direction
'Dwy', false, ... % Ground Motion - Y direction
'Dwz', false, ... % Ground Motion - Z direction
'Fty_x', false, ... % Translation Stage - X direction
'Fty_z', false, ... % Translation Stage - Z direction
'Frz_z', false ... % Spindle - Z direction
2020-01-13 11:42:31 +01:00
);
2019-12-04 10:43:38 +01:00
#+end_src
2020-03-17 12:32:31 +01:00
We set the reference path to be a triangular signal for the Translation Stage.
#+begin_src matlab
initializeReferences('Dy_type', 'triangular', 'Dy_amplitude', 10e-3, 'Dy_period', 1);
#+end_src
2019-12-17 18:03:21 +01:00
We simulate the model.
2019-12-04 10:43:38 +01:00
#+begin_src matlab
2020-02-18 13:58:27 +01:00
sim('nass_model');
2019-12-04 10:43:38 +01:00
#+end_src
2019-12-17 18:03:21 +01:00
And we save the obtained data.
2019-12-04 10:43:38 +01:00
#+begin_src matlab
2020-03-17 12:32:31 +01:00
ty_scan_triangle = simout;
save('./mat/experiment_tomography.mat', 'ty_scan_triangle', '-append');
2019-12-04 10:43:38 +01:00
#+end_src
2020-03-17 12:32:31 +01:00
We now set the reference path to be a sinusoidal signal for the Translation Stage.
2019-12-04 10:43:38 +01:00
#+begin_src matlab
2020-03-17 12:32:31 +01:00
initializeReferences('Dy_type', 'sinusoidal', 'Dy_amplitude', 10e-3, 'Dy_period', 1);
2019-12-04 10:43:38 +01:00
#+end_src
2020-03-17 12:32:31 +01:00
We simulate the model.
2019-12-04 10:43:38 +01:00
#+begin_src matlab
2020-03-17 12:32:31 +01:00
sim('nass_model');
2019-12-04 10:43:38 +01:00
#+end_src
2020-03-17 12:32:31 +01:00
And we save the obtained data.
#+begin_src matlab
ty_scan_sinus = simout;
save('./mat/experiment_tomography.mat', 'ty_scan_sinus', '-append');
2019-12-04 10:43:38 +01:00
#+end_src
2020-03-17 12:32:31 +01:00
** Analysis
#+begin_src matlab
load('./mat/experiment_tomography.mat', 'ty_scan_triangle', 'ty_scan_sinus');
2019-12-04 10:43:38 +01:00
#+end_src
2019-12-17 18:03:21 +01:00
#+begin_src matlab :exports none
figure;
2020-03-17 12:32:31 +01:00
ax1 = subplot(2, 3, 1);
hold on;
plot(ty_scan_triangle.Em.Eg.Time, ty_scan_triangle.Em.Eg.Data(:, 1))
plot(ty_scan_sinus.Em.Eg.Time, ty_scan_sinus.Em.Eg.Data(:, 1))
hold off;
ylabel('Displacement $\epsilon_x$ [m]');
ax2 = subplot(2, 3, 2);
hold on;
plot(ty_scan_triangle.Em.Eg.Time, ty_scan_triangle.Em.Eg.Data(:, 2))
plot(ty_scan_sinus.Em.Eg.Time, ty_scan_sinus.Em.Eg.Data(:, 2))
hold off;
ylabel('Displacement $\epsilon_y$ [m]');
ax3 = subplot(2, 3, 3);
hold on;
plot(ty_scan_triangle.Em.Eg.Time, ty_scan_triangle.Em.Eg.Data(:, 3))
plot(ty_scan_sinus.Em.Eg.Time, ty_scan_sinus.Em.Eg.Data(:, 3))
hold off;
ylabel('Displacement $\epsilon_z$ [m]');
ax4 = subplot(2, 3, 4);
hold on;
plot(ty_scan_triangle.Em.En.Time, ty_scan_triangle.Em.En.Data(:, 4))
plot(ty_scan_sinus.Em.En.Time, ty_scan_sinus.Em.En.Data(:, 4))
hold off;
ylabel('Rotation $\epsilon_{R_x}$ [rad]');
ax5 = subplot(2, 3, 5);
hold on;
plot(ty_scan_triangle.Em.En.Time, ty_scan_triangle.Em.En.Data(:, 5))
plot(ty_scan_sinus.Em.En.Time, ty_scan_sinus.Em.En.Data(:, 5))
hold off;
2019-12-17 18:03:21 +01:00
xlabel('Time [s]');
2020-03-17 12:32:31 +01:00
ylabel('Rotation $\epsilon_{R_y}$ [rad]');
ax6 = subplot(2, 3, 6);
hold on;
plot(ty_scan_triangle.Em.En.Time, ty_scan_triangle.Em.En.Data(:, 6), 'DisplayName', 'triangle')
plot(ty_scan_sinus.Em.En.Time, ty_scan_sinus.Em.En.Data(:, 6), 'DisplayName', 'sinus')
hold off;
ylabel('Rotation $\epsilon_{R_z}$ [rad]');
2019-12-17 18:03:21 +01:00
legend('location', 'northeast');
2019-12-04 10:43:38 +01:00
2020-03-17 12:32:31 +01:00
linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
xlim([0.5, inf]);
2019-12-04 10:43:38 +01:00
#+end_src
2019-12-17 18:03:21 +01:00
#+HEADER : :tangle no :exports results :results none :noweb yes
2020-03-17 12:32:31 +01:00
#+begin_src matlab :var filepath="figs/exp_ty_scan.pdf" :var figsize= "full-tall" :post pdf2svg(file=*this*, ext= "png")
2019-12-17 18:03:21 +01:00
<<plt-matlab >>
2019-12-04 10:43:38 +01:00
#+end_src
2020-03-17 12:32:31 +01:00
#+NAME : fig:exp_ty_scan
#+CAPTION : X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_ty_scan.png][png]], [[./figs/exp_ty_scan.pdf][pdf]])
[[file:figs/exp_ty_scan.png ]]
2019-12-17 18:03:21 +01:00
** Conclusion
#+begin_important
2020-03-17 12:32:31 +01:00
Scans with the translation stage induces some errors in the Y direction and Rx translations.
Also, scanning with a sinusoidal wave induces less position errors and at lower frequencies.
Thus, this should be preferred.
2019-12-17 18:03:21 +01:00
#+end_important