Rework simulink to have more logical arangment
Redo the huddle test and identification on uv and uh
This commit is contained in:
parent
b2d6317679
commit
1c29074622
Binary file not shown.
BIN
mat/data_uh.mat
BIN
mat/data_uh.mat
Binary file not shown.
BIN
mat/data_uv.mat
BIN
mat/data_uv.mat
Binary file not shown.
BIN
mat/data_ux.mat
BIN
mat/data_ux.mat
Binary file not shown.
BIN
mat/data_uy.mat
BIN
mat/data_uy.mat
Binary file not shown.
46
run_test.m
46
run_test.m
@ -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');
|
||||
|
BIN
test_cercalo.slx
BIN
test_cercalo.slx
Binary file not shown.
Loading…
Reference in New Issue
Block a user