Totally reworked the experiment file
This commit is contained in:
@@ -111,7 +111,7 @@ No controller is used (Open Loop).
|
||||
|
||||
And we put some gravity.
|
||||
#+begin_src matlab
|
||||
initializeSimscapeConfiguration('gravity', true);
|
||||
initializeSimscapeConfiguration('gravity', false);
|
||||
#+end_src
|
||||
|
||||
We log the signals for further analysis.
|
||||
@@ -152,77 +152,60 @@ And we save the obtained data.
|
||||
** Analysis
|
||||
#+begin_src matlab
|
||||
load('./mat/experiment_tomography.mat', 'tomo_align_no_dist');
|
||||
t = tomo_align_no_dist.t;
|
||||
MTr = tomo_align_no_dist.MTr;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
Edx = squeeze(MTr(1, 4, :));
|
||||
Edy = squeeze(MTr(2, 4, :));
|
||||
Edz = squeeze(MTr(3, 4, :));
|
||||
% The angles obtained are u-v-w Euler angles (rotations in the moving frame)
|
||||
Ery = atan2( squeeze(MTr(1, 3, :)), squeeze(sqrt(MTr(1, 1, :).^2 + MTr(1, 2, :).^2)));
|
||||
Erx = atan2(-squeeze(MTr(2, 3, :))./cos(Ery), squeeze(MTr(3, 3, :))./cos(Ery));
|
||||
Erz = atan2(-squeeze(MTr(1, 2, :))./cos(Ery), squeeze(MTr(1, 1, :))./cos(Ery));
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
ax1 = subplot(1, 3, 1);
|
||||
plot(t, Edx, 'DisplayName', '$\epsilon_{x}$')
|
||||
ylabel('Displacement [m]');
|
||||
legend('location', 'northeast');
|
||||
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(1, 3, 2);
|
||||
plot(t, Edy, 'DisplayName', '$\epsilon_{y}$')
|
||||
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;
|
||||
xlabel('Time [s]');
|
||||
legend('location', 'northeast');
|
||||
ylabel('Rotation $\epsilon_{R_y}$ [rad]');
|
||||
|
||||
ax3 = subplot(1, 3, 3);
|
||||
plot(t, Edz, 'DisplayName', '$\epsilon_{z}$')
|
||||
legend('location', 'northeast');
|
||||
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]');
|
||||
|
||||
linkaxes([ax1,ax2,ax3],'x');
|
||||
xlim([2, inf]);
|
||||
|
||||
linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
|
||||
xlim([0.5, inf]);
|
||||
#+end_src
|
||||
|
||||
#+HEADER: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/exp_tomo_without_dist_trans.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
|
||||
#+begin_src matlab :var filepath="figs/exp_tomo_without_dist.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:exp_tomo_without_dist_trans
|
||||
#+CAPTION: X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_tomo_without_dist_trans.png][png]], [[./figs/exp_tomo_without_dist_trans.pdf][pdf]])
|
||||
[[file:figs/exp_tomo_without_dist_trans.png]]
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
ax1 = subplot(1, 3, 1);
|
||||
plot(t, Erx, 'DisplayName', '$\epsilon_{\theta x}$')
|
||||
ylabel('Rotation [rad]');
|
||||
legend('location', 'northeast');
|
||||
|
||||
ax2 = subplot(1, 3, 2);
|
||||
plot(t, Ery, 'DisplayName', '$\epsilon_{\theta y}$')
|
||||
xlabel('Time [s]');
|
||||
legend('location', 'northeast');
|
||||
|
||||
ax3 = subplot(1, 3, 3);
|
||||
plot(t, Erz, 'DisplayName', '$\epsilon_{\theta z}$')
|
||||
legend('location', 'northeast');
|
||||
|
||||
linkaxes([ax1,ax2,ax3],'x');
|
||||
xlim([2, inf]);
|
||||
#+end_src
|
||||
|
||||
#+HEADER: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/exp_tomo_without_dist_rot.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:exp_tomo_without_dist_rot
|
||||
#+CAPTION: X-Y-Z rotations of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_tomo_without_dist_rot.png][png]], [[./figs/exp_tomo_without_dist_rot.pdf][pdf]])
|
||||
[[file:figs/exp_tomo_without_dist_rot.png]]
|
||||
#+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]]
|
||||
|
||||
** Conclusion
|
||||
#+begin_important
|
||||
@@ -256,84 +239,74 @@ We simulate the model.
|
||||
|
||||
And we save the obtained data.
|
||||
#+begin_src matlab
|
||||
tomo_align_dist = struct('t', t, 'MTr', MTr);
|
||||
tomo_align_dist = simout;
|
||||
save('./mat/experiment_tomography.mat', 'tomo_align_dist', '-append');
|
||||
#+end_src
|
||||
|
||||
** Analysis
|
||||
#+begin_src matlab
|
||||
load('./mat/experiment_tomography.mat', 'tomo_align_dist');
|
||||
t = tomo_align_dist.t;
|
||||
MTr = tomo_align_dist.MTr;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
Edx = squeeze(MTr(1, 4, :));
|
||||
Edy = squeeze(MTr(2, 4, :));
|
||||
Edz = squeeze(MTr(3, 4, :));
|
||||
% The angles obtained are u-v-w Euler angles (rotations in the moving frame)
|
||||
Ery = atan2( squeeze(MTr(1, 3, :)), squeeze(sqrt(MTr(1, 1, :).^2 + MTr(1, 2, :).^2)));
|
||||
Erx = atan2(-squeeze(MTr(2, 3, :))./cos(Ery), squeeze(MTr(3, 3, :))./cos(Ery));
|
||||
Erz = atan2(-squeeze(MTr(1, 2, :))./cos(Ery), squeeze(MTr(1, 1, :))./cos(Ery));
|
||||
load('./mat/experiment_tomography.mat', 'tomo_align_dist', 'tomo_align_no_dist');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
ax1 = subplot(1, 3, 1);
|
||||
plot(t, Edx, 'DisplayName', '$\epsilon_{x}$')
|
||||
ylabel('Displacement [m]');
|
||||
legend('location', 'northeast');
|
||||
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(1, 3, 2);
|
||||
plot(t, Edy, 'DisplayName', '$\epsilon_{y}$')
|
||||
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;
|
||||
xlabel('Time [s]');
|
||||
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]');
|
||||
legend('location', 'northeast');
|
||||
|
||||
ax3 = subplot(1, 3, 3);
|
||||
plot(t, Edz, 'DisplayName', '$\epsilon_{z}$')
|
||||
legend('location', 'northeast');
|
||||
|
||||
linkaxes([ax1,ax2,ax3],'x');
|
||||
xlim([2, inf]);
|
||||
linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
|
||||
xlim([0.5, inf]);
|
||||
#+end_src
|
||||
|
||||
#+HEADER: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/exp_tomo_dist_trans.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
|
||||
#+begin_src matlab :var filepath="figs/exp_tomo_dist.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:exp_tomo_dist_trans
|
||||
#+CAPTION: X-Y-Z translation of the sample w.r.t. the granite when performing tomography experiment with disturbances ([[./figs/exp_tomo_dist_trans.png][png]], [[./figs/exp_tomo_dist_trans.pdf][pdf]])
|
||||
[[file:figs/exp_tomo_dist_trans.png]]
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
ax1 = subplot(1, 3, 1);
|
||||
plot(t, Erx, 'DisplayName', '$\epsilon_{\theta x}$')
|
||||
ylabel('Rotation [rad]');
|
||||
legend('location', 'northeast');
|
||||
|
||||
ax2 = subplot(1, 3, 2);
|
||||
plot(t, Ery, 'DisplayName', '$\epsilon_{\theta y}$')
|
||||
xlabel('Time [s]');
|
||||
legend('location', 'northeast');
|
||||
|
||||
ax3 = subplot(1, 3, 3);
|
||||
plot(t, Erz, 'DisplayName', '$\epsilon_{\theta z}$')
|
||||
legend('location', 'northeast');
|
||||
|
||||
linkaxes([ax1,ax2,ax3],'x');
|
||||
xlim([2, inf]);
|
||||
#+end_src
|
||||
|
||||
#+HEADER: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/exp_tomo_dist_rot.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:exp_tomo_dist_rot
|
||||
#+CAPTION: X-Y-Z rotations of the sample w.r.t. the granite when performing tomography experiment with disturbances ([[./figs/exp_tomo_dist_rot.png][png]], [[./figs/exp_tomo_dist_rot.pdf][pdf]])
|
||||
[[file:figs/exp_tomo_dist_rot.png]]
|
||||
#+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]]
|
||||
|
||||
** Conclusion
|
||||
|
||||
@@ -384,89 +357,79 @@ We simulate the model.
|
||||
|
||||
And we save the obtained data.
|
||||
#+begin_src matlab
|
||||
tomo_not_align = struct('t', t, 'MTr', MTr);
|
||||
tomo_not_align = simout;
|
||||
save('./mat/experiment_tomography.mat', 'tomo_not_align', '-append');
|
||||
#+end_src
|
||||
|
||||
** Analysis
|
||||
#+begin_src matlab
|
||||
load('./mat/experiment_tomography.mat', 'tomo_not_align');
|
||||
t = tomo_not_align.t;
|
||||
MTr = tomo_not_align.MTr;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
Edx = squeeze(MTr(1, 4, :));
|
||||
Edy = squeeze(MTr(2, 4, :));
|
||||
Edz = squeeze(MTr(3, 4, :));
|
||||
% The angles obtained are u-v-w Euler angles (rotations in the moving frame)
|
||||
Ery = atan2( squeeze(MTr(1, 3, :)), squeeze(sqrt(MTr(1, 1, :).^2 + MTr(1, 2, :).^2)));
|
||||
Erx = atan2(-squeeze(MTr(2, 3, :))./cos(Ery), squeeze(MTr(3, 3, :))./cos(Ery));
|
||||
Erz = atan2(-squeeze(MTr(1, 2, :))./cos(Ery), squeeze(MTr(1, 1, :))./cos(Ery));
|
||||
load('./mat/experiment_tomography.mat', 'tomo_not_align', 'tomo_align_no_dist');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
ax1 = subplot(1, 3, 1);
|
||||
plot(t, Edx, 'DisplayName', '$\epsilon_{x}$')
|
||||
ylabel('Displacement [m]');
|
||||
legend('location', 'northeast');
|
||||
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(1, 3, 2);
|
||||
plot(t, Edy, 'DisplayName', '$\epsilon_{y}$')
|
||||
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;
|
||||
xlabel('Time [s]');
|
||||
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]');
|
||||
legend('location', 'northeast');
|
||||
|
||||
ax3 = subplot(1, 3, 3);
|
||||
plot(t, Edz, 'DisplayName', '$\epsilon_{z}$')
|
||||
legend('location', 'northeast');
|
||||
|
||||
linkaxes([ax1,ax2,ax3],'x');
|
||||
xlim([2, inf]);
|
||||
linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
|
||||
xlim([0.5, inf]);
|
||||
#+end_src
|
||||
|
||||
#+HEADER: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/exp_tomo_offset_trans.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
|
||||
#+begin_src matlab :var filepath="figs/exp_tomo_offset.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:exp_tomo_offset_trans
|
||||
#+CAPTION: X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_tomo_offset_trans.png][png]], [[./figs/exp_tomo_offset_trans.pdf][pdf]])
|
||||
[[file:figs/exp_tomo_offset_trans.png]]
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
ax1 = subplot(1, 3, 1);
|
||||
plot(t, Erx, 'DisplayName', '$\epsilon_{\theta x}$')
|
||||
ylabel('Rotation [rad]');
|
||||
legend('location', 'northeast');
|
||||
|
||||
ax2 = subplot(1, 3, 2);
|
||||
plot(t, Ery, 'DisplayName', '$\epsilon_{\theta y}$')
|
||||
xlabel('Time [s]');
|
||||
legend('location', 'northeast');
|
||||
|
||||
ax3 = subplot(1, 3, 3);
|
||||
plot(t, Erz, 'DisplayName', '$\epsilon_{\theta z}$')
|
||||
legend('location', 'northeast');
|
||||
|
||||
linkaxes([ax1,ax2,ax3],'x');
|
||||
xlim([2, inf]);
|
||||
#+end_src
|
||||
|
||||
#+HEADER: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/exp_tomo_offset_rot.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:exp_tomo_offset_rot
|
||||
#+CAPTION: X-Y-Z rotations of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_tomo_offset_rot.png][png]], [[./figs/exp_tomo_offset_rot.pdf][pdf]])
|
||||
[[file:figs/exp_tomo_offset_rot.png]]
|
||||
#+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]]
|
||||
|
||||
** Conclusion
|
||||
|
||||
#+begin_important
|
||||
The main motions are translations in the X direction of the mobile platform (corresponds to the eccentricity of the micro-hexapod) and rotations along the rotating Y axis.
|
||||
The main motion error are 1Hz X-Y translations and constant Ry error.
|
||||
This is mainly due to finite stiffness of the elements.
|
||||
#+end_important
|
||||
|
||||
* Raster Scans with the translation stage
|
||||
@@ -475,11 +438,6 @@ And we save the obtained data.
|
||||
In this section, scans with the translation stage are performed.
|
||||
|
||||
** Simulation Setup
|
||||
We set the reference path.
|
||||
#+begin_src matlab
|
||||
initializeReferences('Dy_type', 'triangular', 'Dy_amplitude', 10e-3, 'Dy_period', 1);
|
||||
#+end_src
|
||||
|
||||
We initialize the stages.
|
||||
#+begin_src matlab
|
||||
initializeGround();
|
||||
@@ -490,7 +448,7 @@ We initialize the stages.
|
||||
initializeMicroHexapod();
|
||||
initializeAxisc();
|
||||
initializeMirror();
|
||||
initializeNanoHexapod('actuator', 'piezo');
|
||||
initializeNanoHexapod('type', 'rigid');
|
||||
initializeSample('mass', 1);
|
||||
#+end_src
|
||||
|
||||
@@ -506,6 +464,11 @@ And we initialize the disturbances to zero.
|
||||
);
|
||||
#+end_src
|
||||
|
||||
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
|
||||
|
||||
We simulate the model.
|
||||
#+begin_src matlab
|
||||
sim('nass_model');
|
||||
@@ -513,88 +476,95 @@ We simulate the model.
|
||||
|
||||
And we save the obtained data.
|
||||
#+begin_src matlab
|
||||
ty_scan = struct('t', t, 'MTr', MTr);
|
||||
save('./mat/experiment_tomography.mat', 'ty_scan', '-append');
|
||||
ty_scan_triangle = simout;
|
||||
save('./mat/experiment_tomography.mat', 'ty_scan_triangle', '-append');
|
||||
#+end_src
|
||||
|
||||
We now set the reference path to be a sinusoidal signal for the Translation Stage.
|
||||
#+begin_src matlab
|
||||
initializeReferences('Dy_type', 'sinusoidal', 'Dy_amplitude', 10e-3, 'Dy_period', 1);
|
||||
#+end_src
|
||||
|
||||
We simulate the model.
|
||||
#+begin_src matlab
|
||||
sim('nass_model');
|
||||
#+end_src
|
||||
|
||||
And we save the obtained data.
|
||||
#+begin_src matlab
|
||||
ty_scan_sinus = simout;
|
||||
save('./mat/experiment_tomography.mat', 'ty_scan_sinus', '-append');
|
||||
#+end_src
|
||||
|
||||
** Analysis
|
||||
#+begin_src matlab
|
||||
load('./mat/experiment_tomography.mat', 'ty_scan');
|
||||
t = ty_scan.t;
|
||||
MTr = ty_scan.MTr;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
Edx = squeeze(MTr(1, 4, :));
|
||||
Edy = squeeze(MTr(2, 4, :));
|
||||
Edz = squeeze(MTr(3, 4, :));
|
||||
% The angles obtained are u-v-w Euler angles (rotations in the moving frame)
|
||||
Ery = atan2( squeeze(MTr(1, 3, :)), squeeze(sqrt(MTr(1, 1, :).^2 + MTr(1, 2, :).^2)));
|
||||
Erx = atan2(-squeeze(MTr(2, 3, :))./cos(Ery), squeeze(MTr(3, 3, :))./cos(Ery));
|
||||
Erz = atan2(-squeeze(MTr(1, 2, :))./cos(Ery), squeeze(MTr(1, 1, :))./cos(Ery));
|
||||
load('./mat/experiment_tomography.mat', 'ty_scan_triangle', 'ty_scan_sinus');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
ax1 = subplot(1, 3, 1);
|
||||
plot(t, Edx, 'DisplayName', '$\epsilon_{x}$')
|
||||
ylabel('Displacement [m]');
|
||||
legend('location', 'northeast');
|
||||
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(1, 3, 2);
|
||||
plot(t, Edy, 'DisplayName', '$\epsilon_{y}$')
|
||||
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;
|
||||
xlabel('Time [s]');
|
||||
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]');
|
||||
legend('location', 'northeast');
|
||||
|
||||
ax3 = subplot(1, 3, 3);
|
||||
plot(t, Edz, 'DisplayName', '$\epsilon_{z}$')
|
||||
legend('location', 'northeast');
|
||||
|
||||
linkaxes([ax1,ax2,ax3],'x');
|
||||
xlim([2, inf]);
|
||||
linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
|
||||
xlim([0.5, inf]);
|
||||
#+end_src
|
||||
|
||||
#+HEADER: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/exp_ty_scan_trans.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
|
||||
#+begin_src matlab :var filepath="figs/exp_ty_scan.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:exp_ty_scan_trans
|
||||
#+CAPTION: X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_ty_scan_trans.png][png]], [[./figs/exp_ty_scan_trans.pdf][pdf]])
|
||||
[[file:figs/exp_ty_scan_trans.png]]
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
ax1 = subplot(1, 3, 1);
|
||||
plot(t, Erx, 'DisplayName', '$\epsilon_{\theta x}$')
|
||||
ylabel('Rotation [rad]');
|
||||
legend('location', 'northeast');
|
||||
|
||||
ax2 = subplot(1, 3, 2);
|
||||
plot(t, Ery, 'DisplayName', '$\epsilon_{\theta y}$')
|
||||
xlabel('Time [s]');
|
||||
legend('location', 'northeast');
|
||||
|
||||
ax3 = subplot(1, 3, 3);
|
||||
plot(t, Erz, 'DisplayName', '$\epsilon_{\theta z}$')
|
||||
legend('location', 'northeast');
|
||||
|
||||
linkaxes([ax1,ax2,ax3],'x');
|
||||
xlim([2, inf]);
|
||||
#+end_src
|
||||
|
||||
#+HEADER: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/exp_ty_scan_rot.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:exp_ty_scan_rot
|
||||
#+CAPTION: X-Y-Z rotations of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_ty_scan_rot.png][png]], [[./figs/exp_ty_scan_rot.pdf][pdf]])
|
||||
[[file:figs/exp_ty_scan_rot.png]]
|
||||
#+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]]
|
||||
|
||||
** Conclusion
|
||||
|
||||
#+begin_important
|
||||
This is logic that the main error moving is translation along the Y axis and rotation along the X axis.
|
||||
In order to reduce the errors, we can make a smoother reference path for the translation stage.
|
||||
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.
|
||||
#+end_important
|
||||
|
Reference in New Issue
Block a user