Add time domain disturbances plots and comparisons
This commit is contained in:
@@ -568,3 +568,201 @@ The PSD of the disturbance force are now saved for further analysis.
|
||||
save('./mat/dist_psd.mat', 'dist_f');
|
||||
#+end_src
|
||||
|
||||
* Time Domain Disturbances
|
||||
Let's initialize the time domain disturbances and load them.
|
||||
#+begin_src matlab
|
||||
initializeDisturbances();
|
||||
dist = load('nass_disturbances.mat');
|
||||
#+end_src
|
||||
|
||||
The time domain disturbance signals are shown in Figure [[fig:disturbances_time_domain]].
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
|
||||
ax1 = subplot(2, 2, 1);
|
||||
hold on;
|
||||
plot(dist.t, dist.Dwx, 'DisplayName', '$D_{w,x}$')
|
||||
plot(dist.t, dist.Dwy, 'DisplayName', '$D_{w,y}$')
|
||||
plot(dist.t, dist.Dwz, 'DisplayName', '$D_{w,z}$')
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Ground Motion [m]');
|
||||
legend();
|
||||
|
||||
ax2 = subplot(2, 2, 2);
|
||||
hold on;
|
||||
plot(dist.t, dist.Fty_x, 'DisplayName', '$F_{ty,x}$')
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Ty Forces [N]');
|
||||
legend();
|
||||
|
||||
ax3 = subplot(2, 2, 3);
|
||||
hold on;
|
||||
plot(dist.t, dist.Fty_z, 'DisplayName', '$F_{ty,z}$')
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Ty Forces [N]');
|
||||
legend();
|
||||
|
||||
ax4 = subplot(2, 2, 4);
|
||||
hold on;
|
||||
plot(dist.t, dist.Frz_z, 'DisplayName', '$F_{rz,z}$')
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Rz Forces [N]');
|
||||
legend();
|
||||
|
||||
linkaxes([ax1,ax2,ax3,ax4], 'x');
|
||||
xlim([0, dist.t(end)]);
|
||||
#+end_src
|
||||
|
||||
#+header: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/disturbances_time_domain.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+name: fig:disturbances_time_domain
|
||||
#+caption: Disturbances in the Time Domain ([[./figs/disturbances_time_domain.png][png]], [[./figs/disturbances_time_domain.pdf][pdf]])
|
||||
[[file:figs/disturbances_time_domain.png]]
|
||||
|
||||
* Time Domain Effect of Disturbances
|
||||
** Initialization of the Experiment
|
||||
We initialize all the stages with the default parameters.
|
||||
#+begin_src matlab
|
||||
initializeGround();
|
||||
initializeGranite();
|
||||
initializeTy();
|
||||
initializeRy();
|
||||
initializeRz();
|
||||
initializeMicroHexapod();
|
||||
initializeAxisc();
|
||||
initializeMirror();
|
||||
#+end_src
|
||||
|
||||
The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.
|
||||
#+begin_src matlab
|
||||
initializeNanoHexapod('type', 'rigid');
|
||||
initializeSample('mass', 1);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
initializeReferences();
|
||||
initializeController('type', 'open-loop');
|
||||
initializeSimscapeConfiguration('gravity', false);
|
||||
initializeLoggingConfiguration('log', 'all');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
load('mat/conf_simulink.mat');
|
||||
set_param(conf_simulink, 'StopTime', '2');
|
||||
#+end_src
|
||||
|
||||
** Simulations
|
||||
|
||||
No disturbances:
|
||||
#+begin_src matlab
|
||||
initializeDisturbances('enable', false);
|
||||
sim('nass_model');
|
||||
sim_no = simout;
|
||||
#+end_src
|
||||
|
||||
Ground Motion:
|
||||
#+begin_src matlab
|
||||
initializeDisturbances('Fty_x', false, 'Fty_z', false, 'Frz_z', false);
|
||||
sim('nass_model');
|
||||
sim_gm = simout;
|
||||
#+end_src
|
||||
|
||||
Translation Stage Vibrations:
|
||||
#+begin_src matlab
|
||||
initializeDisturbances('Dwx', false, 'Dwy', false, 'Dwz', false, 'Frz_z', false);
|
||||
sim('nass_model');
|
||||
sim_ty = simout;
|
||||
#+end_src
|
||||
|
||||
Rotation Stage Vibrations:
|
||||
#+begin_src matlab
|
||||
initializeDisturbances('Dwx', false, 'Dwy', false, 'Dwz', false, 'Fty_x', false, 'Fty_z', false);
|
||||
sim('nass_model');
|
||||
sim_rz = simout;
|
||||
#+end_src
|
||||
|
||||
** Comparison
|
||||
Let's now compare the effect of those perturbations on the position error of the sample (Figure [[fig:effect_disturbances_position_error]])
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
ax1 = subplot(2, 3, 1);
|
||||
hold on;
|
||||
plot(sim_no.Em.En.Time, sim_no.Em.En.Data(:, 1))
|
||||
plot(sim_gm.Em.En.Time, sim_gm.Em.En.Data(:, 1))
|
||||
plot(sim_ty.Em.En.Time, sim_ty.Em.En.Data(:, 1))
|
||||
plot(sim_rz.Em.En.Time, sim_rz.Em.En.Data(:, 1))
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Dx [m]');
|
||||
|
||||
ax2 = subplot(2, 3, 2);
|
||||
hold on;
|
||||
plot(sim_no.Em.En.Time, sim_no.Em.En.Data(:, 2))
|
||||
plot(sim_gm.Em.En.Time, sim_gm.Em.En.Data(:, 2))
|
||||
plot(sim_ty.Em.En.Time, sim_ty.Em.En.Data(:, 2))
|
||||
plot(sim_rz.Em.En.Time, sim_rz.Em.En.Data(:, 2))
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Dy [m]');
|
||||
|
||||
ax3 = subplot(2, 3, 3);
|
||||
hold on;
|
||||
plot(sim_no.Em.En.Time, sim_no.Em.En.Data(:, 3))
|
||||
plot(sim_gm.Em.En.Time, sim_gm.Em.En.Data(:, 3))
|
||||
plot(sim_ty.Em.En.Time, sim_ty.Em.En.Data(:, 3))
|
||||
plot(sim_rz.Em.En.Time, sim_rz.Em.En.Data(:, 3))
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Dz [m]');
|
||||
|
||||
ax4 = subplot(2, 3, 4);
|
||||
hold on;
|
||||
plot(sim_no.Em.En.Time, sim_no.Em.En.Data(:, 4))
|
||||
plot(sim_gm.Em.En.Time, sim_gm.Em.En.Data(:, 4))
|
||||
plot(sim_ty.Em.En.Time, sim_ty.Em.En.Data(:, 4))
|
||||
plot(sim_rz.Em.En.Time, sim_rz.Em.En.Data(:, 4))
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Rx [rad]');
|
||||
|
||||
ax5 = subplot(2, 3, 5);
|
||||
hold on;
|
||||
plot(sim_no.Em.En.Time, sim_no.Em.En.Data(:, 5))
|
||||
plot(sim_gm.Em.En.Time, sim_gm.Em.En.Data(:, 5))
|
||||
plot(sim_ty.Em.En.Time, sim_ty.Em.En.Data(:, 5))
|
||||
plot(sim_rz.Em.En.Time, sim_rz.Em.En.Data(:, 5))
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Ry [rad]');
|
||||
|
||||
ax6 = subplot(2, 3, 6);
|
||||
hold on;
|
||||
plot(sim_no.Em.En.Time, sim_no.Em.En.Data(:, 6), 'DisplayName', 'No')
|
||||
plot(sim_gm.Em.En.Time, sim_gm.Em.En.Data(:, 6), 'DisplayName', 'Dw')
|
||||
plot(sim_ty.Em.En.Time, sim_ty.Em.En.Data(:, 6), 'DisplayName', 'Ty')
|
||||
plot(sim_rz.Em.En.Time, sim_rz.Em.En.Data(:, 6), 'DisplayName', 'Rz')
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Rz [rad]');
|
||||
legend();
|
||||
|
||||
linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
|
||||
#+end_src
|
||||
|
||||
#+header: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/effect_disturbances_position_error.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+name: fig:effect_disturbances_position_error
|
||||
#+caption: Effect of Perturbations on the position error ([[./figs/effect_disturbances_position_error.png][png]], [[./figs/effect_disturbances_position_error.pdf][pdf]])
|
||||
[[file:figs/effect_disturbances_position_error.png]]
|
||||
|
Reference in New Issue
Block a user