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
|
#+PROPERTY: header-args:matlab+ :mkdirp yes
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
145 994 8
|
||||||
|
|
||||||
* Identification
|
* Identification
|
||||||
:PROPERTIES:
|
: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;
|
data = SimulinkRealTime.utils.getFileScopeData('data/data_001.dat').data;
|
||||||
|
|
||||||
t = data(:, end);
|
t = data(:, end);
|
||||||
ux = data(:, 1);
|
uh = data(:, 1); % Voltage sent to cercalo in horizontal direction
|
||||||
uy = data(:, 2);
|
uv = data(:, 2); % [...] in vertical direction
|
||||||
yx = data(:, 3);
|
xh = data(:, 3); % Measured horizontal position of the beam by the 4QD
|
||||||
yy = data(:, 4);
|
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
|
%% Plot the data
|
||||||
figure;
|
figure;
|
||||||
hold on;
|
hold on;
|
||||||
plot(t, ux);
|
plot(t, uh);
|
||||||
plot(t, uy);
|
plot(t, uv);
|
||||||
hold off
|
hold off
|
||||||
xlabel('Time [s]');
|
xlabel('Time [s]');
|
||||||
ylabel('Voltage [V]');
|
ylabel('Voltage [V]');
|
||||||
|
|
||||||
figure;
|
figure;
|
||||||
hold on;
|
hold on;
|
||||||
plot(t, yx);
|
plot(t, xh);
|
||||||
plot(t, yy);
|
plot(t, xv);
|
||||||
hold off
|
hold off
|
||||||
xlabel('Time [s]');
|
xlabel('Time [s]');
|
||||||
ylabel('Voltage [V]');
|
ylabel('Voltage [V]');
|
||||||
|
BIN
test_cercalo.slx
BIN
test_cercalo.slx
Binary file not shown.
Loading…
Reference in New Issue
Block a user