nass-micro-station-measurem.../instrumentation/index.html

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. 10:28 -->
<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="#org0b9c6e7">1. Measure of the noise of the Voltage Amplifier</a>
<ul>
<li><a href="#orgce5ef47">1.1. Measurement Description</a></li>
<li><a href="#org4658c5c">1.2. Load data</a></li>
<li><a href="#org5de2d60">1.3. Time Domain</a></li>
<li><a href="#org5fc539a">1.4. Frequency Domain</a></li>
<li><a href="#orgbc39043">1.5. Conclusion</a></li>
</ul>
</li>
<li><a href="#org182f3d2">2. Measure of the influence of the AC/DC option on the voltage amplifiers</a>
<ul>
<li><a href="#orgc5cfc61">2.1. Measurement Description</a></li>
<li><a href="#org0c0a3f2">2.2. Load data</a></li>
<li><a href="#orgb381461">2.3. Time Domain</a></li>
<li><a href="#org831a8d7">2.4. Frequency Domain</a></li>
<li><a href="#org0f7903d">2.5. Conclusion</a></li>
</ul>
</li>
<li><a href="#orge486804">3. Transfer function of the Low Pass Filter</a>
<ul>
<li><a href="#org400e34d">3.1. First LPF with a Cut-off frequency of 160Hz</a>
<ul>
<li><a href="#org8e6b3f9">3.1.1. Measurement Description</a></li>
<li><a href="#org3c2d014">3.1.2. Load data</a></li>
<li><a href="#orgddafe0a">3.1.3. Transfer function of the LPF</a></li>
<li><a href="#org7a0daf9">3.1.4. Conclusion</a></li>
</ul>
</li>
<li><a href="#org5504322">3.2. Second LPF with a Cut-off frequency of 1000Hz</a>
<ul>
<li><a href="#orge51e102">3.2.1. Measurement description</a></li>
<li><a href="#org609fd78">3.2.2. Load data</a></li>
<li><a href="#orgad7e872">3.2.3. Transfer function of the LPF</a></li>
<li><a href="#org73a58fb">3.2.4. Conclusion</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-org0b9c6e7" class="outline-2">
<h2 id="org0b9c6e7"><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="org6a52764"></a>
</p>
<div class="note" id="orge2ed99a">
<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-orgce5ef47" class="outline-3">
<h3 id="orgce5ef47"><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-org4658c5c" class="outline-3">
<h3 id="org4658c5c"><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-org5de2d60" class="outline-3">
<h3 id="org5de2d60"><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="#org2fccd36">1</a>.
</p>
<div id="org2fccd36" 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-org5fc539a" class="outline-3">
<h3 id="org5fc539a"><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="#org46e6591">2</a>.
</p>
<div id="org46e6591" 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-orgbc39043" class="outline-3">
<h3 id="orgbc39043"><span class="section-number-3">1.5</span> Conclusion</h3>
<div class="outline-text-3" id="text-1-5">
<div class="important" id="orgb8e9939">
<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-org182f3d2" class="outline-2">
<h2 id="org182f3d2"><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="org4bf4c36"></a>
</p>
<div class="note" id="org66d7fee">
<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-orgc5cfc61" class="outline-3">
<h3 id="orgc5cfc61"><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="org52bc26f" 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-org0c0a3f2" class="outline-3">
<h3 id="org0c0a3f2"><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-orgb381461" class="outline-3">
<h3 id="orgb381461"><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="#org26ff108">4</a>.
</p>
<div id="org26ff108" 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-org831a8d7" class="outline-3">
<h3 id="org831a8d7"><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="#org252ca9f">5</a>.
</p>
<div id="org252ca9f" 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-org0f7903d" class="outline-3">
<h3 id="org0f7903d"><span class="section-number-3">2.5</span> Conclusion</h3>
<div class="outline-text-3" id="text-2-5">
<div class="important" id="orga7652b6">
<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-orge486804" class="outline-2">
<h2 id="orge486804"><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="orgae11ccf"></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-org400e34d" class="outline-3">
<h3 id="org400e34d"><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-org8e6b3f9" class="outline-4">
<h4 id="org8e6b3f9"><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="orgebabef7"><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="org19a615d" 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="org91c0742" 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-org3c2d014" class="outline-4">
<h4 id="org3c2d014"><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-orgddafe0a" class="outline-4">
<h4 id="orgddafe0a"><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="#orgb174301">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="orgb174301" 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-org7a0daf9" class="outline-4">
<h4 id="org7a0daf9"><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="org84503a8">
<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-org5504322" class="outline-3">
<h3 id="org5504322"><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-orge51e102" class="outline-4">
<h4 id="orge51e102"><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-org609fd78" class="outline-4">
<h4 id="org609fd78"><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-orgad7e872" class="outline-4">
<h4 id="orgad7e872"><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="#org9707219">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="org9707219" 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-org73a58fb" class="outline-4">
<h4 id="org73a58fb"><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="org1fede99">
<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. 10:28</p>
</div>
</body>
</html>