add slip-ring-noise measurement
This commit is contained in:
parent
e96bd46b7c
commit
d23d4acfba
11
slip-ring-test/analysis.m
Normal file
11
slip-ring-test/analysis.m
Normal file
@ -0,0 +1,11 @@
|
||||
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-data1.x2);
|
||||
plot(data2.t, data2.x1-data2.x2);
|
||||
hold off
|
||||
xlabel('Time [s]');
|
||||
ylabel('Voltage [V]');
|
||||
legend({'Slip-ring OFF', 'Slip-ring ON'});
|
BIN
slip-ring-test/mat/data_001.mat
Normal file
BIN
slip-ring-test/mat/data_001.mat
Normal file
Binary file not shown.
BIN
slip-ring-test/mat/data_002.mat
Normal file
BIN
slip-ring-test/mat/data_002.mat
Normal file
Binary file not shown.
2
slip-ring-test/readme.org
Normal file
2
slip-ring-test/readme.org
Normal file
@ -0,0 +1,2 @@
|
||||
|data_001|slip-ring not turning|
|
||||
|data_002|slip-ring turning|
|
49
slip-ring-test/run_test.m
Normal file
49
slip-ring-test/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('slip_ring_test');
|
||||
|
||||
%% Run the application
|
||||
tg.start;
|
||||
pause(10);
|
||||
tg.stop;
|
||||
|
||||
%% Load the data
|
||||
f = SimulinkRealTime.openFTP(tg);
|
||||
cd(f, 'data/slip_ring_test/');
|
||||
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]');
|
1
slip-ring-test/setup.m
Normal file
1
slip-ring-test/setup.m
Normal file
@ -0,0 +1 @@
|
||||
Ts = 1e-3; % [s]
|
BIN
slip-ring-test/slip_ring_test.slx
Normal file
BIN
slip-ring-test/slip_ring_test.slx
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user