2019-03-14 16:40:28 +01:00
|
|
|
#+TITLE: Measurements made by Marc Lessourd on the 17th of November 2017 - Matlab
|
2019-07-05 11:40:22 +02:00
|
|
|
:DRAWER:
|
2019-03-14 16:40:28 +01:00
|
|
|
#+LATEX_CLASS: cleanreport
|
|
|
|
#+LaTeX_CLASS_OPTIONS: [tocnp, secbreak, minted]
|
|
|
|
#+STARTUP: overview
|
2019-07-05 11:40:22 +02:00
|
|
|
|
2019-03-14 16:40:28 +01:00
|
|
|
#+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:
|
|
|
|
|
|
|
|
* Load the data
|
|
|
|
#+begin_src matlab :exports code :results none
|
|
|
|
load('./raw_data/id31_microstation_2017_11_17_coh.mat',...
|
|
|
|
'coh_hexa_x',...
|
|
|
|
'coh_hexa_y',...
|
|
|
|
'coh_hexa_z',...
|
|
|
|
'coh_marble_x',...
|
|
|
|
'coh_marble_y',...
|
|
|
|
'coh_marble_z');
|
|
|
|
load('./raw_data/id31_microstation_2017_11_17_frf.mat',...
|
|
|
|
'freq_frf',...
|
|
|
|
'frf_hexa_x',...
|
|
|
|
'frf_hexa_y',...
|
|
|
|
'frf_hexa_z',...
|
|
|
|
'frf_marble_x',...
|
|
|
|
'frf_marble_y',...
|
|
|
|
'frf_marble_z');
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
Measurement is in V?
|
|
|
|
#+begin_src matlab :results none
|
|
|
|
accel_sensitivity = 0.102; % [V/(m/s2)]
|
|
|
|
w = j*2*pi*freq_frf;
|
|
|
|
|
|
|
|
frf_hexa_x = 1/accel_sensitivity*frf_hexa_x./(w.^2);
|
|
|
|
frf_hexa_y = -1/accel_sensitivity*frf_hexa_y./(w.^2);
|
|
|
|
frf_hexa_z = -1/accel_sensitivity*frf_hexa_z./(w.^2);
|
|
|
|
|
|
|
|
frf_marble_x = 1/accel_sensitivity*frf_marble_x./(w.^2);
|
|
|
|
frf_marble_y = 1/accel_sensitivity*frf_marble_y./(w.^2);
|
|
|
|
frf_marble_z = -1/accel_sensitivity*frf_marble_z./(w.^2);
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
* Plots
|
|
|
|
#+begin_src matlab :exports none :results none
|
|
|
|
figure;
|
|
|
|
hold on;
|
|
|
|
plot(freq_frf, abs(frf_hexa_x(:, 2)), 'DisplayName', 'Marble - X');
|
|
|
|
plot(freq_frf, abs(frf_hexa_x(:, 5)), 'DisplayName', 'Ty - X');
|
|
|
|
plot(freq_frf, abs(frf_hexa_x(:, 8)), 'DisplayName', 'Ry - X');
|
|
|
|
plot(freq_frf, abs(frf_hexa_x(:, 11)), 'DisplayName', 'Hexa - X');
|
|
|
|
hold off;
|
|
|
|
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
|
|
|
xlim([20, 200]);
|
|
|
|
legend('Location', 'northeast');
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src matlab :exports none :results none
|
|
|
|
figure;
|
|
|
|
hold on;
|
|
|
|
plot(freq_frf, abs(frf_hexa_x(:, 2)), 'DisplayName', 'Marble - X');
|
|
|
|
plot(freq_frf, abs(frf_hexa_x(:, 5)), 'DisplayName', 'Ty - X');
|
|
|
|
plot(freq_frf, abs(frf_hexa_x(:, 8)), 'DisplayName', 'Ry - X');
|
|
|
|
plot(freq_frf, abs(frf_hexa_x(:, 11)), 'DisplayName', 'Hexa - X');
|
|
|
|
hold off;
|
|
|
|
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
|
|
|
xlim([20, 200]);
|
|
|
|
legend('Location', 'northeast');
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src matlab :exports none :results none
|
|
|
|
channel = 12;
|
|
|
|
|
|
|
|
figure;
|
2019-07-05 11:40:22 +02:00
|
|
|
ax1 = subplot(3,1,1);
|
2019-03-14 16:40:28 +01:00
|
|
|
plot(freq_frf, abs(frf_hexa_y(:, channel)))
|
|
|
|
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
|
|
|
|
2019-07-05 11:40:22 +02:00
|
|
|
ax2 = subplot(3,1,2);
|
2019-03-14 16:40:28 +01:00
|
|
|
plot(freq_frf, mod(180/pi*phase(frf_hexa_y(:, channel))+180, 360)-180)
|
|
|
|
set(gca, 'Xscale', 'log');
|
|
|
|
ylim([-180 180]);
|
|
|
|
yticks([-180:90:180]);
|
|
|
|
|
2019-07-05 11:40:22 +02:00
|
|
|
ax3 = subplot(3,1,3);
|
2019-03-14 16:40:28 +01:00
|
|
|
plot(freq_frf, coh_hexa_y(:, channel))
|
|
|
|
set(gca, 'Xscale', 'log');
|
|
|
|
|
|
|
|
linkaxes([ax1,ax2,ax3],'x');
|
|
|
|
xlim([20, 200]);
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
#+begin_src matlab :exports none :results none
|
|
|
|
figure;
|
2019-07-05 11:40:22 +02:00
|
|
|
ax1 = subplot(2,1,1);
|
2019-03-14 16:40:28 +01:00
|
|
|
plot(freq_frf, abs(frf_marble_z(:, 4)))
|
|
|
|
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log')
|
2019-07-05 11:40:22 +02:00
|
|
|
ax2 = subplot(2,1,2);
|
2019-03-14 16:40:28 +01:00
|
|
|
plot(freq_frf, mod(180/pi*phase(frf_marble_z(:, 4))+180, 360)-180)
|
|
|
|
linkaxes([ax1,ax2],'x');
|
|
|
|
ylim([-180 180]);
|
|
|
|
yticks([-180:90:180]);
|
|
|
|
set(gca, 'Xscale', 'log')
|
|
|
|
xlim([20, 200])
|
|
|
|
#+end_src
|