Add every computation files and data

This commit is contained in:
2019-03-14 16:40:28 +01:00
parent 3929373a9d
commit c2aa389536
423 changed files with 2233847 additions and 0 deletions

View File

@@ -0,0 +1,112 @@
#+TITLE: Measurements made by Marc Lessourd on the 17th of November 2017 - Matlab
:drawer:
#+LATEX_CLASS: cleanreport
#+LaTeX_CLASS_OPTIONS: [tocnp, secbreak, minted]
#+STARTUP: overview
#+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;
ax1 = subaxis(3,1,1);
plot(freq_frf, abs(frf_hexa_y(:, channel)))
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
ax2 = subaxis(3,1,2);
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]);
ax3 = subaxis(3,1,3);
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;
ax1 = subaxis(2,1,1);
plot(freq_frf, abs(frf_marble_z(:, 4)))
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log')
ax2 = subaxis(2,1,2);
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

View File

@@ -0,0 +1,53 @@
%%
clear;
close all;
clc
%% Coherence
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');
%% Save Coherence data
save('../data/id31_microstation_2017_11_17_coh.mat', ...
'coh_marble_x', ...
'coh_hexa_x', ...
'coh_marble_y', ...
'coh_hexa_y', ...
'coh_marble_z', ...
'coh_hexa_z');
%% Frequency Response
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');
force_factor = 1;
accel_factor = 1000;
scale_factor = accel_factor/force_factor;
frf_hexa_x = scale_factor*frf_hexa_x;
frf_hexa_y = -scale_factor*frf_hexa_y;
frf_hexa_z = -scale_factor*frf_hexa_z;
frf_marble_x = scale_factor*frf_marble_x;
frf_marble_y = scale_factor*frf_marble_y;
frf_marble_z = -scale_factor*frf_marble_z;
%% Save Frequency Response Data
save('../data/id31_microstation_2017_11_17_frf.mat', ...
'freq_frf', ...
'frf_marble_x', ...
'frf_hexa_x', ...
'frf_marble_y', ...
'frf_hexa_y', ...
'frf_marble_z', ...
'frf_hexa_z');

View File

@@ -0,0 +1,182 @@
ground = struct(...
'full_name', 'Ground',...
'short_name', 'ground',...
'letter', 'g',...
'above_of', '',...
'bellow_of', 'marble',...
'tx', struct(...
'isMeasured', false, ...
'isExcited', false, ...
'id', 0 ...
),...
'ty', struct(...
'isMeasured', false, ...
'isExcited', false, ...
'id', 0 ...
),...
'tz', struct(...
'isMeasured', false, ...
'isExcited', false, ...
'id', 0 ...
)...
);
marble = struct(...
'full_name', 'Marble',...
'short_name', 'marble',...
'letter', 'm',...
'above_of', 'ground',...
'bellow_of', 'trans_stage',...
'tx', struct(...
'isMeasured', true, ...
'isExcited', true, ...
'id', 2 ...
),...
'ty', struct(...
'isMeasured', true, ...
'isExcited', true, ...
'id', 3 ...
),...
'tz', struct(...
'isMeasured', true, ...
'isExcited', true, ...
'id', 4 ...
)...
);
trans_stage = struct(...
'full_name', 'Translation Stage',...
'short_name', 'trans_stage',...
'letter', 't',...
'above_of', 'marble',...
'bellow_of', 'tilt_stage',...
'tx', struct(...
'isMeasured', true, ...
'isExcited', false, ...
'id', 5 ...
),...
'ty', struct(...
'isMeasured', true, ...
'isExcited', false, ...
'id', 6 ...
),...
'tz', struct(...
'isMeasured', true, ...
'isExcited', false, ...
'id', 7 ...
)...
);
tilt_stage = struct(...
'full_name', 'Tilt Stage',...
'short_name', 'tilt_stage',...
'letter', 'o',...
'above_of', 'trans_stage',...
'bellow_of', 'hexa',...
'tx', struct(...
'isMeasured', true, ...
'isExcited', false, ...
'id', 8 ...
),...
'ty', struct(...
'isMeasured', true, ...
'isExcited', false, ...
'id', 9 ...
),...
'tz', struct(...
'isMeasured', true, ...
'isExcited', false, ...
'id', 10 ...
)...
);
hexa = struct(...
'full_name', 'Hexapod',...
'short_name', 'hexa',...
'letter', 'h',...
'above_of', 'tilt_stage',...
'bellow_of', 'nano_stage',...
'tx', struct(...
'isMeasured', true, ...
'isExcited', true, ...
'id', 11 ...
),...
'ty', struct(...
'isMeasured', true, ...
'isExcited', true, ...
'id', 12 ...
),...
'tz', struct(...
'isMeasured', true, ...
'isExcited', true, ...
'id', 13 ...
)...
);
nano_stage = struct(...
'full_name', 'Nano Stage',...
'short_name', 'nano_stage',...
'letter', 'n',...
'above_of', 'hexa',...
'bellow_of', 'sample',...
'tx', struct(...
'isMeasured', false, ...
'isExcited', false, ...
'id', 0 ...
),...
'ty', struct(...
'isMeasured', false, ...
'isExcited', false, ...
'id', 0 ...
),...
'tz', struct(...
'isMeasured', false, ...
'isExcited', false, ...
'id', 0 ...
)...
);
sample = struct(...
'full_name', 'Sample',...
'short_name', 'sample',...
'letter', 's',...
'above_of', 'nano_stage',...
'bellow_of', '',...
'tx', struct(...
'isMeasured', false, ...
'isExcited', false, ...
'id', 0 ...
),...
'ty', struct(...
'isMeasured', false, ...
'isExcited', false, ...
'id', 0 ...
),...
'tz', struct(...
'isMeasured', false, ...
'isExcited', false, ...
'id', 0 ...
)...
);
%%
elements = struct(...
'ground', ground,...
'marble', marble,...
'trans_stage', trans_stage,...
'tilt_stage', tilt_stage,...
'hexa', hexa,...
'nano_stage', nano_stage,...
'sample', sample ...
);
%% Where is located the data files generated by export_measure_data script
files = struct(...
'frf', 'id31_microstation_2017_11_17_frf.mat',...
'coh', 'id31_microstation_2017_11_17_coh.mat' ...
);
%%
m_object = struct(...
'files', files,...
'elements', elements,...
'quantity', 'acceleration', ...
'notes', 'Mesures du 17/11/2017 par Marc Lessourd - Accelerometers' ...
);
%% Save m_object
save('../data/2017_11_17.mat', 'm_object')