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;
|
tg = slrt;
|
||||||
|
|
||||||
%%
|
%%
|
||||||
% if tg.Connected == "Yes"
|
if tg.Connected == "Yes"
|
||||||
% if tg.Status == "stopped"
|
if tg.Status == "stopped"
|
||||||
% %% Load the application
|
%% Load the application
|
||||||
% tg.load('test_cercalo');
|
tg.load('test_cercalo');
|
||||||
%
|
|
||||||
% %% Run the application
|
%% Run the application
|
||||||
% tg.start;
|
tg.start;
|
||||||
% pause(10);
|
pause(101);
|
||||||
% tg.stop;
|
tg.stop;
|
||||||
% end
|
end
|
||||||
% end
|
end
|
||||||
|
|
||||||
%%
|
%%
|
||||||
f = SimulinkRealTime.openFTP(tg);
|
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
|
cuh = data(:, 5); % Voltage of the cercalo's inductors used for horizontal
|
||||||
cuv = data(:, 6); % [...] vertical
|
cuv = data(:, 6); % [...] vertical
|
||||||
|
|
||||||
save('mat/data_uv.mat', 't', 'uh', 'uv', 'xh', 'xv', 'cuh', 'cuv');
|
|
||||||
|
|
||||||
%% Plot the data
|
%% Plot the data
|
||||||
figure;
|
figure;
|
||||||
hold on;
|
hold on;
|
||||||
plot(t, uh);
|
plot(t, uh, 'DisplayName', 'uh');
|
||||||
plot(t, uv);
|
plot(t, uv, 'DisplayName', 'uv');
|
||||||
hold off
|
hold off
|
||||||
xlabel('Time [s]');
|
xlabel('Time [s]');
|
||||||
ylabel('Voltage [V]');
|
ylabel('Voltage [V]');
|
||||||
|
legend();
|
||||||
|
|
||||||
figure;
|
figure;
|
||||||
hold on;
|
hold on;
|
||||||
plot(t, xh);
|
plot(t, xh, 'DisplayName', 'xh');
|
||||||
plot(t, xv);
|
plot(t, xv, 'DisplayName', 'xv');
|
||||||
hold off
|
hold off
|
||||||
xlabel('Time [s]');
|
xlabel('Time [s]');
|
||||||
ylabel('Voltage [V]');
|
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