nass-micro-station-measurem.../instrumentation/index.html
2020-11-24 17:42:27 +01:00

729 lines
25 KiB
HTML

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2020-11-12 jeu. 16:39 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Measurements on the instrumentation</title>
<meta name="generator" content="Org mode" />
<meta name="author" content="Dehaeze Thomas" />
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
<script>MathJax = {
tex: {
tags: 'ams',
macros: {bm: ["\\boldsymbol{#1}",1],}
}
};
</script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
</head>
<body>
<div id="org-div-home-and-up">
<a accesskey="h" href="../index.html"> UP </a>
|
<a accesskey="H" href="../index.html"> HOME </a>
</div><div id="content">
<h1 class="title">Measurements on the instrumentation</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org575a2ef">1. Measure of the noise of the Voltage Amplifier</a>
<ul>
<li><a href="#orgf7d6556">1.1. Measurement Description</a></li>
<li><a href="#org355a7b5">1.2. Load data</a></li>
<li><a href="#orgdd9efc8">1.3. Time Domain</a></li>
<li><a href="#org2042f75">1.4. Frequency Domain</a></li>
<li><a href="#org58e87f6">1.5. Conclusion</a></li>
</ul>
</li>
<li><a href="#org5837403">2. Measure of the influence of the AC/DC option on the voltage amplifiers</a>
<ul>
<li><a href="#orgdbe55cf">2.1. Measurement Description</a></li>
<li><a href="#org7456e69">2.2. Load data</a></li>
<li><a href="#org25d2f84">2.3. Time Domain</a></li>
<li><a href="#org089c2d7">2.4. Frequency Domain</a></li>
<li><a href="#orgf774275">2.5. Conclusion</a></li>
</ul>
</li>
<li><a href="#org53c2f0f">3. Transfer function of the Low Pass Filter</a>
<ul>
<li><a href="#orge98780d">3.1. First LPF with a Cut-off frequency of 160Hz</a>
<ul>
<li><a href="#org96fa587">3.1.1. Measurement Description</a></li>
<li><a href="#orgf82e4ab">3.1.2. Load data</a></li>
<li><a href="#org9c9a07c">3.1.3. Transfer function of the LPF</a></li>
<li><a href="#orgb110f25">3.1.4. Conclusion</a></li>
</ul>
</li>
<li><a href="#org1edfecc">3.2. Second LPF with a Cut-off frequency of 1000Hz</a>
<ul>
<li><a href="#org60fea06">3.2.1. Measurement description</a></li>
<li><a href="#org0ffd8a4">3.2.2. Load data</a></li>
<li><a href="#org39f2fc3">3.2.3. Transfer function of the LPF</a></li>
<li><a href="#org127ac21">3.2.4. Conclusion</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-org575a2ef" class="outline-2">
<h2 id="org575a2ef"><span class="section-number-2">1</span> Measure of the noise of the Voltage Amplifier</h2>
<div class="outline-text-2" id="text-1">
<p>
<a id="org87914f2"></a>
</p>
<div class="note" id="orged55ddc">
<p>
All the files (data and Matlab scripts) are accessible <a href="data/meas_volt_amp.zip">here</a>.
</p>
</div>
</div>
<div id="outline-container-orgf7d6556" class="outline-3">
<h3 id="orgf7d6556"><span class="section-number-3">1.1</span> Measurement Description</h3>
<div class="outline-text-3" id="text-1-1">
<p>
<b>Goal</b>:
</p>
<ul class="org-ul">
<li>Determine the Voltage Amplifier noise</li>
</ul>
<p>
<b>Setup</b>:
</p>
<ul class="org-ul">
<li>The two inputs (differential) of the voltage amplifier are shunted with 50Ohms</li>
<li>The AC/DC option of the Voltage amplifier is on AC</li>
<li>The low pass filter is set to 1hHz</li>
<li>We measure the output of the voltage amplifier with a 16bits ADC of the Speedgoat</li>
</ul>
<p>
<b>Measurements</b>:
</p>
<ul class="org-ul">
<li><code>data_003</code>: Ampli OFF</li>
<li><code>data_004</code>: Ampli ON set to 20dB</li>
<li><code>data_005</code>: Ampli ON set to 40dB</li>
<li><code>data_006</code>: Ampli ON set to 60dB</li>
</ul>
</div>
</div>
<div id="outline-container-org355a7b5" class="outline-3">
<h3 id="org355a7b5"><span class="section-number-3">1.2</span> Load data</h3>
<div class="outline-text-3" id="text-1-2">
<div class="org-src-container">
<pre class="src src-matlab">amp_off = load(<span class="org-string">'mat/data_003.mat'</span>, <span class="org-string">'data'</span>); amp_off = amp_off.data(<span class="org-type">:</span>, [1,3]);
amp_20d = load(<span class="org-string">'mat/data_004.mat'</span>, <span class="org-string">'data'</span>); amp_20d = amp_20d.data(<span class="org-type">:</span>, [1,3]);
amp_40d = load(<span class="org-string">'mat/data_005.mat'</span>, <span class="org-string">'data'</span>); amp_40d = amp_40d.data(<span class="org-type">:</span>, [1,3]);
amp_60d = load(<span class="org-string">'mat/data_006.mat'</span>, <span class="org-string">'data'</span>); amp_60d = amp_60d.data(<span class="org-type">:</span>, [1,3]);
</pre>
</div>
</div>
</div>
<div id="outline-container-orgdd9efc8" class="outline-3">
<h3 id="orgdd9efc8"><span class="section-number-3">1.3</span> Time Domain</h3>
<div class="outline-text-3" id="text-1-3">
<p>
The time domain signals are shown on figure <a href="#orgffaa33c">1</a>.
</p>
<div id="orgffaa33c" class="figure">
<p><img src="figs/ampli_noise_time.png" alt="ampli_noise_time.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Output of the amplifier</p>
</div>
</div>
</div>
<div id="outline-container-org2042f75" class="outline-3">
<h3 id="org2042f75"><span class="section-number-3">1.4</span> Frequency Domain</h3>
<div class="outline-text-3" id="text-1-4">
<p>
We first compute some parameters that will be used for the PSD computation.
</p>
<div class="org-src-container">
<pre class="src src-matlab">dt = amp_off(2, 2)<span class="org-type">-</span>amp_off(1, 2);
Fs = 1<span class="org-type">/</span>dt; <span class="org-comment">% [Hz]</span>
win = hanning(ceil(10<span class="org-type">*</span>Fs));
</pre>
</div>
<p>
Then we compute the Power Spectral Density using <code>pwelch</code> function.
</p>
<div class="org-src-container">
<pre class="src src-matlab">[pxoff, f] = pwelch(amp_off(<span class="org-type">:</span>,1), win, [], [], Fs);
[px20d, <span class="org-type">~</span>] = pwelch(amp_20d(<span class="org-type">:</span>,1), win, [], [], Fs);
[px40d, <span class="org-type">~</span>] = pwelch(amp_40d(<span class="org-type">:</span>,1), win, [], [], Fs);
[px60d, <span class="org-type">~</span>] = pwelch(amp_60d(<span class="org-type">:</span>,1), win, [], [], Fs);
</pre>
</div>
<p>
We compute the theoretical ADC noise.
</p>
<div class="org-src-container">
<pre class="src src-matlab">q = 20<span class="org-type">/</span>2<span class="org-type">^</span>16; <span class="org-comment">% quantization</span>
Sq = q<span class="org-type">^</span>2<span class="org-type">/</span>12<span class="org-type">/</span>1000; <span class="org-comment">% PSD of the ADC noise</span>
</pre>
</div>
<p>
Finally, the ASD is shown on figure <a href="#org1514c56">2</a>.
</p>
<div id="org1514c56" class="figure">
<p><img src="figs/ampli_noise_psd.png" alt="ampli_noise_psd.png" />
</p>
<p><span class="figure-number">Figure 2: </span>Amplitude Spectral Density of the measured voltage at the output of the voltage amplifier</p>
</div>
</div>
</div>
<div id="outline-container-org58e87f6" class="outline-3">
<h3 id="org58e87f6"><span class="section-number-3">1.5</span> Conclusion</h3>
<div class="outline-text-3" id="text-1-5">
<div class="important" id="org7198d4c">
<p>
<b>Questions</b>:
</p>
<ul class="org-ul">
<li>Where does those sharp peaks comes from? Can this be due to aliasing?</li>
</ul>
<p>
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.
</p>
</div>
</div>
</div>
</div>
<div id="outline-container-org5837403" class="outline-2">
<h2 id="org5837403"><span class="section-number-2">2</span> Measure of the influence of the AC/DC option on the voltage amplifiers</h2>
<div class="outline-text-2" id="text-2">
<p>
<a id="org4e0bd48"></a>
</p>
<div class="note" id="org4311309">
<p>
All the files (data and Matlab scripts) are accessible <a href="data/meas_noise_ac_dc.zip">here</a>.
</p>
</div>
</div>
<div id="outline-container-orgdbe55cf" class="outline-3">
<h3 id="orgdbe55cf"><span class="section-number-3">2.1</span> Measurement Description</h3>
<div class="outline-text-3" id="text-2-1">
<p>
<b>Goal</b>:
</p>
<ul class="org-ul">
<li>Measure the influence of the high-pass filter option of the voltage amplifiers</li>
</ul>
<p>
<b>Setup</b>:
</p>
<ul class="org-ul">
<li>One geophone is located on the marble.</li>
<li>It&rsquo;s signal goes to two voltage amplifiers with a gain of 60dB.</li>
<li>One voltage amplifier is on the AC option, the other is on the DC option.</li>
</ul>
<p>
<b>Measurements</b>:
First measurement (<code>mat/data_014.mat</code> file):
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-right" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-right">Column</th>
<th scope="col" class="org-left">Signal</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-right">1</td>
<td class="org-left">Amplifier 1 with AC option</td>
</tr>
<tr>
<td class="org-right">2</td>
<td class="org-left">Amplifier 2 with DC option</td>
</tr>
<tr>
<td class="org-right">3</td>
<td class="org-left">Time</td>
</tr>
</tbody>
</table>
<p>
Second measurement (<code>mat/data_015.mat</code> file):
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-right" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-right">Column</th>
<th scope="col" class="org-left">Signal</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-right">1</td>
<td class="org-left">Amplifier 1 with DC option</td>
</tr>
<tr>
<td class="org-right">2</td>
<td class="org-left">Amplifier 2 with AC option</td>
</tr>
<tr>
<td class="org-right">3</td>
<td class="org-left">Time</td>
</tr>
</tbody>
</table>
<div id="org7c3455c" class="figure">
<p><img src="./img/IMG_20190503_170936.jpg" alt="IMG_20190503_170936.jpg" width="500px" />
</p>
<p><span class="figure-number">Figure 3: </span>Picture of the two voltages amplifiers</p>
</div>
</div>
</div>
<div id="outline-container-org7456e69" class="outline-3">
<h3 id="org7456e69"><span class="section-number-3">2.2</span> Load data</h3>
<div class="outline-text-3" id="text-2-2">
<p>
We load the data of the z axis of two geophones.
</p>
<div class="org-src-container">
<pre class="src src-matlab">meas14 = load(<span class="org-string">'mat/data_014.mat'</span>, <span class="org-string">'data'</span>); meas14 = meas14.data;
meas15 = load(<span class="org-string">'mat/data_015.mat'</span>, <span class="org-string">'data'</span>); meas15 = meas15.data;
</pre>
</div>
</div>
</div>
<div id="outline-container-org25d2f84" class="outline-3">
<h3 id="org25d2f84"><span class="section-number-3">2.3</span> Time Domain</h3>
<div class="outline-text-3" id="text-2-3">
<p>
The signals are shown on figure <a href="#orgbb51b92">4</a>.
</p>
<div id="orgbb51b92" class="figure">
<p><img src="figs/ac_dc_option_time.png" alt="ac_dc_option_time.png" />
</p>
<p><span class="figure-number">Figure 4: </span>Comparison of the signals going through the Voltage amplifiers</p>
</div>
</div>
</div>
<div id="outline-container-org089c2d7" class="outline-3">
<h3 id="org089c2d7"><span class="section-number-3">2.4</span> Frequency Domain</h3>
<div class="outline-text-3" id="text-2-4">
<p>
We first compute some parameters that will be used for the PSD computation.
</p>
<div class="org-src-container">
<pre class="src src-matlab">dt = meas14(2, 3)<span class="org-type">-</span>meas14(1, 3);
Fs = 1<span class="org-type">/</span>dt; <span class="org-comment">% [Hz]</span>
win = hanning(ceil(10<span class="org-type">*</span>Fs));
</pre>
</div>
<p>
Then we compute the Power Spectral Density using <code>pwelch</code> function.
</p>
<div class="org-src-container">
<pre class="src src-matlab">[pxamp1ac, f] = pwelch(meas14(<span class="org-type">:</span>, 1), win, [], [], Fs);
[pxamp2dc, <span class="org-type">~</span>] = pwelch(meas14(<span class="org-type">:</span>, 2), win, [], [], Fs);
[pxamp1dc, <span class="org-type">~</span>] = pwelch(meas15(<span class="org-type">:</span>, 1), win, [], [], Fs);
[pxamp2ac, <span class="org-type">~</span>] = pwelch(meas15(<span class="org-type">:</span>, 2), win, [], [], Fs);
</pre>
</div>
<p>
The ASD of the signals are compare on figure <a href="#orge363ddf">5</a>.
</p>
<div id="orge363ddf" class="figure">
<p><img src="figs/ac_dc_option_asd.png" alt="ac_dc_option_asd.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Amplitude Spectral Density of the measured signals</p>
</div>
</div>
</div>
<div id="outline-container-orgf774275" class="outline-3">
<h3 id="orgf774275"><span class="section-number-3">2.5</span> Conclusion</h3>
<div class="outline-text-3" id="text-2-5">
<div class="important" id="org4302749">
<ul class="org-ul">
<li>The voltage amplifiers include some very sharp high pass filters at 1.5Hz (maybe 4th order)</li>
<li>There is a DC offset on the time domain signal because the DC-offset knob was not set to zero</li>
</ul>
</div>
</div>
</div>
</div>
<div id="outline-container-org53c2f0f" class="outline-2">
<h2 id="org53c2f0f"><span class="section-number-2">3</span> Transfer function of the Low Pass Filter</h2>
<div class="outline-text-2" id="text-3">
<p>
<a id="org1dde479"></a>
</p>
<p>
The computation files for this section are accessible <a href="data/low_pass_filter_measurements.zip">here</a>.
</p>
</div>
<div id="outline-container-orge98780d" class="outline-3">
<h3 id="orge98780d"><span class="section-number-3">3.1</span> First LPF with a Cut-off frequency of 160Hz</h3>
<div class="outline-text-3" id="text-3-1">
</div>
<div id="outline-container-org96fa587" class="outline-4">
<h4 id="org96fa587"><span class="section-number-4">3.1.1</span> Measurement Description</h4>
<div class="outline-text-4" id="text-3-1-1">
<p>
<b>Goal</b>:
</p>
<ul class="org-ul">
<li>Measure the Low Pass Filter Transfer Function</li>
</ul>
<p>
The values of the components are:
</p>
\begin{aligned}
R &= 1k\Omega \\
C &= 1\mu F
\end{aligned}
<p>
Which makes a cut-off frequency of \(f_c = \frac{1}{RC} = 1000 rad/s = 160Hz\).
</p>
<div class="org-src-container">
<pre class="src src-latex" id="orgedba10d"><span class="org-font-latex-sedate"><span class="org-keyword">\begin</span></span>{<span class="org-function-name">tikzpicture</span>}
<span class="org-font-latex-sedate">\draw</span> (0,2)
to [R=<span class="org-font-latex-sedate"><span class="org-font-latex-math">\(R\)</span></span>] ++(2,0) node[circ]
to ++(2,0)
++(-2,0)
to [C=<span class="org-font-latex-sedate"><span class="org-font-latex-math">\(C\)</span></span>] ++(0,-2) node[circ]
++(-2,0)
to ++(2,0)
to ++(2,0)
<span class="org-font-latex-sedate"><span class="org-keyword">\end</span></span>{<span class="org-function-name">tikzpicture</span>}
</pre>
</div>
<div id="org75b8ca4" class="figure">
<p><img src="figs/lpf.png" alt="lpf.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Schematic of the Low Pass Filter used</p>
</div>
<p>
<b>Setup</b>:
</p>
<ul class="org-ul">
<li>We are measuring the signal from from Geophone with a BNC T</li>
<li>On part goes to column 1 through the LPF</li>
<li>The other part goes to column 2 without the LPF</li>
</ul>
<p>
<b>Measurements</b>:
<code>mat/data_018.mat</code>:
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-right" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-right">Column</th>
<th scope="col" class="org-left">Signal</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-right">1</td>
<td class="org-left">Amplifier 1 with LPF</td>
</tr>
<tr>
<td class="org-right">2</td>
<td class="org-left">Amplifier 2</td>
</tr>
<tr>
<td class="org-right">3</td>
<td class="org-left">Time</td>
</tr>
</tbody>
</table>
<div id="org1f2ff7e" class="figure">
<p><img src="./img/IMG_20190507_102756.jpg" alt="IMG_20190507_102756.jpg" width="500px" />
</p>
<p><span class="figure-number">Figure 7: </span>Picture of the low pass filter used</p>
</div>
</div>
</div>
<div id="outline-container-orgf82e4ab" class="outline-4">
<h4 id="orgf82e4ab"><span class="section-number-4">3.1.2</span> Load data</h4>
<div class="outline-text-4" id="text-3-1-2">
<p>
We load the data of the z axis of two geophones.
</p>
<div class="org-src-container">
<pre class="src src-matlab">data = load(<span class="org-string">'mat/data_018.mat'</span>, <span class="org-string">'data'</span>); data = data.data;
</pre>
</div>
</div>
</div>
<div id="outline-container-org9c9a07c" class="outline-4">
<h4 id="org9c9a07c"><span class="section-number-4">3.1.3</span> Transfer function of the LPF</h4>
<div class="outline-text-4" id="text-3-1-3">
<p>
We compute the transfer function from the signal without the LPF to the signal measured with the LPF.
</p>
<div class="org-src-container">
<pre class="src src-matlab">dt = data(2, 3)<span class="org-type">-</span>data(1, 3);
Fs = 1<span class="org-type">/</span>dt; <span class="org-comment">% [Hz]</span>
win = hanning(ceil(10<span class="org-type">*</span>Fs));
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[Glpf, f] = tfestimate(data(<span class="org-type">:</span>, 2), data(<span class="org-type">:</span>, 1), win, [], [], Fs);
</pre>
</div>
<p>
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 <a href="#orga5b8e9e">8</a>.
</p>
<div class="org-src-container">
<pre class="src src-matlab">Gth = 1<span class="org-type">/</span>(1<span class="org-type">+</span>s<span class="org-type">/</span>1000)
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">figure</span>;
ax1 = subplot(2, 1, 1);
hold on;
plot(f, abs(Glpf));
plot(f, abs(squeeze(freqresp(Gth, f, <span class="org-string">'Hz'</span>))));
hold off;
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'xscale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'yscale'</span>, <span class="org-string">'log'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XTickLabel'</span>,[]);
ylabel(<span class="org-string">'Magnitude'</span>);
ax2 = subplot(2, 1, 2);
hold on;
plot(f, mod(180<span class="org-type">+</span>180<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">*</span>phase(Glpf), 360)<span class="org-type">-</span>180);
plot(f, 180<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">*</span>unwrap(angle(squeeze(freqresp(Gth, f, <span class="org-string">'Hz'</span>)))));
hold off;
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'xscale'</span>, <span class="org-string">'log'</span>);
ylim([<span class="org-type">-</span>180, 180]);
yticks([<span class="org-type">-</span>180, <span class="org-type">-</span>90, 0, 90, 180]);
xlabel(<span class="org-string">'Frequency [Hz]'</span>); ylabel(<span class="org-string">'Phase'</span>);
linkaxes([ax1,ax2],<span class="org-string">'x'</span>);
xlim([1, 500]);
</pre>
</div>
<div id="orga5b8e9e" class="figure">
<p><img src="figs/Glpf_bode.png" alt="Glpf_bode.png" />
</p>
<p><span class="figure-number">Figure 8: </span>Bode Diagram of the measured Low Pass filter and the theoritical one</p>
</div>
</div>
</div>
<div id="outline-container-orgb110f25" class="outline-4">
<h4 id="orgb110f25"><span class="section-number-4">3.1.4</span> Conclusion</h4>
<div class="outline-text-4" id="text-3-1-4">
<div class="important" id="orgdd53898">
<p>
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\).
</p>
</div>
</div>
</div>
</div>
<div id="outline-container-org1edfecc" class="outline-3">
<h3 id="org1edfecc"><span class="section-number-3">3.2</span> Second LPF with a Cut-off frequency of 1000Hz</h3>
<div class="outline-text-3" id="text-3-2">
</div>
<div id="outline-container-org60fea06" class="outline-4">
<h4 id="org60fea06"><span class="section-number-4">3.2.1</span> Measurement description</h4>
<div class="outline-text-4" id="text-3-2-1">
<p>
This time, the value are
</p>
\begin{aligned}
R &= 1k\Omega \\
C &= 150nF
\end{aligned}
<p>
Which makes a low pass filter with a cut-off frequency of \(f_c = 1060Hz\).
</p>
</div>
</div>
<div id="outline-container-org0ffd8a4" class="outline-4">
<h4 id="org0ffd8a4"><span class="section-number-4">3.2.2</span> Load data</h4>
<div class="outline-text-4" id="text-3-2-2">
<p>
We load the data of the z axis of two geophones.
</p>
<div class="org-src-container">
<pre class="src src-matlab">data = load(<span class="org-string">'mat/data_019.mat'</span>, <span class="org-string">'data'</span>); data = data.data;
</pre>
</div>
</div>
</div>
<div id="outline-container-org39f2fc3" class="outline-4">
<h4 id="org39f2fc3"><span class="section-number-4">3.2.3</span> Transfer function of the LPF</h4>
<div class="outline-text-4" id="text-3-2-3">
<p>
We compute the transfer function from the signal without the LPF to the signal measured with the LPF.
</p>
<div class="org-src-container">
<pre class="src src-matlab">dt = data(2, 3)<span class="org-type">-</span>data(1, 3);
Fs = 1<span class="org-type">/</span>dt; <span class="org-comment">% [Hz]</span>
win = hanning(ceil(10<span class="org-type">*</span>Fs));
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[Glpf, f] = tfestimate(data(<span class="org-type">:</span>, 2), data(<span class="org-type">:</span>, 1), win, [], [], Fs);
</pre>
</div>
<p>
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 <a href="#org16c9122">9</a>.
</p>
<div class="org-src-container">
<pre class="src src-matlab">Gth = 1<span class="org-type">/</span>(1<span class="org-type">+</span>s<span class="org-type">/</span>1060<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">figure</span>;
ax1 = subplot(2, 1, 1);
hold on;
plot(f, abs(Glpf));
plot(f, abs(squeeze(freqresp(Gth, f, <span class="org-string">'Hz'</span>))));
hold off;
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'xscale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'yscale'</span>, <span class="org-string">'log'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XTickLabel'</span>,[]);
ylabel(<span class="org-string">'Magnitude'</span>);
ax2 = subplot(2, 1, 2);
hold on;
plot(f, mod(180<span class="org-type">+</span>180<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">*</span>phase(Glpf), 360)<span class="org-type">-</span>180);
plot(f, 180<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">*</span>unwrap(angle(squeeze(freqresp(Gth, f, <span class="org-string">'Hz'</span>)))));
hold off;
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'xscale'</span>, <span class="org-string">'log'</span>);
ylim([<span class="org-type">-</span>180, 180]);
yticks([<span class="org-type">-</span>180, <span class="org-type">-</span>90, 0, 90, 180]);
xlabel(<span class="org-string">'Frequency [Hz]'</span>); ylabel(<span class="org-string">'Phase'</span>);
linkaxes([ax1,ax2],<span class="org-string">'x'</span>);
xlim([1, 500]);
</pre>
</div>
<div id="org16c9122" class="figure">
<p><img src="figs/Glpf_bode_bis.png" alt="Glpf_bode_bis.png" />
</p>
<p><span class="figure-number">Figure 9: </span>Bode Diagram of the measured Low Pass filter and the theoritical one</p>
</div>
</div>
</div>
<div id="outline-container-org127ac21" class="outline-4">
<h4 id="org127ac21"><span class="section-number-4">3.2.4</span> Conclusion</h4>
<div class="outline-text-4" id="text-3-2-4">
<div class="important" id="orgd954ff9">
<p>
The added LPF has the expected behavior.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2020-11-12 jeu. 16:39</p>
</div>
</body>
</html>