Reworked the analysis for the Ty stage motion

This commit is contained in:
2019-05-14 17:55:59 +02:00
parent de8bf8eae9
commit 00614b2ef3
15 changed files with 324 additions and 138 deletions

View File

@@ -10,6 +10,18 @@ z_ty = load('mat/data_040.mat', 'data'); z_ty = z_ty.data;
e_ty = load('mat/data_041.mat', 'data'); e_ty = e_ty.data;
e_of = load('mat/data_042.mat', 'data'); e_of = e_of.data;
% Voltage to Velocity
% We convert the measured voltage to velocity using the function =voltageToVelocityL22= (accessible [[file:~/MEGA/These/meas/src/index.org][here]]).
z_ty(:, 1) = voltageToVelocityL22(z_ty(:, 1), z_ty(:, 3), 40);
e_ty(:, 1) = voltageToVelocityL22(e_ty(:, 1), e_ty(:, 3), 40);
e_of(:, 1) = voltageToVelocityL22(e_of(:, 1), e_of(:, 3), 40);
z_ty(:, 2) = voltageToVelocityL22(z_ty(:, 2), z_ty(:, 3), 40);
e_ty(:, 2) = voltageToVelocityL22(e_ty(:, 2), e_ty(:, 3), 40);
e_of(:, 2) = voltageToVelocityL22(e_of(:, 2), e_of(:, 3), 40);
% Time domain plots
figure;
@@ -17,24 +29,24 @@ hold on;
plot(z_ty(:, 3), z_ty(:, 1), 'DisplayName', 'Marble - Z');
plot(z_ty(:, 3), z_ty(:, 2), 'DisplayName', 'Sample - Z');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
xlim([0, 100]); ylim([-5, 5]);
xlabel('Time [s]'); ylabel('Velocity [m/s]');
xlim([0, 100]);
legend('Location', 'northeast');
% #+NAME: fig:ty_z_time
% #+CAPTION: Z motion of the sample and marble when scanning with the translation stage
% #+CAPTION: Z velocity of the sample and marble when scanning with the translation stage
% #+RESULTS: fig:ty_z_time
% [[file:figs/ty_z_time.png]]
xlim([0, 1])
xlim([0, 1]);
% #+NAME: fig:ty_z_time_zoom
% #+CAPTION: Z motion of the sample and marble when scanning with the translation stage - Zoom
% #+CAPTION: Z velocity of the sample and marble when scanning with the translation stage - Zoom
% #+RESULTS: fig:ty_z_time_zoom
% [[file:figs/ty_z_time_zoom.png]]
@@ -45,14 +57,14 @@ hold on;
plot(e_ty(:, 3), e_ty(:, 1), 'DisplayName', 'Marble - X');
plot(e_ty(:, 3), e_ty(:, 2), 'DisplayName', 'Sample - X');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
xlim([0, 100]); ylim([-10, 10]);
xlabel('Time [s]'); ylabel('Velocity [m/s]');
xlim([0, 100]);
legend('Location', 'northeast');
% #+NAME: fig:ty_e_time
% #+CAPTION: Motion of the sample and marble in the east direction when scanning with the translation stage
% #+CAPTION: Velocity of the sample and marble in the east direction when scanning with the translation stage
% #+RESULTS: fig:ty_e_time
% [[file:figs/ty_e_time.png]]
@@ -60,6 +72,12 @@ legend('Location', 'northeast');
xlim([0, 1])
% Frequency Domain analysis
% We get the typical ground velocity to compare with the velocities measured.
[pxx_gm, f_gm] = getPSDGroundVelocity();
% We first compute some parameters that will be used for the PSD computation.
dt = z_ty(2, 3)-z_ty(1, 3);
@@ -88,27 +106,28 @@ win = hanning(ceil(10*Fs));
% And we plot the ASD of the measured signals:
% - figure [[fig:asd_east_marble]] compares the marble motion in the east direction when scanning and when Ty is OFF
% - figure [[fig:asd_east_sample]] compares the sample motion in the east direction when scanning and when Ty is OFF
% - figure [[fig:asd_z_direction]] shows the marble and sample motion in the Z direction when scanning with the translation stage
% And we plot the ASD of the measured velocities:
% - figure [[fig:asd_east_marble]] compares the marble velocity in the east direction when scanning and when Ty is OFF
% - figure [[fig:asd_east_sample]] compares the sample velocity in the east direction when scanning and when Ty is OFF
% - figure [[fig:asd_z_direction]] shows the marble and sample velocities in the Z direction when scanning with the translation stage
figure;
hold on;
plot(f, sqrt(pxe_ty_m), 'DisplayName', 'Ty 1Hz - Marble - X');
plot(f, sqrt(pxe_of_m), 'DisplayName', 'Ty OFF - Marble - X');
plot(f_gm, sqrt(pxx_gm), 'k--', 'DisplayName', 'Ground Motion');
hold off;
set(gca, 'xscale', 'log');
set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD of the measured Voltage $\left[\frac{V}{\sqrt{Hz}}\right]$')
xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$')
legend('Location', 'northwest');
xlim([0.1, 500]); ylim([1e-5, 1e1]);
xlim([0.1, 500]);
% #+NAME: fig:asd_east_marble
% #+CAPTION: Amplitude spectral density of the measure voltage corresponding to the geophone in the east direction located on the marble when the translation stage is OFF and when it is scanning at 1Hz
% #+CAPTION: Amplitude spectral density of the measured velocities corresponding to the geophone in the east direction located on the marble when the translation stage is OFF and when it is scanning at 1Hz
% #+RESULTS: fig:asd_east_marble
% [[file:figs/asd_east_marble.png]]
@@ -118,17 +137,18 @@ figure;
hold on;
plot(f, sqrt(pxe_ty_s), 'DisplayName', 'Ty 1Hz - Sample - X');
plot(f, sqrt(pxe_of_s), 'DisplayName', 'Ty OFF - Sample - X');
plot(f_gm, sqrt(pxx_gm), 'k--', 'DisplayName', 'Ground Motion');
hold off;
set(gca, 'xscale', 'log');
set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD of the measured Voltage $\left[\frac{V}{\sqrt{Hz}}\right]$')
xlabel('Frequency [Hz]'); ylabel('ASD of the measured velocity $\left[\frac{m/s}{\sqrt{Hz}}\right]$')
legend('Location', 'northwest');
xlim([0.1, 500]); ylim([1e-5, 1e1]);
xlim([0.1, 500]);
% #+NAME: fig:asd_east_sample
% #+CAPTION: Amplitude spectral density of the measure voltage corresponding to the geophone in the east direction located at the sample location when the translation stage is OFF and when it is scanning at 1Hz
% #+CAPTION: Amplitude spectral density of the measured velocities corresponding to the geophone in the east direction located at the sample location when the translation stage is OFF and when it is scanning at 1Hz
% #+RESULTS: fig:asd_east_sample
% [[file:figs/asd_east_sample.png]]
@@ -138,15 +158,16 @@ figure;
hold on;
plot(f, sqrt(pxz_ty_m), 'DisplayName', 'Ty 1Hz - Marble - Z');
plot(f, sqrt(pxz_ty_s), 'DisplayName', 'Ty 1Hz - Sample - Z');
plot(f_gm, sqrt(pxx_gm), 'k--', 'DisplayName', 'Ground Motion');
hold off;
set(gca, 'xscale', 'log');
set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD of the measured Voltage $\left[\frac{V}{\sqrt{Hz}}\right]$')
legend('Location', 'northwest');
xlim([0.1, 500]); ylim([1e-5, 1e1]);
xlim([0.1, 500]);
% Transfer function from marble motion in the East direction to sample motion in the East direction
% Let's compute the transfer function for the marble motion in the east direction to the sample motion in the east direction.
% Let's compute the transfer function for the marble velocity in the east direction to the sample velocity in the east direction.
% We first plot the time domain motions when every stage is off (figure [[fig:east_marble_sample]]).
@@ -156,14 +177,14 @@ hold on;
plot(e_of(:, 3), e_of(:, 2), 'DisplayName', 'Sample - X');
plot(e_of(:, 3), e_of(:, 1), 'DisplayName', 'Marble - X');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
xlim([0, 100]); ylim([-1, 1]);
legend('Location', 'northeast');
xlabel('Time [s]'); ylabel('Velocity [m/s]');
xlim([0, 100]);
legend('Location', 'southwest');
% #+NAME: fig:east_marble_sample
% #+CAPTION: East motion of the marble and sample when all the stages are OFF
% #+CAPTION: Velocity in the east direction of the marble and sample when all the stages are OFF
% #+RESULTS: fig:east_marble_sample
% [[file:figs/east_marble_sample.png]]