2021-06-07 19:00:29 +02:00
|
|
|
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-07-01 17:45:57 +02:00
|
|
|
de = data(:, 1:6); % Measurment displacement (encoder) [m]
|
|
|
|
Vs = data(:, 7:12); % Force Sensor [V]
|
|
|
|
u = data(:, 13:18); % Control Output [V]
|
|
|
|
Va = data(:, 19); % Excitation Signal [V]
|
|
|
|
t = data(:, end); % Time [s]
|
|
|
|
|
|
|
|
% strut_num = 6;
|
|
|
|
% save(sprintf('mat/frf_exc_iff_strut_%i_enc_plates_noise.mat', strut_num), 't', 'de', 'Vs', 'u', 'Va');
|
|
|
|
|
|
|
|
save('mat/hac_iff_more_lead_nass_scan', 't', 'de', 'Vs', 'u', 'Va');
|
2021-06-07 19:00:29 +02:00
|
|
|
|
2021-07-01 17:45:57 +02:00
|
|
|
%%
|
|
|
|
load('mat/jacobian.mat', 'J');
|
2021-06-07 19:00:29 +02:00
|
|
|
|
2021-07-01 17:45:57 +02:00
|
|
|
X = inv(J)*de';
|
|
|
|
X = X';
|
2021-06-07 19:00:29 +02:00
|
|
|
|
2021-07-01 17:45:57 +02:00
|
|
|
%%
|
|
|
|
figure;
|
|
|
|
plot3(X(:,1), X(:,2), X(:,3))
|