Change one measurement of folder

This commit is contained in:
Thomas Dehaeze 2019-05-15 17:24:56 +02:00
parent 8f0cd2d3c0
commit 65b83cfb48
24 changed files with 492 additions and 416 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

View File

@ -1,4 +1,4 @@
#+TITLE:Measurements
#+TITLE:Effect on the control system of each stages on the vibration of the station
:DRAWER:
#+STARTUP: overview
@ -398,7 +398,11 @@ All the control systems are turned OFF, then, they are turned on one at a time.
Each measurement are done during 100s.
The settings of the voltage amplifier are shown on figure [[fig:amplifier_settings]].
The settings of the voltage amplifier are shown on figure [[fig:amplifier_settings]]:
- gain of 60dB
- AC/DC option set on DC
- Low pass filter set at 1kHz
A first order low pass filter with a cut-off frequency of 1kHz is added before the voltage amplifier.
#+name: tab:control_system_on_off
@ -444,22 +448,44 @@ We load the data of the z axis of two geophones.
d_he = load('mat/data_018.mat', 'data'); d_he = d_he.data;
#+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
gain = 60; % [dB]
d_of(:, 1) = voltageToVelocityL22(d_of(:, 1), d_of(:, 3), gain);
d_ty(:, 1) = voltageToVelocityL22(d_ty(:, 1), d_ty(:, 3), gain);
d_ry(:, 1) = voltageToVelocityL22(d_ry(:, 1), d_ry(:, 3), gain);
d_sr(:, 1) = voltageToVelocityL22(d_sr(:, 1), d_sr(:, 3), gain);
d_rz(:, 1) = voltageToVelocityL22(d_rz(:, 1), d_rz(:, 3), gain);
d_he(:, 1) = voltageToVelocityL22(d_he(:, 1), d_he(:, 3), gain);
d_of(:, 2) = voltageToVelocityL22(d_of(:, 2), d_of(:, 3), gain);
d_ty(:, 2) = voltageToVelocityL22(d_ty(:, 2), d_ty(:, 3), gain);
d_ry(:, 2) = voltageToVelocityL22(d_ry(:, 2), d_ry(:, 3), gain);
d_sr(:, 2) = voltageToVelocityL22(d_sr(:, 2), d_sr(:, 3), gain);
d_rz(:, 2) = voltageToVelocityL22(d_rz(:, 2), d_rz(:, 3), gain);
d_he(:, 2) = voltageToVelocityL22(d_he(:, 2), d_he(:, 3), gain);
#+end_src
** Analysis - Time Domain
First, we can look at the time domain data and compare all the measurements:
- comparison for the geophone at the sample location (figure [[fig:time_domain_sample_lpf]])
- comparison for the geophone on the granite (figure [[fig:time_domain_marble_lpf]])
- relative displacement of the sample with respect to the marble (figure [[fig:time_domain_marble_lpf]])
#+begin_src matlab :results none
#+begin_src matlab
figure;
hold on;
plot(d_of(:, 3), d_of(:, 2), 'DisplayName', 'All OFF';
plot(d_of(:, 3), d_of(:, 2), 'DisplayName', 'All OFF');
plot(d_ty(:, 3), d_ty(:, 2), 'DisplayName', 'Ty ON');
plot(d_ry(:, 3), d_ry(:, 2), 'DisplayName', 'Ry ON');
plot(d_sr(:, 3), d_sr(:, 2), 'DisplayName', 'S-R ON');
plot(d_rz(:, 3), d_rz(:, 2), 'DisplayName', 'Rz ON');
plot(d_he(:, 3), d_he(:, 2), 'DisplayName', 'Hexa ON');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
xlabel('Time [s]'); ylabel('Velocity [m/s]');
xlim([0, 50]);
legend('Location', 'bestoutside');
#+end_src
@ -476,7 +502,7 @@ First, we can look at the time domain data and compare all the measurements:
[[file:figs/time_domain_sample_lpf.png]]
#+begin_src matlab :results none
#+begin_src matlab
figure;
hold on;
plot(d_of(:, 3), d_of(:, 1), 'DisplayName', 'All OFF');
@ -486,7 +512,7 @@ First, we can look at the time domain data and compare all the measurements:
plot(d_rz(:, 3), d_rz(:, 1), 'DisplayName', 'Rz ON');
plot(d_he(:, 3), d_he(:, 1), 'DisplayName', 'Hexa ON');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
xlabel('Time [s]'); ylabel('Velocity [m/s]');
xlim([0, 50]);
legend('Location', 'bestoutside');
#+end_src
@ -502,6 +528,32 @@ First, we can look at the time domain data and compare all the measurements:
#+RESULTS: fig:time_domain_marble_lpf
[[file:figs/time_domain_marble_lpf.png]]
#+begin_src matlab
figure;
hold on;
plot(d_of(:, 3), 1e6*lsim(1/(1+s/(2*pi*0.5)), d_of(:, 2)-d_of(:, 1), d_of(:, 3)), 'DisplayName', 'All OFF');
plot(d_ty(:, 3), 1e6*lsim(1/(1+s/(2*pi*0.5)), d_ty(:, 2)-d_ty(:, 1), d_ty(:, 3)), 'DisplayName', 'Ty ON');
plot(d_ry(:, 3), 1e6*lsim(1/(1+s/(2*pi*0.5)), d_ry(:, 2)-d_ry(:, 1), d_ry(:, 3)), 'DisplayName', 'Ry ON');
plot(d_sr(:, 3), 1e6*lsim(1/(1+s/(2*pi*0.5)), d_sr(:, 2)-d_sr(:, 1), d_sr(:, 3)), 'DisplayName', 'S-R ON');
plot(d_rz(:, 3), 1e6*lsim(1/(1+s/(2*pi*0.5)), d_rz(:, 2)-d_rz(:, 1), d_rz(:, 3)), 'DisplayName', 'Rz ON');
plot(d_he(:, 3), 1e6*lsim(1/(1+s/(2*pi*0.5)), d_he(:, 2)-d_he(:, 1), d_he(:, 3)), 'DisplayName', 'Hexa ON');
hold off;
xlabel('Time [s]'); ylabel('Relative Displacement [$\mu m$]');
xlim([0, 50]);
legend('Location', 'bestoutside');
#+end_src
#+NAME: fig:time_domain_relative_disp
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/time_domain_relative_disp.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:time_domain_relative_disp
#+CAPTION: Relative displacement of the sample with respect to the marble
#+RESULTS: fig:time_domain_relative_disp
[[file:figs/time_domain_relative_disp.png]]
** Analysis - Frequency Domain
#+begin_src matlab :results none
dt = d_of(2, 3) - d_of(1, 3);
@ -534,7 +586,7 @@ And we compare all the signals (figures [[fig:psd_sample_comp_lpf]] and [[fig:ps
hold off;
set(gca, 'xscale', 'log');
set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('Amplitude Spectral Density $\left[\frac{V}{\sqrt{Hz}}\right]$')
xlabel('Frequency [Hz]'); ylabel('Amplitude Spectral Density $\left[\frac{m/s}{\sqrt{Hz}}\right]$')
xlim([0.1, 500]);
legend('Location', 'southwest');
#+end_src
@ -546,7 +598,7 @@ And we compare all the signals (figures [[fig:psd_sample_comp_lpf]] and [[fig:ps
#+end_src
#+NAME: fig:psd_sample_comp_lpf
#+CAPTION: Amplitude Spectral Density of the signal coming from the top geophone
#+CAPTION: Amplitude Spectral Density of the sample velocity
#+RESULTS: fig:psd_sample_comp_lpf
[[file:figs/psd_sample_comp_lpf.png]]
@ -562,7 +614,7 @@ And we compare all the signals (figures [[fig:psd_sample_comp_lpf]] and [[fig:ps
#+end_src
#+NAME: fig:psd_sample_comp_high_freq_lpf
#+CAPTION: Amplitude Spectral Density of the signal coming from the top geophone (zoom at high frequencies)
#+CAPTION: Amplitude Spectral Density of the sample velocity (zoom at high frequencies)
#+RESULTS: fig:psd_sample_comp_high_freq_lpf
[[file:figs/psd_sample_comp_high_freq_lpf.png]]
@ -590,7 +642,7 @@ And we compare the Amplitude Spectral Densities (figures [[fig:psd_marble_comp_l
hold off;
set(gca, 'xscale', 'log');
set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('Amplitude Spectral Density $\left[\frac{V}{\sqrt{Hz}}\right]$')
xlabel('Frequency [Hz]'); ylabel('Amplitude Spectral Density $\left[\frac{m/s}{\sqrt{Hz}}\right]$')
xlim([0.1, 500]);
legend('Location', 'northeast');
#+end_src
@ -602,7 +654,7 @@ And we compare the Amplitude Spectral Densities (figures [[fig:psd_marble_comp_l
#+end_src
#+NAME: fig:psd_marble_comp_lpf
#+CAPTION: Amplitude Spectral Density of the signal coming from geophone located on the marble
#+CAPTION: Amplitude Spectral Density of the marble velocity
#+RESULTS: fig:psd_marble_comp_lpf
[[file:figs/psd_marble_comp_lpf.png]]
@ -619,7 +671,7 @@ And we compare the Amplitude Spectral Densities (figures [[fig:psd_marble_comp_l
#+end_src
#+NAME: fig:psd_marble_comp_lpf_high_freq
#+CAPTION: Amplitude Spectral Density of the signal coming from the geophone located on the marble (zoom at high frequencies)
#+CAPTION: Amplitude Spectral Density of the marble velocity (zoom at high frequencies)
#+RESULTS: fig:psd_marble_comp_lpf_high_freq
[[file:figs/psd_marble_comp_lpf_high_freq.png]]
@ -779,404 +831,3 @@ First, we compute the Power Spectral Density of the signals coming from the Geop
#+begin_important
Even tough the Hexapod's driver vibrates quite a lot, it does not generate significant vibrations of the granite when either placed on the granite or on the ground.
#+end_important
* Transfer function from one stage to the other
:PROPERTIES:
:header-args:matlab+: :tangle matlab/tf_stages_geophone.m
:header-args:matlab+: :comments org :mkdirp yes
:END:
<<sec:tf_stages_geophone>>
** ZIP file containing the data and matlab files :ignore:
#+begin_src bash :exports none :results none
if [ matlab/tf_stages_geophone.m -nt data/tf_stages_geophone.zip ]; then
cp matlab/tf_stages_geophone.m tf_stages_geophone.m;
zip data/tf_stages_geophone \
mat/data_010.mat \
mat/data_011.mat \
mat/data_012.mat \
tf_stages_geophone.m
rm tf_stages_geophone.m;
fi
#+end_src
#+begin_note
All the files (data and Matlab scripts) are accessible [[file:data/tf_stages_geophone.zip][here]].
#+end_note
** Experimental Setup
For all the measurements in this section:
- all the control stages are OFF.
- the measurements are on the $z$ direction
*** From Marble to Ty - =mat/meas_010.mat=
One geophone is on the marble, one is on the Ty stage (see figures [[fig:setup_m_ty]], [[fig:setup_m_ty_zoom]] and [[fig:setup_m_ty_top]]).
The =data= array contains the following columns:
| Column | Description |
|--------+-------------|
| 1 | Ground |
| 2 | Ty |
| 3 | Time |
#+name: fig:setup_m_ty
#+caption: Setup with one geophone on the marble and one on top of the translation stage
#+attr_html: :width 500px
[[file:./img/IMG_20190430_155330.jpg]]
#+name: fig:setup_m_ty_zoom
#+caption: Setup with one geophone on the marble and one on top of the translation stage - Close up view
#+attr_html: :width 500px
[[file:./img/IMG_20190430_155335.jpg]]
#+name: fig:setup_m_ty_top
#+caption: Setup with one geophone on the marble and one on top of the translation stage - Top view
#+attr_html: :width 500px
[[file:./img/IMG_20190430_155342.jpg]]
*** From Marble to Ry - =mat/meas_011.mat=
One geophone is on the marble, one is on the Ry stage (see figure [[fig:setup_m_ry]])
The =data= array contains the following columns:
| Column | Description |
|--------+-------------|
| 1 | Ground |
| 2 | Ry |
| 3 | Time |
#+name: fig:setup_m_ry
#+caption: Setup with one geophone on the marble and one on top of the Tilt Stage
#+attr_html: :width 500px
[[file:./img/IMG_20190430_163919.jpg]]
*** From Ty to Ry - =mat/meas_012.mat=
One geophone is on the Ty stage, one is on the Ry stage (see figures [[fig:setup_ty_ry]], [[fig:setup_ty_ry_top]] and [[fig:setup_ty_ry_zoom]])
One geophone on the Ty stage, one geophone on the Ry stage.
The =data= array contains the following columns:
| Column | Description |
|--------+-------------|
| 1 | Ty |
| 2 | Ry |
| 3 | Time |
#+name: fig:setup_ty_ry
#+caption: Setup with one geophone on the translation stage and one on top of the Tilt Stage
#+attr_html: :width 500px
[[file:./img/IMG_20190430_170405.jpg]]
#+name: fig:setup_ty_ry_top
#+caption: Setup with one geophone on the translation stage and one on top of the Tilt Stage - Top view
#+attr_html: :width 500px
[[file:./img/IMG_20190430_170418.jpg]]
#+name: fig:setup_ty_ry_zoom
#+caption: Setup with one geophone on the translation stage and one on top of the Tilt Stage - Close up view
#+attr_html: :width 500px
[[file:./img/IMG_20190430_170425.jpg]]
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src
** Load data
We load the data of the z axis of two geophones.
#+begin_src matlab :results none
m_ty = load('mat/data_010.mat', 'data'); m_ty = m_ty.data;
m_ry = load('mat/data_011.mat', 'data'); m_ry = m_ry.data;
ty_ry = load('mat/data_012.mat', 'data'); ty_ry = ty_ry.data;
#+end_src
** Analysis - Time Domain
First, we can look at the time domain data.
#+begin_src matlab :results none
figure;
hold on;
plot(m_ty(:, 3), m_ty(:, 1), 'DisplayName', 'Marble');
plot(m_ty(:, 3), m_ty(:, 2), 'DisplayName', 'Ty');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
legend('Location', 'northeast');
xlim([0, 500]);
#+end_src
#+NAME: fig:time_domain_m_ty
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/time_domain_m_ty.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:time_domain_m_ty
#+CAPTION: Time domain - Marble and translation stage
#+RESULTS: fig:time_domain_m_ty
[[file:figs/time_domain_m_ty.png]]
#+begin_src matlab :results none
figure;
hold on;
plot(m_ry(:, 3), m_ry(:, 1), 'DisplayName', 'Marble');
plot(m_ry(:, 3), m_ry(:, 2), 'DisplayName', 'Ty');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
legend('Location', 'northeast');
xlim([0, 500]);
#+end_src
#+NAME: fig:time_domain_m_ry
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/time_domain_m_ry.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:time_domain_m_ry
#+CAPTION: Time domain - Marble and tilt stage
#+RESULTS: fig:time_domain_m_ry
[[file:figs/time_domain_m_ry.png]]
#+begin_src matlab :results none
figure;
hold on;
plot(ty_ry(:, 3), ty_ry(:, 1), 'DisplayName', 'Ty');
plot(ty_ry(:, 3), ty_ry(:, 2), 'DisplayName', 'Ry');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
legend('Location', 'northeast');
xlim([0, 500]);
#+end_src
#+NAME: fig:time_domain_ty_ry
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/time_domain_ty_ry.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:time_domain_ty_ry
#+CAPTION: Time domain - Translation stage and tilt stage
#+RESULTS: fig:time_domain_ty_ry
[[file:figs/time_domain_ty_ry.png]]
** Analysis - Frequency Domain
#+begin_src matlab :results none
dt = m_ty(2, 3) - m_ty(1, 3);
Fs = 1/dt;
win = hanning(ceil(1*Fs));
#+end_src
First, we compute the transfer function estimate between the two geophones for the 3 experiments (figure [[fig:compare_tf_geophones]]). We also plot their coherence (figure [[fig:coherence_two_geophones]]).
#+begin_src matlab :results none
[T_m_ty, f] = tfestimate(m_ty(:, 1), m_ty(:, 2), win, [], [], Fs);
[T_m_ry, ~] = tfestimate(m_ry(:, 1), m_ry(:, 2), win, [], [], Fs);
[T_ty_ry, ~] = tfestimate(ty_ry(:, 1), ty_ry(:, 2), win, [], [], Fs);
#+end_src
#+begin_src matlab :results none
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(f, abs(T_m_ty), 'DisplayName', 'Marble - Ty');
plot(f, abs(T_m_ry), 'DisplayName', 'Marble - Ry');
plot(f, abs(T_ty_ry), 'DisplayName', 'Ty - Ry');
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
set(gca, 'XTickLabel',[]);
ylabel('Magnitude');
legend('Location', 'northwest');
ax2 = subplot(2, 1, 2);
hold on;
plot(f, mod(180+180/pi*phase(T_m_ty), 360)-180);
plot(f, mod(180+180/pi*phase(T_m_ry), 360)-180);
plot(f, mod(180+180/pi*phase(T_ty_ry), 360)-180);
hold off;
set(gca, 'xscale', 'log');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
xlabel('Frequency [Hz]'); ylabel('Phase');
linkaxes([ax1,ax2],'x');
xlim([10, 500]);
#+end_src
#+NAME: fig:compare_tf_geophones
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/compare_tf_geophones.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:compare_tf_geophones
#+CAPTION: Transfer function from the first geophone to the second geophone for the three experiments
#+RESULTS: fig:compare_tf_geophones
[[file:figs/compare_tf_geophones.png]]
#+begin_src matlab :results none
[coh_m_ty, f] = mscohere(m_ty(:, 1), m_ty(:, 2), win, [], [], Fs);
[coh_m_ry, ~] = mscohere(m_ry(:, 1), m_ry(:, 2), win, [], [], Fs);
[coh_ty_ry, ~] = mscohere(ty_ry(:, 1), ty_ry(:, 2), win, [], [], Fs);
#+end_src
#+begin_src matlab :results none :exports none
figure;
hold on;
plot(f, coh_m_ty, 'DisplayName', 'Marble - Ty');
plot(f, coh_m_ry, 'DisplayName', 'Marble - Ry');
plot(f, coh_ty_ry, 'DisplayName', 'Ty - Ry');
hold off;
set(gca, 'xscale', 'log');
xlabel('Frequency [Hz]'); ylabel('Coherence');
ylim([0, 1]); xlim([1, 500]);
#+end_src
#+NAME: fig:coherence_two_geophones
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/coherence_two_geophones.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:coherence_two_geophones
#+CAPTION: Coherence between the two geophones for the three experiments
#+RESULTS: fig:coherence_two_geophones
[[file:figs/coherence_two_geophones.png]]
** Conclusion
#+begin_important
These measurements are not relevant.
#+end_important
* Effect of the Ty Control System on the vibration of the Sample :noexport:ignore:
** Experimental Setup
One geophone is on the marble, the other at the sample location (see figures [[fig:setup_ty]]).
The signal from the top geophone goes through the slip-ring.
#+name: fig:setup_ty
#+caption: Experimental Setup
#+attr_html: :width 500px
[[file:./img/IMG_20190430_112615.jpg]]
Two measurements are done:
| Setup | Data File |
|----------------------+--------------------|
| Control of Ty is on | =mat/data_001.mat= |
| Control of Ty is off | =mat/data_002.mat= |
For each of the measurements, the data are:
| Variable | Description |
|----------+--------------------------------------------------------------------|
| =t= | Time Vector |
| =x1= | Voltage measured across the geophone placed on the marble |
| =x2= | Voltage measured across the geophone placed at the sample location |
Measurements are 50s long.
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src
** Load data
We load the data of the z axis of two geophones.
#+begin_src matlab :results none
tyOn = load('mat/data_001.mat', 't', 'x1', 'x2');
tyOff = load('mat/data_002.mat', 't', 'x1', 'x2');
#+end_src
** Analysis - Time Domain
#+begin_src matlab :results none
dt = tyOn.t(2)-tyOn.t(1);
Fs = 1/dt;
#+end_src
#+begin_src matlab :results none
figure;
subplot(1, 2, 1);
hold on;
plot(tyOn.t, tyOn.x1, 'DisplayName', 'Ty ON - Marble');
plot(tyOff.t, tyOff.x1, 'DisplayName', 'Ty OFF - Marble');
hold off;
legend();
xlabel('Time [s]'); ylabel('Voltage [V]');
xlim([0, 50]);
subplot(1, 2, 2);
hold on;
plot(tyOn.t, tyOn.x2, 'DisplayName', 'Ty ON - Sample');
plot(tyOff.t, tyOff.x2, 'DisplayName', 'Ty OFF - Sample');
hold off;
legend();
xlabel('Time [s]'); ylabel('Voltage [V]');
xlim([0, 50]);
#+end_src
#+NAME: fig:time_domain_effect_ty
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/time_domain_effect_ty.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:time_domain_effect_ty
#+CAPTION: Effect of the Ty control system on the vibrations of the marble and sample
#+RESULTS: fig:time_domain_effect_ty
[[file:figs/time_domain_effect_ty.png]]
** Analysis - Frequency Domain
#+begin_src matlab :results none
Fs = 1/dt;
win = hanning(ceil(10*Fs));
#+end_src
#+begin_src matlab :results none
[pxOn1, f] = pwelch(tyOn.x1, win, [], [], Fs);
[pxOn2, ~] = pwelch(tyOn.x2, win, [], [], Fs);
[pxOff1, ~] = pwelch(tyOff.x1, win, [], [], Fs);
[pxOff2, ~] = pwelch(tyOff.x2, win, [], [], Fs);
#+end_src
#+begin_src matlab :results none
figure;
subplot(1, 2, 1);
hold on;
plot(f, sqrt(pxOn1), 'DisplayName', 'Ty ON - Marble');
plot(f, sqrt(pxOff1), 'DisplayName', 'Ty OFF - Marble');
hold off;
legend();
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlim([0.1, 500]); ylim([1e-4, 1]);
xlabel('Frequency [Hz]'); ylabel('Amplitude Spectral Density $\left[\frac{V}{\sqrt{Hz}}\right]$')
subplot(1, 2, 2);
hold on;
plot(f, sqrt(pxOn2), 'DisplayName', 'Ty ON - Sample');
plot(f, sqrt(pxOff2), 'DisplayName', 'Ty OFF - Sample');
hold off;
legend();
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('Amplitude Spectral Density $\left[\frac{V}{\sqrt{Hz}}\right]$')
xlim([0.1, 500]); ylim([1e-4, 1]);
#+end_src
#+NAME: fig:psd_effect_ty
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/psd_effect_ty.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:psd_effect_ty
#+CAPTION: Amplitude Spectral Density - Effect of the Ty control system
#+RESULTS: fig:psd_effect_ty
[[file:figs/psd_effect_ty.png]]
** Conclusion

View File

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 159 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 MiB

After

Width:  |  Height:  |  Size: 4.2 MiB

View File

Before

Width:  |  Height:  |  Size: 3.8 MiB

After

Width:  |  Height:  |  Size: 3.8 MiB

View File

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

View File

Before

Width:  |  Height:  |  Size: 4.2 MiB

After

Width:  |  Height:  |  Size: 4.2 MiB

View File

Before

Width:  |  Height:  |  Size: 3.9 MiB

After

Width:  |  Height:  |  Size: 3.9 MiB

View File

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 3.0 MiB

View File

Before

Width:  |  Height:  |  Size: 3.4 MiB

After

Width:  |  Height:  |  Size: 3.4 MiB

View File

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

View File

@ -0,0 +1,124 @@
%% Clear Workspace and Close figures
clear; close all; clc;
%% Intialize Laplace variable
s = zpk('s');
% Load data
% We load the data of the z axis of two geophones.
m_ty = load('mat/data_010.mat', 'data'); m_ty = m_ty.data;
m_ry = load('mat/data_011.mat', 'data'); m_ry = m_ry.data;
ty_ry = load('mat/data_012.mat', 'data'); ty_ry = ty_ry.data;
% Analysis - Time Domain
% First, we can look at the time domain data.
figure;
hold on;
plot(m_ty(:, 3), m_ty(:, 1), 'DisplayName', 'Marble');
plot(m_ty(:, 3), m_ty(:, 2), 'DisplayName', 'Ty');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
legend('Location', 'northeast');
xlim([0, 500]);
% #+NAME: fig:time_domain_m_ty
% #+CAPTION: Time domain - Marble and translation stage
% #+RESULTS: fig:time_domain_m_ty
% [[file:figs/time_domain_m_ty.png]]
figure;
hold on;
plot(m_ry(:, 3), m_ry(:, 1), 'DisplayName', 'Marble');
plot(m_ry(:, 3), m_ry(:, 2), 'DisplayName', 'Ty');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
legend('Location', 'northeast');
xlim([0, 500]);
% #+NAME: fig:time_domain_m_ry
% #+CAPTION: Time domain - Marble and tilt stage
% #+RESULTS: fig:time_domain_m_ry
% [[file:figs/time_domain_m_ry.png]]
figure;
hold on;
plot(ty_ry(:, 3), ty_ry(:, 1), 'DisplayName', 'Ty');
plot(ty_ry(:, 3), ty_ry(:, 2), 'DisplayName', 'Ry');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
legend('Location', 'northeast');
xlim([0, 500]);
% Analysis - Frequency Domain
dt = m_ty(2, 3) - m_ty(1, 3);
Fs = 1/dt;
win = hanning(ceil(1*Fs));
% First, we compute the transfer function estimate between the two geophones for the 3 experiments (figure [[fig:compare_tf_geophones]]). We also plot their coherence (figure [[fig:coherence_two_geophones]]).
[T_m_ty, f] = tfestimate(m_ty(:, 1), m_ty(:, 2), win, [], [], Fs);
[T_m_ry, ~] = tfestimate(m_ry(:, 1), m_ry(:, 2), win, [], [], Fs);
[T_ty_ry, ~] = tfestimate(ty_ry(:, 1), ty_ry(:, 2), win, [], [], Fs);
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(f, abs(T_m_ty), 'DisplayName', 'Marble - Ty');
plot(f, abs(T_m_ry), 'DisplayName', 'Marble - Ry');
plot(f, abs(T_ty_ry), 'DisplayName', 'Ty - Ry');
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
set(gca, 'XTickLabel',[]);
ylabel('Magnitude');
legend('Location', 'northwest');
ax2 = subplot(2, 1, 2);
hold on;
plot(f, mod(180+180/pi*phase(T_m_ty), 360)-180);
plot(f, mod(180+180/pi*phase(T_m_ry), 360)-180);
plot(f, mod(180+180/pi*phase(T_ty_ry), 360)-180);
hold off;
set(gca, 'xscale', 'log');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
xlabel('Frequency [Hz]'); ylabel('Phase');
linkaxes([ax1,ax2],'x');
xlim([10, 500]);
% #+NAME: fig:compare_tf_geophones
% #+CAPTION: Transfer function from the first geophone to the second geophone for the three experiments
% #+RESULTS: fig:compare_tf_geophones
% [[file:figs/compare_tf_geophones.png]]
[coh_m_ty, f] = mscohere(m_ty(:, 1), m_ty(:, 2), win, [], [], Fs);
[coh_m_ry, ~] = mscohere(m_ry(:, 1), m_ry(:, 2), win, [], [], Fs);
[coh_ty_ry, ~] = mscohere(ty_ry(:, 1), ty_ry(:, 2), win, [], [], Fs);
figure;
hold on;
plot(f, coh_m_ty, 'DisplayName', 'Marble - Ty');
plot(f, coh_m_ry, 'DisplayName', 'Marble - Ry');
plot(f, coh_ty_ry, 'DisplayName', 'Ty - Ry');
hold off;
set(gca, 'xscale', 'log');
xlabel('Frequency [Hz]'); ylabel('Coherence');
ylim([0, 1]); xlim([1, 500]);

Binary file not shown.

View File

@ -0,0 +1,301 @@
#+TITLE: Transfer function from velocity of one stage to the velocity of another stage using geophones
:DRAWER:
#+STARTUP: overview
#+LANGUAGE: en
#+EMAIL: dehaeze.thomas@gmail.com
#+AUTHOR: Dehaeze Thomas
#+HTML_LINK_HOME: ../index.html
#+HTML_LINK_UP: ../index.html
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../css/htmlize.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../css/readtheorg.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../css/zenburn.css"/>
#+HTML_HEAD: <script type="text/javascript" src="../js/jquery.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="../js/bootstrap.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="../js/jquery.stickytableheaders.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="../js/readtheorg.js"></script>
#+HTML_MATHJAX: align: center tagside: right font: TeX
#+PROPERTY: header-args:matlab :session *MATLAB*
#+PROPERTY: header-args:matlab+ :comments org
#+PROPERTY: header-args:matlab+ :results none
#+PROPERTY: header-args:matlab+ :exports both
#+PROPERTY: header-args:matlab+ :eval no-export
#+PROPERTY: header-args:matlab+ :output-dir figs
#+PROPERTY: header-args:shell :eval no-export
:END:
* Experimental Setup
For all the measurements in this section:
- all the control stages are OFF.
- the measurements are on the $z$ direction
** From Marble to Ty - =mat/meas_010.mat=
One geophone is on the marble, one is on the Ty stage (see figures [[fig:setup_m_ty]], [[fig:setup_m_ty_zoom]] and [[fig:setup_m_ty_top]]).
The =data= array contains the following columns:
| Column | Description |
|--------+-------------|
| 1 | Ground |
| 2 | Ty |
| 3 | Time |
#+name: fig:setup_m_ty
#+caption: Setup with one geophone on the marble and one on top of the translation stage
#+attr_html: :width 500px
[[file:./img/IMG_20190430_155330.jpg]]
#+name: fig:setup_m_ty_zoom
#+caption: Setup with one geophone on the marble and one on top of the translation stage - Close up view
#+attr_html: :width 500px
[[file:./img/IMG_20190430_155335.jpg]]
#+name: fig:setup_m_ty_top
#+caption: Setup with one geophone on the marble and one on top of the translation stage - Top view
#+attr_html: :width 500px
[[file:./img/IMG_20190430_155342.jpg]]
** From Marble to Ry - =mat/meas_011.mat=
One geophone is on the marble, one is on the Ry stage (see figure [[fig:setup_m_ry]])
The =data= array contains the following columns:
| Column | Description |
|--------+-------------|
| 1 | Ground |
| 2 | Ry |
| 3 | Time |
#+name: fig:setup_m_ry
#+caption: Setup with one geophone on the marble and one on top of the Tilt Stage
#+attr_html: :width 500px
[[file:./img/IMG_20190430_163919.jpg]]
** From Ty to Ry - =mat/meas_012.mat=
One geophone is on the Ty stage, one is on the Ry stage (see figures [[fig:setup_ty_ry]], [[fig:setup_ty_ry_top]] and [[fig:setup_ty_ry_zoom]])
One geophone on the Ty stage, one geophone on the Ry stage.
The =data= array contains the following columns:
| Column | Description |
|--------+-------------|
| 1 | Ty |
| 2 | Ry |
| 3 | Time |
#+name: fig:setup_ty_ry
#+caption: Setup with one geophone on the translation stage and one on top of the Tilt Stage
#+attr_html: :width 500px
[[file:./img/IMG_20190430_170405.jpg]]
#+name: fig:setup_ty_ry_top
#+caption: Setup with one geophone on the translation stage and one on top of the Tilt Stage - Top view
#+attr_html: :width 500px
[[file:./img/IMG_20190430_170418.jpg]]
#+name: fig:setup_ty_ry_zoom
#+caption: Setup with one geophone on the translation stage and one on top of the Tilt Stage - Close up view
#+attr_html: :width 500px
[[file:./img/IMG_20190430_170425.jpg]]
* Measurement Analysis
:PROPERTIES:
:header-args:matlab+: :tangle matlab/tf_stages_geophone.m
:header-args:matlab+: :comments org :mkdirp yes
:END:
<<sec:tf_stages_geophone>>
** ZIP file containing the data and matlab files :ignore:
#+begin_src bash :exports none :results none
if [ matlab/tf_stages_geophone.m -nt data/tf_stages_geophone.zip ]; then
cp matlab/tf_stages_geophone.m tf_stages_geophone.m;
zip data/tf_stages_geophone \
mat/data_010.mat \
mat/data_011.mat \
mat/data_012.mat \
tf_stages_geophone.m
rm tf_stages_geophone.m;
fi
#+end_src
#+begin_note
All the files (data and Matlab scripts) are accessible [[file:data/tf_stages_geophone.zip][here]].
#+end_note
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src
** Load data
We load the data of the z axis of two geophones.
#+begin_src matlab :results none
m_ty = load('mat/data_010.mat', 'data'); m_ty = m_ty.data;
m_ry = load('mat/data_011.mat', 'data'); m_ry = m_ry.data;
ty_ry = load('mat/data_012.mat', 'data'); ty_ry = ty_ry.data;
#+end_src
** Analysis - Time Domain
First, we can look at the time domain data.
#+begin_src matlab :results none
figure;
hold on;
plot(m_ty(:, 3), m_ty(:, 1), 'DisplayName', 'Marble');
plot(m_ty(:, 3), m_ty(:, 2), 'DisplayName', 'Ty');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
legend('Location', 'northeast');
xlim([0, 500]);
#+end_src
#+NAME: fig:time_domain_m_ty
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/time_domain_m_ty.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:time_domain_m_ty
#+CAPTION: Time domain - Marble and translation stage
#+RESULTS: fig:time_domain_m_ty
[[file:figs/time_domain_m_ty.png]]
#+begin_src matlab :results none
figure;
hold on;
plot(m_ry(:, 3), m_ry(:, 1), 'DisplayName', 'Marble');
plot(m_ry(:, 3), m_ry(:, 2), 'DisplayName', 'Ty');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
legend('Location', 'northeast');
xlim([0, 500]);
#+end_src
#+NAME: fig:time_domain_m_ry
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/time_domain_m_ry.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:time_domain_m_ry
#+CAPTION: Time domain - Marble and tilt stage
#+RESULTS: fig:time_domain_m_ry
[[file:figs/time_domain_m_ry.png]]
#+begin_src matlab :results none
figure;
hold on;
plot(ty_ry(:, 3), ty_ry(:, 1), 'DisplayName', 'Ty');
plot(ty_ry(:, 3), ty_ry(:, 2), 'DisplayName', 'Ry');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
legend('Location', 'northeast');
xlim([0, 500]);
#+end_src
#+NAME: fig:time_domain_ty_ry
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/time_domain_ty_ry.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:time_domain_ty_ry
#+CAPTION: Time domain - Translation stage and tilt stage
#+RESULTS: fig:time_domain_ty_ry
[[file:figs/time_domain_ty_ry.png]]
** Analysis - Frequency Domain
#+begin_src matlab :results none
dt = m_ty(2, 3) - m_ty(1, 3);
Fs = 1/dt;
win = hanning(ceil(1*Fs));
#+end_src
First, we compute the transfer function estimate between the two geophones for the 3 experiments (figure [[fig:compare_tf_geophones]]). We also plot their coherence (figure [[fig:coherence_two_geophones]]).
#+begin_src matlab :results none
[T_m_ty, f] = tfestimate(m_ty(:, 1), m_ty(:, 2), win, [], [], Fs);
[T_m_ry, ~] = tfestimate(m_ry(:, 1), m_ry(:, 2), win, [], [], Fs);
[T_ty_ry, ~] = tfestimate(ty_ry(:, 1), ty_ry(:, 2), win, [], [], Fs);
#+end_src
#+begin_src matlab :results none
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(f, abs(T_m_ty), 'DisplayName', 'Marble - Ty');
plot(f, abs(T_m_ry), 'DisplayName', 'Marble - Ry');
plot(f, abs(T_ty_ry), 'DisplayName', 'Ty - Ry');
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
set(gca, 'XTickLabel',[]);
ylabel('Magnitude');
legend('Location', 'northwest');
ax2 = subplot(2, 1, 2);
hold on;
plot(f, mod(180+180/pi*phase(T_m_ty), 360)-180);
plot(f, mod(180+180/pi*phase(T_m_ry), 360)-180);
plot(f, mod(180+180/pi*phase(T_ty_ry), 360)-180);
hold off;
set(gca, 'xscale', 'log');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
xlabel('Frequency [Hz]'); ylabel('Phase');
linkaxes([ax1,ax2],'x');
xlim([10, 500]);
#+end_src
#+NAME: fig:compare_tf_geophones
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/compare_tf_geophones.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:compare_tf_geophones
#+CAPTION: Transfer function from the first geophone to the second geophone for the three experiments
#+RESULTS: fig:compare_tf_geophones
[[file:figs/compare_tf_geophones.png]]
#+begin_src matlab :results none
[coh_m_ty, f] = mscohere(m_ty(:, 1), m_ty(:, 2), win, [], [], Fs);
[coh_m_ry, ~] = mscohere(m_ry(:, 1), m_ry(:, 2), win, [], [], Fs);
[coh_ty_ry, ~] = mscohere(ty_ry(:, 1), ty_ry(:, 2), win, [], [], Fs);
#+end_src
#+begin_src matlab :results none :exports none
figure;
hold on;
plot(f, coh_m_ty, 'DisplayName', 'Marble - Ty');
plot(f, coh_m_ry, 'DisplayName', 'Marble - Ry');
plot(f, coh_ty_ry, 'DisplayName', 'Ty - Ry');
hold off;
set(gca, 'xscale', 'log');
xlabel('Frequency [Hz]'); ylabel('Coherence');
ylim([0, 1]); xlim([1, 500]);
#+end_src
#+NAME: fig:coherence_two_geophones
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/coherence_two_geophones.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:coherence_two_geophones
#+CAPTION: Coherence between the two geophones for the three experiments
#+RESULTS: fig:coherence_two_geophones
[[file:figs/coherence_two_geophones.png]]
** Conclusion
#+begin_important
These measurements are not relevant.
#+end_important

View File

@ -76,7 +76,7 @@ This Matlab function is accessible [[file:voltageToDisplacementL22.m][here]].
#+begin_src matlab
velocity = voltageToVelocityL22(voltage, time, gain);
disp = lsim(1/s, velocity, time);
disp = lsim(1/(1+s/(2*pi*0.5)), velocity, time);
#+end_src
* getGroundVelocity
:PROPERTIES:

View File

@ -15,4 +15,4 @@ s = zpk('s');
velocity = voltageToVelocityL22(voltage, time, gain);
disp = lsim(1/s, velocity, time);
disp = lsim(1/(1+s/(2*pi*0.5)), velocity, time);