add spindle disturbance measurements

This commit is contained in:
Thomas Dehaeze 2019-04-30 11:40:38 +02:00
parent 92e4a20e88
commit eb51305100
8 changed files with 78 additions and 0 deletions

View File

@ -0,0 +1,14 @@
data1 = load('mat/data_001.mat', 't', 'x1', 'x2');
data2 = load('mat/data_002.mat', 't', 'x1', 'x2');
figure;
hold on;
plot(data1.t, data1.x1);
plot(data2.t, data2.x1);
hold off;
figure;
hold on;
plot(data1.t, data1.x2);
plot(data2.t, data2.x2);
hold off;s

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,8 @@
Measurement:
- one geophone on the marble
- one geophone at the sample position
Every stage is powered on.
|data_001.mat|nothing is turning|
|data_002.mat|spindle is turning at 1rpm|

View File

@ -0,0 +1,49 @@
tg = slrt;
%% TODO - Build this application if updated
%%
if tg.Connected == "Yes"
if tg.Status == "stopped"
%% Load the application
tg.load('disturbance_measurement');
%% Run the application
tg.start;
pause(300);
tg.stop;
%% Load the data
f = SimulinkRealTime.openFTP(tg);
cd(f, 'data/disturbance_measurement/');
mget(f, 'data_001.dat', 'data');
close(f);
end
end
data = SimulinkRealTime.utils.getFileScopeData('data/data_001.dat').data;
size(data)
t = data(:, end);
x1 = data(:, 1);
x2 = data(:, 2);
save('mat/data_002.mat', 't', 'x1', 'x2');
%% Plot the data
figure;
hold on;
plot(t, x1);
plot(t, x2);
hold off
xlabel('Time [s]');
ylabel('Voltage [V]');
%%
figure;
hold on;
plot(t, x1-x2);
hold off
xlabel('Time [s]');
ylabel('Voltage [V]');

View File

View File

@ -1 +1,8 @@
Ts = 1e-3; % [s]
%%
% tg = slrt;
% f = SimulinkRealTime.openFTP(tg);
% cd(f, 'data/');
% mkdir(f, 'disturbance-measurement');
% close(f);