nass-micro-station-measurem.../Ground Motion/index.org

122 lines
3.9 KiB
Org Mode

#+TITLE: Ground Motion 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: <script src="../js/jquery.min.js"></script>
#+HTML_HEAD: <script src="../js/bootstrap.min.js"></script>
#+HTML_HEAD: <script src="../js/jquery.stickytableheaders.min.js"></script>
#+HTML_HEAD: <script src="../js/readtheorg.js"></script>
#+LATEX_CLASS: cleanreport
#+LaTeX_CLASS_OPTIONS: [tocnp, secbreak, minted]
#+PROPERTY: header-args:matlab :session *MATLAB*
#+PROPERTY: header-args:matlab+ :comments org
#+PROPERTY: header-args:matlab+ :exports both
#+PROPERTY: header-args:matlab+ :eval no-export
#+PROPERTY: header-args:matlab+ :noweb yes
#+PROPERTY: header-args:matlab+ :mkdirp yes
#+PROPERTY: header-args:matlab+ :output-dir figs
:end:
#+begin_src matlab :exports none :results silent
<<matlab-init>>
#+end_src
* Preprocessing of id31 ground motion measurement
#+begin_src matlab :exports code :results silent
data = table2array(readtable('./data/id31_camac_floor_PSD_october2014.txt'));
#+end_src
The first column is the frequency vector in Hz.
#+begin_src matlab :exports code :results silent
gm.freqs = data(:, 1);
#+end_src
The other colmns are the PSD of the ground velocity in $\frac{(\mu m/s)^2}{Hz}$ for the x,y,z axis.
It is converted to $\frac{(m/s)^2}{Hz}$.
#+begin_src matlab :exports code :results silent
gm.psd_vx = 1e-12*data(:, 2);
gm.psd_vy = 1e-12*data(:, 3);
gm.psd_vz = 1e-12*data(:, 4);
#+end_src
Finally, we integrate the signal to obtain the power spectral density of the ground displacement.
#+begin_src matlab :results silent
gm.psd_dx = gm.psd_vx./(2*pi*gm.freqs);
gm.psd_dy = gm.psd_vy./(2*pi*gm.freqs);
gm.psd_dz = gm.psd_vz./(2*pi*gm.freqs);
#+end_src
The pre-processed data are saved.
#+begin_src matlab :results silent
save('./data/gm_esrf.mat', 'gm');
#+end_src
* Plots
We load measurements made:
- at ID31
- at ID09
- at CERN
#+begin_src matlab :results silent
id31 = load('./data/ground_motion_psd.mat');
id09 = load('./data/id09_floor_september2018.mat');
cern = load('./data/ground_motion_dist.mat');
#+end_src
** ID09 Measurements - Time Domain
#+begin_src matlab :results silent
figure;
hold on;
plot(id09.time3, 1e-6*id09.x_y_z(:, 1), 'DisplayName', 'dx');
plot(id09.time3, 1e-6*id09.x_y_z(:, 2), 'DisplayName', 'dy');
plot(id09.time3, 1e-6*id09.x_y_z(:, 3), 'DisplayName', 'dz');
hold off;
xlabel('Time [s]'); ylabel('Velocity [$m/s$]');
legend();
#+end_src
#+NAME: fig:id09_time_domain
#+HEADER: :tangle no :exports results :results raw :noweb yes
#+begin_src matlab :var filepath="figs/id09_time_domain.pdf" :var figsize="wide-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:id09_time_domain
#+CAPTION: Time domain data - ID09
#+RESULTS: fig:id09_time_domain
[[file:figs/id09_time_domain.png]]
** Compute PSD of ID09 ground motion
#+begin_src matlab :results silent
[id09_pxx, id09_f] = pwelch(1e-6*id09.x_y_z(:, 1), hanning(ceil(length(1e-6*id09.x_y_z(:, 1))/10)), 0, [], 1/(id09.time3(end)/(length(id09.time3) - 1)));
#+end_src
** Compare PSD of Cern, ID09 and ID31
#+begin_src matlab :results silent
figure;
hold on;
plot(cern.gm.freq, cern.gm.psd, 'DisplayName', 'CERN');
plot(id31.freqs, id31.psd_dx, 'DisplayName', 'ID31');
plot(id09_f, id09_pxx, 'DisplayName', 'ID09');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m^2/Hz$]');
legend('Location', 'northeast');
#+end_src
#+NAME: fig:psd_comparison
#+HEADER: :tangle no :exports results :results raw :noweb yes
#+begin_src matlab :var filepath="figs/psd_comparison.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:psd_comparison
#+CAPTION: Comparison of the PSD of ground motion
#+RESULTS: fig:psd_comparison
[[file:figs/psd_comparison.png]]