2021-06-07 19:00:29 +02:00
|
|
|
% =frf_save.m= - Save Data
|
|
|
|
% :PROPERTIES:
|
|
|
|
% :header-args: :tangle matlab/frf_save.m
|
|
|
|
% :END:
|
|
|
|
|
|
|
|
% First, we get data from the Speedgoat:
|
|
|
|
|
|
|
|
tg = slrt;
|
|
|
|
|
|
|
|
f = SimulinkRealTime.openFTP(tg);
|
|
|
|
mget(f, 'data/data.dat');
|
|
|
|
close(f);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
% And we load the data on the Workspace:
|
|
|
|
|
|
|
|
data = SimulinkRealTime.utils.getFileScopeData('data/data.dat').data;
|
|
|
|
|
2021-06-08 16:51:38 +02:00
|
|
|
de = data(:, 1:6); % Measurment displacement (encoder) [m]
|
|
|
|
Vs = data(:, 7:12); % Measured voltage (force sensor) [V]
|
2021-06-10 14:17:06 +02:00
|
|
|
u = data(:, 13:18); % DAC Voltage (command) [V]
|
|
|
|
Vexc = data(:, 19); % Excitation Voltage [V]
|
2021-06-07 19:00:29 +02:00
|
|
|
t = data(:, end); % Time [s]
|
|
|
|
|
|
|
|
|
|
|
|
% And we save this to a =mat= file:
|
2021-06-08 17:31:16 +02:00
|
|
|
strut_number = 6;
|
2021-06-07 19:00:29 +02:00
|
|
|
|
2021-06-10 14:17:06 +02:00
|
|
|
save(sprintf('mat/iff_strut_%i_noise_g_400.mat', strut_number), 't', 'u', 'Vs', 'Vexc', 'de');
|
|
|
|
% save(sprintf('mat/frf_data_exc_strut_%i_noise_lf.mat', strut_number), 't', 'u', 'Vs', 'de');
|
|
|
|
% save(sprintf('mat/frf_data_exc_strut_%i_sweep.mat', strut_number), 't', 'u', 'Vs', 'de');
|
|
|
|
% save(sprintf('mat/iff_strut_%i_noise_hf.mat', strut_number), 't', 'u', 'Vs', 'de');
|
|
|
|
% save(sprintf('mat/frf_data_exc_strut_%i_add_mass_closed_circuit.mat', strut_number), 't', 'u', 'Vs', 'de');
|