Huddle test / change the simulink file
Better scopes, better naming of the signals. Change the wiring of the setup
This commit is contained in:
parent
ee7cf958ca
commit
887abfc6da
@ -24,6 +24,8 @@
|
||||
#+PROPERTY: header-args:matlab+ :mkdirp yes
|
||||
:END:
|
||||
|
||||
Notes:
|
||||
145 994 8
|
||||
|
||||
* Identification
|
||||
:PROPERTIES:
|
||||
|
BIN
mat/data_huddle_test.mat
Normal file
BIN
mat/data_huddle_test.mat
Normal file
Binary file not shown.
20
run_test.m
20
run_test.m
@ -22,26 +22,28 @@ close(f);
|
||||
data = SimulinkRealTime.utils.getFileScopeData('data/data_001.dat').data;
|
||||
|
||||
t = data(:, end);
|
||||
ux = data(:, 1);
|
||||
uy = data(:, 2);
|
||||
yx = data(:, 3);
|
||||
yy = data(:, 4);
|
||||
uh = data(:, 1); % Voltage sent to cercalo in horizontal direction
|
||||
uv = data(:, 2); % [...] in vertical direction
|
||||
xh = data(:, 3); % Measured horizontal position of the beam by the 4QD
|
||||
xv = data(:, 4); % [...] vertical position
|
||||
cuh = data(:, 3); % Voltage of the cercalo's inductors used for horizontal
|
||||
cuv = data(:, 4); % [...] vertical
|
||||
|
||||
save('mat/data_001.mat', 't', 'ux', 'uy', 'yx', 'yy');
|
||||
save('mat/data_001.mat', 't', 'uh', 'uv', 'xh', 'xv', 'cuh', 'cuv');
|
||||
|
||||
%% Plot the data
|
||||
figure;
|
||||
hold on;
|
||||
plot(t, ux);
|
||||
plot(t, uy);
|
||||
plot(t, uh);
|
||||
plot(t, uv);
|
||||
hold off
|
||||
xlabel('Time [s]');
|
||||
ylabel('Voltage [V]');
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(t, yx);
|
||||
plot(t, yy);
|
||||
plot(t, xh);
|
||||
plot(t, xv);
|
||||
hold off
|
||||
xlabel('Time [s]');
|
||||
ylabel('Voltage [V]');
|
||||
|
BIN
test_cercalo.slx
BIN
test_cercalo.slx
Binary file not shown.
Loading…
Reference in New Issue
Block a user