Add all the signals

Attocube, Newport, Cercalo, Photodiodes, ...
This commit is contained in:
Thomas Dehaeze 2019-09-13 16:24:53 +02:00
parent dcf738c8ae
commit 61067522d0
3 changed files with 52 additions and 15 deletions

BIN
mat/data_test.mat Normal file

Binary file not shown.

View File

@ -21,41 +21,78 @@ close(f);
%% Convert the Data %% Convert the Data
data = SimulinkRealTime.utils.getFileScopeData('data/data_001.dat').data; data = SimulinkRealTime.utils.getFileScopeData('data/data_001.dat').data;
Uch = data(:, 1);
Ucv = data(:, 2);
Unh = data(:, 3);
Unv = data(:, 4);
Vph = data(:, 5);
Vpv = data(:, 6);
Vch = data(:, 7);
Vcv = data(:, 8);
Vnh = data(:, 9);
Vnv = data(:, 10);
Va = data(:, 11);
t = data(:, end); t = data(:, end);
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(:, 5); % Voltage of the cercalo's inductors used for horizontal
cuv = data(:, 6); % [...] vertical
%% Plot the data %% Plot the data
figure; figure;
subplot(2, 3, 1);
hold on; hold on;
plot(t, uh, 'DisplayName', 'uh'); plot(t, Ucv, 'DisplayName', 'Ucv');
plot(t, uv, 'DisplayName', 'uv'); plot(t, Vpv, 'DisplayName', 'Vpv');
hold off hold off
xlabel('Time [s]'); xlabel('Time [s]');
ylabel('Voltage [V]'); ylabel('Voltage [V]');
legend(); legend();
figure; subplot(2, 3, 2);
hold on; hold on;
plot(t, xh, 'DisplayName', 'xh'); plot(t, Uch, 'DisplayName', 'Uch');
plot(t, xv, 'DisplayName', 'xv'); plot(t, Vph, 'DisplayName', 'Vph');
hold off hold off
xlabel('Time [s]'); xlabel('Time [s]');
ylabel('Voltage [V]'); ylabel('Voltage [V]');
legend(); legend();
figure; subplot(2, 3, 3);
hold on; hold on;
plot(t, cuh, 'DisplayName', 'Cuh'); plot(t, Vch, 'DisplayName', 'Vch');
plot(t, cuv, 'DisplayName', 'Cuv'); plot(t, Vcv, 'DisplayName', 'Vcv');
hold off hold off
xlabel('Time [s]'); xlabel('Time [s]');
ylabel('Voltage [V]'); ylabel('Voltage [V]');
legend(); legend();
subplot(2, 3, 4);
hold on;
plot(t, Unh, 'DisplayName', 'Unh');
plot(t, Vnh, 'DisplayName', 'Vnh');
hold off
xlabel('Time [s]');
ylabel('Voltage [V]');
legend();
subplot(2, 3, 5);
hold on;
plot(t, Unv, 'DisplayName', 'Unv');
plot(t, Vnv, 'DisplayName', 'Vnv');
hold off
xlabel('Time [s]');
ylabel('Voltage [V]');
legend();
subplot(2, 3, 6);
hold on;
plot(t, Va, 'DisplayName', 'Va');
hold off
xlabel('Time [s]');
ylabel('Distance [m]');
legend();
%% Save %% Save
save('mat/data_uh.mat', 't', 'uh', 'uv', 'xh', 'xv', 'cuh', 'cuv'); save('mat/data_test.mat', 't', 'Uch', 'Ucv', ...
'Unh', 'Unv', ...
'Vph', 'Vpv', ...
'Vch', 'Vcv', ...
'Vnh', 'Vnv', ...
'Va');

Binary file not shown.