Rework simulink to have more logical arangment

Redo the huddle test and identification on uv and uh
This commit is contained in:
Thomas Dehaeze 2019-09-12 16:12:01 +02:00
parent b2d6317679
commit 1c29074622
7 changed files with 29 additions and 17 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,17 +1,17 @@
tg = slrt;
%%
% if tg.Connected == "Yes"
% if tg.Status == "stopped"
% %% Load the application
% tg.load('test_cercalo');
%
% %% Run the application
% tg.start;
% pause(10);
% tg.stop;
% end
% end
if tg.Connected == "Yes"
if tg.Status == "stopped"
%% Load the application
tg.load('test_cercalo');
%% Run the application
tg.start;
pause(101);
tg.stop;
end
end
%%
f = SimulinkRealTime.openFTP(tg);
@ -29,21 +29,33 @@ xv = data(:, 4); % [...] vertical position
cuh = data(:, 5); % Voltage of the cercalo's inductors used for horizontal
cuv = data(:, 6); % [...] vertical
save('mat/data_uv.mat', 't', 'uh', 'uv', 'xh', 'xv', 'cuh', 'cuv');
%% Plot the data
figure;
hold on;
plot(t, uh);
plot(t, uv);
plot(t, uh, 'DisplayName', 'uh');
plot(t, uv, 'DisplayName', 'uv');
hold off
xlabel('Time [s]');
ylabel('Voltage [V]');
legend();
figure;
hold on;
plot(t, xh);
plot(t, xv);
plot(t, xh, 'DisplayName', 'xh');
plot(t, xv, 'DisplayName', 'xv');
hold off
xlabel('Time [s]');
ylabel('Voltage [V]');
legend();
figure;
hold on;
plot(t, cuh, 'DisplayName', 'Cuh');
plot(t, cuv, 'DisplayName', 'Cuv');
hold off
xlabel('Time [s]');
ylabel('Voltage [V]');
legend();
%% Save
save('mat/data_uh.mat', 't', 'uh', 'uv', 'xh', 'xv', 'cuh', 'cuv');

Binary file not shown.