[WIP] Slip slip-ring measurements in two
This commit is contained in:
1 parent
65b83cfb48
commit
3e98138772
73 files changed
+4103
-564
No files matched your search
@@ -1,6 +1,3 @@
|
||||
% Matlab Init :noexport:ignore:
|
||||
|
||||
current_dir='/home/thomas/MEGA/These/meas/slip-ring-test/';
|
||||
%% Clear Workspace and Close figures
|
||||
clear; close all; clc;
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
% Matlab Init :noexport:ignore:
|
||||
|
||||
current_dir='/home/thomas/MEGA/These/meas/slip-ring-test/';
|
||||
%% Clear Workspace and Close figures
|
||||
clear; close all; clc;
|
||||
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
% Matlab Init :noexport:ignore:
|
||||
|
||||
current_dir='/home/thomas/MEGA/These/meas/slip-ring-test/';
|
||||
%% Go to current Directory
|
||||
cd(current_dir);
|
||||
|
||||
%% Initialize ans with org-babel
|
||||
ans = 0;
|
||||
|
||||
%% Clear Workspace and Close figures
|
||||
clear; close all; clc;
|
||||
|
||||
@@ -17,18 +8,17 @@ s = zpk('s');
|
||||
% We load the data of the z axis of two geophones.
|
||||
|
||||
|
||||
d8 = load('mat/data_018.mat', 'data'); d8 = d8.data;
|
||||
d9 = load('mat/data_019.mat', 'data'); d9 = d9.data;
|
||||
meas_sr = load('mat/data_018.mat', 'data'); meas_sr = meas_sr.data;
|
||||
meas_di = load('mat/data_019.mat', 'data'); meas_di = meas_di.data;
|
||||
|
||||
% Analysis - Time Domain
|
||||
% First, we compare the time domain signals for the two experiments (figure [[fig:slipring_time]]).
|
||||
|
||||
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(d9(:, 3), d9(:, 2), 'DisplayName', 'Slip-Ring');
|
||||
plot(d8(:, 3), d8(:, 2), 'DisplayName', 'Wire');
|
||||
plot(meas_di(:, 3), meas_di(:, 2), 'DisplayName', 'Geophone - Direct');
|
||||
plot(meas_sr(:, 3), meas_sr(:, 2), 'DisplayName', 'Geophone - Slip-Ring');
|
||||
hold off;
|
||||
xlabel('Time [s]'); ylabel('Voltage [V]');
|
||||
xlim([0, 50]);
|
||||
@@ -37,18 +27,19 @@ legend('location', 'northeast');
|
||||
% Analysis - Frequency Domain
|
||||
% We then compute the Power Spectral Density of the two signals and we compare them (figure [[fig:slipring_asd]]).
|
||||
|
||||
dt = d8(2, 3) - d8(1, 3);
|
||||
|
||||
dt = meas_di(2, 3) - meas_di(1, 3);
|
||||
Fs = 1/dt;
|
||||
|
||||
win = hanning(ceil(1*Fs));
|
||||
win = hanning(ceil(5*Fs));
|
||||
|
||||
[pxx8, f] = pwelch(d8(:, 2), win, [], [], Fs);
|
||||
[pxx9, ~] = pwelch(d9(:, 2), win, [], [], Fs);
|
||||
[px_di, f] = pwelch(meas_di(:, 2), win, [], [], Fs);
|
||||
[px_sr, ~] = pwelch(meas_sr(:, 2), win, [], [], Fs);
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(pxx9), 'DisplayName', 'Slip-Ring');
|
||||
plot(f, sqrt(pxx8), 'DisplayName', 'Wire');
|
||||
plot(f, sqrt(px_sr), 'DisplayName', 'Slip-Ring');
|
||||
plot(f, sqrt(px_di), 'DisplayName', 'Wire');
|
||||
hold off;
|
||||
set(gca, 'xscale', 'log');
|
||||
set(gca, 'yscale', 'log');
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
% Matlab Init :noexport:ignore:
|
||||
|
||||
current_dir='/home/thomas/MEGA/These/meas/slip-ring-test/';
|
||||
%% Clear Workspace and Close figures
|
||||
clear; close all; clc;
|
||||
|
||||
@@ -104,9 +101,10 @@ sr_lpf_on = load('mat/data_017.mat', 'data'); sr_lpf_on = sr_lpf_on.data;
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(sr_lpf_off(:, 3), sr_lpf_off(:, 1), 'DisplayName', 'Direct');
|
||||
plot(sr_lpf_off(:, 3), sr_lpf_off(:, 2), 'DisplayName', 'Slip-Ring');
|
||||
plot(sr_lpf_off(:, 3), sr_lpf_off(:, 1)-mean(sr_lpf_off(:, 1)), 'DisplayName', 'Direct');
|
||||
plot(sr_lpf_off(:, 3), sr_lpf_off(:, 2)-mean(sr_lpf_off(:, 2)), 'DisplayName', 'Slip-Ring');
|
||||
hold off;
|
||||
xlim([0, 100]); ylim([-1, 1]);
|
||||
legend('Location', 'northeast');
|
||||
xlabel('Time [s]');
|
||||
ylabel('Voltage [V]');
|
||||
@@ -121,9 +119,10 @@ ylabel('Voltage [V]');
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(sr_lpf_on(:, 3), sr_lpf_on(:, 1), 'DisplayName', 'Direct');
|
||||
plot(sr_lpf_on(:, 3), sr_lpf_on(:, 2), 'DisplayName', 'Slip-Ring');
|
||||
plot(sr_lpf_on(:, 3), sr_lpf_on(:, 1)-mean(sr_lpf_on(:, 1)), 'DisplayName', 'Direct');
|
||||
plot(sr_lpf_on(:, 3), sr_lpf_on(:, 2)-mean(sr_lpf_on(:, 2)), 'DisplayName', 'Slip-Ring');
|
||||
hold off;
|
||||
xlim([0, 100]); ylim([-1, 1]);
|
||||
legend('Location', 'northeast');
|
||||
xlabel('Time [s]');
|
||||
ylabel('Voltage [V]');
|
||||
@@ -156,16 +155,15 @@ win = hanning(ceil(10*Fs));
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(pxd_lpf_off), 'DisplayName', 'Direct - OFF');
|
||||
plot(f, sqrt(pxd_lpf_off), 'DisplayName', 'Direct - OFF');
|
||||
plot(f, sqrt(pxsr_lpf_off), 'DisplayName', 'Slip-Ring - OFF');
|
||||
plot(f, sqrt(pxd_lpf_on), 'DisplayName', 'Direct - ON');
|
||||
plot(f, sqrt(pxd_lpf_on), 'DisplayName', 'Direct - ON');
|
||||
plot(f, sqrt(pxsr_lpf_on), 'DisplayName', 'Slip-Ring - ON');
|
||||
hold off;
|
||||
set(gca, 'xscale', 'log');
|
||||
set(gca, 'yscale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('ASD of the measured Voltage $\left[\frac{V}{\sqrt{Hz}}\right]$')
|
||||
legend('Location', 'northeast');
|
||||
xlim([0.1, 500]);
|
||||
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('ASD of the measured Voltage $\left[\frac{V}{\sqrt{Hz}}\right]$')
|
||||
legend('Location', 'southwest');
|
||||
|
||||
|
||||
|
||||
@@ -177,17 +175,76 @@ xlim([0.1, 500]);
|
||||
|
||||
xlim([100, 500]);
|
||||
|
||||
% Comparison of with and without LPF
|
||||
% Load data
|
||||
% We load the data of the z axis of two geophones.
|
||||
|
||||
sr_lpf_1khz_of = load('mat/data_035.mat', 'data'); sr_lpf_1khz_of = sr_lpf_1khz_of.data;
|
||||
sr_lpf_1khz_on = load('mat/data_036.mat', 'data'); sr_lpf_1khz_on = sr_lpf_1khz_on.data;
|
||||
|
||||
% Time Domain
|
||||
% We compare the signal when the Slip-Ring is OFF (figure [[fig:sr_lpf_1khz_geophone_time_off]]) and when it is ON (figure [[fig:sr_lpf_1khz_geophone_time_on]]).
|
||||
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(pxdon), 'DisplayName', 'Direct - ON');
|
||||
plot(f, sqrt(pxsron), 'DisplayName', 'Slip-Ring - ON');
|
||||
plot(f, sqrt(pxd_lpf_on), 'DisplayName', 'Direct - ON - LPF');
|
||||
plot(f, sqrt(pxsr_lpf_on), 'DisplayName', 'Slip-Ring - ON - LPF');
|
||||
plot(sr_lpf_1khz_of(:, 3), sr_lpf_1khz_of(:, 1)-mean(sr_lpf_1khz_of(:, 1)), 'DisplayName', 'Direct');
|
||||
plot(sr_lpf_1khz_of(:, 3), sr_lpf_1khz_of(:, 2)-mean(sr_lpf_1khz_of(:, 2)), 'DisplayName', 'Slip-Ring');
|
||||
hold off;
|
||||
set(gca, 'xscale', 'log');
|
||||
set(gca, 'yscale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('ASD of the measured Voltage $\left[\frac{V}{\sqrt{Hz}}\right]$')
|
||||
xlim([0, 100]); ylim([-1, 1]);
|
||||
legend('Location', 'northeast');
|
||||
xlabel('Time [s]'); ylabel('Voltage [V]');
|
||||
|
||||
|
||||
|
||||
% #+NAME: fig:sr_lpf_1khz_geophone_time_off
|
||||
% #+CAPTION: Comparison of the time domain signals when the slip-ring is OFF
|
||||
% #+RESULTS: fig:sr_lpf_1khz_geophone_time_off
|
||||
% [[file:figs/sr_lpf_1khz_geophone_time_off.png]]
|
||||
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(sr_lpf_1khz_on(:, 3), sr_lpf_1khz_on(:, 1)-mean(sr_lpf_1khz_on(:, 1)), 'DisplayName', 'Direct');
|
||||
plot(sr_lpf_1khz_on(:, 3), sr_lpf_1khz_on(:, 2)-mean(sr_lpf_1khz_on(:, 2)), 'DisplayName', 'Slip-Ring');
|
||||
hold off;
|
||||
xlim([0, 100]); ylim([-1, 1]);
|
||||
legend('Location', 'northeast');
|
||||
xlabel('Time [s]'); ylabel('Voltage [V]');
|
||||
|
||||
% Frequency Domain
|
||||
% We first compute some parameters that will be used for the PSD computation.
|
||||
|
||||
dt = sr_lpf_1khz_of(2, 3)-sr_lpf_1khz_of(1, 3);
|
||||
|
||||
Fs = 1/dt; % [Hz]
|
||||
|
||||
win = hanning(ceil(10*Fs));
|
||||
|
||||
|
||||
|
||||
% Then we compute the Power Spectral Density using =pwelch= function.
|
||||
|
||||
% Direct measure
|
||||
[pxdi_lpf_1khz_of, f] = pwelch(sr_lpf_1khz_of(:, 1), win, [], [], Fs);
|
||||
[pxdi_lpf_1khz_on, ~] = pwelch(sr_lpf_1khz_on(:, 1), win, [], [], Fs);
|
||||
|
||||
% Slip-Ring measure
|
||||
[pxsr_lpf_1khz_of, ~] = pwelch(sr_lpf_1khz_of(:, 2), win, [], [], Fs);
|
||||
[pxsr_lpf_1khz_on, ~] = pwelch(sr_lpf_1khz_on(:, 2), win, [], [], Fs);
|
||||
|
||||
|
||||
|
||||
% Finally, we compare the Amplitude Spectral Density of the signals (figure [[fig:sr_lpf_1khz_geophone_asd]]);
|
||||
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(pxdi_lpf_1khz_of), 'DisplayName', 'Direct - OFF');
|
||||
plot(f, sqrt(pxsr_lpf_1khz_of), 'DisplayName', 'Slip-Ring - OFF');
|
||||
plot(f, sqrt(pxdi_lpf_1khz_on), 'DisplayName', 'Direct - ON');
|
||||
plot(f, sqrt(pxsr_lpf_1khz_on), 'DisplayName', 'Slip-Ring - ON');
|
||||
hold off;
|
||||
xlim([0.1, 500]);
|
||||
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('ASD of the measured Voltage $\left[\frac{V}{\sqrt{Hz}}\right]$')
|
||||
legend('Location', 'southwest');
|
||||
Reference in new issue
Block a user