Add analysis of LPF, and slip-ring noise

This commit is contained in:
Thomas Dehaeze 2019-05-07 13:51:35 +02:00
parent d39efd8afe
commit 50fdd49b94
23 changed files with 852 additions and 22 deletions

View File

@ -76,6 +76,11 @@ Then, the =f= object can be used to access the filesystem on the target computer
| rmdir | | |
| close | | |
* ELMO
tutorials: https://www.elmomc.com/products/application-studio/easii/easii-tutorials/
* Low Pass Filter
R = 1KOhm
C = 1muF
Fc = 1kHz

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

BIN
slip-ring-test/figs/lpf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

View File

@ -25,10 +25,12 @@
:END:
#+begin_src bash :exports none :results none
zip data/meas_effect_sr \
mat/data_001.mat \
mat/data_002.mat \
meas_effect_sr.m
if [ meas_effect_sr.m -nt data/meas_effect_sr.zip ]; then
zip data/meas_effect_sr \
mat/data_001.mat \
mat/data_002.mat \
meas_effect_sr.m
fi
#+end_src
The data and matlab files are accessible [[file:data/meas_effect_sr.zip][here]].
@ -153,9 +155,9 @@ We now look at the difference between the signal directly measured by the ADC an
** Conclusion
#+begin_note
*Remaining questions*:
- Should the measurement be redone using voltage amplifiers?
- Use higher rotation speed and measure for longer periods (to have multiple revolutions) ?
*Remaining questions*:
- Should the measurement be redone using voltage amplifiers?
- Use higher rotation speed and measure for longer periods (to have multiple revolutions) ?
#+end_note
* Measure of the noise of the Voltage Amplifier
:PROPERTIES:
@ -460,18 +462,21 @@ And we plot the ASD of the measured signals (figure [[fig:sr_psd_compare]]);
zip data/meas_sr_geophone \
mat/data_012.mat \
mat/data_013.mat \
mat/data_016.mat \
mat/data_017.mat \
meas_sr_geophone.m
#+end_src
The data and matlab files are accessible [[file:data/meas_sr_geophone.zip][here]].
** Measurement Description
** First Measurement without LPF
*** Measurement Description
*Goal*:
- Determine if the noise induced by the slip-ring is a limiting factor when measuring the signal coming from a geophone
*Setup*:
- The geophone is located at the sample location
- The two Voltage amplifiers have the following settings:
- The two Voltage amplifiers have the same following settings:
- AC
- 60dB
- 1kHz
@ -486,19 +491,19 @@ Second column: Slip-ring measure
- =data_012=: Slip-Ring OFF
- =data_013=: Slip-Ring ON
** Matlab Init :noexport:ignore:
*** Matlab Init :noexport:ignore:
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src
** Load data
*** Load data
We load the data of the z axis of two geophones.
#+begin_src matlab :results none
sr_off = load('mat/data_012.mat', 'data'); sr_off = sr_off.data;
sr_on = load('mat/data_013.mat', 'data'); sr_on = sr_on.data;
#+end_src
** Time Domain
*** Time Domain
We compare the signal when the Slip-Ring is OFF (figure [[fig:sr_geophone_time_off]]) and when it is ON (figure [[fig:sr_geophone_time_on]]).
#+begin_src matlab :results none :exports none
@ -545,7 +550,7 @@ We compare the signal when the Slip-Ring is OFF (figure [[fig:sr_geophone_time_o
#+RESULTS: fig:sr_geophone_time_on
[[file:figs/sr_geophone_time_on.png]]
** Frequency Domain
*** Frequency Domain
We first compute some parameters that will be used for the PSD computation.
#+begin_src matlab :results none
dt = sr_off(2, 3)-sr_off(1, 3);
@ -566,7 +571,7 @@ Then we compute the Power Spectral Density using =pwelch= function.
[pxsron, ~] = pwelch(sr_on(:, 2), win, [], [], Fs);
#+end_src
Finally, we compare the Amplitude Spectral Density of the signals (figure [[]]);
Finally, we compare the Amplitude Spectral Density of the signals (figure [[fig:sr_geophone_asd]]);
#+begin_src matlab :results none
figure;
@ -609,10 +614,205 @@ Finally, we compare the Amplitude Spectral Density of the signals (figure [[]]);
#+RESULTS: fig:sr_geophone_asd_zoom
[[file:figs/sr_geophone_asd_zoom.png]]
** Conclusion
*** Conclusion
#+begin_important
- When the slip-ring is OFF, it does not add any noise to the measurement
- When the slip-ring is ON, it adds significant noise to the signal
- The fact that the Slip-Ring is turned ON adds some noise to the signal.
- The signal going through the Slip-Ring is less noisy than the one going directly to the ADC.
- This could be due to less good electromagnetic isolation.
*Questions*:
- Can the sharp peak on figure [[fig:sr_geophone_asd_zoom]] be due to the Aliasing?
#+end_important
** Measurement using an oscilloscope
*** Measurement Setup
Know we are measuring the same signals but using an oscilloscope instead of the Speedgoat ADC.
*** Observations
Then the Slip-Ring is ON (figure [[fig:oscilloscope_sr_on]]), we observe a signal at 40kHz with a peak-to-peak amplitude of 200mV for the direct measure and 100mV for the signal going through the Slip-Ring.
Then the Slip-Ring is OFF, we don't observe this 40kHz anymore (figure [[fig:oscilloscope_sr_off]]).
#+name: fig:oscilloscope_sr_on
#+caption: Signals measured by the oscilloscope - Slip-Ring ON - Yellow: Direct measure - Blue: Through Slip-Ring
#+attr_html: :width 500px
[[file:./img/IMG_20190506_160420.jpg]]
#+name: fig:oscilloscope_sr_off
#+caption: Signals measured by the oscilloscope - Slip-Ring OFF - Yellow: Direct measure - Blue: Through Slip-Ring
#+attr_html: :width 500px
[[file:./img/IMG_20190506_160438.jpg]]
*** Conclusion
#+begin_important
- By looking at the signals using an oscilloscope, there is a lot of high frequency noise when turning on the Slip-Ring
- This can eventually saturate the voltage amplifiers (seen by a led indicating saturation)
- The choice is to add a Low pass filter before the voltage amplifiers to not saturate them and filter the noise.
#+end_important
** New measurements with a LPF before the Voltage Amplifiers
*** Setup description
A first order low pass filter is added before the Voltage Amplifiers with the following values:
\begin{aligned}
R &= 1k\Omega \\
C &= 1\mu F
\end{aligned}
And we have a cut-off frequency of $f_c = \frac{1}{RC} = 160Hz$.
We are measuring the signal from a geophone put on the marble with and without the added LPF:
- with the slip ring OFF: =mat/data_016.mat=
- with the slip ring ON: =mat/data_017.mat=
*** Load data
We load the data of the z axis of two geophones.
#+begin_src matlab :results none
sr_lpf_off = load('mat/data_016.mat', 'data'); sr_lpf_off = sr_lpf_off.data;
sr_lpf_on = load('mat/data_017.mat', 'data'); sr_lpf_on = sr_lpf_on.data;
#+end_src
*** Time Domain
We compare the signal when the Slip-Ring is OFF (figure [[fig:sr_lpf_geophone_time_off]]) and when it is ON (figure [[fig:sr_lpf_geophone_time_on]]).
#+begin_src matlab :results none :exports none
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');
hold off;
legend('Location', 'northeast');
xlabel('Time [s]');
ylabel('Voltage [V]');
#+end_src
#+NAME: fig:sr_lpf_geophone_time_off
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/sr_lpf_geophone_time_off.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:sr_lpf_geophone_time_off
#+CAPTION: Comparison of the time domain signals when the slip-ring is OFF
#+RESULTS: fig:sr_lpf_geophone_time_off
[[file:figs/sr_lpf_geophone_time_off.png]]
#+begin_src matlab :results none :exports none
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');
hold off;
legend('Location', 'northeast');
xlabel('Time [s]');
ylabel('Voltage [V]');
#+end_src
#+NAME: fig:sr_lpf_geophone_time_on
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/sr_lpf_geophone_time_on.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:sr_lpf_geophone_time_on
#+CAPTION: Comparison of the time domain signals when the slip-ring is ON
#+RESULTS: fig:sr_lpf_geophone_time_on
[[file:figs/sr_lpf_geophone_time_on.png]]
*** Frequency Domain
We first compute some parameters that will be used for the PSD computation.
#+begin_src matlab :results none
dt = sr_lpf_off(2, 3)-sr_lpf_off(1, 3);
Fs = 1/dt; % [Hz]
win = hanning(ceil(10*Fs));
#+end_src
Then we compute the Power Spectral Density using =pwelch= function.
#+begin_src matlab :results none
% Direct measure
[pxd_lpf_off, ~] = pwelch(sr_lpf_off(:, 1), win, [], [], Fs);
[pxd_lpf_on, ~] = pwelch(sr_lpf_on(:, 1), win, [], [], Fs);
% Slip-Ring measure
[pxsr_lpf_off, f] = pwelch(sr_lpf_off(:, 2), win, [], [], Fs);
[pxsr_lpf_on, ~] = pwelch(sr_lpf_on(:, 2), win, [], [], Fs);
#+end_src
Finally, we compare the Amplitude Spectral Density of the signals (figure [[fig:sr_lpf_geophone_asd]]);
#+begin_src matlab :results none
figure;
hold on;
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(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]);
#+end_src
#+NAME: fig:sr_lpf_geophone_asd
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/sr_lpf_geophone_asd.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:sr_lpf_geophone_asd
#+CAPTION: Comparison of the Amplitude Spectral Sensity
#+RESULTS: fig:sr_lpf_geophone_asd
[[file:figs/sr_lpf_geophone_asd.png]]
#+begin_src matlab :results none :exports none
xlim([100, 500]);
#+end_src
#+NAME: fig:sr_lpf_geophone_asd_zoom
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/sr_lpf_geophone_asd_zoom.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:sr_lpf_geophone_asd_zoom
#+CAPTION: Comparison of the Amplitude Spectral Sensity - Zoom
#+RESULTS: fig:sr_lpf_geophone_asd_zoom
[[file:figs/sr_lpf_geophone_asd_zoom.png]]
*** Comparison of with and without LPF
#+begin_src matlab :results none
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');
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]);
#+end_src
#+NAME: fig:comp_with_without_lpf
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/comp_with_without_lpf.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:comp_with_without_lpf
#+CAPTION: Comparison of the measured signals with and without LPF
#+RESULTS: fig:comp_with_without_lpf
[[file:figs/comp_with_without_lpf.png]]
*** Conclusion
#+begin_important
- Using the LPF, we don't have any perturbation coming from the slip-ring when it is on.
- However, we will use a smaller value of the capacitor to have a cut-off frequency at $1kHz$.
#+end_important
* Measure of the influence of the AC/DC option on the voltage amplifiers
@ -681,7 +881,7 @@ The signals are shown on figure [[fig:ac_dc_option_time]].
plot(meas15(:, 3), meas15(:, 1), 'DisplayName', 'Amp1 - DC');
plot(meas15(:, 3), meas15(:, 2), 'DisplayName', 'Amp2 - AC');
hold off;
legend('Location', 'northeast');
legend('Location', 'bestoutside');
xlabel('Time [s]');
ylabel('Voltage [V]');
xlim([0, 100]);
@ -689,7 +889,7 @@ The signals are shown on figure [[fig:ac_dc_option_time]].
#+NAME: fig:ac_dc_option_time
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/ac_dc_option_time.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
#+begin_src matlab :var filepath="figs/ac_dc_option_time.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
@ -746,5 +946,138 @@ The ASD of the signals are compare on figure [[fig:ac_dc_option_asd]].
** Conclusion
#+begin_important
- The voltage amplifiers include some very sharp high pass filters at 1.5Hz (maybe 4th order)
- There is a DC offset on the time domain signal because the DC-offset knob was not set to zero
*Questions*:
- What option should be used for the measurements?
#+end_important
* Measure of the Low Pass Filter
** Measurement Description
*Goal*:
- Measure the Low Pass Filter Transfer Function
The values of the components are:
\begin{aligned}
R &= 1k\Omega \\
C &= 1\mu F
\end{aligned}
Which makes a cut-off frequency of $f_c = \frac{1}{RC} = 1000 rad/s = 160Hz$.
#+NAME: fig:lpf
#+HEADER: :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/MEGA/These/LaTeX/}{config.tex}")
#+HEADER: :imagemagick t :fit yes :iminoptions -scale 100% -density 150 :imoutoptions -quality 100
#+HEADER: :results raw replace :buffer no :eval no-export :exports both :mkdirp yes
#+HEADER: :output-dir figs
#+begin_src latex :file lpf.pdf :post pdf2svg(file=*this*, ext="png") :exports both
\begin{tikzpicture}
\draw (0,2) node[circ]
to [R=\(R\)] ++(2,0)
to ++(2,0) node[circ]
++(-2,0) node[circ]
to [C=\(C\)] ++(0,-2)
++(-2,0) node[circ]
to ++(2,0) node[circ]
to ++(2,0) node[circ];
\end{tikzpicture}
#+end_src
#+NAME: fig:lpf
#+CAPTION: Schematic of the Low Pass Filter used
#+RESULTS: fig:lpf
[[file:figs/lpf.png]]
*Setup*:
- We are measuring the signal from from Geophone with a BNC T
- On part goes to column 1 through the LPF
- The other part goes to column 2 without the LPF
*Measurements*:
=mat/data_018.mat=:
| Column | Signal |
|--------+----------------------|
| 1 | Amplifier 1 with LPF |
| 2 | Amplifier 2 |
| 3 | Time |
** Matlab Init :noexport:ignore:
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src
** Load data
We load the data of the z axis of two geophones.
#+begin_src matlab :results none
data = load('mat/data_018.mat', 'data'); data = data.data;
#+end_src
** Transfer function of the LPF
We compute the transfer function from the signal without the LPF to the signal measured with the LPF.
#+begin_src matlab :results none
dt = data(2, 3)-data(1, 3);
Fs = 1/dt; % [Hz]
win = hanning(ceil(10*Fs));
#+end_src
#+begin_src matlab :results none
[Glpf, f] = tfestimate(data(:, 2), data(:, 1), win, [], [], Fs);
#+end_src
We compare this transfer function with a transfer function corresponding to an ideal first order LPF with a cut-off frequency of $1000rad/s$.
We obtain the result on figure [[fig:Glpf_bode]].
#+begin_src matlab :results none
Gth = 1/(1+s/1000)
#+end_src
#+begin_src matlab :results none
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(f, abs(Glpf));
plot(f, abs(squeeze(freqresp(Gth, f, 'Hz'))));
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
set(gca, 'XTickLabel',[]);
ylabel('Magnitude');
ax2 = subplot(2, 1, 2);
hold on;
plot(f, mod(180+180/pi*phase(Glpf), 360)-180);
plot(f, 180/pi*unwrap(angle(squeeze(freqresp(Gth, f, 'Hz')))));
hold off;
set(gca, 'xscale', 'log');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
xlabel('Frequency [Hz]'); ylabel('Phase');
linkaxes([ax1,ax2],'x');
xlim([1, 500]);
#+end_src
#+NAME: fig:Glpf_bode
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/Glpf_bode.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:Glpf_bode
#+CAPTION: Bode Diagram of the measured Low Pass filter and the theoritical one
#+RESULTS: fig:Glpf_bode
[[file:figs/Glpf_bode.png]]
** Conclusion
#+begin_important
As we want to measure things up to $500Hz$, we chose to change the value of the capacitor to obtain a cut-off frequency of $1kHz$.
#+end_important
** TODO Low Pass Filter with a cut-off frequency of 1kHz
This time, the value are
\begin{aligned}
R &= 1k\Omega \\
C &= 150nF
\end{aligned}
Which makes a low pass filter with a cut-off frequency of $f_c = 1060Hz$.

View File

@ -0,0 +1,71 @@
% Matlab Init :noexport:ignore:
clear; close all; clc;
%% Intialize Laplace variable
s = zpk('s');
%% Initialize ans with org-babel
ans = 0;
% Load data
% We load the data of the z axis of two geophones.
sr_off = load('mat/data_001.mat', 't', 'x1', 'x2');
sr_on = load('mat/data_002.mat', 't', 'x1', 'x2');
% Analysis
% Let's first look at the signal produced by the DAC (figure [[fig:random_signal]]).
figure;
hold on;
plot(sr_on.t, sr_on.x1);
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
xlim([0 10]);
% #+NAME: fig:random_signal
% #+CAPTION: Random signal produced by the DAC
% #+RESULTS: fig:random_signal
% [[file:figs/random_signal.png]]
% We now look at the difference between the signal directly measured by the ADC and the signal that goes through the slip-ring (figure [[fig:slipring_comp_signals]]).
figure;
hold on;
plot(sr_on.t, sr_on.x1 - sr_on.x2, 'DisplayName', 'Slip-Ring - $\omega = 1rpm$');
plot(sr_off.t, sr_off.x1 - sr_off.x2,'DisplayName', 'Slip-Ring off');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
xlim([0 10]);
legend('Location', 'northeast');
% #+NAME: fig:slipring_comp_signals
% #+CAPTION: Alteration of the signal when the slip-ring is turning
% #+RESULTS: fig:slipring_comp_signals
% [[file:figs/slipring_comp_signals.png]]
dt = sr_on.t(2) - sr_on.t(1);
Fs = 1/dt; % [Hz]
win = hanning(ceil(1*Fs));
[pxx_on, f] = pwelch(sr_on.x1 - sr_on.x2, win, [], [], Fs);
[pxx_off, ~] = pwelch(sr_off.x1 - sr_off.x2, win, [], [], Fs);
figure;
hold on;
plot(f, sqrt(pxx_on), 'DisplayName', 'Slip-Ring - $\omega = 1rpm$');
plot(f, sqrt(pxx_off),'DisplayName', 'Slip-Ring off');
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD $\left[\frac{V}{\sqrt{Hz}}\right]$');
legend('Location', 'northeast');
xlim([1, 500]); ylim([1e-5, 1e-3])

View File

@ -0,0 +1,66 @@
% Matlab Init :noexport:ignore:
clear; close all; clc;
%% Intialize Laplace variable
s = zpk('s');
%% Initialize ans with org-babel
ans = 0;
% Load data
% We load the data of the z axis of two geophones.
meas14 = load('mat/data_014.mat', 'data'); meas14 = meas14.data;
meas15 = load('mat/data_015.mat', 'data'); meas15 = meas15.data;
% Time Domain
% The signals are shown on figure [[fig:ac_dc_option_time]].
figure;
hold on;
plot(meas14(:, 3), meas14(:, 1), 'DisplayName', 'Amp1 - AC');
plot(meas14(:, 3), meas14(:, 2), 'DisplayName', 'Amp2 - DC');
plot(meas15(:, 3), meas15(:, 1), 'DisplayName', 'Amp1 - DC');
plot(meas15(:, 3), meas15(:, 2), 'DisplayName', 'Amp2 - AC');
hold off;
legend('Location', 'bestoutside');
xlabel('Time [s]');
ylabel('Voltage [V]');
xlim([0, 100]);
% Frequency Domain
% We first compute some parameters that will be used for the PSD computation.
dt = meas14(2, 3)-meas14(1, 3);
Fs = 1/dt; % [Hz]
win = hanning(ceil(10*Fs));
% Then we compute the Power Spectral Density using =pwelch= function.
[pxamp1ac, f] = pwelch(meas14(:, 1), win, [], [], Fs);
[pxamp2dc, ~] = pwelch(meas14(:, 2), win, [], [], Fs);
[pxamp1dc, ~] = pwelch(meas15(:, 1), win, [], [], Fs);
[pxamp2ac, ~] = pwelch(meas15(:, 2), win, [], [], Fs);
% The ASD of the signals are compare on figure [[fig:ac_dc_option_asd]].
figure;
hold on;
plot(f, sqrt(pxamp1ac), 'DisplayName', 'Amp1 - AC');
plot(f, sqrt(pxamp2dc), 'DisplayName', 'Amp2 - DC');
plot(f, sqrt(pxamp1dc), 'DisplayName', 'Amp1 - DC');
plot(f, sqrt(pxamp2ac), 'DisplayName', 'Amp2 - AC');
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]);

View File

@ -0,0 +1,88 @@
% Matlab Init :noexport:ignore:
clear; close all; clc;
%% Intialize Laplace variable
s = zpk('s');
%% Initialize ans with org-babel
ans = 0;
% Load data
% We load the data of the z axis of two geophones.
sr_off = load('mat/data_008.mat', 'data'); sr_off = sr_off.data;
sr_on = load('mat/data_009.mat', 'data'); sr_on = sr_on.data;
sr_6r = load('mat/data_010.mat', 'data'); sr_6r = sr_6r.data;
sr_60r = load('mat/data_011.mat', 'data'); sr_60r = sr_60r.data;
% Time Domain
% We plot the time domain data for the direct measurement (figure [[fig:sr_direct_time]]) and for the signal going through the slip-ring (figure [[fig:sr_slipring_time]]);
figure;
hold on;
plot(sr_60r(:, 3), sr_60r(:, 1), 'DisplayName', '60rpm');
plot(sr_6r(:, 3), sr_6r(:, 1), 'DisplayName', '6rpm');
plot(sr_on(:, 3), sr_on(:, 1), 'DisplayName', 'ON');
plot(sr_off(:, 3), sr_off(:, 1), 'DisplayName', 'OFF');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
legend('Location', 'northeast');
% #+NAME: fig:sr_direct_time
% #+CAPTION: Direct measurement
% #+RESULTS: fig:sr_direct_time
% [[file:figs/sr_direct_time.png]]
figure;
hold on;
plot(sr_60r(:, 3), sr_60r(:, 2), 'DisplayName', '60rpm');
plot(sr_6r(:, 3), sr_6r(:, 2), 'DisplayName', '6rpm');
plot(sr_on(:, 3), sr_on(:, 2), 'DisplayName', 'ON');
plot(sr_off(:, 3), sr_off(:, 2), 'DisplayName', 'OFF');
hold off;
xlabel('Time [s]'); ylabel('Voltage [V]');
legend('Location', 'northeast');
% Frequency Domain
% We first compute some parameters that will be used for the PSD computation.
dt = sr_off(2, 3)-sr_off(1, 3);
Fs = 1/dt; % [Hz]
win = hanning(ceil(10*Fs));
% Then we compute the Power Spectral Density using =pwelch= function.
[pxdir, f] = pwelch(sr_off(:, 1), win, [], [], Fs);
[pxoff, ~] = pwelch(sr_off(:, 2), win, [], [], Fs);
[pxon, ~] = pwelch(sr_on(:, 2), win, [], [], Fs);
[px6r, ~] = pwelch(sr_6r(:, 2), win, [], [], Fs);
[px60r, ~] = pwelch(sr_60r(:, 2), win, [], [], Fs);
% And we plot the ASD of the measured signals (figure [[fig:sr_psd_compare]]);
figure;
hold on;
plot(f, sqrt(pxoff), 'DisplayName', 'OFF');
plot(f, sqrt(pxon), 'DisplayName', 'ON');
plot(f, sqrt(px6r), 'DisplayName', '6rpm');
plot(f, sqrt(px60r), 'DisplayName', '60rpm');
plot(f, sqrt(pxdir), 'k-', 'DisplayName', 'Direct');
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]);

View File

@ -0,0 +1,194 @@
% Matlab Init :noexport:ignore:
clear; close all; clc;
%% Intialize Laplace variable
s = zpk('s');
%% Initialize ans with org-babel
ans = 0;
% Load data
% We load the data of the z axis of two geophones.
sr_off = load('mat/data_012.mat', 'data'); sr_off = sr_off.data;
sr_on = load('mat/data_013.mat', 'data'); sr_on = sr_on.data;
% Time Domain
% We compare the signal when the Slip-Ring is OFF (figure [[fig:sr_geophone_time_off]]) and when it is ON (figure [[fig:sr_geophone_time_on]]).
figure;
hold on;
plot(sr_off(:, 3), sr_off(:, 1), 'DisplayName', 'Direct');
plot(sr_off(:, 3), sr_off(:, 2), 'DisplayName', 'Slip-Ring');
hold off;
legend('Location', 'northeast');
xlabel('Time [s]');
ylabel('Voltage [V]');
% #+NAME: fig:sr_geophone_time_off
% #+CAPTION: Comparison of the time domain signals when the slip-ring is OFF
% #+RESULTS: fig:sr_geophone_time_off
% [[file:figs/sr_geophone_time_off.png]]
figure;
hold on;
plot(sr_on(:, 3), sr_on(:, 1), 'DisplayName', 'Direct');
plot(sr_on(:, 3), sr_on(:, 2), 'DisplayName', 'Slip-Ring');
hold off;
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_off(2, 3)-sr_off(1, 3);
Fs = 1/dt; % [Hz]
win = hanning(ceil(10*Fs));
% Then we compute the Power Spectral Density using =pwelch= function.
% Direct measure
[pxdoff, ~] = pwelch(sr_off(:, 1), win, [], [], Fs);
[pxdon, ~] = pwelch(sr_on(:, 1), win, [], [], Fs);
% Slip-Ring measure
[pxsroff, f] = pwelch(sr_off(:, 2), win, [], [], Fs);
[pxsron, ~] = pwelch(sr_on(:, 2), win, [], [], Fs);
% Finally, we compare the Amplitude Spectral Density of the signals (figure [[fig:sr_geophone_asd]]);
figure;
hold on;
plot(f, sqrt(pxdoff), 'DisplayName', 'Direct - OFF');
plot(f, sqrt(pxsroff), 'DisplayName', 'Slip-Ring - OFF');
plot(f, sqrt(pxdon), 'DisplayName', 'Direct - ON');
plot(f, sqrt(pxsron), '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]);
% #+NAME: fig:sr_geophone_asd
% #+CAPTION: Comparison of the Amplitude Spectral Sensity
% #+RESULTS: fig:sr_geophone_asd
% [[file:figs/sr_geophone_asd.png]]
xlim([100, 500]);
% Load data
% We load the data of the z axis of two geophones.
sr_lpf_off = load('mat/data_016.mat', 'data'); sr_lpf_off = sr_lpf_off.data;
sr_lpf_on = load('mat/data_017.mat', 'data'); sr_lpf_on = sr_lpf_on.data;
% Time Domain
% We compare the signal when the Slip-Ring is OFF (figure [[fig:sr_lpf_geophone_time_off]]) and when it is ON (figure [[fig:sr_lpf_geophone_time_on]]).
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');
hold off;
legend('Location', 'northeast');
xlabel('Time [s]');
ylabel('Voltage [V]');
% #+NAME: fig:sr_lpf_geophone_time_off
% #+CAPTION: Comparison of the time domain signals when the slip-ring is OFF
% #+RESULTS: fig:sr_lpf_geophone_time_off
% [[file:figs/sr_lpf_geophone_time_off.png]]
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');
hold off;
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_off(2, 3)-sr_lpf_off(1, 3);
Fs = 1/dt; % [Hz]
win = hanning(ceil(10*Fs));
% Then we compute the Power Spectral Density using =pwelch= function.
% Direct measure
[pxd_lpf_off, ~] = pwelch(sr_lpf_off(:, 1), win, [], [], Fs);
[pxd_lpf_on, ~] = pwelch(sr_lpf_on(:, 1), win, [], [], Fs);
% Slip-Ring measure
[pxsr_lpf_off, f] = pwelch(sr_lpf_off(:, 2), win, [], [], Fs);
[pxsr_lpf_on, ~] = pwelch(sr_lpf_on(:, 2), win, [], [], Fs);
% Finally, we compare the Amplitude Spectral Density of the signals (figure [[fig:sr_lpf_geophone_asd]]);
figure;
hold on;
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(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]);
% #+NAME: fig:sr_lpf_geophone_asd
% #+CAPTION: Comparison of the Amplitude Spectral Sensity
% #+RESULTS: fig:sr_lpf_geophone_asd
% [[file:figs/sr_lpf_geophone_asd.png]]
xlim([100, 500]);
% Comparison of with and without LPF
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');
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]);

View File

@ -0,0 +1,74 @@
% Matlab Init :noexport:ignore:
clear; close all; clc;
%% Intialize Laplace variable
s = zpk('s');
%% Initialize ans with org-babel
ans = 0;
% Load data
amp_off = load('mat/data_003.mat', 'data'); amp_off = amp_off.data(:, [1,3]);
amp_20d = load('mat/data_004.mat', 'data'); amp_20d = amp_20d.data(:, [1,3]);
amp_40d = load('mat/data_005.mat', 'data'); amp_40d = amp_40d.data(:, [1,3]);
amp_60d = load('mat/data_006.mat', 'data'); amp_60d = amp_60d.data(:, [1,3]);
% Time Domain
% The time domain signals are shown on figure [[fig:ampli_noise_time]].
figure;
hold on;
plot(amp_off(:, 2), amp_off(:, 1), 'DisplayName', 'OFF');
plot(amp_20d(:, 2), amp_20d(:, 1), 'DisplayName', '20dB');
plot(amp_40d(:, 2), amp_40d(:, 1), 'DisplayName', '40dB');
plot(amp_60d(:, 2), amp_60d(:, 1), 'DisplayName', '60dB');
hold off;
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 = amp_off(2, 2)-amp_off(1, 2);
Fs = 1/dt; % [Hz]
win = hanning(ceil(10*Fs));
% Then we compute the Power Spectral Density using =pwelch= function.
[pxoff, f] = pwelch(amp_off(:,1), win, [], [], Fs);
[px20d, ~] = pwelch(amp_20d(:,1), win, [], [], Fs);
[px40d, ~] = pwelch(amp_40d(:,1), win, [], [], Fs);
[px60d, ~] = pwelch(amp_60d(:,1), win, [], [], Fs);
% We compute the theoretical ADC noise.
q = 20/2^16; % quantization
Sq = q^2/12/1000; % PSD of the ADC noise
% Finally, the ASD is shown on figure [[fig:ampli_noise_psd]].
figure;
hold on;
plot(f, sqrt(pxoff), 'DisplayName', 'OFF');
plot(f, sqrt(px20d), 'DisplayName', '20dB');
plot(f, sqrt(px40d), 'DisplayName', '40dB');
plot(f, sqrt(px60d), 'DisplayName', '60dB');
plot([0.1, 500], [sqrt(Sq), sqrt(Sq)], 'k--');
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]);

View File

@ -68,7 +68,6 @@ Second column: DC
- meas14: col-1 = amp1+AC. col-2 = amp2+DC.
- meas15: col-1 = amp1+DC. col-2 = amp2+AC.
* Measurement of the LPF
We are measuring the signal from from Geophone with a BNC T
On part goes to column 1 through the LPF