add spindle disturbance measurements
This commit is contained in:
parent
92e4a20e88
commit
eb51305100
14
disturbance-measurement/analysis.m
Normal file
14
disturbance-measurement/analysis.m
Normal 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
|
BIN
disturbance-measurement/disturbance_measurement.slx
Normal file
BIN
disturbance-measurement/disturbance_measurement.slx
Normal file
Binary file not shown.
BIN
disturbance-measurement/mat/data_001.mat
Normal file
BIN
disturbance-measurement/mat/data_001.mat
Normal file
Binary file not shown.
BIN
disturbance-measurement/mat/data_002.mat
Normal file
BIN
disturbance-measurement/mat/data_002.mat
Normal file
Binary file not shown.
8
disturbance-measurement/readme.org
Normal file
8
disturbance-measurement/readme.org
Normal 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|
|
49
disturbance-measurement/run_test.m
Normal file
49
disturbance-measurement/run_test.m
Normal 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]');
|
0
disturbance-measurement/setup.m
Normal file
0
disturbance-measurement/setup.m
Normal file
@ -1 +1,8 @@
|
||||
Ts = 1e-3; % [s]
|
||||
|
||||
%%
|
||||
% tg = slrt;
|
||||
% f = SimulinkRealTime.openFTP(tg);
|
||||
% cd(f, 'data/');
|
||||
% mkdir(f, 'disturbance-measurement');
|
||||
% close(f);
|
Loading…
x
Reference in New Issue
Block a user