Reworked the analysis for the Ty stage motion

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 KiB

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

View File

@ -116,6 +116,19 @@ Each of the measurement =mat= file contains one =data= array with 3 columns:
e_of = load('mat/data_042.mat', 'data'); e_of = e_of.data; e_of = load('mat/data_042.mat', 'data'); e_of = e_of.data;
#+end_src #+end_src
** Voltage to Velocity
We convert the measured voltage to velocity using the function =voltageToVelocityL22= (accessible [[file:~/MEGA/These/meas/src/index.org][here]]).
#+begin_src matlab
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);
#+end_src
** Time domain plots ** Time domain plots
#+begin_src matlab #+begin_src matlab
figure; figure;
@ -123,8 +136,8 @@ Each of the measurement =mat= file contains one =data= array with 3 columns:
plot(z_ty(:, 3), z_ty(:, 1), 'DisplayName', 'Marble - Z'); plot(z_ty(:, 3), z_ty(:, 1), 'DisplayName', 'Marble - Z');
plot(z_ty(:, 3), z_ty(:, 2), 'DisplayName', 'Sample - Z'); plot(z_ty(:, 3), z_ty(:, 2), 'DisplayName', 'Sample - Z');
hold off; hold off;
xlabel('Time [s]'); ylabel('Voltage [V]'); xlabel('Time [s]'); ylabel('Velocity [m/s]');
xlim([0, 100]); ylim([-5, 5]); xlim([0, 100]);
legend('Location', 'northeast'); legend('Location', 'northeast');
#+end_src #+end_src
@ -135,12 +148,12 @@ Each of the measurement =mat= file contains one =data= array with 3 columns:
#+end_src #+end_src
#+NAME: fig:ty_z_time #+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 #+RESULTS: fig:ty_z_time
[[file:figs/ty_z_time.png]] [[file:figs/ty_z_time.png]]
#+begin_src matlab :exports none #+begin_src matlab :exports none
xlim([0, 1]) xlim([0, 1]);
#+end_src #+end_src
#+NAME: fig:ty_z_time_zoom #+NAME: fig:ty_z_time_zoom
@ -150,7 +163,7 @@ Each of the measurement =mat= file contains one =data= array with 3 columns:
#+end_src #+end_src
#+NAME: fig:ty_z_time_zoom #+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 #+RESULTS: fig:ty_z_time_zoom
[[file:figs/ty_z_time_zoom.png]] [[file:figs/ty_z_time_zoom.png]]
@ -161,8 +174,8 @@ Each of the measurement =mat= file contains one =data= array with 3 columns:
plot(e_ty(:, 3), e_ty(:, 1), 'DisplayName', 'Marble - X'); plot(e_ty(:, 3), e_ty(:, 1), 'DisplayName', 'Marble - X');
plot(e_ty(:, 3), e_ty(:, 2), 'DisplayName', 'Sample - X'); plot(e_ty(:, 3), e_ty(:, 2), 'DisplayName', 'Sample - X');
hold off; hold off;
xlabel('Time [s]'); ylabel('Voltage [V]'); xlabel('Time [s]'); ylabel('Velocity [m/s]');
xlim([0, 100]); ylim([-10, 10]); xlim([0, 100]);
legend('Location', 'northeast'); legend('Location', 'northeast');
#+end_src #+end_src
@ -173,7 +186,7 @@ Each of the measurement =mat= file contains one =data= array with 3 columns:
#+end_src #+end_src
#+NAME: fig:ty_e_time #+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 #+RESULTS: fig:ty_e_time
[[file:figs/ty_e_time.png]] [[file:figs/ty_e_time.png]]
@ -188,11 +201,16 @@ Each of the measurement =mat= file contains one =data= array with 3 columns:
#+end_src #+end_src
#+NAME: fig:ty_e_time_zoom #+NAME: fig:ty_e_time_zoom
#+CAPTION: Motion of the sample and marble in the east direction when scanning with the translation stage - Zoom #+CAPTION: Velocity of the sample and marble in the east direction when scanning with the translation stage - Zoom
#+RESULTS: fig:ty_e_time_zoom #+RESULTS: fig:ty_e_time_zoom
[[file:figs/ty_e_time_zoom.png]] [[file:figs/ty_e_time_zoom.png]]
** Frequency Domain analysis ** Frequency Domain analysis
We get the typical ground velocity to compare with the velocities measured.
#+begin_src matlab
[pxx_gm, f_gm] = getPSDGroundVelocity();
#+end_src
We first compute some parameters that will be used for the PSD computation. We first compute some parameters that will be used for the PSD computation.
#+begin_src matlab #+begin_src matlab
dt = z_ty(2, 3)-z_ty(1, 3); dt = z_ty(2, 3)-z_ty(1, 3);
@ -218,22 +236,23 @@ And for the geophone located at the sample position.
[pxe_of_s, ~] = pwelch(e_of(:, 2), win, [], [], Fs); [pxe_of_s, ~] = pwelch(e_of(:, 2), win, [], [], Fs);
#+end_src #+end_src
And we plot the ASD of the measured signals: And we plot the ASD of the measured velocities:
- figure [[fig:asd_east_marble]] compares the marble motion in the east direction when scanning and when Ty is OFF - 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 motion 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 motion in the Z direction when scanning with the translation stage - figure [[fig:asd_z_direction]] shows the marble and sample velocities in the Z direction when scanning with the translation stage
#+begin_src matlab #+begin_src matlab
figure; figure;
hold on; hold on;
plot(f, sqrt(pxe_ty_m), 'DisplayName', 'Ty 1Hz - Marble - X'); plot(f, sqrt(pxe_ty_m), 'DisplayName', 'Ty 1Hz - Marble - X');
plot(f, sqrt(pxe_of_m), 'DisplayName', 'Ty OFF - 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; hold off;
set(gca, 'xscale', 'log'); set(gca, 'xscale', 'log');
set(gca, 'yscale', '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'); legend('Location', 'northwest');
xlim([0.1, 500]); ylim([1e-5, 1e1]); xlim([0.1, 500]);
#+end_src #+end_src
#+NAME: fig:asd_east_marble #+NAME: fig:asd_east_marble
@ -243,7 +262,7 @@ And we plot the ASD of the measured signals:
#+end_src #+end_src
#+NAME: fig:asd_east_marble #+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 #+RESULTS: fig:asd_east_marble
[[file:figs/asd_east_marble.png]] [[file:figs/asd_east_marble.png]]
@ -253,12 +272,13 @@ And we plot the ASD of the measured signals:
hold on; hold on;
plot(f, sqrt(pxe_ty_s), 'DisplayName', 'Ty 1Hz - Sample - X'); plot(f, sqrt(pxe_ty_s), 'DisplayName', 'Ty 1Hz - Sample - X');
plot(f, sqrt(pxe_of_s), 'DisplayName', 'Ty OFF - 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; hold off;
set(gca, 'xscale', 'log'); set(gca, 'xscale', 'log');
set(gca, 'yscale', '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'); legend('Location', 'northwest');
xlim([0.1, 500]); ylim([1e-5, 1e1]); xlim([0.1, 500]);
#+end_src #+end_src
#+NAME: fig:asd_east_sample #+NAME: fig:asd_east_sample
@ -268,7 +288,7 @@ And we plot the ASD of the measured signals:
#+end_src #+end_src
#+NAME: fig:asd_east_sample #+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 #+RESULTS: fig:asd_east_sample
[[file:figs/asd_east_sample.png]] [[file:figs/asd_east_sample.png]]
@ -278,12 +298,13 @@ And we plot the ASD of the measured signals:
hold on; hold on;
plot(f, sqrt(pxz_ty_m), 'DisplayName', 'Ty 1Hz - Marble - Z'); plot(f, sqrt(pxz_ty_m), 'DisplayName', 'Ty 1Hz - Marble - Z');
plot(f, sqrt(pxz_ty_s), 'DisplayName', 'Ty 1Hz - Sample - Z'); plot(f, sqrt(pxz_ty_s), 'DisplayName', 'Ty 1Hz - Sample - Z');
plot(f_gm, sqrt(pxx_gm), 'k--', 'DisplayName', 'Ground Motion');
hold off; hold off;
set(gca, 'xscale', 'log'); set(gca, 'xscale', 'log');
set(gca, 'yscale', '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 Voltage $\left[\frac{V}{\sqrt{Hz}}\right]$')
legend('Location', 'northwest'); legend('Location', 'northwest');
xlim([0.1, 500]); ylim([1e-5, 1e1]); xlim([0.1, 500]);
#+end_src #+end_src
#+NAME: fig:asd_z_direction #+NAME: fig:asd_z_direction
@ -298,7 +319,7 @@ And we plot the ASD of the measured signals:
[[file:figs/asd_z_direction.png]] [[file:figs/asd_z_direction.png]]
** Transfer function from marble motion in the East direction to sample motion in the East direction ** 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]]). We first plot the time domain motions when every stage is off (figure [[fig:east_marble_sample]]).
@ -308,9 +329,9 @@ We first plot the time domain motions when every stage is off (figure [[fig:east
plot(e_of(:, 3), e_of(:, 2), 'DisplayName', 'Sample - X'); plot(e_of(:, 3), e_of(:, 2), 'DisplayName', 'Sample - X');
plot(e_of(:, 3), e_of(:, 1), 'DisplayName', 'Marble - X'); plot(e_of(:, 3), e_of(:, 1), 'DisplayName', 'Marble - X');
hold off; hold off;
xlabel('Time [s]'); ylabel('Voltage [V]'); xlabel('Time [s]'); ylabel('Velocity [m/s]');
xlim([0, 100]); ylim([-1, 1]); xlim([0, 100]);
legend('Location', 'northeast'); legend('Location', 'southwest');
#+end_src #+end_src
#+NAME: fig:east_marble_sample #+NAME: fig:east_marble_sample
@ -320,7 +341,7 @@ We first plot the time domain motions when every stage is off (figure [[fig:east
#+end_src #+end_src
#+NAME: fig:east_marble_sample #+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 #+RESULTS: fig:east_marble_sample
[[file:figs/east_marble_sample.png]] [[file:figs/east_marble_sample.png]]
@ -366,7 +387,7 @@ The result is shown on figure [[fig:tf_east_marble_sample]].
#+end_src #+end_src
#+NAME: fig:tf_east_marble_sample #+NAME: fig:tf_east_marble_sample
#+CAPTION: Estimation of the transfer function from marble motion in the east direction to sample motion in the east direction #+CAPTION: Estimation of the transfer function from marble velocity in the east direction to sample velocity in the east direction
#+RESULTS: fig:tf_east_marble_sample #+RESULTS: fig:tf_east_marble_sample
[[file:figs/tf_east_marble_sample.png]] [[file:figs/tf_east_marble_sample.png]]

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_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; 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 % Time domain plots
figure; figure;
@ -17,24 +29,24 @@ hold on;
plot(z_ty(:, 3), z_ty(:, 1), 'DisplayName', 'Marble - Z'); plot(z_ty(:, 3), z_ty(:, 1), 'DisplayName', 'Marble - Z');
plot(z_ty(:, 3), z_ty(:, 2), 'DisplayName', 'Sample - Z'); plot(z_ty(:, 3), z_ty(:, 2), 'DisplayName', 'Sample - Z');
hold off; hold off;
xlabel('Time [s]'); ylabel('Voltage [V]'); xlabel('Time [s]'); ylabel('Velocity [m/s]');
xlim([0, 100]); ylim([-5, 5]); xlim([0, 100]);
legend('Location', 'northeast'); legend('Location', 'northeast');
% #+NAME: fig:ty_z_time % #+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 % #+RESULTS: fig:ty_z_time
% [[file:figs/ty_z_time.png]] % [[file:figs/ty_z_time.png]]
xlim([0, 1]) xlim([0, 1]);
% #+NAME: fig:ty_z_time_zoom % #+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 % #+RESULTS: fig:ty_z_time_zoom
% [[file:figs/ty_z_time_zoom.png]] % [[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(:, 1), 'DisplayName', 'Marble - X');
plot(e_ty(:, 3), e_ty(:, 2), 'DisplayName', 'Sample - X'); plot(e_ty(:, 3), e_ty(:, 2), 'DisplayName', 'Sample - X');
hold off; hold off;
xlabel('Time [s]'); ylabel('Voltage [V]'); xlabel('Time [s]'); ylabel('Velocity [m/s]');
xlim([0, 100]); ylim([-10, 10]); xlim([0, 100]);
legend('Location', 'northeast'); legend('Location', 'northeast');
% #+NAME: fig:ty_e_time % #+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 % #+RESULTS: fig:ty_e_time
% [[file:figs/ty_e_time.png]] % [[file:figs/ty_e_time.png]]
@ -60,6 +72,12 @@ legend('Location', 'northeast');
xlim([0, 1]) xlim([0, 1])
% Frequency Domain analysis % 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. % We first compute some parameters that will be used for the PSD computation.
dt = z_ty(2, 3)-z_ty(1, 3); 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: % And we plot the ASD of the measured velocities:
% - figure [[fig:asd_east_marble]] compares the marble motion in the east direction when scanning and when Ty is OFF % - 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 motion 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 motion in the Z direction when scanning with the translation stage % - figure [[fig:asd_z_direction]] shows the marble and sample velocities in the Z direction when scanning with the translation stage
figure; figure;
hold on; hold on;
plot(f, sqrt(pxe_ty_m), 'DisplayName', 'Ty 1Hz - Marble - X'); plot(f, sqrt(pxe_ty_m), 'DisplayName', 'Ty 1Hz - Marble - X');
plot(f, sqrt(pxe_of_m), 'DisplayName', 'Ty OFF - 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; hold off;
set(gca, 'xscale', 'log'); set(gca, 'xscale', 'log');
set(gca, 'yscale', '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'); legend('Location', 'northwest');
xlim([0.1, 500]); ylim([1e-5, 1e1]); xlim([0.1, 500]);
% #+NAME: fig:asd_east_marble % #+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 % #+RESULTS: fig:asd_east_marble
% [[file:figs/asd_east_marble.png]] % [[file:figs/asd_east_marble.png]]
@ -118,17 +137,18 @@ figure;
hold on; hold on;
plot(f, sqrt(pxe_ty_s), 'DisplayName', 'Ty 1Hz - Sample - X'); plot(f, sqrt(pxe_ty_s), 'DisplayName', 'Ty 1Hz - Sample - X');
plot(f, sqrt(pxe_of_s), 'DisplayName', 'Ty OFF - 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; hold off;
set(gca, 'xscale', 'log'); set(gca, 'xscale', 'log');
set(gca, 'yscale', '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'); legend('Location', 'northwest');
xlim([0.1, 500]); ylim([1e-5, 1e1]); xlim([0.1, 500]);
% #+NAME: fig:asd_east_sample % #+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 % #+RESULTS: fig:asd_east_sample
% [[file:figs/asd_east_sample.png]] % [[file:figs/asd_east_sample.png]]
@ -138,15 +158,16 @@ figure;
hold on; hold on;
plot(f, sqrt(pxz_ty_m), 'DisplayName', 'Ty 1Hz - Marble - Z'); plot(f, sqrt(pxz_ty_m), 'DisplayName', 'Ty 1Hz - Marble - Z');
plot(f, sqrt(pxz_ty_s), 'DisplayName', 'Ty 1Hz - Sample - Z'); plot(f, sqrt(pxz_ty_s), 'DisplayName', 'Ty 1Hz - Sample - Z');
plot(f_gm, sqrt(pxx_gm), 'k--', 'DisplayName', 'Ground Motion');
hold off; hold off;
set(gca, 'xscale', 'log'); set(gca, 'xscale', 'log');
set(gca, 'yscale', '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 Voltage $\left[\frac{V}{\sqrt{Hz}}\right]$')
legend('Location', 'northwest'); 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 % 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]]). % 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(:, 2), 'DisplayName', 'Sample - X');
plot(e_of(:, 3), e_of(:, 1), 'DisplayName', 'Marble - X'); plot(e_of(:, 3), e_of(:, 1), 'DisplayName', 'Marble - X');
hold off; hold off;
xlabel('Time [s]'); ylabel('Voltage [V]'); xlabel('Time [s]'); ylabel('Velocity [m/s]');
xlim([0, 100]); ylim([-1, 1]); xlim([0, 100]);
legend('Location', 'northeast'); legend('Location', 'southwest');
% #+NAME: fig:east_marble_sample % #+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 % #+RESULTS: fig:east_marble_sample
% [[file:figs/east_marble_sample.png]] % [[file:figs/east_marble_sample.png]]

View File

@ -36,6 +36,10 @@ This Matlab function is accessible [[file:voltageToVelocityL22.m][here]].
S = S0*(s/2/pi/f0)/(1+s/2/pi/f0); S = S0*(s/2/pi/f0)/(1+s/2/pi/f0);
#+end_src #+end_src
#+begin_src matlab
voltage = detrend(voltage);
#+end_src
#+begin_src matlab #+begin_src matlab
velocity = lsim((S*10^(gain/20))\1, voltage, time); velocity = lsim((S*10^(gain/20))\1, voltage, time);
#+end_src #+end_src
@ -70,9 +74,128 @@ This Matlab function is accessible [[file:voltageToDisplacementL22.m][here]].
#+end_src #+end_src
#+begin_src matlab #+begin_src matlab
voltage = voltage - mean(voltage);
velocity = voltageToVelocityL22(voltage, time, gain); velocity = voltageToVelocityL22(voltage, time, gain);
disp = lsim(1/s, velocity, time); disp = lsim(1/s, velocity, time);
#+end_src #+end_src
* getGroundVelocity
:PROPERTIES:
:header-args:matlab+: :tangle getGroundVelocity.m
:header-args:matlab+: :comments org :mkdirp yes
:header-args:matlab+: :eval no :results none
:END:
<<sec:getGroundVelocity>>
This Matlab function is accessible [[file:getGroundVelocity.m][here]].
#+begin_src matlab
function [time, velocity] = getGroundVelocity()
% getGroundVelocity -
%
% Syntax: [time, velocity] = voltageToVelocityL22()
%
% Inputs:
% - -
%
% Outputs:
% - time - in [s]
% - velocity - in [m/s]
current_dir = pwd;
src_dir = mfilename('fullpath');
src_dir = strsplit(src_dir, '/');
src_dir = strjoin(src_dir(1:end-1), '/');
cd(src_dir);
data = load('mat/data_028.mat', 'data'); data = data.data;
time = data(:, 3);
[velocity] = voltageToVelocityL22(data(:, 1), time, 60);
cd(current_dir);
end
#+end_src
* getGroundDisplacement
:PROPERTIES:
:header-args:matlab+: :tangle getGroundDisplacement.m
:header-args:matlab+: :comments org :mkdirp yes
:header-args:matlab+: :eval no :results none
:END:
<<sec:getGroundDisplacement>>
This Matlab function is accessible [[file:getGroundDisplacement.m][here]].
#+begin_src matlab
function [time, displacement] = getGroundDisplacement()
% getGroundDisplacement -
%
% Syntax: [time, displacement] = voltageToVelocityL22()
%
% Inputs:
% - -
%
% Outputs:
% - time - in [s]
% - displacement - in [m]
s = zpk('s');
[time, velocity] = getGroundVelocity();
displacement = lsim(1/s, velocity, time);
end
#+end_src
* getPSDGroundVelocity
:PROPERTIES:
:header-args:matlab+: :tangle getPSDGroundVelocity.m
:header-args:matlab+: :comments org :mkdirp yes
:header-args:matlab+: :eval no :results none
:END:
<<sec:getPSDGroundVelocity>>
This Matlab function is accessible [[file:getPSDGroundVelocity.m][here]].
#+begin_src matlab
function [pxx, f] = getPSDGroundVelocity()
% getPSDGroundVelocity -
%
% Syntax: [pxx, f] = voltageToVelocityL22(in_data)
%
% Outputs:
% - psd -
% - f -
[time, velocity] = getGroundVelocity();
dt = time(2) - time(1);
Fs = 1/dt;
win = hanning(ceil(10*Fs));
[pxx, f] = pwelch(velocity, win, [], [], Fs);
#+end_src
* getPSDGroundDisplacement
:PROPERTIES:
:header-args:matlab+: :tangle getPSDGroundDisplacement.m
:header-args:matlab+: :comments org :mkdirp yes
:header-args:matlab+: :eval no :results none
:END:
<<sec:getPSDGroundDisplacement>>
This Matlab function is accessible [[file:getPSDGroundDisplacement.m][here]].
#+begin_src matlab
function [pxx, f] = getPSDGroundDisplacement()
% getPSDGroundDisplacement -
%
% Syntax: [pxx, f] = voltageToVelocityL22(in_data)
%
% Outputs:
% - pxx -
% - f -
[pxx, f] = getPSDGroundVelocity();
pxx = (sqrt(pxx)./(2*pi*f)).^2;
#+end_src

View File

@ -13,8 +13,6 @@ function [disp] = voltageToDisplacementL22(voltage, time, gain)
s = zpk('s'); s = zpk('s');
voltage = voltage - mean(voltage);
velocity = voltageToVelocityL22(voltage, time, gain); velocity = voltageToVelocityL22(voltage, time, gain);
disp = lsim(1/s, velocity, time); disp = lsim(1/s, velocity, time);

View File

@ -18,4 +18,6 @@ f0 = 2; % Cut-off frequnecy [Hz]
S = S0*(s/2/pi/f0)/(1+s/2/pi/f0); S = S0*(s/2/pi/f0)/(1+s/2/pi/f0);
voltage = detrend(voltage);
velocity = lsim((S*10^(gain/20))\1, voltage, time); velocity = lsim((S*10^(gain/20))\1, voltage, time);