test-bench-pd200/matlab/run_test.m

31 lines
717 B
Mathematica
Raw Normal View History

2021-01-19 17:16:05 +01:00
%%
tg = slrt;
f = SimulinkRealTime.openFTP(tg);
mget(f, 'data/data.dat');
close(f);
%% Convert the Data
data = SimulinkRealTime.utils.getFileScopeData('data/data.dat').data;
2021-01-22 11:34:24 +01:00
Vin = data(:, 1);
Vout = data(:, 2);
2021-01-19 17:16:05 +01:00
t = data(:, end);
%% Notes
2021-01-21 17:54:20 +01:00
pre_amp = struct('coupling', 'DC A', ...
'gain', 50000, ...
2021-01-21 11:15:32 +01:00
'LPF', '6dB 0.1Hz', ...
2021-01-21 17:54:20 +01:00
'input', 'SSI2V (20bits, +/- 10V)', ...
2021-01-21 11:15:32 +01:00
'HPF', '6dB 30kHz');
2021-01-19 17:16:05 +01:00
2021-01-21 14:54:44 +01:00
pd200 = struct('input', 'DAC', ...
2021-01-22 11:34:24 +01:00
'signal', 'sweep sine 0.1V 1Hz-5kHz', ...
'f_max', f1, ...
2021-01-21 11:15:32 +01:00
'load', '3 uF');
2021-01-19 17:16:05 +01:00
2021-01-22 11:34:24 +01:00
notes = struct('pd200', pd200);
2021-01-19 17:16:05 +01:00
%% Save
save('mat/tf_pd200_7_0_1V.mat', 't', 'Vin', 'Vout', 'notes');