Analyze the measured noise of all encoders
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 85 KiB |
BIN
figs/vionic_noise_raw_lpf.pdf
Normal file
BIN
figs/vionic_noise_raw_lpf.png
Normal file
After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 53 KiB |
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-02-02 mar. 18:46 -->
|
||||
<!-- 2021-02-03 mer. 11:20 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<title>Encoder Renishaw Vionic - Test Bench</title>
|
||||
<meta name="generator" content="Org mode" />
|
||||
@ -39,23 +39,23 @@
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org3a55927">1. Encoder Model</a></li>
|
||||
<li><a href="#orgde74ebc">2. Noise Measurement</a>
|
||||
<li><a href="#org691fd8d">1. Encoder Model</a></li>
|
||||
<li><a href="#org6d49234">2. Noise Measurement</a>
|
||||
<ul>
|
||||
<li><a href="#org835e359">2.1. Test Bench</a></li>
|
||||
<li><a href="#org52a3f6f">2.2. Results</a></li>
|
||||
<li><a href="#orga5ff56c">2.1. Test Bench</a></li>
|
||||
<li><a href="#org14877fe">2.2. Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orge941dff">3. Linearity Measurement</a>
|
||||
<li><a href="#org2b0bcde">3. Linearity Measurement</a>
|
||||
<ul>
|
||||
<li><a href="#orga2e857a">3.1. Test Bench</a></li>
|
||||
<li><a href="#orgc7f59c3">3.2. Results</a></li>
|
||||
<li><a href="#org175ba6f">3.1. Test Bench</a></li>
|
||||
<li><a href="#org69056ec">3.2. Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org42e063d">4. Dynamical Measurement</a>
|
||||
<li><a href="#org5ca0c03">4. Dynamical Measurement</a>
|
||||
<ul>
|
||||
<li><a href="#org4e0f29a">4.1. Test Bench</a></li>
|
||||
<li><a href="#orgb2f1f77">4.2. Results</a></li>
|
||||
<li><a href="#orgde9a37d">4.1. Test Bench</a></li>
|
||||
<li><a href="#org8bc51db">4.2. Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -65,7 +65,7 @@
|
||||
<p>This report is also available as a <a href="./test-bench-vionic.pdf">pdf</a>.</p>
|
||||
<hr>
|
||||
|
||||
<div class="note" id="orgf92d65f">
|
||||
<div class="note" id="org978e8ad">
|
||||
<p>
|
||||
You can find below the document of:
|
||||
</p>
|
||||
@ -90,14 +90,24 @@ In particular, we would like to measure:
|
||||
</ul>
|
||||
|
||||
|
||||
<div id="orgddb4738" class="figure">
|
||||
<div id="orgf372152" class="figure">
|
||||
<p><img src="figs/encoder_vionic.png" alt="encoder_vionic.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 1: </span>Picture of the Vionic Encoder</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3a55927" class="outline-2">
|
||||
<h2 id="org3a55927"><span class="section-number-2">1</span> Encoder Model</h2>
|
||||
<ul class="org-ul">
|
||||
<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">
|
||||
<p>
|
||||
The Encoder is characterized by its dynamics \(G_m(s)\) from the “true” 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>
|
||||
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>
|
||||
|
||||
|
||||
<div id="orga0a431c" class="figure">
|
||||
<div id="orgb6cf5b4" class="figure">
|
||||
<p><img src="figs/encoder-model-schematic.png" alt="encoder-model-schematic.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 2: </span>Model of the Encoder</p>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<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>
|
||||
</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>
|
||||
|
||||
<colgroup>
|
||||
@ -174,7 +184,7 @@ We can also use a transfer function \(G_n(s)\) to shape a noise \(\tilde{n}\) wi
|
||||
</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>
|
||||
<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 id="outline-container-orgde74ebc" class="outline-2">
|
||||
<h2 id="orgde74ebc"><span class="section-number-2">2</span> Noise Measurement</h2>
|
||||
<div id="outline-container-org6d49234" class="outline-2">
|
||||
<h2 id="org6d49234"><span class="section-number-2">2</span> Noise Measurement</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
<a id="orgcac09c5"></a>
|
||||
<a id="org4cb96c9"></a>
|
||||
</p>
|
||||
</div>
|
||||
<div id="outline-container-org835e359" class="outline-3">
|
||||
<h3 id="org835e359"><span class="section-number-3">2.1</span> Test Bench</h3>
|
||||
<div id="outline-container-orga5ff56c" class="outline-3">
|
||||
<h3 id="orga5ff56c"><span class="section-number-3">2.1</span> Test Bench</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<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.
|
||||
@ -200,63 +210,84 @@ Then, the measured signal \(y_m\) corresponds to the noise \(n\).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org52a3f6f" class="outline-3">
|
||||
<h3 id="org52a3f6f"><span class="section-number-3">2.2</span> Results</h3>
|
||||
<div id="outline-container-org14877fe" class="outline-3">
|
||||
<h3 id="org14877fe"><span class="section-number-3">2.2</span> Results</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
First we load the data.
|
||||
</p>
|
||||
<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>);
|
||||
x = x <span class="org-type">-</span> mean(x);
|
||||
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Load Data</span></span>
|
||||
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>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
<img src="figs/vionic_noise_time.png" alt="vionic_noise_time.png" />
|
||||
The amplitude spectral density is computed and shown in Figure <a href="#orgfb661b7">5</a>.
|
||||
The time domain data for all the encoders are compared in Figure <a href="#orgf7f2fda">6</a>.
|
||||
</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>
|
||||
<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>
|
||||
|
||||
<p>
|
||||
Let’s create a transfer function that approximate the measured noise of the encoder.
|
||||
</p>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<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>
|
||||
<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 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">
|
||||
<p>
|
||||
<a id="org0c843ed"></a>
|
||||
<a id="orgc339bfd"></a>
|
||||
</p>
|
||||
</div>
|
||||
<div id="outline-container-orga2e857a" class="outline-3">
|
||||
<h3 id="orga2e857a"><span class="section-number-3">3.1</span> Test Bench</h3>
|
||||
<div id="outline-container-org175ba6f" class="outline-3">
|
||||
<h3 id="org175ba6f"><span class="section-number-3">3.1</span> Test Bench</h3>
|
||||
<div class="outline-text-3" id="text-3-1">
|
||||
<p>
|
||||
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>
|
||||
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>
|
||||
@ -278,38 +309,38 @@ As the interferometer has a very large bandwidth, we should be able to estimate
|
||||
</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>
|
||||
<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 id="outline-container-orgc7f59c3" class="outline-3">
|
||||
<h3 id="orgc7f59c3"><span class="section-number-3">3.2</span> Results</h3>
|
||||
<div id="outline-container-org69056ec" class="outline-3">
|
||||
<h3 id="org69056ec"><span class="section-number-3">3.2</span> Results</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org42e063d" class="outline-2">
|
||||
<h2 id="org42e063d"><span class="section-number-2">4</span> Dynamical Measurement</h2>
|
||||
<div id="outline-container-org5ca0c03" class="outline-2">
|
||||
<h2 id="org5ca0c03"><span class="section-number-2">4</span> Dynamical Measurement</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<p>
|
||||
<a id="org2b52f4b"></a>
|
||||
<a id="org71dc40b"></a>
|
||||
</p>
|
||||
</div>
|
||||
<div id="outline-container-org4e0f29a" class="outline-3">
|
||||
<h3 id="org4e0f29a"><span class="section-number-3">4.1</span> Test Bench</h3>
|
||||
<div id="outline-container-orgde9a37d" class="outline-3">
|
||||
<h3 id="orgde9a37d"><span class="section-number-3">4.1</span> Test Bench</h3>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb2f1f77" class="outline-3">
|
||||
<h3 id="orgb2f1f77"><span class="section-number-3">4.2</span> Results</h3>
|
||||
<div id="outline-container-org8bc51db" class="outline-3">
|
||||
<h3 id="org8bc51db"><span class="section-number-3">4.2</span> Results</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<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>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -16,7 +16,6 @@
|
||||
#+LaTeX_CLASS: scrreprt
|
||||
#+LaTeX_CLASS_OPTIONS: [a4paper, 10pt, DIV=12, parskip=full]
|
||||
#+LaTeX_HEADER_EXTRA: \input{preamble.tex}
|
||||
#+EXPORT_FILE_NAME: test-bench-vionic.tex
|
||||
|
||||
#+PROPERTY: header-args:matlab :session *MATLAB*
|
||||
#+PROPERTY: header-args:matlab+ :comments org
|
||||
@ -175,20 +174,60 @@ addpath('./mat/');
|
||||
** Results
|
||||
First we load the data.
|
||||
#+begin_src matlab
|
||||
load('noise_meas_100s_20kHz.mat', 't', 'x');
|
||||
x = x - mean(x);
|
||||
%% Load Data
|
||||
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
|
||||
|
||||
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
|
||||
figure;
|
||||
hold on;
|
||||
plot(t, 1e9*x, '.', 'DisplayName', 'Raw');
|
||||
plot(t, 1e9*lsim(1/(1 + s/2/pi/500), x, t), 'DisplayName', 'LPF - 500Hz')
|
||||
plot(enc1.t, 1e9*enc1.x, '.', 'DisplayName', 'Enc 1 - Raw');
|
||||
plot(enc1.t, 1e9*lsim(1/(1 + s/2/pi/10), enc1.x, enc1.t), '-', 'DisplayName', 'Enc 1 - LPF');
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
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
|
||||
|
||||
#+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
|
||||
|
||||
#+name: fig:vionic_noise_time
|
||||
#+caption: Time domain measurement (raw data and low pass filtered data)
|
||||
#+caption: Comparison of the time domain measurement
|
||||
#+RESULTS:
|
||||
[[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
|
||||
% 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;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
% 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
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
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');
|
||||
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');
|
||||
xlim([1, Fs/2]);
|
||||
ylim([1e-11, 1e-9]);
|
||||
xlim([10, Fs/2]);
|
||||
ylim([1e-11, 1e-10]);
|
||||
legend('location', 'northeast');
|
||||
#+end_src
|
||||
|
||||
#+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.
|
||||
#+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
|
||||
|
||||
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
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(pxx));
|
||||
plot(f, abs(squeeze(freqresp(Gn_e, f, 'Hz'))), 'k--');
|
||||
plot(f, sqrt(p1), 'color', [0, 0, 0, 0.5], 'DisplayName', '$\Gamma_n(\omega)$');
|
||||
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;
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');
|
||||
xlim([1, Fs/2]);
|
||||
ylim([1e-11, 1e-9]);
|
||||
xlim([10, Fs/2]);
|
||||
ylim([1e-11, 1e-10]);
|
||||
legend('location', 'northeast');
|
||||
#+end_src
|
||||
|
||||
#+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
|
||||
#+RESULTS:
|
||||
[[file:figs/vionic_noise_asd_model.png]]
|
||||
|
||||
* Linearity Measurement
|
||||
<<sec:linearity_measurement>>
|
||||
** Test Bench
|
||||
|