Add analysis on the new measurements

This commit is contained in:
2019-05-07 18:30:04 +02:00
parent 40e492ffed
commit 3cba7b5fdc
18 changed files with 814 additions and 262 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

File diff suppressed because it is too large Load Diff

View File

@@ -166,12 +166,14 @@ We now look at the difference between the signal directly measured by the ADC an
:END:
#+begin_src bash :exports none :results none
zip data/meas_volt_amp \
mat/data_003.mat \
mat/data_004.mat \
mat/data_005.mat \
mat/data_006.mat \
meas_volt_amp.m
if [ meas_volt_amp.m -nt data/meas_volt_amp.zip ]; then
zip data/meas_volt_amp \
mat/data_003.mat \
mat/data_004.mat \
mat/data_005.mat \
mat/data_006.mat \
meas_volt_amp.m
fi
#+end_src
The data and matlab files are accessible [[file:data/meas_volt_amp.zip][here]].
@@ -286,7 +288,10 @@ Finally, the ASD is shown on figure [[fig:ampli_noise_psd]].
** Conclusion
#+begin_important
Noise induced by the voltage amplifiers is not a limiting factor.
*Questions*:
- Where does those sharp peaks comes from? Can this be due to aliasing?
Noise induced by the voltage amplifiers seems not to be a limiting factor as we have the same noise when they are OFF and ON.
#+end_important
* Measure of the noise induced by the Slip-Ring
@@ -296,12 +301,14 @@ Finally, the ASD is shown on figure [[fig:ampli_noise_psd]].
:END:
#+begin_src bash :exports none :results none
zip data/meas_slip_ring \
mat/data_008.mat \
mat/data_009.mat \
mat/data_010.mat \
mat/data_011.mat \
meas_slip_ring.m
if [ meas_slip_ring.m -nt data/meas_slip_ring.zip ]; then
zip data/meas_slip_ring \
mat/data_008.mat \
mat/data_009.mat \
mat/data_010.mat \
mat/data_011.mat \
meas_slip_ring.m
fi
#+end_src
The data and matlab files are accessible [[file:data/meas_slip_ring.zip][here]].
@@ -449,7 +456,9 @@ And we plot the ASD of the measured signals (figure [[fig:sr_psd_compare]]);
** Conclusion
#+begin_important
*Questions:*
- Why is there some sharp peaks? Can this be due to aliasing?
- It is possible that the amplifiers were saturating during the measurements => should redo the measurements with a low pass filter before the voltage amplifier
#+end_important
* Measure of the noise induced by the slip ring when using a geophone
@@ -459,12 +468,14 @@ And we plot the ASD of the measured signals (figure [[fig:sr_psd_compare]]);
:END:
#+begin_src bash :exports none :results none
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
if [ meas_sr_geophone.m -nt data/meas_sr_geophone.zip ]; then
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
fi
#+end_src
The data and matlab files are accessible [[file:data/meas_sr_geophone.zip][here]].
@@ -647,7 +658,7 @@ Then the Slip-Ring is OFF, we don't observe this 40kHz anymore (figure [[fig:osc
#+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.
- 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
@@ -812,7 +823,7 @@ Finally, we compare the Amplitude Spectral Density of the signals (figure [[fig:
*** 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$.
- However, we should 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
@@ -822,10 +833,12 @@ Finally, we compare the Amplitude Spectral Density of the signals (figure [[fig:
:END:
#+begin_src bash :exports none :results none
zip data/meas_noise_ac_dc \
mat/data_012.mat \
mat/data_013.mat \
meas_noise_ac_dc.m
if [ meas_noise_ac_dc.m -nt data/meas_noise_ac_dc.zip ]; then
zip data/meas_noise_ac_dc \
mat/data_012.mat \
mat/data_013.mat \
meas_noise_ac_dc.m
fi
#+end_src
The data and matlab files are accessible [[file:data/meas_noise_ac_dc.zip][here]].
@@ -948,13 +961,27 @@ The ASD of the signals are compare on figure [[fig:ac_dc_option_asd]].
#+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
* Transfer function of the Low Pass Filter
:PROPERTIES:
:header-args:matlab+: :tangle low_pass_filter_measurements.m
:header-args:matlab+: :comments org :mkdirp yes
:END:
#+begin_src bash :exports none :results none
if [ low_pass_filter_measurements.m -nt data/low_pass_filter_measurements.zip ]; then
zip data/low_pass_filter_measurements \
mat/data_018.mat \
mat/data_019.mat \
low_pass_filter_measurements.m
fi
#+end_src
The computation files for this section are accessible [[file:data/low_pass_filter_measurements.zip][here]].
** First LPF with a Cut-off frequency of 160Hz
*** Measurement Description
*Goal*:
- Measure the Low Pass Filter Transfer Function
@@ -972,14 +999,14 @@ Which makes a cut-off frequency of $f_c = \frac{1}{RC} = 1000 rad/s = 160Hz$.
#+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];
\draw (0,2)
to [R=\(R\)] ++(2,0) node[circ]
to ++(2,0)
++(-2,0)
to [C=\(C\)] ++(0,-2) node[circ]
++(-2,0)
to ++(2,0)
to ++(2,0)
\end{tikzpicture}
#+end_src
@@ -1002,18 +1029,23 @@ Which makes a cut-off frequency of $f_c = \frac{1}{RC} = 1000 rad/s = 160Hz$.
| 2 | Amplifier 2 |
| 3 | Time |
** Matlab Init :noexport:ignore:
#+name: fig:lpf_picture
#+caption: Picture of the low pass filter used
#+attr_html: :width 500px
[[file:./img/IMG_20190507_102756.jpg]]
*** 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
data = load('mat/data_018.mat', 'data'); data = data.data;
#+end_src
** Transfer function of the LPF
*** 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);
@@ -1068,16 +1100,82 @@ We obtain the result on figure [[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
*** 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
** Second LPF with a Cut-off frequency of 1000Hz
*** Measurement description
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$.
*** Load data
We load the data of the z axis of two geophones.
#+begin_src matlab :results none
data = load('mat/data_019.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 $1060Hz$.
We obtain the result on figure [[fig:Glpf_bode_bis]].
#+begin_src matlab :results none
Gth = 1/(1+s/1060/2/pi);
#+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_bis
#+HEADER: :tangle no :exports results :results value raw replace :noweb yes
#+begin_src matlab :var filepath="figs/Glpf_bode_bis.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:Glpf_bode_bis
#+CAPTION: Bode Diagram of the measured Low Pass filter and the theoritical one
#+RESULTS: fig:Glpf_bode_bis
[[file:figs/Glpf_bode_bis.png]]
*** Conclusion
#+begin_important
The added LPF has the expected behavior.
#+end_important

View File

@@ -0,0 +1,101 @@
% 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.
data = load('mat/data_018.mat', 'data'); data = data.data;
% Transfer function of the LPF
% We compute the transfer function from the signal without the LPF to the signal measured with the LPF.
dt = data(2, 3)-data(1, 3);
Fs = 1/dt; % [Hz]
win = hanning(ceil(10*Fs));
[Glpf, f] = tfestimate(data(:, 2), data(:, 1), win, [], [], Fs);
% 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]].
Gth = 1/(1+s/1000)
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]);
% Load data
% We load the data of the z axis of two geophones.
data = load('mat/data_019.mat', 'data'); data = data.data;
% Transfer function of the LPF
% We compute the transfer function from the signal without the LPF to the signal measured with the LPF.
dt = data(2, 3)-data(1, 3);
Fs = 1/dt; % [Hz]
win = hanning(ceil(10*Fs));
[Glpf, f] = tfestimate(data(:, 2), data(:, 1), win, [], [], Fs);
% We compare this transfer function with a transfer function corresponding to an ideal first order LPF with a cut-off frequency of $1060Hz$.
% We obtain the result on figure [[fig:Glpf_bode_bis]].
Gth = 1/(1+s/1060/2/pi);
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]);