Analyze the measured noise of all encoders

This commit is contained in:
Thomas Dehaeze 2021-02-03 11:20:22 +01:00
parent 0296f80900
commit 53ffaaa793
10 changed files with 166 additions and 79 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2021-02-02 mar. 18:46 --> <!-- 2021-02-03 mer. 11:20 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Encoder Renishaw Vionic - Test Bench</title> <title>Encoder Renishaw Vionic - Test Bench</title>
<meta name="generator" content="Org mode" /> <meta name="generator" content="Org mode" />
@ -39,23 +39,23 @@
<h2>Table of Contents</h2> <h2>Table of Contents</h2>
<div id="text-table-of-contents"> <div id="text-table-of-contents">
<ul> <ul>
<li><a href="#org3a55927">1. Encoder Model</a></li> <li><a href="#org691fd8d">1. Encoder Model</a></li>
<li><a href="#orgde74ebc">2. Noise Measurement</a> <li><a href="#org6d49234">2. Noise Measurement</a>
<ul> <ul>
<li><a href="#org835e359">2.1. Test Bench</a></li> <li><a href="#orga5ff56c">2.1. Test Bench</a></li>
<li><a href="#org52a3f6f">2.2. Results</a></li> <li><a href="#org14877fe">2.2. Results</a></li>
</ul> </ul>
</li> </li>
<li><a href="#orge941dff">3. Linearity Measurement</a> <li><a href="#org2b0bcde">3. Linearity Measurement</a>
<ul> <ul>
<li><a href="#orga2e857a">3.1. Test Bench</a></li> <li><a href="#org175ba6f">3.1. Test Bench</a></li>
<li><a href="#orgc7f59c3">3.2. Results</a></li> <li><a href="#org69056ec">3.2. Results</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org42e063d">4. Dynamical Measurement</a> <li><a href="#org5ca0c03">4. Dynamical Measurement</a>
<ul> <ul>
<li><a href="#org4e0f29a">4.1. Test Bench</a></li> <li><a href="#orgde9a37d">4.1. Test Bench</a></li>
<li><a href="#orgb2f1f77">4.2. Results</a></li> <li><a href="#org8bc51db">4.2. Results</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -65,7 +65,7 @@
<p>This report is also available as a <a href="./test-bench-vionic.pdf">pdf</a>.</p> <p>This report is also available as a <a href="./test-bench-vionic.pdf">pdf</a>.</p>
<hr> <hr>
<div class="note" id="orgf92d65f"> <div class="note" id="org978e8ad">
<p> <p>
You can find below the document of: You can find below the document of:
</p> </p>
@ -90,14 +90,24 @@ In particular, we would like to measure:
</ul> </ul>
<div id="orgddb4738" class="figure"> <div id="orgf372152" class="figure">
<p><img src="figs/encoder_vionic.png" alt="encoder_vionic.png" /> <p><img src="figs/encoder_vionic.png" alt="encoder_vionic.png" />
</p> </p>
<p><span class="figure-number">Figure 1: </span>Picture of the Vionic Encoder</p> <p><span class="figure-number">Figure 1: </span>Picture of the Vionic Encoder</p>
</div> </div>
<div id="outline-container-org3a55927" class="outline-2"> <ul class="org-ul">
<h2 id="org3a55927"><span class="section-number-2">1</span> Encoder Model</h2> <li>1: 2YA275</li>
<li>2: 2YA274</li>
<li>3: 2YA273</li>
<li>4: 2YA270</li>
<li>5: 2YA272</li>
<li>6: 2YA271</li>
<li>7: 2YJ313</li>
</ul>
<div id="outline-container-org691fd8d" class="outline-2">
<h2 id="org691fd8d"><span class="section-number-2">1</span> Encoder Model</h2>
<div class="outline-text-2" id="text-1"> <div class="outline-text-2" id="text-1">
<p> <p>
The Encoder is characterized by its dynamics \(G_m(s)\) from the &ldquo;true&rdquo; displacement \(y\) to measured displacement \(y_m\). The Encoder is characterized by its dynamics \(G_m(s)\) from the &ldquo;true&rdquo; displacement \(y\) to measured displacement \(y_m\).
@ -109,27 +119,27 @@ It is also characterized by its measurement noise \(n\) that can be described by
</p> </p>
<p> <p>
The model of the encoder is shown in Figure <a href="#orga0a431c">2</a>. The model of the encoder is shown in Figure <a href="#orgb6cf5b4">2</a>.
</p> </p>
<div id="orga0a431c" class="figure"> <div id="orgb6cf5b4" class="figure">
<p><img src="figs/encoder-model-schematic.png" alt="encoder-model-schematic.png" /> <p><img src="figs/encoder-model-schematic.png" alt="encoder-model-schematic.png" />
</p> </p>
<p><span class="figure-number">Figure 2: </span>Model of the Encoder</p> <p><span class="figure-number">Figure 2: </span>Model of the Encoder</p>
</div> </div>
<p> <p>
We can also use a transfer function \(G_n(s)\) to shape a noise \(\tilde{n}\) with unity ASD as shown in Figure <a href="#org70392dd">4</a>. We can also use a transfer function \(G_n(s)\) to shape a noise \(\tilde{n}\) with unity ASD as shown in Figure <a href="#orgd00343b">4</a>.
</p> </p>
<div id="org27d4d98" class="figure"> <div id="org2725c4b" class="figure">
<p><img src="figs/encoder-model-schematic-with-asd.png" alt="encoder-model-schematic-with-asd.png" /> <p><img src="figs/encoder-model-schematic-with-asd.png" alt="encoder-model-schematic-with-asd.png" />
</p> </p>
</div> </div>
<table id="org212ba69" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> <table id="org20632fc" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 1:</span> Characteristics of the Vionic Encoder</caption> <caption class="t-above"><span class="table-number">Table 1:</span> Characteristics of the Vionic Encoder</caption>
<colgroup> <colgroup>
@ -174,7 +184,7 @@ We can also use a transfer function \(G_n(s)\) to shape a noise \(\tilde{n}\) wi
</table> </table>
<div id="org70392dd" class="figure"> <div id="orgd00343b" class="figure">
<p><img src="./figs/vionic_expected_noise.png" alt="vionic_expected_noise.png" /> <p><img src="./figs/vionic_expected_noise.png" alt="vionic_expected_noise.png" />
</p> </p>
<p><span class="figure-number">Figure 4: </span>Expected interpolation errors for the Vionic Encoder</p> <p><span class="figure-number">Figure 4: </span>Expected interpolation errors for the Vionic Encoder</p>
@ -183,15 +193,15 @@ We can also use a transfer function \(G_n(s)\) to shape a noise \(\tilde{n}\) wi
</div> </div>
<div id="outline-container-orgde74ebc" class="outline-2"> <div id="outline-container-org6d49234" class="outline-2">
<h2 id="orgde74ebc"><span class="section-number-2">2</span> Noise Measurement</h2> <h2 id="org6d49234"><span class="section-number-2">2</span> Noise Measurement</h2>
<div class="outline-text-2" id="text-2"> <div class="outline-text-2" id="text-2">
<p> <p>
<a id="orgcac09c5"></a> <a id="org4cb96c9"></a>
</p> </p>
</div> </div>
<div id="outline-container-org835e359" class="outline-3"> <div id="outline-container-orga5ff56c" class="outline-3">
<h3 id="org835e359"><span class="section-number-3">2.1</span> Test Bench</h3> <h3 id="orga5ff56c"><span class="section-number-3">2.1</span> Test Bench</h3>
<div class="outline-text-3" id="text-2-1"> <div class="outline-text-3" id="text-2-1">
<p> <p>
To measure the noise \(n\) of the encoder, one can rigidly fix the head and the ruler together such that no motion should be measured. To measure the noise \(n\) of the encoder, one can rigidly fix the head and the ruler together such that no motion should be measured.
@ -200,63 +210,84 @@ Then, the measured signal \(y_m\) corresponds to the noise \(n\).
</div> </div>
</div> </div>
<div id="outline-container-org52a3f6f" class="outline-3"> <div id="outline-container-org14877fe" class="outline-3">
<h3 id="org52a3f6f"><span class="section-number-3">2.2</span> Results</h3> <h3 id="org14877fe"><span class="section-number-3">2.2</span> Results</h3>
<div class="outline-text-3" id="text-2-2"> <div class="outline-text-3" id="text-2-2">
<p> <p>
First we load the data. First we load the data.
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'noise_meas_100s_20kHz.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'x'</span>); <pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Load Data</span></span>
x = x <span class="org-type">-</span> mean(x); enc1 = load(<span class="org-string">'noise_meas_100s_20kHz_1.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'x'</span>);
enc2 = load(<span class="org-string">'noise_meas_100s_20kHz_2.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'x'</span>);
enc3 = load(<span class="org-string">'noise_meas_100s_20kHz_3.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'x'</span>);
enc4 = load(<span class="org-string">'noise_meas_100s_20kHz_4.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'x'</span>);
enc6 = load(<span class="org-string">'noise_meas_100s_20kHz_6.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'x'</span>);
enc7 = load(<span class="org-string">'noise_meas_100s_20kHz_7.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'x'</span>);
</pre> </pre>
</div> </div>
<p> <p>
The time domain data are shown in Figure <a href="#orgc55250e">4</a>. The raw measured data as well as the low pass filtered data (using a first order low pass filter with a cut-off at 10Hz) are shown in Figure <a href="#org72fd239">5</a>.
</p> </p>
<div id="org72fd239" class="figure">
<p><img src="figs/vionic_noise_raw_lpf.png" alt="vionic_noise_raw_lpf.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Time domain measurement (raw data and low pass filtered data with first order 10Hz LPF)</p>
</div>
<p> <p>
<img src="figs/vionic_noise_time.png" alt="vionic_noise_time.png" /> The time domain data for all the encoders are compared in Figure <a href="#orgf7f2fda">6</a>.
The amplitude spectral density is computed and shown in Figure <a href="#orgfb661b7">5</a>.
</p> </p>
<div id="orgf7f2fda" class="figure">
<p><img src="figs/vionic_noise_time.png" alt="vionic_noise_time.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Comparison of the time domain measurement</p>
</div>
<div id="orgfb661b7" class="figure"> <p>
The amplitude spectral density is computed and shown in Figure <a href="#orgf3c083c">7</a>.
</p>
<div id="orgf3c083c" class="figure">
<p><img src="figs/vionic_noise_asd.png" alt="vionic_noise_asd.png" /> <p><img src="figs/vionic_noise_asd.png" alt="vionic_noise_asd.png" />
</p> </p>
<p><span class="figure-number">Figure 5: </span>Amplitude Spectral Density of the measured signal</p> <p><span class="figure-number">Figure 7: </span>Amplitude Spectral Density of the measured signal</p>
</div> </div>
<p> <p>
Let&rsquo;s create a transfer function that approximate the measured noise of the encoder. Let&rsquo;s create a transfer function that approximate the measured noise of the encoder.
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">Gn_e = 1.8e<span class="org-type">-</span>11<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">/</span>5e3); <pre class="src src-matlab">Gn_e = 1.8e<span class="org-type">-</span>11<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">/</span>1e4);
</pre> </pre>
</div> </div>
<p> <p>
The amplitude of the transfer function and the measured ASD are shown in Figure <a href="#org6d60818">6</a>. The amplitude of the transfer function and the measured ASD are shown in Figure <a href="#org8714af7">8</a>.
</p> </p>
<div id="org6d60818" class="figure"> <div id="org8714af7" class="figure">
<p><img src="figs/vionic_noise_asd_model.png" alt="vionic_noise_asd_model.png" /> <p><img src="figs/vionic_noise_asd_model.png" alt="vionic_noise_asd_model.png" />
</p> </p>
<p><span class="figure-number">Figure 6: </span>Measured ASD of the noise and modelled one</p> <p><span class="figure-number">Figure 8: </span>Measured ASD of the noise and modelled one</p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-orge941dff" class="outline-2">
<h2 id="orge941dff"><span class="section-number-2">3</span> Linearity Measurement</h2> <div id="outline-container-org2b0bcde" class="outline-2">
<h2 id="org2b0bcde"><span class="section-number-2">3</span> Linearity Measurement</h2>
<div class="outline-text-2" id="text-3"> <div class="outline-text-2" id="text-3">
<p> <p>
<a id="org0c843ed"></a> <a id="orgc339bfd"></a>
</p> </p>
</div> </div>
<div id="outline-container-orga2e857a" class="outline-3"> <div id="outline-container-org175ba6f" class="outline-3">
<h3 id="orga2e857a"><span class="section-number-3">3.1</span> Test Bench</h3> <h3 id="org175ba6f"><span class="section-number-3">3.1</span> Test Bench</h3>
<div class="outline-text-3" id="text-3-1"> <div class="outline-text-3" id="text-3-1">
<p> <p>
In order to measure the linearity, we have to compare the measured displacement with a reference sensor with a known linearity. In order to measure the linearity, we have to compare the measured displacement with a reference sensor with a known linearity.
@ -265,7 +296,7 @@ An actuator should also be there so impose a displacement.
</p> </p>
<p> <p>
One idea is to use the test-bench shown in Figure <a href="#org793dd45">7</a>. One idea is to use the test-bench shown in Figure <a href="#org30ec1c0">9</a>.
</p> </p>
<p> <p>
@ -278,38 +309,38 @@ As the interferometer has a very large bandwidth, we should be able to estimate
</p> </p>
<div id="org793dd45" class="figure"> <div id="org30ec1c0" class="figure">
<p><img src="figs/test_bench_encoder_calibration.png" alt="test_bench_encoder_calibration.png" /> <p><img src="figs/test_bench_encoder_calibration.png" alt="test_bench_encoder_calibration.png" />
</p> </p>
<p><span class="figure-number">Figure 7: </span>Schematic of the test bench</p> <p><span class="figure-number">Figure 9: </span>Schematic of the test bench</p>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-orgc7f59c3" class="outline-3"> <div id="outline-container-org69056ec" class="outline-3">
<h3 id="orgc7f59c3"><span class="section-number-3">3.2</span> Results</h3> <h3 id="org69056ec"><span class="section-number-3">3.2</span> Results</h3>
</div> </div>
</div> </div>
<div id="outline-container-org42e063d" class="outline-2"> <div id="outline-container-org5ca0c03" class="outline-2">
<h2 id="org42e063d"><span class="section-number-2">4</span> Dynamical Measurement</h2> <h2 id="org5ca0c03"><span class="section-number-2">4</span> Dynamical Measurement</h2>
<div class="outline-text-2" id="text-4"> <div class="outline-text-2" id="text-4">
<p> <p>
<a id="org2b52f4b"></a> <a id="org71dc40b"></a>
</p> </p>
</div> </div>
<div id="outline-container-org4e0f29a" class="outline-3"> <div id="outline-container-orgde9a37d" class="outline-3">
<h3 id="org4e0f29a"><span class="section-number-3">4.1</span> Test Bench</h3> <h3 id="orgde9a37d"><span class="section-number-3">4.1</span> Test Bench</h3>
</div> </div>
<div id="outline-container-orgb2f1f77" class="outline-3"> <div id="outline-container-org8bc51db" class="outline-3">
<h3 id="orgb2f1f77"><span class="section-number-3">4.2</span> Results</h3> <h3 id="org8bc51db"><span class="section-number-3">4.2</span> Results</h3>
</div> </div>
</div> </div>
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p> <p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-02-02 mar. 18:46</p> <p class="date">Created: 2021-02-03 mer. 11:20</p>
</div> </div>
</body> </body>
</html> </html>

View File

@ -16,7 +16,6 @@
#+LaTeX_CLASS: scrreprt #+LaTeX_CLASS: scrreprt
#+LaTeX_CLASS_OPTIONS: [a4paper, 10pt, DIV=12, parskip=full] #+LaTeX_CLASS_OPTIONS: [a4paper, 10pt, DIV=12, parskip=full]
#+LaTeX_HEADER_EXTRA: \input{preamble.tex} #+LaTeX_HEADER_EXTRA: \input{preamble.tex}
#+EXPORT_FILE_NAME: test-bench-vionic.tex
#+PROPERTY: header-args:matlab :session *MATLAB* #+PROPERTY: header-args:matlab :session *MATLAB*
#+PROPERTY: header-args:matlab+ :comments org #+PROPERTY: header-args:matlab+ :comments org
@ -175,20 +174,60 @@ addpath('./mat/');
** Results ** Results
First we load the data. First we load the data.
#+begin_src matlab #+begin_src matlab
load('noise_meas_100s_20kHz.mat', 't', 'x'); %% Load Data
x = x - mean(x); enc1 = load('noise_meas_100s_20kHz_1.mat', 't', 'x');
enc2 = load('noise_meas_100s_20kHz_2.mat', 't', 'x');
enc3 = load('noise_meas_100s_20kHz_3.mat', 't', 'x');
enc4 = load('noise_meas_100s_20kHz_4.mat', 't', 'x');
enc6 = load('noise_meas_100s_20kHz_6.mat', 't', 'x');
enc7 = load('noise_meas_100s_20kHz_7.mat', 't', 'x');
#+end_src #+end_src
The time domain data are shown in Figure [[fig:vionic_noise_time]]. #+begin_src matlab :exports none
%% Remove initial offset
enc1.x = enc1.x - mean(enc1.x(1:1000));
enc2.x = enc2.x - mean(enc2.x(1:1000));
enc3.x = enc3.x - mean(enc3.x(1:1000));
enc4.x = enc4.x - mean(enc4.x(1:1000));
enc6.x = enc6.x - mean(enc6.x(1:1000));
enc7.x = enc7.x - mean(enc7.x(1:1000));
#+end_src
The raw measured data as well as the low pass filtered data (using a first order low pass filter with a cut-off at 10Hz) are shown in Figure [[fig:vionic_noise_raw_lpf]].
#+begin_src matlab :exports none #+begin_src matlab :exports none
figure; figure;
hold on; hold on;
plot(t, 1e9*x, '.', 'DisplayName', 'Raw'); plot(enc1.t, 1e9*enc1.x, '.', 'DisplayName', 'Enc 1 - Raw');
plot(t, 1e9*lsim(1/(1 + s/2/pi/500), x, t), 'DisplayName', 'LPF - 500Hz') plot(enc1.t, 1e9*lsim(1/(1 + s/2/pi/10), enc1.x, enc1.t), '-', 'DisplayName', 'Enc 1 - LPF');
hold off; hold off;
xlabel('Time [s]'); xlabel('Time [s]');
ylabel('Displacement [nm]'); ylabel('Displacement [nm]');
legend('location', 'northeast'); legend('location', 'northwest');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/vionic_noise_raw_lpf.pdf', 'width', 'wide', 'height', 'normal');
#+end_src
#+name: fig:vionic_noise_raw_lpf
#+caption: Time domain measurement (raw data and low pass filtered data with first order 10Hz LPF)
#+RESULTS:
[[file:figs/vionic_noise_raw_lpf.png]]
The time domain data for all the encoders are compared in Figure [[fig:vionic_noise_time]].
#+begin_src matlab :exports none
figure;
hold on;
plot(enc1.t, 1e9*lsim(1/(1 + s/2/pi/10), enc1.x, enc1.t), '.', 'DisplayName', 'Enc 1');
plot(enc2.t, 1e9*lsim(1/(1 + s/2/pi/10), enc2.x, enc2.t), '.', 'DisplayName', 'Enc 2');
plot(enc3.t, 1e9*lsim(1/(1 + s/2/pi/10), enc3.x, enc3.t), '.', 'DisplayName', 'Enc 3');
plot(enc4.t, 1e9*lsim(1/(1 + s/2/pi/10), enc4.x, enc4.t), '.', 'DisplayName', 'Enc 4');
plot(enc6.t, 1e9*lsim(1/(1 + s/2/pi/10), enc6.x, enc6.t), '.', 'DisplayName', 'Enc 6');
plot(enc7.t, 1e9*lsim(1/(1 + s/2/pi/10), enc7.x, enc7.t), '.', 'DisplayName', 'Enc 7');
hold off;
xlabel('Time [s]');
ylabel('Displacement [nm]');
legend('location', 'northwest');
#+end_src #+end_src
#+begin_src matlab :tangle no :exports results :results file replace #+begin_src matlab :tangle no :exports results :results file replace
@ -196,31 +235,41 @@ exportFig('figs/vionic_noise_time.pdf', 'width', 'wide', 'height', 'normal');
#+end_src #+end_src
#+name: fig:vionic_noise_time #+name: fig:vionic_noise_time
#+caption: Time domain measurement (raw data and low pass filtered data) #+caption: Comparison of the time domain measurement
#+RESULTS: #+RESULTS:
[[file:figs/vionic_noise_time.png]] [[file:figs/vionic_noise_time.png]]
The amplitude spectral density is computed and shown in Figure [[fig:vionic_noise_asd]].
The amplitude spectral density is computed and shown in Figure [[fig:vionic_noise_asd]].
#+begin_src matlab :exports none #+begin_src matlab :exports none
% Compute sampling Frequency % Compute sampling Frequency
Ts = (t(end) - t(1))/(length(t)-1); Ts = (enc1.t(end) - enc1.t(1))/(length(enc1.t)-1);
Fs = 1/Ts; Fs = 1/Ts;
#+end_src
#+begin_src matlab :exports none
% Hannning Windows % Hannning Windows
win = hanning(ceil(0.5*Fs)); win = hanning(ceil(0.5/Ts));
[pxx, f] = pwelch(x, win, [], [], Fs); [p1, f] = pwelch(enc1.x, win, [], [], Fs);
[p2, ~] = pwelch(enc2.x, win, [], [], Fs);
[p3, ~] = pwelch(enc3.x, win, [], [], Fs);
[p4, ~] = pwelch(enc4.x, win, [], [], Fs);
[p6, ~] = pwelch(enc6.x, win, [], [], Fs);
[p7, ~] = pwelch(enc7.x, win, [], [], Fs);
#+end_src #+end_src
#+begin_src matlab :exports none #+begin_src matlab :exports none
figure; figure;
plot(f, sqrt(pxx)); hold on;
plot(f, sqrt(p1), 'DisplayName', 'Enc 1');
plot(f, sqrt(p2), 'DisplayName', 'Enc 2');
plot(f, sqrt(p3), 'DisplayName', 'Enc 3');
plot(f, sqrt(p4), 'DisplayName', 'Enc 4');
plot(f, sqrt(p6), 'DisplayName', 'Enc 6');
plot(f, sqrt(p7), 'DisplayName', 'Enc 7');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]'); xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');
xlim([1, Fs/2]); xlim([10, Fs/2]);
ylim([1e-11, 1e-9]); ylim([1e-11, 1e-10]);
legend('location', 'northeast');
#+end_src #+end_src
#+begin_src matlab :tangle no :exports results :results file replace #+begin_src matlab :tangle no :exports results :results file replace
@ -234,7 +283,7 @@ exportFig('figs/vionic_noise_asd.pdf', 'width', 'wide', 'height', 'normal');
Let's create a transfer function that approximate the measured noise of the encoder. Let's create a transfer function that approximate the measured noise of the encoder.
#+begin_src matlab #+begin_src matlab
Gn_e = 1.8e-11/(1 + s/2/pi/5e3); Gn_e = 1.8e-11/(1 + s/2/pi/1e4);
#+end_src #+end_src
The amplitude of the transfer function and the measured ASD are shown in Figure [[fig:vionic_noise_asd_model]]. The amplitude of the transfer function and the measured ASD are shown in Figure [[fig:vionic_noise_asd_model]].
@ -242,13 +291,19 @@ The amplitude of the transfer function and the measured ASD are shown in Figure
#+begin_src matlab :exports none #+begin_src matlab :exports none
figure; figure;
hold on; hold on;
plot(f, sqrt(pxx)); plot(f, sqrt(p1), 'color', [0, 0, 0, 0.5], 'DisplayName', '$\Gamma_n(\omega)$');
plot(f, abs(squeeze(freqresp(Gn_e, f, 'Hz'))), 'k--'); plot(f, sqrt(p2), 'color', [0, 0, 0, 0.5], 'HandleVisibility', 'off');
plot(f, sqrt(p3), 'color', [0, 0, 0, 0.5], 'HandleVisibility', 'off');
plot(f, sqrt(p4), 'color', [0, 0, 0, 0.5], 'HandleVisibility', 'off');
plot(f, sqrt(p6), 'color', [0, 0, 0, 0.5], 'HandleVisibility', 'off');
plot(f, sqrt(p7), 'color', [0, 0, 0, 0.5], 'HandleVisibility', 'off');
plot(f, abs(squeeze(freqresp(Gn_e, f, 'Hz'))), 'r-', 'DisplayName', '$|G_n(j\omega)|$');
hold off; hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]'); xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');
xlim([1, Fs/2]); xlim([10, Fs/2]);
ylim([1e-11, 1e-9]); ylim([1e-11, 1e-10]);
legend('location', 'northeast');
#+end_src #+end_src
#+begin_src matlab :tangle no :exports results :results file replace #+begin_src matlab :tangle no :exports results :results file replace
@ -259,6 +314,7 @@ exportFig('figs/vionic_noise_asd_model.pdf', 'width', 'wide', 'height', 'normal'
#+caption: Measured ASD of the noise and modelled one #+caption: Measured ASD of the noise and modelled one
#+RESULTS: #+RESULTS:
[[file:figs/vionic_noise_asd_model.png]] [[file:figs/vionic_noise_asd_model.png]]
* Linearity Measurement * Linearity Measurement
<<sec:linearity_measurement>> <<sec:linearity_measurement>>
** Test Bench ** Test Bench