diff --git a/docs/disturbances.html b/docs/disturbances.html index 45028c1..d160c15 100644 --- a/docs/disturbances.html +++ b/docs/disturbances.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Identification of the disturbances @@ -254,7 +254,6 @@
  • 5. Compute the Power Spectral Density of the disturbance force
  • 6. Noise Budget
  • 7. Save
  • -
  • 8. Error motion of the Sample without Control
  • @@ -277,7 +276,6 @@ Because we cannot measure directly the perturbation forces, we have the measure

    -

    uniaxial-model-micro-station.png

    @@ -324,7 +322,8 @@ We load the configuration and we set a small StopTime.

    -We initialize all the stages. +We initialize all the stages without the sample nor the nano-hexapod. +The obtained system corresponds to the status micro-station when the vibration measurements were conducted.

    initializeGround();
    @@ -339,6 +338,30 @@ initializeNanoHexapod('type', 'type', 'none');
     
    + +

    +Open Loop Control. +

    +
    +
    initializeController('type', 'open-loop');
    +
    +
    + +

    +We don’t need gravity here. +

    +
    +
    initializeSimscapeConfiguration('gravity', false);
    +
    +
    + +

    +We log the signals. +

    +
    +
    initializeLoggingConfiguration('log', 'all');
    +
    +
    @@ -351,41 +374,41 @@ The transfer functions from the disturbance forces to the relative velocity of t

    -
    %% Options for Linearized
    -options = linearizeOptions;
    -options.SampleTime = 0;
    -
    -%% Name of the Simulink File
    +
    %% Name of the Simulink File
     mdl = 'nass_model';
    -
    -
    -
    -
    %% Micro-Hexapod
    -  clear io; io_i = 1;
    -  io(io_i) = linio([mdl, '/Disturbances'], 1, 'openinput', [], 'Dwz'); io_i = io_i + 1; % Vertical Ground Motion
    -  io(io_i) = linio([mdl, '/Disturbances'], 1, 'openinput', [], 'Fty_z'); io_i = io_i + 1; % Parasitic force Ty
    -  io(io_i) = linio([mdl, '/Disturbances'], 1, 'openinput', [], 'Frz_z'); io_i = io_i + 1; % Parasitic force Rz
    -  io(io_i) = linio([mdl, '/Micro-Station/Granite/Modal Analysis/accelerometer'], 1, 'openoutput'); io_i = io_i + 1; % Absolute motion - Granite
    -  io(io_i) = linio([mdl, '/Micro-Station/Micro Hexapod/Modal Analysis/accelerometer'],  1, 'openoutput'); io_i = io_i + 1; % Absolute Motion - Hexapod
    -  % io(io_i) = linio([mdl, '/Vm'],   1, 'openoutput'); io_i = io_i + 1; % Relative Velocity hexapod/granite
    -
    -
    +%% Micro-Hexapod +clear io; io_i = 1; +io(io_i) = linio([mdl, '/Disturbances'], 1, 'openinput', [], 'Dwz'); io_i = io_i + 1; % Vertical Ground Motion +io(io_i) = linio([mdl, '/Disturbances'], 1, 'openinput', [], 'Fty_z'); io_i = io_i + 1; % Parasitic force Ty +io(io_i) = linio([mdl, '/Disturbances'], 1, 'openinput', [], 'Frz_z'); io_i = io_i + 1; % Parasitic force Rz -
    -
    % Run the linearization
    +io(io_i) = linio([mdl, '/Micro-Station/Granite/Modal Analysis/accelerometer'], 1, 'openoutput'); io_i = io_i + 1; % Absolute motion - Granite
    +io(io_i) = linio([mdl, '/Micro-Station/Micro Hexapod/Modal Analysis/accelerometer'],  1, 'openoutput'); io_i = io_i + 1; % Absolute Motion - Hexapod
    +% io(io_i) = linio([mdl, '/Vm'],   1, 'openoutput'); io_i = io_i + 1; % Relative Velocity hexapod/granite
    +
    +% Run the linearization
     G = linearize(mdl, io, 0);
    +
    +
    -% We Take only the outputs corresponding to the vertical acceleration -G = G([3,9], :); +

    +We Take only the outputs corresponding to the vertical acceleration. +

    +
    +
    G = G([3,9], :);
     
     % Input/Output names
     G.InputName  = {'Dw', 'Fty', 'Frz'};
     G.OutputName = {'Agm', 'Ahm'};
    +
    +
    -% We integrate 1 time the output to have the velocity and we -% substract the absolute velocities to have the relative velocity -G = (1/s)*tf([-1, 1])*G; +

    +We integrate 1 time the output to have the velocity and we substract the absolute velocities to have the relative velocity. +

    +
    +
    G = (1/s)*tf([-1, 1])*G;
     
     % Input/Output names
     G.InputName  = {'Dw', 'Fty', 'Frz'};
    @@ -402,6 +425,14 @@ G.OutputName = {'Vm'};
     
     

    +

    +The obtained sensitivity to disturbances are shown bellow: +

    + +

    sensitivity_dist_gm.png @@ -432,10 +463,13 @@ G.OutputName = {'Vm'};

    -The PSD of the relative velocity between the hexapod and the marble in \([(m/s)^2/Hz]\) are loaded for the following sources of disturbance: +

    + +

    +The Power Spectral Densities of the relative velocity between the hexapod and the marble in \([(m/s)^2/Hz]\) are loaded for the following sources of disturbance:

      -
    • Slip Ring Rotation
    • +
    • Slip Ring Rotation (\(F_{r_z}\))
    • Scan of the translation stage (effect in the vertical direction and in the horizontal direction)
    @@ -460,7 +494,7 @@ We now compute the relative velocity between the hexapod and the granite due to

    -The Power Spectral Density of the relative motion/velocity of the hexapod with respect to the granite are shown in figures 5 and 6. +The Power Spectral Density of the relative motion and velocity of the hexapod with respect to the granite are shown in figures 5 and 6.

    @@ -487,6 +521,14 @@ The Cumulative Amplitude Spectrum of the relative motion is shown in figure dist_effect_relative_motion_cas.png

    Figure 7: Cumulative Amplitude Spectrum of the relative motion due to different sources of perturbation (png, pdf)

    +
    + +
    +

    +From Figure 7, we can see that the translation stage and the rotation stage have almost the same effect on the position error. +Also, the ground motion has a relatively negligible effect on the position error. +

    +
    @@ -499,15 +541,22 @@ The Cumulative Amplitude Spectrum of the relative motion is shown in figure

    -Now, from the extracted transfer functions from the disturbance force to the relative motion of the hexapod with respect to the granite (section 3) and from the measured PSD of the relative motion (section 4), we can compute the PSD of the disturbance force. +Using the extracted transfer functions from the disturbance force to the relative motion of the hexapod with respect to the granite (section 3) and using the measured PSD of the relative motion (section 4), we can compute the PSD of the disturbance force.

    +

    +This is done below. +

    rz.psd_f  = rz.pxsp_r./abs(squeeze(freqresp(G('Vm', 'Frz'), rz.f, 'Hz'))).^2;
     tyz.psd_f = tyz.pxz_ty_r./abs(squeeze(freqresp(G('Vm', 'Fty'), tyz.f, 'Hz'))).^2;
     
    +

    +The obtained amplitude spectral densities of the disturbance forces are shown in Figure 8. +

    +

    dist_force_psd.png @@ -525,24 +574,31 @@ tyz.psd_f = tyz.pxz_ty_r./abs(squeeze(freqresp(G(<

    -Now, from the compute spectral density of the disturbance sources, we can compute the resulting relative motion of the Hexapod with respect to the granite using the model. -We should verify that this is coherent with the measurements. +From the obtained spectral density of the disturbance sources, we can compute the resulting relative motion of the Hexapod with respect to the granite using the model.

    +

    +This is equivalent as doing the inverse that was done in the previous section. +This is done in order to verify that this is coherent with the measurements. +

    + +

    +The power spectral density of the relative motion is computed below and the result is shown in Figure 9. +We can see that this is exactly the same as the Figure 6. +

    +
    +
    psd_gm_d = gm.psd_gm.*abs(squeeze(freqresp(G('Vm', 'Dw')/s, gm.f, 'Hz'))).^2;
    +psd_ty_d = tyz.psd_f.*abs(squeeze(freqresp(G('Vm', 'Fty')/s, tyz.f, 'Hz'))).^2;
    +psd_rz_d = rz.psd_f.*abs(squeeze(freqresp(G('Vm', 'Frz')/s, rz.f, 'Hz'))).^2;
    +
    +
    +

    psd_effect_dist_verif.png

    Figure 9: Computed Effect of the disturbances on the relative displacement hexapod/granite (png, pdf)

    - - - -
    -

    cas_computed_relative_displacement.png -

    -

    Figure 10: CAS of the total Relative Displacement due to all considered sources of perturbation (png, pdf)

    -
    @@ -567,117 +623,10 @@ save('./mat/dist_psd.mat', -

    8 Error motion of the Sample without Control

    -
    -
    -
    initializeGround();
    -initializeGranite('Foffset', false);
    -initializeTy('Foffset', false);
    -initializeRy('Foffset', false);
    -initializeRz('Foffset', false);
    -initializeMicroHexapod('Foffset', false);
    -initializeAxisc('type', 'rigid');
    -initializeMirror('type', 'rigid');
    -
    -
    - -

    -The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg. -

    -
    -
    initializeNanoHexapod('type', 'rigid');
    -initializeSample('type', 'rigid', 'mass', 50);
    -
    -
    - -

    -We set the references and disturbances to zero. -

    -
    -
    initializeReferences();
    -initializeDisturbances();
    -
    -
    - -

    -We set the controller type to Open-Loop. -

    -
    -
    initializeController('type', 'open-loop');
    -
    -
    - -

    -And we put some gravity. -

    -
    -
    initializeSimscapeConfiguration('gravity', false);
    -
    -
    - -

    -We do not need to log any signal. -

    -
    -
    initializeLoggingConfiguration('log', 'all');
    -
    -
    - -
    -
    initializePosError('error', false);
    -
    -
    - -
    -
    load('mat/conf_simulink.mat');
    -set_param(conf_simulink, 'StopTime', '1');
    -
    -
    - -

    -We simulate the model. -

    -
    -
    sim('nass_model');
    -
    -
    - -
    -
    figure;
    -subplot(1, 2, 1);
    -hold on;
    -plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 1), 'DisplayName', 'X');
    -plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 2), 'DisplayName', 'Y');
    -plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 3), 'DisplayName', 'Z');
    -hold off;
    -xlabel('Time [s]');
    -ylabel('Position error [m]');
    -legend();
    -
    -subplot(1, 2, 2);
    -hold on;
    -plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 4));
    -plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 5));
    -plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 6));
    -hold off;
    -xlabel('Time [s]');
    -ylabel('Orientation error [rad]');
    -
    -
    - -
    -
    Eg = simout.Em.Eg;
    -save('./mat/motion_error_ol.mat', 'Eg');
    -
    -
    -
    -

    Author: Dehaeze Thomas

    -

    Created: 2020-03-13 ven. 17:39

    +

    Created: 2020-03-17 mar. 11:21

    diff --git a/docs/figs/cas_computed_relative_displacement.pdf b/docs/figs/cas_computed_relative_displacement.pdf deleted file mode 100644 index 0fd30b3..0000000 Binary files a/docs/figs/cas_computed_relative_displacement.pdf and /dev/null differ diff --git a/docs/figs/cas_computed_relative_displacement.png b/docs/figs/cas_computed_relative_displacement.png deleted file mode 100644 index 6f0c21a..0000000 Binary files a/docs/figs/cas_computed_relative_displacement.png and /dev/null differ diff --git a/docs/figs/dist_effect_relative_velocity.pdf b/docs/figs/dist_effect_relative_velocity.pdf index 0b5319a..6710d22 100644 Binary files a/docs/figs/dist_effect_relative_velocity.pdf and b/docs/figs/dist_effect_relative_velocity.pdf differ diff --git a/docs/figs/dist_effect_relative_velocity.png b/docs/figs/dist_effect_relative_velocity.png index 239c343..68432c2 100644 Binary files a/docs/figs/dist_effect_relative_velocity.png and b/docs/figs/dist_effect_relative_velocity.png differ diff --git a/docs/figs/nano_station_inputs_outputs.pdf b/docs/figs/nano_station_inputs_outputs.pdf index 9bd69d6..eaea042 100644 Binary files a/docs/figs/nano_station_inputs_outputs.pdf and b/docs/figs/nano_station_inputs_outputs.pdf differ diff --git a/docs/figs/psd_effect_dist_verif.pdf b/docs/figs/psd_effect_dist_verif.pdf index 4d72b9b..7d8af3a 100644 Binary files a/docs/figs/psd_effect_dist_verif.pdf and b/docs/figs/psd_effect_dist_verif.pdf differ diff --git a/docs/figs/psd_effect_dist_verif.png b/docs/figs/psd_effect_dist_verif.png index 38c7ef0..f3f76af 100644 Binary files a/docs/figs/psd_effect_dist_verif.png and b/docs/figs/psd_effect_dist_verif.png differ diff --git a/org/disturbances.org b/org/disturbances.org index d509667..2a37fe6 100644 --- a/org/disturbances.org +++ b/org/disturbances.org @@ -54,7 +54,6 @@ The sources of perturbations are (schematically shown in figure [[fig:uniaxial-m Because we cannot measure directly the perturbation forces, we have the measure the effect of those perturbations on the system (in terms of velocity for instance using geophones, $D$ on figure [[fig:uniaxial-model-micro-station]]) and then, using a model, compute the forces that induced such velocity. - #+begin_src latex :file uniaxial-model-micro-station.pdf :post pdf2svg(file=*this*, ext="png") :exports results \begin{tikzpicture} % ==================== @@ -212,7 +211,8 @@ We load the configuration and we set a small =StopTime=. set_param(conf_simulink, 'StopTime', '0.5'); #+end_src -We initialize all the stages. +We initialize all the stages without the sample nor the nano-hexapod. +The obtained system corresponds to the status micro-station when the vibration measurements were conducted. #+begin_src matlab initializeGround(); initializeGranite('type', 'modal-analysis'); @@ -226,6 +226,21 @@ We initialize all the stages. initializeSample('type', 'none'); #+end_src +Open Loop Control. +#+begin_src matlab + initializeController('type', 'open-loop'); +#+end_src + +We don't need gravity here. +#+begin_src matlab + initializeSimscapeConfiguration('gravity', false); +#+end_src + +We log the signals. +#+begin_src matlab + initializeLoggingConfiguration('log', 'all'); +#+end_src + * Identification :PROPERTIES: :CUSTOM_ID: Identification @@ -234,38 +249,34 @@ We initialize all the stages. The transfer functions from the disturbance forces to the relative velocity of the hexapod with respect to the granite are computed using the Simscape Model representing the experimental setup with the code below. #+begin_src matlab - %% Options for Linearized - options = linearizeOptions; - options.SampleTime = 0; - %% Name of the Simulink File mdl = 'nass_model'; -#+end_src -#+begin_src matlab -%% Micro-Hexapod + %% Micro-Hexapod clear io; io_i = 1; io(io_i) = linio([mdl, '/Disturbances'], 1, 'openinput', [], 'Dwz'); io_i = io_i + 1; % Vertical Ground Motion io(io_i) = linio([mdl, '/Disturbances'], 1, 'openinput', [], 'Fty_z'); io_i = io_i + 1; % Parasitic force Ty io(io_i) = linio([mdl, '/Disturbances'], 1, 'openinput', [], 'Frz_z'); io_i = io_i + 1; % Parasitic force Rz + io(io_i) = linio([mdl, '/Micro-Station/Granite/Modal Analysis/accelerometer'], 1, 'openoutput'); io_i = io_i + 1; % Absolute motion - Granite io(io_i) = linio([mdl, '/Micro-Station/Micro Hexapod/Modal Analysis/accelerometer'], 1, 'openoutput'); io_i = io_i + 1; % Absolute Motion - Hexapod % io(io_i) = linio([mdl, '/Vm'], 1, 'openoutput'); io_i = io_i + 1; % Relative Velocity hexapod/granite -#+end_src -#+begin_src matlab % Run the linearization G = linearize(mdl, io, 0); +#+end_src - % We Take only the outputs corresponding to the vertical acceleration +We Take only the outputs corresponding to the vertical acceleration. +#+begin_src matlab G = G([3,9], :); % Input/Output names G.InputName = {'Dw', 'Fty', 'Frz'}; G.OutputName = {'Agm', 'Ahm'}; +#+end_src - % We integrate 1 time the output to have the velocity and we - % substract the absolute velocities to have the relative velocity +We integrate 1 time the output to have the velocity and we substract the absolute velocities to have the relative velocity. +#+begin_src matlab G = (1/s)*tf([-1, 1])*G; % Input/Output names @@ -279,6 +290,10 @@ The transfer functions from the disturbance forces to the relative velocity of t :END: <> +The obtained sensitivity to disturbances are shown bellow: +- The transfer function from vertical ground motion $D_w$ to the vertical relative displacement from the micro-hexapod to the granite $D$ is shown in Figure [[fig:sensitivity_dist_gm]] +- The sensitive from vertical forces applied in the Translation stage is shown in Figure [[fig:sensitivity_dist_fty]] + #+begin_src matlab :exports none freqs = logspace(0, 3, 1000); @@ -349,8 +364,9 @@ The transfer functions from the disturbance forces to the relative velocity of t :CUSTOM_ID: Power-Spectral-Density-of-the-effect-of-the-disturbances :END: <> -The PSD of the relative velocity between the hexapod and the marble in $[(m/s)^2/Hz]$ are loaded for the following sources of disturbance: -- Slip Ring Rotation + +The Power Spectral Densities of the relative velocity between the hexapod and the marble in $[(m/s)^2/Hz]$ are loaded for the following sources of disturbance: +- Slip Ring Rotation ($F_{r_z}$) - Scan of the translation stage (effect in the vertical direction and in the horizontal direction) Also, the Ground Motion is measured. @@ -369,7 +385,6 @@ Also, the Ground Motion is measured. tyx.f = tyx.f(2:end); gm.psd_gm = gm.psd_gm(2:end); % PSD of Ground Motion [m^2/Hz] - gm.psd_gv = gm.psd_gv(2:end); % PSD of Ground Velocity [(m/s)^2/Hz] rz.pxsp_r = rz.pxsp_r(2:end); % PSD of Relative Velocity [(m/s)^2/Hz] tyz.pxz_ty_r = tyz.pxz_ty_r(2:end); % PSD of Relative Velocity [(m/s)^2/Hz] tyx.pxe_ty_r = tyx.pxe_ty_r(2:end); % PSD of Relative Velocity [(m/s)^2/Hz] @@ -380,7 +395,7 @@ We now compute the relative velocity between the hexapod and the granite due to gm.psd_rv = gm.psd_gm.*abs(squeeze(freqresp(G('Vm', 'Dw'), gm.f, 'Hz'))).^2; #+end_src -The Power Spectral Density of the relative motion/velocity of the hexapod with respect to the granite are shown in figures [[fig:dist_effect_relative_velocity]] and [[fig:dist_effect_relative_motion]]. +The Power Spectral Density of the relative motion and velocity of the hexapod with respect to the granite are shown in figures [[fig:dist_effect_relative_velocity]] and [[fig:dist_effect_relative_motion]]. The Cumulative Amplitude Spectrum of the relative motion is shown in figure [[fig:dist_effect_relative_motion_cas]]. @@ -451,19 +466,27 @@ The Cumulative Amplitude Spectrum of the relative motion is shown in figure [[fi #+CAPTION: Cumulative Amplitude Spectrum of the relative motion due to different sources of perturbation ([[./figs/dist_effect_relative_motion_cas.png][png]], [[./figs/dist_effect_relative_motion_cas.pdf][pdf]]) [[file:figs/dist_effect_relative_motion_cas.png]] +#+begin_important + From Figure [[fig:dist_effect_relative_motion_cas]], we can see that the translation stage and the rotation stage have almost the same effect on the position error. + Also, the ground motion has a relatively negligible effect on the position error. +#+end_important + * Compute the Power Spectral Density of the disturbance force :PROPERTIES: :CUSTOM_ID: Compute-the-Power-Spectral-Density-of-the-disturbance-force :END: <> -Now, from the extracted transfer functions from the disturbance force to the relative motion of the hexapod with respect to the granite (section [[sec:sensitivity_disturbances]]) and from the measured PSD of the relative motion (section [[sec:psd_dist]]), we can compute the PSD of the disturbance force. +Using the extracted transfer functions from the disturbance force to the relative motion of the hexapod with respect to the granite (section [[sec:sensitivity_disturbances]]) and using the measured PSD of the relative motion (section [[sec:psd_dist]]), we can compute the PSD of the disturbance force. +This is done below. #+begin_src matlab rz.psd_f = rz.pxsp_r./abs(squeeze(freqresp(G('Vm', 'Frz'), rz.f, 'Hz'))).^2; tyz.psd_f = tyz.pxz_ty_r./abs(squeeze(freqresp(G('Vm', 'Fty'), tyz.f, 'Hz'))).^2; #+end_src +The obtained amplitude spectral densities of the disturbance forces are shown in Figure [[fig:dist_force_psd]]. + #+begin_src matlab :exports none figure; hold on; @@ -492,11 +515,14 @@ Now, from the extracted transfer functions from the disturbance force to the rel :END: <> -Now, from the compute spectral density of the disturbance sources, we can compute the resulting relative motion of the Hexapod with respect to the granite using the model. -We should verify that this is coherent with the measurements. +From the obtained spectral density of the disturbance sources, we can compute the resulting relative motion of the Hexapod with respect to the granite using the model. -#+begin_src matlab :exports none - % Power Spectral Density of the relative Displacement +This is equivalent as doing the inverse that was done in the previous section. +This is done in order to verify that this is coherent with the measurements. + +The power spectral density of the relative motion is computed below and the result is shown in Figure [[fig:psd_effect_dist_verif]]. +We can see that this is exactly the same as the Figure [[fig:dist_effect_relative_motion]]. +#+begin_src matlab psd_gm_d = gm.psd_gm.*abs(squeeze(freqresp(G('Vm', 'Dw')/s, gm.f, 'Hz'))).^2; psd_ty_d = tyz.psd_f.*abs(squeeze(freqresp(G('Vm', 'Fty')/s, tyz.f, 'Hz'))).^2; psd_rz_d = rz.psd_f.*abs(squeeze(freqresp(G('Vm', 'Frz')/s, rz.f, 'Hz'))).^2; @@ -508,7 +534,6 @@ We should verify that this is coherent with the measurements. plot(gm.f, sqrt(psd_gm_d), 'DisplayName', 'Ground Motion'); plot(tyz.f, sqrt(psd_ty_d), 'DisplayName', 'Ty'); plot(rz.f, sqrt(psd_rz_d), 'DisplayName', 'Rz'); - plot(rz.f, sqrt(psd_gm_d + psd_ty_d + psd_rz_d), 'k--', 'DisplayName', 'tot'); hold off; set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log'); xlabel('Frequency [Hz]'); ylabel('ASD of the relative motion $\left[\frac{m}{\sqrt{Hz}}\right]$') @@ -525,30 +550,6 @@ We should verify that this is coherent with the measurements. #+CAPTION: Computed Effect of the disturbances on the relative displacement hexapod/granite ([[./figs/psd_effect_dist_verif.png][png]], [[./figs/psd_effect_dist_verif.pdf][pdf]]) [[file:figs/psd_effect_dist_verif.png]] - -#+begin_src matlab :exports none - figure; - hold on; - plot(gm.f, flip(sqrt(-cumtrapz(flip(gm.f), flip(psd_gm_d)))), 'DisplayName', 'Ground Motion'); - plot(gm.f, flip(sqrt(-cumtrapz(flip(gm.f), flip(psd_ty_d)))), 'DisplayName', 'Ty'); - plot(gm.f, flip(sqrt(-cumtrapz(flip(gm.f), flip(psd_rz_d)))), 'DisplayName', 'Rz'); - plot(gm.f, flip(sqrt(-cumtrapz(flip(gm.f), flip(psd_gm_d + psd_ty_d + psd_rz_d)))), 'k-', 'DisplayName', 'tot'); - hold off; - set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log'); - xlabel('Frequency [Hz]'); ylabel('Cumulative Amplitude Spectrum [m]') - legend('location', 'northeast'); - xlim([2, 500]); ylim([1e-11, 1e-6]); -#+end_src - -#+HEADER: :tangle no :exports results :results none :noweb yes -#+begin_src matlab :var filepath="figs/cas_computed_relative_displacement.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") - <> -#+end_src - -#+NAME: fig:cas_computed_relative_displacement -#+CAPTION: CAS of the total Relative Displacement due to all considered sources of perturbation ([[./figs/cas_computed_relative_displacement.png][png]], [[./figs/cas_computed_relative_displacement.pdf][pdf]]) -[[file:figs/cas_computed_relative_displacement.png]] - * Save :PROPERTIES: :CUSTOM_ID: Save @@ -567,82 +568,3 @@ The PSD of the disturbance force are now saved for further analysis. save('./mat/dist_psd.mat', 'dist_f'); #+end_src -* Error motion of the Sample without Control -#+begin_src matlab - initializeGround(); - initializeGranite('Foffset', false); - initializeTy('Foffset', false); - initializeRy('Foffset', false); - initializeRz('Foffset', false); - initializeMicroHexapod('Foffset', false); - initializeAxisc('type', 'rigid'); - initializeMirror('type', 'rigid'); -#+end_src - -The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg. -#+begin_src matlab - initializeNanoHexapod('type', 'rigid'); - initializeSample('type', 'rigid', 'mass', 50); -#+end_src - -We set the references and disturbances to zero. -#+begin_src matlab - initializeReferences(); - initializeDisturbances(); -#+end_src - -We set the controller type to Open-Loop. -#+begin_src matlab - initializeController('type', 'open-loop'); -#+end_src - -And we put some gravity. -#+begin_src matlab - initializeSimscapeConfiguration('gravity', false); -#+end_src - -We do not need to log any signal. -#+begin_src matlab - initializeLoggingConfiguration('log', 'all'); -#+end_src - -#+begin_src matlab - initializePosError('error', false); -#+end_src - -#+begin_src matlab - load('mat/conf_simulink.mat'); - set_param(conf_simulink, 'StopTime', '1'); -#+end_src - -We simulate the model. -#+begin_src matlab - sim('nass_model'); -#+end_src - -#+begin_src matlab - figure; - subplot(1, 2, 1); - hold on; - plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 1), 'DisplayName', 'X'); - plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 2), 'DisplayName', 'Y'); - plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 3), 'DisplayName', 'Z'); - hold off; - xlabel('Time [s]'); - ylabel('Position error [m]'); - legend(); - - subplot(1, 2, 2); - hold on; - plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 4)); - plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 5)); - plot(simout.Em.Eg.Time, simout.Em.Eg.Data(:, 6)); - hold off; - xlabel('Time [s]'); - ylabel('Orientation error [rad]'); -#+end_src - -#+begin_src matlab - Eg = simout.Em.Eg; - save('./mat/motion_error_ol.mat', 'Eg'); -#+end_src