Update with last measured encoder

This commit is contained in:
Thomas Dehaeze 2021-02-04 20:23:22 +01:00
parent 006cb20df1
commit 30177e4809
10 changed files with 83 additions and 105 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

@ -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-03 mer. 11:20 -->
<!-- 2021-02-04 jeu. 20:23 -->
<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="#org691fd8d">1. Encoder Model</a></li>
<li><a href="#org6d49234">2. Noise Measurement</a>
<li><a href="#org5cfc524">1. Encoder Model</a></li>
<li><a href="#orgdb597d2">2. Noise Measurement</a>
<ul>
<li><a href="#orga5ff56c">2.1. Test Bench</a></li>
<li><a href="#org14877fe">2.2. Results</a></li>
<li><a href="#orgcf20f40">2.1. Test Bench</a></li>
<li><a href="#orga00ea74">2.2. Results</a></li>
</ul>
</li>
<li><a href="#org2b0bcde">3. Linearity Measurement</a>
<li><a href="#orgf37b64f">3. Linearity Measurement</a>
<ul>
<li><a href="#org175ba6f">3.1. Test Bench</a></li>
<li><a href="#org69056ec">3.2. Results</a></li>
<li><a href="#orgd7d0144">3.1. Test Bench</a></li>
<li><a href="#org664af52">3.2. Results</a></li>
</ul>
</li>
<li><a href="#org5ca0c03">4. Dynamical Measurement</a>
<li><a href="#orgf3c325a">4. Dynamical Measurement</a>
<ul>
<li><a href="#orgde9a37d">4.1. Test Bench</a></li>
<li><a href="#org8bc51db">4.2. Results</a></li>
<li><a href="#org5deba50">4.1. Test Bench</a></li>
<li><a href="#org4eec56e">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="org978e8ad">
<div class="note" id="org3ece63c">
<p>
You can find below the document of:
</p>
@ -90,7 +90,7 @@ In particular, we would like to measure:
</ul>
<div id="orgf372152" class="figure">
<div id="orga8ce6e5" 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>
@ -106,8 +106,8 @@ In particular, we would like to measure:
<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 id="outline-container-org5cfc524" class="outline-2">
<h2 id="org5cfc524"><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 &ldquo;true&rdquo; displacement \(y\) to measured displacement \(y_m\).
@ -119,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="#orgb6cf5b4">2</a>.
The model of the encoder is shown in Figure <a href="#org3722c48">2</a>.
</p>
<div id="orgb6cf5b4" class="figure">
<div id="org3722c48" 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="#orgd00343b">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="#org1f28b48">4</a>.
</p>
<div id="org2725c4b" class="figure">
<div id="org1ffb004" class="figure">
<p><img src="figs/encoder-model-schematic-with-asd.png" alt="encoder-model-schematic-with-asd.png" />
</p>
</div>
<table id="org20632fc" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org6be868a" 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>
@ -184,7 +184,7 @@ We can also use a transfer function \(G_n(s)\) to shape a noise \(\tilde{n}\) wi
</table>
<div id="orgd00343b" class="figure">
<div id="org1f28b48" 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>
@ -193,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-org6d49234" class="outline-2">
<h2 id="org6d49234"><span class="section-number-2">2</span> Noise Measurement</h2>
<div id="outline-container-orgdb597d2" class="outline-2">
<h2 id="orgdb597d2"><span class="section-number-2">2</span> Noise Measurement</h2>
<div class="outline-text-2" id="text-2">
<p>
<a id="org4cb96c9"></a>
<a id="org4a8cf7a"></a>
</p>
</div>
<div id="outline-container-orga5ff56c" class="outline-3">
<h3 id="orga5ff56c"><span class="section-number-3">2.1</span> Test Bench</h3>
<div id="outline-container-orgcf20f40" class="outline-3">
<h3 id="orgcf20f40"><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.
@ -210,48 +210,35 @@ Then, the measured signal \(y_m\) corresponds to the noise \(n\).
</div>
</div>
<div id="outline-container-org14877fe" class="outline-3">
<h3 id="org14877fe"><span class="section-number-3">2.2</span> Results</h3>
<div id="outline-container-orga00ea74" class="outline-3">
<h3 id="orga00ea74"><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"><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 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>.
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="#orgafb2d71">5</a>.
</p>
<div id="org72fd239" class="figure">
<div id="orgafb2d71" 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>
The time domain data for all the encoders are compared in Figure <a href="#orgf7f2fda">6</a>.
The time domain data for all the encoders are compared in Figure <a href="#org6fcc332">6</a>.
</p>
<div id="orgf7f2fda" class="figure">
<div id="org6fcc332" 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>
<p>
The amplitude spectral density is computed and shown in Figure <a href="#orgf3c083c">7</a>.
The amplitude spectral density is computed and shown in Figure <a href="#org0596231">7</a>.
</p>
<div id="orgf3c083c" class="figure">
<div id="org0596231" class="figure">
<p><img src="figs/vionic_noise_asd.png" alt="vionic_noise_asd.png" />
</p>
<p><span class="figure-number">Figure 7: </span>Amplitude Spectral Density of the measured signal</p>
@ -266,11 +253,11 @@ Let&rsquo;s create a transfer function that approximate the measured noise of th
</div>
<p>
The amplitude of the transfer function and the measured ASD are shown in Figure <a href="#org8714af7">8</a>.
The amplitude of the transfer function and the measured ASD are shown in Figure <a href="#org2802608">8</a>.
</p>
<div id="org8714af7" class="figure">
<div id="org2802608" class="figure">
<p><img src="figs/vionic_noise_asd_model.png" alt="vionic_noise_asd_model.png" />
</p>
<p><span class="figure-number">Figure 8: </span>Measured ASD of the noise and modelled one</p>
@ -279,15 +266,15 @@ The amplitude of the transfer function and the measured ASD are shown in Figure
</div>
</div>
<div id="outline-container-org2b0bcde" class="outline-2">
<h2 id="org2b0bcde"><span class="section-number-2">3</span> Linearity Measurement</h2>
<div id="outline-container-orgf37b64f" class="outline-2">
<h2 id="orgf37b64f"><span class="section-number-2">3</span> Linearity Measurement</h2>
<div class="outline-text-2" id="text-3">
<p>
<a id="orgc339bfd"></a>
<a id="org55aba7f"></a>
</p>
</div>
<div id="outline-container-org175ba6f" class="outline-3">
<h3 id="org175ba6f"><span class="section-number-3">3.1</span> Test Bench</h3>
<div id="outline-container-orgd7d0144" class="outline-3">
<h3 id="orgd7d0144"><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.
@ -296,7 +283,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="#org30ec1c0">9</a>.
One idea is to use the test-bench shown in Figure <a href="#orgd759dea">9</a>.
</p>
<p>
@ -309,7 +296,7 @@ As the interferometer has a very large bandwidth, we should be able to estimate
</p>
<div id="org30ec1c0" class="figure">
<div id="orgd759dea" class="figure">
<p><img src="figs/test_bench_encoder_calibration.png" alt="test_bench_encoder_calibration.png" />
</p>
<p><span class="figure-number">Figure 9: </span>Schematic of the test bench</p>
@ -317,30 +304,30 @@ As the interferometer has a very large bandwidth, we should be able to estimate
</div>
</div>
<div id="outline-container-org69056ec" class="outline-3">
<h3 id="org69056ec"><span class="section-number-3">3.2</span> Results</h3>
<div id="outline-container-org664af52" class="outline-3">
<h3 id="org664af52"><span class="section-number-3">3.2</span> Results</h3>
</div>
</div>
<div id="outline-container-org5ca0c03" class="outline-2">
<h2 id="org5ca0c03"><span class="section-number-2">4</span> Dynamical Measurement</h2>
<div id="outline-container-orgf3c325a" class="outline-2">
<h2 id="orgf3c325a"><span class="section-number-2">4</span> Dynamical Measurement</h2>
<div class="outline-text-2" id="text-4">
<p>
<a id="org71dc40b"></a>
<a id="org7abf850"></a>
</p>
</div>
<div id="outline-container-orgde9a37d" class="outline-3">
<h3 id="orgde9a37d"><span class="section-number-3">4.1</span> Test Bench</h3>
<div id="outline-container-org5deba50" class="outline-3">
<h3 id="org5deba50"><span class="section-number-3">4.1</span> Test Bench</h3>
</div>
<div id="outline-container-org8bc51db" class="outline-3">
<h3 id="org8bc51db"><span class="section-number-3">4.2</span> Results</h3>
<div id="outline-container-org4eec56e" class="outline-3">
<h3 id="org4eec56e"><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-03 mer. 11:20</p>
<p class="date">Created: 2021-02-04 jeu. 20:23</p>
</div>
</body>
</html>

View File

@ -173,32 +173,27 @@ addpath('./mat/');
** Results
First we load the data.
#+begin_src matlab
%% 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');
#+begin_src matlab :exports none
%% Load all the measurements
enc = {};
for i = 1:7
enc(i) = {load(['mat/noise_meas_100s_20kHz_' num2str(i) '.mat'], 't', 'x')};
end
#+end_src
#+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));
for i = 1:7
enc{i}.x = enc{i}.x - mean(enc{i}.x(1:1000));
end
#+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(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');
plot(enc{1}.t, 1e9*enc{1}.x, '.', 'DisplayName', 'Enc 1 - Raw');
plot(enc{1}.t, 1e9*lsim(1/(1 + s/2/pi/10), enc{1}.x, enc{1}.t), '-', 'DisplayName', 'Enc 1 - LPF');
hold off;
xlabel('Time [s]');
ylabel('Displacement [nm]');
@ -218,12 +213,10 @@ The time domain data for all the encoders are compared in Figure [[fig:vionic_no
#+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');
for i=1:7
plot(enc{i}.t, 1e9*lsim(1/(1 + s/2/pi/10), enc{i}.x, enc{i}.t), '.', ...
'DisplayName', sprintf('Enc %i', i));
end
hold off;
xlabel('Time [s]');
ylabel('Displacement [nm]');
@ -248,23 +241,22 @@ Fs = 1/Ts;
% Hannning Windows
win = hanning(ceil(0.5/Ts));
[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);
[pxx, f] = pwelch(enc{1}.x, win, [], [], Fs);
enc{1}.pxx = pxx;
for i=2:7
[pxx, ~] = pwelch(enc{i}.x, win, [], [], Fs);
enc{i}.pxx = pxx;
end
#+end_src
#+begin_src matlab :exports none
figure;
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');
for i=1:7
plot(f, sqrt(enc{i}.pxx), ...
'DisplayName', sprintf('Enc %i', i));
end
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');
xlim([10, Fs/2]);
@ -292,11 +284,10 @@ The amplitude of the transfer function and the measured ASD are shown in Figure
figure;
hold on;
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');
for i=2:7
plot(f, sqrt(enc{i}.pxx), 'color', [0, 0, 0, 0.5], ...
'HandleVisibility', 'off');
end
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');

Binary file not shown.