[WIP] Breaking Change - Use Update
Folder name is changed, rework the html templates Change the organisation.
This commit is contained in:
3
static-measurements/figs/.gitignore
vendored
3
static-measurements/figs/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
*.svg
|
||||
*.pdf
|
||||
*.tex
|
Binary file not shown.
Before Width: | Height: | Size: 110 KiB |
Binary file not shown.
Before Width: | Height: | Size: 62 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.4 MiB |
Binary file not shown.
Before Width: | Height: | Size: 3.5 MiB |
File diff suppressed because it is too large
Load Diff
@@ -1,142 +1,37 @@
|
||||
#+TITLE:Measurements
|
||||
:DRAWER:
|
||||
#+STARTUP: overview
|
||||
|
||||
#+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>
|
||||
|
||||
#+PROPERTY: header-args:matlab :session *MATLAB*
|
||||
#+PROPERTY: header-args:matlab+ :comments org
|
||||
#+PROPERTY: header-args:matlab+ :results output
|
||||
#+PROPERTY: header-args:matlab+ :exports both
|
||||
#+PROPERTY: header-args:matlab+ :eval no-export
|
||||
#+PROPERTY: header-args:matlab+ :output-dir figs
|
||||
:END:
|
||||
#+SETUPFILE: ../config.org
|
||||
|
||||
For all the measurements shown here:
|
||||
- geophones used are L22 with a resonance frequency of 1Hz
|
||||
- the signals are amplified with voltage amplifiers with a gain of 60dB
|
||||
- the voltage amplifiers include a low pass filter with a cut-off frequency at 1kHz
|
||||
|
||||
* Effect of the Slip-Ring on the signal
|
||||
** Experimental Setup
|
||||
Two measurements are made with the control systems of all the stages turned OFF.
|
||||
* Effect of all the control systems on the Sample vibrations
|
||||
:PROPERTIES:
|
||||
:header-args:matlab+: :tangle matlab/effect_control_all.m
|
||||
:header-args:matlab+: :comments org :mkdirp yes
|
||||
:END:
|
||||
<<sec:effect_control_all>>
|
||||
|
||||
One geophone is located on the marble while the other is located at the sample location (figure [[fig:setup_slipring]]).
|
||||
|
||||
#+name: fig:setup_slipring
|
||||
#+caption: Experimental Setup
|
||||
#+attr_html: :width 500px
|
||||
[[file:./img/IMG_20190430_112615.jpg]]
|
||||
|
||||
The two measurements are:
|
||||
| Measurement File | Description |
|
||||
|------------------+------------------------------------------------------------------|
|
||||
| =meas_008.mat= | Signal from the top geophone does not goes through the Slip-ring |
|
||||
| =meas_009.mat= | Signal goes through the Slip-ring (as shown on the figure above) |
|
||||
|
||||
Each of the measurement =mat= file contains one =data= array with 3 columns:
|
||||
| Column number | Description |
|
||||
|---------------+-------------------|
|
||||
| 1 | Geophone - Marble |
|
||||
| 2 | Geophone - Sample |
|
||||
| 3 | Time |
|
||||
|
||||
** Matlab Init :noexport:ignore:
|
||||
#+begin_src matlab :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||
<<matlab-init>>
|
||||
#+begin_src bash :exports none :results none
|
||||
if [ matlab/effect_control_all.m -nt data/effect_control_all.zip ]; then
|
||||
cp matlab/effect_control_all.m effect_control_all.m;
|
||||
zip data/effect_control_all \
|
||||
mat/data_003.mat \
|
||||
mat/data_004.mat \
|
||||
mat/data_005.mat \
|
||||
mat/data_006.mat \
|
||||
mat/data_007.mat \
|
||||
mat/data_008.mat \
|
||||
effect_control_all.m;
|
||||
rm effect_control_all.m;
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
** Load data
|
||||
We load the data of the z axis of two geophones.
|
||||
|
||||
#+begin_src matlab :results none
|
||||
d8 = load('mat/data_008.mat', 'data'); d8 = d8.data;
|
||||
d9 = load('mat/data_009.mat', 'data'); d9 = d9.data;
|
||||
#+end_src
|
||||
|
||||
** Analysis - Time Domain
|
||||
First, we compare the time domain signals for the two experiments (figure [[fig:slipring_time]]).
|
||||
|
||||
|
||||
#+begin_src matlab :results none
|
||||
figure;
|
||||
hold on;
|
||||
plot(d9(:, 3), d9(:, 2), 'DisplayName', 'Slip-Ring');
|
||||
plot(d8(:, 3), d8(:, 2), 'DisplayName', 'Wire');
|
||||
hold off;
|
||||
xlabel('Time [s]'); ylabel('Voltage [V]');
|
||||
xlim([0, 50]);
|
||||
legend('location', 'northeast');
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:slipring_time
|
||||
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/slipring_time.pdf" :var figsize="wide-tall" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:slipring_time
|
||||
#+CAPTION: Effect of the Slip-Ring on the measured signal - Time domain
|
||||
#+RESULTS: fig:slipring_time
|
||||
[[file:figs/slipring_time.png]]
|
||||
|
||||
** Analysis - Frequency Domain
|
||||
We then compute the Power Spectral Density of the two signals and we compare them (figure [[fig:slipring_asd]]).
|
||||
#+begin_src matlab :results none
|
||||
dt = d8(2, 3) - d8(1, 3);
|
||||
Fs = 1/dt;
|
||||
|
||||
win = hanning(ceil(1*Fs));
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :results none
|
||||
[pxx8, f] = pwelch(d8(:, 2), win, [], [], Fs);
|
||||
[pxx9, ~] = pwelch(d9(:, 2), win, [], [], Fs);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :results none
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(pxx9), 'DisplayName', 'Slip-Ring');
|
||||
plot(f, sqrt(pxx8), 'DisplayName', 'Wire');
|
||||
hold off;
|
||||
set(gca, 'xscale', 'log');
|
||||
set(gca, 'yscale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('Amplitude Spectral Density $\left[\frac{V}{\sqrt{Hz}}\right]$')
|
||||
xlim([1, 500]);
|
||||
legend('Location', 'southwest');
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:slipring_asd
|
||||
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/slipring_asd.pdf" :var figsize="wide-tall" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:slipring_asd
|
||||
#+CAPTION: Effect of the Slip-Ring on the measured signal - Frequency domain
|
||||
#+RESULTS: fig:slipring_asd
|
||||
[[file:figs/slipring_asd.png]]
|
||||
|
||||
** Conclusion
|
||||
#+begin_important
|
||||
- Connecting the geophone through the Slip-Ring seems to induce a lot of noise.
|
||||
#+end_important
|
||||
|
||||
#+begin_note
|
||||
*Remaining questions to answer*:
|
||||
- Why is there a sharp peak at 300Hz?
|
||||
- Why the use of the Slip-Ring does induce a noise?
|
||||
- Can the capacitive/inductive properties of the wires in the Slip-ring does not play well with the geophone? (resonant RLC circuit)
|
||||
All the files (data and Matlab scripts) are accessible [[file:data/effect_control_all.zip][here]].
|
||||
#+end_note
|
||||
|
||||
* Effect of all the control systems on the Sample vibrations
|
||||
** Experimental Setup
|
||||
We here measure the signals of two geophones:
|
||||
- One is located on top of the Sample platform
|
||||
@@ -166,7 +61,11 @@ Each of the =mat= file contains one array =data= with 3 columns:
|
||||
| 3 | Time |
|
||||
|
||||
** Matlab Init :noexport:ignore:
|
||||
#+begin_src matlab :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||
#+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
|
||||
|
||||
@@ -433,6 +332,31 @@ First, we compute the Power Spectral Density of the signals coming from the Geop
|
||||
#+end_note
|
||||
|
||||
* Effect of all the control systems on the Sample vibrations - One stage at a time
|
||||
:PROPERTIES:
|
||||
:header-args:matlab+: :tangle matlab/effect_control_one.m
|
||||
:header-args:matlab+: :comments org :mkdirp yes
|
||||
:END:
|
||||
<<sec:effect_control_one>>
|
||||
|
||||
#+begin_src bash :exports none :results none
|
||||
if [ matlab/effect_control_one.m -nt data/effect_control_one.zip ]; then
|
||||
cp matlab/effect_control_one.m effect_control_one.m;
|
||||
zip data/effect_control_one \
|
||||
mat/data_013.mat \
|
||||
mat/data_014.mat \
|
||||
mat/data_015.mat \
|
||||
mat/data_016.mat \
|
||||
mat/data_017.mat \
|
||||
mat/data_018.mat \
|
||||
effect_control_one.m
|
||||
rm effect_control_one.m;
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
#+begin_note
|
||||
All the files (data and Matlab scripts) are accessible [[file:data/effect_control_one.zip][here]].
|
||||
#+end_note
|
||||
|
||||
** Experimental Setup
|
||||
We here measure the signals of two geophones:
|
||||
- One is located on top of the Sample platform
|
||||
@@ -471,7 +395,11 @@ Each of the =mat= file contains one array =data= with 3 columns:
|
||||
[[file:./img/IMG_20190507_101459.jpg]]
|
||||
|
||||
** Matlab Init :noexport:ignore:
|
||||
#+begin_src matlab :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||
#+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
|
||||
|
||||
@@ -669,9 +597,30 @@ And we compare the Amplitude Spectral Densities (figures [[fig:psd_marble_comp_l
|
||||
#+begin_important
|
||||
- The Ty stage induces vibrations of the marble and at the sample location above 100Hz
|
||||
- The hexapod stage induces vibrations at the sample position above 220Hz
|
||||
#+end_note
|
||||
#+end_important
|
||||
|
||||
* Effect of the Symetrie Driver
|
||||
:PROPERTIES:
|
||||
:header-args:matlab+: :tangle matlab/effect_symetrie_driver.m
|
||||
:header-args:matlab+: :comments org :mkdirp yes
|
||||
:END:
|
||||
<<sec:effect_symetrie_driver>>
|
||||
|
||||
#+begin_src bash :exports none :results none
|
||||
if [ matlab/effect_symetrie_driver.m -nt data/effect_symetrie_driver.zip ]; then
|
||||
cp matlab/effect_symetrie_driver.m effect_symetrie_driver.m;
|
||||
zip data/effect_symetrie_driver \
|
||||
mat/data_018.mat \
|
||||
mat/data_019.mat \
|
||||
effect_symetrie_driver.m
|
||||
rm effect_symetrie_driver.m;
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
#+begin_note
|
||||
All the files (data and Matlab scripts) are accessible [[file:data/effect_symetrie_driver.zip][here]].
|
||||
#+end_note
|
||||
|
||||
** Experimental Setup
|
||||
We here measure the signals of two geophones:
|
||||
- One is located on top of the Sample platform
|
||||
@@ -702,7 +651,11 @@ Each of the =mat= file contains one array =data= with 3 columns:
|
||||
| 3 | Time |
|
||||
|
||||
** Matlab Init :noexport:ignore:
|
||||
#+begin_src matlab :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||
#+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
|
||||
|
||||
@@ -797,6 +750,28 @@ First, we compute the Power Spectral Density of the signals coming from the Geop
|
||||
#+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>>
|
||||
|
||||
#+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.
|
||||
@@ -869,7 +844,11 @@ The =data= array contains the following columns:
|
||||
[[file:./img/IMG_20190430_170425.jpg]]
|
||||
|
||||
** Matlab Init :noexport:ignore:
|
||||
#+begin_src matlab :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||
#+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
|
||||
|
||||
@@ -1067,7 +1046,11 @@ For each of the measurements, the data are:
|
||||
Measurements are 50s long.
|
||||
|
||||
** Matlab Init :noexport:ignore:
|
||||
#+begin_src matlab :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||
#+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
|
||||
|
||||
|
Binary file not shown.
173
static-measurements/matlab/effect_control_all.m
Normal file
173
static-measurements/matlab/effect_control_all.m
Normal file
@@ -0,0 +1,173 @@
|
||||
%% 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.
|
||||
|
||||
d3 = load('mat/data_003.mat', 'data'); d3 = d3.data;
|
||||
d4 = load('mat/data_004.mat', 'data'); d4 = d4.data;
|
||||
d5 = load('mat/data_005.mat', 'data'); d5 = d5.data;
|
||||
d6 = load('mat/data_006.mat', 'data'); d6 = d6.data;
|
||||
d7 = load('mat/data_007.mat', 'data'); d7 = d7.data;
|
||||
d8 = load('mat/data_008.mat', 'data'); d8 = d8.data;
|
||||
|
||||
% 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]])
|
||||
% - comparison for the geophone on the granite (figure [[fig:time_domain_marble]])
|
||||
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(d3(:, 3), d3(:, 2), 'DisplayName', 'All ON');
|
||||
plot(d4(:, 3), d4(:, 2), 'DisplayName', 'Ty OFF');
|
||||
plot(d5(:, 3), d5(:, 2), 'DisplayName', 'Ry OFF');
|
||||
plot(d6(:, 3), d6(:, 2), 'DisplayName', 'S-R OFF');
|
||||
plot(d7(:, 3), d7(:, 2), 'DisplayName', 'Rz OFF');
|
||||
plot(d8(:, 3), d8(:, 2), 'DisplayName', 'Hexa OFF');
|
||||
hold off;
|
||||
xlabel('Time [s]'); ylabel('Voltage [V]');
|
||||
xlim([0, 50]);
|
||||
legend('Location', 'bestoutside');
|
||||
|
||||
|
||||
|
||||
% #+NAME: fig:time_domain_sample
|
||||
% #+CAPTION: Comparison of the time domain data when turning off the control system of the stages - Geophone at the sample location
|
||||
% #+RESULTS: fig:time_domain_sample
|
||||
% [[file:figs/time_domain_sample.png]]
|
||||
|
||||
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(d3(:, 3), d3(:, 1), 'DisplayName', 'All ON');
|
||||
plot(d4(:, 3), d4(:, 1), 'DisplayName', 'Ty OFF');
|
||||
plot(d5(:, 3), d5(:, 1), 'DisplayName', 'Ry OFF');
|
||||
plot(d6(:, 3), d6(:, 1), 'DisplayName', 'S-R OFF');
|
||||
plot(d7(:, 3), d7(:, 1), 'DisplayName', 'Rz OFF');
|
||||
plot(d8(:, 3), d8(:, 1), 'DisplayName', 'Hexa OFF');
|
||||
hold off;
|
||||
xlabel('Time [s]'); ylabel('Voltage [V]');
|
||||
xlim([0, 50]);
|
||||
legend('Location', 'bestoutside');
|
||||
|
||||
% Analysis - Frequency Domain
|
||||
|
||||
dt = d3(2, 3) - d3(1, 3);
|
||||
|
||||
Fs = 1/dt;
|
||||
win = hanning(ceil(10*Fs));
|
||||
|
||||
% Vibrations at the sample location
|
||||
% First, we compute the Power Spectral Density of the signals coming from the Geophone located at the sample location.
|
||||
|
||||
[px3, f] = pwelch(d3(:, 2), win, [], [], Fs);
|
||||
[px4, ~] = pwelch(d4(:, 2), win, [], [], Fs);
|
||||
[px5, ~] = pwelch(d5(:, 2), win, [], [], Fs);
|
||||
[px6, ~] = pwelch(d6(:, 2), win, [], [], Fs);
|
||||
[px7, ~] = pwelch(d7(:, 2), win, [], [], Fs);
|
||||
[px8, ~] = pwelch(d8(:, 2), win, [], [], Fs);
|
||||
|
||||
|
||||
|
||||
% And we compare all the signals (figures [[fig:psd_sample_comp]] and [[fig:psd_sample_comp_high_freq]]).
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(px3), 'DisplayName', 'All ON');
|
||||
plot(f, sqrt(px4), 'DisplayName', 'Ty OFF');
|
||||
plot(f, sqrt(px5), 'DisplayName', 'Ry OFF');
|
||||
plot(f, sqrt(px6), 'DisplayName', 'S-R OFF');
|
||||
plot(f, sqrt(px7), 'DisplayName', 'Rz OFF');
|
||||
plot(f, sqrt(px8), 'DisplayName', 'Hexa OFF');
|
||||
hold off;
|
||||
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]);
|
||||
legend('Location', 'southwest');
|
||||
|
||||
% Vibrations on the marble
|
||||
% Now we plot the same curves for the geophone located on the marble.
|
||||
|
||||
[px3, f] = pwelch(d3(:, 1), win, [], [], Fs);
|
||||
[px4, ~] = pwelch(d4(:, 1), win, [], [], Fs);
|
||||
[px5, ~] = pwelch(d5(:, 1), win, [], [], Fs);
|
||||
[px6, ~] = pwelch(d6(:, 1), win, [], [], Fs);
|
||||
[px7, ~] = pwelch(d7(:, 1), win, [], [], Fs);
|
||||
[px8, ~] = pwelch(d8(:, 1), win, [], [], Fs);
|
||||
|
||||
|
||||
|
||||
% And we compare the Amplitude Spectral Densities (figures [[fig:psd_marble_comp]] and [[fig:psd_marble_comp_high_freq]])
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(px3), 'DisplayName', 'All ON');
|
||||
plot(f, sqrt(px4), 'DisplayName', 'Ty OFF');
|
||||
plot(f, sqrt(px5), 'DisplayName', 'Ry OFF');
|
||||
plot(f, sqrt(px6), 'DisplayName', 'S-R OFF');
|
||||
plot(f, sqrt(px7), 'DisplayName', 'Rz OFF');
|
||||
plot(f, sqrt(px8), 'DisplayName', 'Hexa OFF');
|
||||
hold off;
|
||||
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]);
|
||||
legend('Location', 'northeast');
|
||||
|
||||
% Effect of the control system on the transmissibility from ground to sample
|
||||
% As the feedback loops change the dynamics of the system, we should see differences on the transfer function from marble velocity to sample velocity when turning off the control systems (figure [[fig:trans_comp]]).
|
||||
|
||||
|
||||
dt = d3(2, 3) - d3(1, 3);
|
||||
|
||||
Fs = 1/dt;
|
||||
win = hanning(ceil(1*Fs));
|
||||
|
||||
|
||||
|
||||
% First, we compute the Power Spectral Density of the signals coming from the Geophone located at the sample location.
|
||||
|
||||
[T3, f] = tfestimate(d3(:, 1), d3(:, 2), win, [], [], Fs);
|
||||
[T4, ~] = tfestimate(d4(:, 1), d4(:, 2), win, [], [], Fs);
|
||||
[T5, ~] = tfestimate(d5(:, 1), d5(:, 2), win, [], [], Fs);
|
||||
[T6, ~] = tfestimate(d6(:, 1), d6(:, 2), win, [], [], Fs);
|
||||
[T7, ~] = tfestimate(d7(:, 1), d7(:, 2), win, [], [], Fs);
|
||||
[T8, ~] = tfestimate(d8(:, 1), d8(:, 2), win, [], [], Fs);
|
||||
|
||||
figure;
|
||||
ax1 = subplot(2, 1, 1);
|
||||
hold on;
|
||||
plot(f, abs(T3), 'DisplayName', 'All ON');
|
||||
plot(f, abs(T4), 'DisplayName', 'Ty OFF');
|
||||
plot(f, abs(T5), 'DisplayName', 'Ry OFF');
|
||||
plot(f, abs(T6), 'DisplayName', 'S-R OFF');
|
||||
plot(f, abs(T7), 'DisplayName', 'Rz OFF');
|
||||
plot(f, abs(T8), 'DisplayName', 'Hexa OFF');
|
||||
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(T3), 360)-180);
|
||||
plot(f, mod(180+180/pi*phase(T4), 360)-180);
|
||||
plot(f, mod(180+180/pi*phase(T5), 360)-180);
|
||||
plot(f, mod(180+180/pi*phase(T6), 360)-180);
|
||||
plot(f, mod(180+180/pi*phase(T7), 360)-180);
|
||||
plot(f, mod(180+180/pi*phase(T8), 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([1, 500]);
|
121
static-measurements/matlab/effect_control_one.m
Normal file
121
static-measurements/matlab/effect_control_one.m
Normal file
@@ -0,0 +1,121 @@
|
||||
%% 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.
|
||||
|
||||
d_of = load('mat/data_013.mat', 'data'); d_of = d_of.data;
|
||||
d_ty = load('mat/data_014.mat', 'data'); d_ty = d_ty.data;
|
||||
d_ry = load('mat/data_015.mat', 'data'); d_ry = d_ry.data;
|
||||
d_sr = load('mat/data_016.mat', 'data'); d_sr = d_sr.data;
|
||||
d_rz = load('mat/data_017.mat', 'data'); d_rz = d_rz.data;
|
||||
d_he = load('mat/data_018.mat', 'data'); d_he = d_he.data;
|
||||
|
||||
% 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]])
|
||||
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
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]');
|
||||
xlim([0, 50]);
|
||||
legend('Location', 'bestoutside');
|
||||
|
||||
|
||||
|
||||
% #+NAME: fig:time_domain_sample_lpf
|
||||
% #+CAPTION: Comparison of the time domain data when turning off the control system of the stages - Geophone at the sample location
|
||||
% #+RESULTS: fig:time_domain_sample_lpf
|
||||
% [[file:figs/time_domain_sample_lpf.png]]
|
||||
|
||||
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(d_of(:, 3), d_of(:, 1), 'DisplayName', 'All OFF');
|
||||
plot(d_ty(:, 3), d_ty(:, 1), 'DisplayName', 'Ty ON');
|
||||
plot(d_ry(:, 3), d_ry(:, 1), 'DisplayName', 'Ry ON');
|
||||
plot(d_sr(:, 3), d_sr(:, 1), 'DisplayName', 'S-R ON');
|
||||
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]');
|
||||
xlim([0, 50]);
|
||||
legend('Location', 'bestoutside');
|
||||
|
||||
% Analysis - Frequency Domain
|
||||
|
||||
dt = d_of(2, 3) - d_of(1, 3);
|
||||
|
||||
Fs = 1/dt;
|
||||
win = hanning(ceil(10*Fs));
|
||||
|
||||
% Vibrations at the sample location
|
||||
% First, we compute the Power Spectral Density of the signals coming from the Geophone located at the sample location.
|
||||
|
||||
[px_of, f] = pwelch(d_of(:, 2), win, [], [], Fs);
|
||||
[px_ty, ~] = pwelch(d_ty(:, 2), win, [], [], Fs);
|
||||
[px_ry, ~] = pwelch(d_ry(:, 2), win, [], [], Fs);
|
||||
[px_sr, ~] = pwelch(d_sr(:, 2), win, [], [], Fs);
|
||||
[px_rz, ~] = pwelch(d_rz(:, 2), win, [], [], Fs);
|
||||
[px_he, ~] = pwelch(d_he(:, 2), win, [], [], Fs);
|
||||
|
||||
|
||||
|
||||
% And we compare all the signals (figures [[fig:psd_sample_comp_lpf]] and [[fig:psd_sample_comp_high_freq_lpf]]).
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(px_of), 'DisplayName', 'All OFF');
|
||||
plot(f, sqrt(px_ty), 'DisplayName', 'Ty ON');
|
||||
plot(f, sqrt(px_ry), 'DisplayName', 'Ry ON');
|
||||
plot(f, sqrt(px_sr), 'DisplayName', 'S-R ON');
|
||||
plot(f, sqrt(px_rz), 'DisplayName', 'Rz ON');
|
||||
plot(f, sqrt(px_he), 'DisplayName', 'Hexa ON');
|
||||
hold off;
|
||||
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]);
|
||||
legend('Location', 'southwest');
|
||||
|
||||
% Vibrations on the marble
|
||||
% Now we plot the same curves for the geophone located on the marble.
|
||||
|
||||
[px_of, f] = pwelch(d_of(:, 1), win, [], [], Fs);
|
||||
[px_ty, ~] = pwelch(d_ty(:, 1), win, [], [], Fs);
|
||||
[px_ry, ~] = pwelch(d_ry(:, 1), win, [], [], Fs);
|
||||
[px_sr, ~] = pwelch(d_sr(:, 1), win, [], [], Fs);
|
||||
[px_rz, ~] = pwelch(d_rz(:, 1), win, [], [], Fs);
|
||||
[px_he, ~] = pwelch(d_he(:, 1), win, [], [], Fs);
|
||||
|
||||
|
||||
|
||||
% And we compare the Amplitude Spectral Densities (figures [[fig:psd_marble_comp_lpf]] and [[fig:psd_marble_comp_lpf_high_freq]])
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(px_of), 'DisplayName', 'All OFF');
|
||||
plot(f, sqrt(px_ty), 'DisplayName', 'Ty ON');
|
||||
plot(f, sqrt(px_ry), 'DisplayName', 'Ry ON');
|
||||
plot(f, sqrt(px_sr), 'DisplayName', 'S-R ON');
|
||||
plot(f, sqrt(px_rz), 'DisplayName', 'Rz ON');
|
||||
plot(f, sqrt(px_he), 'DisplayName', 'Hexa ON');
|
||||
hold off;
|
||||
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]);
|
||||
legend('Location', 'northeast');
|
46
static-measurements/matlab/effect_symetrie_driver.m
Normal file
46
static-measurements/matlab/effect_symetrie_driver.m
Normal file
@@ -0,0 +1,46 @@
|
||||
%% 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.
|
||||
|
||||
d_18 = load('mat/data_018.mat', 'data'); d_18 = d_18.data;
|
||||
d_19 = load('mat/data_019.mat', 'data'); d_19 = d_19.data;
|
||||
|
||||
% Analysis - Time Domain
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(d_19(:, 3), d_19(:, 1), 'DisplayName', 'Driver - Ground');
|
||||
plot(d_18(:, 3), d_18(:, 1), 'DisplayName', 'Driver - Granite');
|
||||
hold off;
|
||||
xlabel('Time [s]'); ylabel('Voltage [V]');
|
||||
xlim([0, 50]);
|
||||
legend('Location', 'bestoutside');
|
||||
|
||||
% Analysis - Frequency Domain
|
||||
|
||||
dt = d_18(2, 3) - d_18(1, 3);
|
||||
|
||||
Fs = 1/dt;
|
||||
win = hanning(ceil(10*Fs));
|
||||
|
||||
% Vibrations at the sample location
|
||||
% First, we compute the Power Spectral Density of the signals coming from the Geophone located at the sample location.
|
||||
|
||||
[px_18, f] = pwelch(d_18(:, 1), win, [], [], Fs);
|
||||
[px_19, ~] = pwelch(d_19(:, 1), win, [], [], Fs);
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(px_19), 'DisplayName', 'Driver - Ground');
|
||||
plot(f, sqrt(px_18), 'DisplayName', 'Driver - Granite');
|
||||
hold off;
|
||||
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]);
|
||||
legend('Location', 'southwest');
|
124
static-measurements/matlab/tf_stages_geophone.m
Normal file
124
static-measurements/matlab/tf_stages_geophone.m
Normal 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.
@@ -1,24 +0,0 @@
|
||||
tg = slrt;
|
||||
|
||||
%% TODO - Build this application if updated
|
||||
|
||||
%%
|
||||
if tg.Connected == "Yes"
|
||||
if tg.Status == "running"
|
||||
disp('Target is Running, Stopping...');
|
||||
tg.stop;
|
||||
while tg.Status == "running"
|
||||
pause(1);
|
||||
end
|
||||
disp('Target is Stopped');
|
||||
end
|
||||
if tg.Status == "stopped"
|
||||
disp('Load the Application');
|
||||
tg.load('measure_channels');
|
||||
|
||||
%% Run the application
|
||||
disp('Starting the Application');
|
||||
tg.start;
|
||||
slrtexplr;
|
||||
end
|
||||
end
|
@@ -1,52 +0,0 @@
|
||||
%%
|
||||
Tsim = 500; % [s]
|
||||
|
||||
%%
|
||||
tg = slrt;
|
||||
|
||||
%% TODO - Build this application if updated
|
||||
|
||||
%%
|
||||
if tg.Connected == "Yes"
|
||||
if tg.Status == "running"
|
||||
disp('Target is Running, Stopping...');
|
||||
tg.stop;
|
||||
while tg.Status == "running"
|
||||
pause(1);
|
||||
end
|
||||
disp('Target is Stopped');
|
||||
end
|
||||
if tg.Status == "stopped"
|
||||
disp('Load the Application');
|
||||
tg.load('measure_channels');
|
||||
|
||||
%% Run the application
|
||||
disp('Starting the Application');
|
||||
tg.start;
|
||||
pause(Tsim);
|
||||
tg.stop;
|
||||
end
|
||||
end
|
||||
|
||||
%%
|
||||
f = SimulinkRealTime.openFTP(tg);
|
||||
cd(f, 'data/measure_channels/');
|
||||
mget(f, 'data_001.dat', 'data');
|
||||
close(f);
|
||||
|
||||
%%
|
||||
data = SimulinkRealTime.utils.getFileScopeData('data/data_001.dat').data;
|
||||
|
||||
%%
|
||||
n = 012;
|
||||
|
||||
while isfile(['mat/data_', num2str(n, '%03d'), '.mat'])
|
||||
disp('File exists.');
|
||||
if input(['Are you sure you want to override the file ', 'mat/data_', ...
|
||||
num2str(n, '%03d'), '.mat', ' ? [Y/n]']) == 'Y'
|
||||
break;
|
||||
end
|
||||
n = input('What should be the measurement number?');
|
||||
end
|
||||
|
||||
save(['mat/data_', num2str(n, '%03d'), '.mat'], 'data');
|
@@ -1,53 +0,0 @@
|
||||
%%
|
||||
Tsim = 100; % [s]
|
||||
|
||||
%%
|
||||
tg = slrt;
|
||||
|
||||
%% TODO - Build this application if updated
|
||||
|
||||
%%
|
||||
if tg.Connected == "Yes"
|
||||
if tg.Status == "running"
|
||||
disp('Target is Running, Stopping...');
|
||||
tg.stop;
|
||||
while tg.Status == "running"
|
||||
pause(1);
|
||||
end
|
||||
disp('Target is Stopped');
|
||||
end
|
||||
if tg.Status == "stopped"
|
||||
disp('Load the Application');
|
||||
tg.load('measure_channels');
|
||||
|
||||
%% Run the application
|
||||
disp('Starting the Application');
|
||||
tg.start;
|
||||
pause(Tsim);
|
||||
tg.stop;
|
||||
end
|
||||
else
|
||||
error("The target computer is not connected");
|
||||
end
|
||||
|
||||
%%
|
||||
f = SimulinkRealTime.openFTP(tg);
|
||||
cd(f, 'data/measure_channels/');
|
||||
mget(f, 'data_001.dat', 'data');
|
||||
close(f);
|
||||
|
||||
data = SimulinkRealTime.utils.getFileScopeData('data/data_001.dat').data;
|
||||
|
||||
%%
|
||||
n = 19;
|
||||
|
||||
while isfile(['mat/data_', num2str(n, '%03d'), '.mat'])
|
||||
disp('File exists.');
|
||||
if input(['Are you sure you want to override the file ', 'mat/data_', ...
|
||||
num2str(n, '%03d'), '.mat', ' ? [Y/n]']) == 'Y'
|
||||
break;
|
||||
end
|
||||
n = input('What should be the measurement number?');
|
||||
end
|
||||
|
||||
save(['mat/data_', num2str(n, '%03d'), '.mat'], 'data');
|
Reference in New Issue
Block a user