add Simulink file

This commit is contained in:
Thomas Dehaeze 2021-02-16 11:32:23 +01:00
parent 1435f92167
commit d7116e94ee
5 changed files with 26 additions and 0 deletions

4
matlab/analysis.m Normal file
View File

@ -0,0 +1,4 @@
figure;
plot(F, d);
xlabel('Measured Force [N]');
ylabel('Measured Displacement [um]');

View File

@ -0,0 +1,16 @@
%%
tg = slrt;
f = SimulinkRealTime.openFTP(tg);
mget(f, 'data/data.dat');
close(f);
%% Convert the Data
data = SimulinkRealTime.utils.getFileScopeData('data/data.dat').data;
d = data(:, 1);
F = data(:, 2);
t = data(:, end);
%% Save
save('mat/flex_1_x.mat', 't', 'd', 'F');

View File

@ -0,0 +1,6 @@
Fs = 20e3; % [Hz]
Ts = 1/Fs; % [s]
%% Gains
Gf = 10; % [N/V]
Gd = 10e-6; % [m/V]

Binary file not shown.

Binary file not shown.