Analyse long measurement

This commit is contained in:
Thomas Dehaeze 2021-02-11 15:22:02 +01:00
parent 73dc280ab3
commit 9a06c0995f
14 changed files with 1560 additions and 128 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
figs/vionic_drifts_time.pdf Normal file

Binary file not shown.

BIN
figs/vionic_drifts_time.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 80 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

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-10 mer. 15:14 -->
<!-- 2021-02-11 jeu. 15:21 -->
<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,22 +39,21 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgee60877">1. Expected Performances</a></li>
<li><a href="#org78808d1">2. Encoder Model</a></li>
<li><a href="#org07e5c0c">3. Noise Measurement</a>
<li><a href="#orgacaf822">1. Expected Performances</a></li>
<li><a href="#orgd1b48b9">2. Encoder Model</a></li>
<li><a href="#org9947f0d">3. Noise Measurement</a>
<ul>
<li><a href="#org1171cfb">3.1. Test Bench</a></li>
<li><a href="#org2d3c7ed">3.2. Thermal drifts</a></li>
<li><a href="#org12c8422">3.3. Time Domain signals</a></li>
<li><a href="#orgcfb7422">3.4. Noise Spectral Density</a></li>
<li><a href="#orgf450d0e">3.5. Noise Model</a></li>
<li><a href="#org5d6e2aa">3.6. Validity of the noise model</a></li>
<li><a href="#org7dd6ce0">3.1. Test Bench</a></li>
<li><a href="#orgd61ad80">3.2. Thermal drifts</a></li>
<li><a href="#org8f23c76">3.3. Time Domain signals</a></li>
<li><a href="#orgbd6cefe">3.4. Noise Spectral Density</a></li>
<li><a href="#orgc14197f">3.5. Noise Model</a></li>
</ul>
</li>
<li><a href="#orgbcdb22e">4. Linearity Measurement</a>
<li><a href="#orgbc58807">4. Linearity Measurement</a>
<ul>
<li><a href="#org0508ec2">4.1. Test Bench</a></li>
<li><a href="#org4e41106">4.2. Results</a></li>
<li><a href="#org38d4317">4.1. Test Bench</a></li>
<li><a href="#org9a6927b">4.2. Results</a></li>
</ul>
</li>
</ul>
@ -64,7 +63,7 @@
<p>This report is also available as a <a href="./test-bench-vionic.pdf">pdf</a>.</p>
<hr>
<div class="note" id="orgf0dfbf1">
<div class="note" id="org34d0504">
<p>
You can find below the documentation of:
</p>
@ -89,25 +88,25 @@ In particular, we would like to measure:
This document is structured as follow:
</p>
<ul class="org-ul">
<li>Section <a href="#org5825e63">1</a>: the expected performance of the Vionic encoder system are described</li>
<li>Section <a href="#org886dc10">2</a>: a simple model of the encoder is developed</li>
<li>Section <a href="#orgce8febf">3</a>: the noise of the encoder is measured and a model of the noise is identified</li>
<li>Section <a href="#org0a6ada3">4</a>: the linearity of the sensor is estimated</li>
<li>Section <a href="#orgafe2cb7">1</a>: the expected performance of the Vionic encoder system are described</li>
<li>Section <a href="#org1d1f36e">2</a>: a simple model of the encoder is developed</li>
<li>Section <a href="#orgf70a154">3</a>: the noise of the encoder is measured and a model of the noise is identified</li>
<li>Section <a href="#org3767bd5">4</a>: the linearity of the sensor is estimated</li>
</ul>
<div id="outline-container-orgee60877" class="outline-2">
<h2 id="orgee60877"><span class="section-number-2">1</span> Expected Performances</h2>
<div id="outline-container-orgacaf822" class="outline-2">
<h2 id="orgacaf822"><span class="section-number-2">1</span> Expected Performances</h2>
<div class="outline-text-2" id="text-1">
<p>
<a id="org5825e63"></a>
<a id="orgafe2cb7"></a>
</p>
<p>
The Vionic encoder is shown in Figure <a href="#org8649a60">1</a>.
The Vionic encoder is shown in Figure <a href="#org300cb52">1</a>.
</p>
<div id="org8649a60" class="figure">
<div id="org300cb52" 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>
@ -135,21 +134,21 @@ Interpolation is within the readhead, with fine resolution versions being furthe
</blockquote>
<p>
The expected interpolation errors (non-linearity) is shown in Figure <a href="#org35c5a3c">2</a>.
The expected interpolation errors (non-linearity) is shown in Figure <a href="#org74b94f4">2</a>.
</p>
<div id="org35c5a3c" class="figure">
<div id="org74b94f4" class="figure">
<p><img src="./figs/vionic_expected_noise.png" alt="vionic_expected_noise.png" />
</p>
<p><span class="figure-number">Figure 2: </span>Expected interpolation errors for the Vionic Encoder</p>
</div>
<p>
The characteristics as advertise in the manual as well as our specifications are shown in Table <a href="#org025a9b8">1</a>.
The characteristics as advertise in the manual as well as our specifications are shown in Table <a href="#org12ad600">1</a>.
</p>
<table id="org025a9b8" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org12ad600" 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 compared with the specifications</caption>
<colgroup>
@ -169,7 +168,7 @@ The characteristics as advertise in the manual as well as our specifications are
<tbody>
<tr>
<td class="org-left">Time Delay</td>
<td class="org-center">&#xa0;</td>
<td class="org-center">&lt; 10 ns</td>
<td class="org-center">&lt; 0.5 ms</td>
</tr>
@ -201,11 +200,11 @@ The characteristics as advertise in the manual as well as our specifications are
</div>
</div>
<div id="outline-container-org78808d1" class="outline-2">
<h2 id="org78808d1"><span class="section-number-2">2</span> Encoder Model</h2>
<div id="outline-container-orgd1b48b9" class="outline-2">
<h2 id="orgd1b48b9"><span class="section-number-2">2</span> Encoder Model</h2>
<div class="outline-text-2" id="text-2">
<p>
<a id="org886dc10"></a>
<a id="org1d1f36e"></a>
</p>
<p>
@ -218,38 +217,53 @@ 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="#orgd01aa78">3</a>.
The model of the encoder is shown in Figure <a href="#orge3dfe4a">3</a>.
</p>
<div id="orgd01aa78" class="figure">
<div id="orge3dfe4a" class="figure">
<p><img src="figs/encoder-model-schematic.png" alt="encoder-model-schematic.png" />
</p>
<p><span class="figure-number">Figure 3: </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="#org35c5a3c">2</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="#org74b94f4">2</a>.
</p>
<div id="org0de813a" class="figure">
<div id="orgb259ef8" class="figure">
<p><img src="figs/encoder-model-schematic-with-asd.png" alt="encoder-model-schematic-with-asd.png" />
</p>
</div>
</div>
</div>
<div id="outline-container-org07e5c0c" class="outline-2">
<h2 id="org07e5c0c"><span class="section-number-2">3</span> Noise Measurement</h2>
<div id="outline-container-org9947f0d" class="outline-2">
<h2 id="org9947f0d"><span class="section-number-2">3</span> Noise Measurement</h2>
<div class="outline-text-2" id="text-3">
<p>
<a id="orgce8febf"></a>
<a id="orgf70a154"></a>
</p>
<p>
This part is structured as follow:
</p>
<ul class="org-ul">
<li>Section <a href="#org1bbddb3">3.1</a>: the measurement bench is described</li>
<li>Section <a href="#orge37ddeb">3.2</a>: long measurement is performed to estimate the low frequency drifts in the measurement</li>
<li>Section <a href="#orgbe1c0e1">3.3</a>: high frequency measurements are performed to estimate the high frequency noise</li>
<li>Section <a href="#orgfafa9fd">3.4</a>: the Spectral density of the measurement noise is estimated</li>
<li>Section <a href="#org2284feb">3.5</a>: finally, the measured noise is modeled</li>
</ul>
</div>
<div id="outline-container-org1171cfb" class="outline-3">
<h3 id="org1171cfb"><span class="section-number-3">3.1</span> Test Bench</h3>
<div id="outline-container-org7dd6ce0" class="outline-3">
<h3 id="org7dd6ce0"><span class="section-number-3">3.1</span> Test Bench</h3>
<div class="outline-text-3" id="text-3-1">
<p>
<a id="org1bbddb3"></a>
</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.
Then, the measured signal \(y_m\) corresponds to the noise \(n\).
@ -257,62 +271,138 @@ Then, the measured signal \(y_m\) corresponds to the noise \(n\).
</div>
</div>
<div id="outline-container-org2d3c7ed" class="outline-3">
<h3 id="org2d3c7ed"><span class="section-number-3">3.2</span> Thermal drifts</h3>
<div id="outline-container-orgd61ad80" class="outline-3">
<h3 id="orgd61ad80"><span class="section-number-3">3.2</span> Thermal drifts</h3>
<div class="outline-text-3" id="text-3-2">
<ul class="org-ul">
<li class="off"><code>[&#xa0;]</code> picture of the setup</li>
<li class="off"><code>[&#xa0;]</code> long thermal drifts</li>
<li class="off"><code>[&#xa0;]</code> once stabilize, look at the noise</li>
<li class="off"><code>[&#xa0;]</code> compute low frequency ASD (may still be thermal drifts of the mechanics and not noise)</li>
</ul>
<p>
<a id="orge37ddeb"></a>
Measured displacement were recording during approximately 40 hours with a sample frequency of 100Hz.
A first order low pass filter with a corner frequency of 1Hz
</p>
<div class="org-src-container">
<pre class="src src-matlab">enc_l = load(<span class="org-string">'mat/noise_meas_40h_100Hz_1.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'x'</span>);
</pre>
</div>
<p>
The measured time domain data are shown in Figure <a href="#org55bfe2a">5</a>.
</p>
<div id="org55bfe2a" class="figure">
<p><img src="figs/vionic_drifts_time.png" alt="vionic_drifts_time.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Measured thermal drifts</p>
</div>
<p>
The measured data seems to experience a constant drift after approximately 20 hour.
Let&rsquo;s estimate this drift.
</p>
<pre class="example">
The mean drift is approximately 60.9 [nm/hour] or 1.0 [nm/min]
</pre>
<p>
Comparison between the data and the linear fit is shown in Figure <a href="#org1085735">6</a>.
</p>
<div id="org1085735" class="figure">
<p><img src="figs/vionic_drifts_linear_fit.png" alt="vionic_drifts_linear_fit.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Measured drift and linear fit</p>
</div>
<p>
Let&rsquo;s now estimate the Power Spectral Density of the measured displacement.
The obtained low frequency ASD is shown in Figure <a href="#orgf2675d7">7</a>.
</p>
<div id="orgf2675d7" class="figure">
<p><img src="figs/vionic_noise_asd_low_freq.png" alt="vionic_noise_asd_low_freq.png" />
</p>
<p><span class="figure-number">Figure 7: </span>Amplitude Spectral density of the measured displacement</p>
</div>
</div>
</div>
<div id="outline-container-org12c8422" class="outline-3">
<h3 id="org12c8422"><span class="section-number-3">3.3</span> Time Domain signals</h3>
<div id="outline-container-org8f23c76" class="outline-3">
<h3 id="org8f23c76"><span class="section-number-3">3.3</span> Time Domain signals</h3>
<div class="outline-text-3" id="text-3-3">
<p>
First we load the data.
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="#org0525912">5</a>.
<a id="orgbe1c0e1"></a>
</p>
<div id="org0525912" class="figure">
<p>
Then, and for all the 7 encoders, we record the measured motion during 100s with a sampling frequency of 20kHz.
</p>
<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="#orgbd876dc">8</a>.
</p>
<div id="orgbd876dc" 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>
<p><span class="figure-number">Figure 8: </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="#org5c2c4fa">6</a>.
The time domain data for all the encoders are compared in Figure <a href="#org63a82cb">9</a>.
</p>
<div id="org5c2c4fa" class="figure">
<p>
We can see some drifts that are in the order of few nm to 20nm per minute.
As shown in Section <a href="#orge37ddeb">3.2</a>, these drifts should diminish over time down to 1nm/min.
</p>
<div id="org63a82cb" 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>
<p><span class="figure-number">Figure 9: </span>Comparison of the time domain measurement</p>
</div>
</div>
</div>
<div id="outline-container-orgcfb7422" class="outline-3">
<h3 id="orgcfb7422"><span class="section-number-3">3.4</span> Noise Spectral Density</h3>
<div id="outline-container-orgbd6cefe" class="outline-3">
<h3 id="orgbd6cefe"><span class="section-number-3">3.4</span> Noise Spectral Density</h3>
<div class="outline-text-3" id="text-3-4">
<p>
The amplitude spectral density is computed and shown in Figure <a href="#orged52478">7</a>.
<a id="orgfafa9fd"></a>
</p>
<div id="orged52478" class="figure">
<p>
The amplitude spectral densities for all the encoder are computed and shown in Figure <a href="#org4b13cc6">10</a>.
</p>
<div id="org4b13cc6" 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>
<p><span class="figure-number">Figure 10: </span>Amplitude Spectral Density of the measured signal</p>
</div>
<p>
We can combine these measurements with the low frequency noise computed in Section <a href="#orge37ddeb">3.2</a>.
The obtained ASD is shown in Figure <a href="#orgec960f3">11</a>.
</p>
<div id="orgec960f3" class="figure">
<p><img src="figs/vionic_noise_asd_combined.png" alt="vionic_noise_asd_combined.png" />
</p>
<p><span class="figure-number">Figure 11: </span>Combined low frequency and high frequency noise measurements</p>
</div>
</div>
</div>
<div id="outline-container-orgf450d0e" class="outline-3">
<h3 id="orgf450d0e"><span class="section-number-3">3.5</span> Noise Model</h3>
<div id="outline-container-orgc14197f" class="outline-3">
<h3 id="orgc14197f"><span class="section-number-3">3.5</span> Noise Model</h3>
<div class="outline-text-3" id="text-3-5">
<p>
<a id="org2284feb"></a>
</p>
<p>
Let&rsquo;s create a transfer function that approximate the measured noise of the encoder.
</p>
@ -322,23 +412,18 @@ 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="#orgd40fb21">8</a>.
The amplitude of the transfer function and the measured ASD are shown in Figure <a href="#org904aecb">12</a>.
</p>
<div id="orgd40fb21" class="figure">
<div id="org904aecb" 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 modeled one</p>
</div>
</div>
<p><span class="figure-number">Figure 12: </span>Measured ASD of the noise and modeled one</p>
</div>
<div id="outline-container-org5d6e2aa" class="outline-3">
<h3 id="org5d6e2aa"><span class="section-number-3">3.6</span> Validity of the noise model</h3>
<div class="outline-text-3" id="text-3-6">
<p>
The cumulative amplitude spectrum is now computed and shown in Figure <a href="#orgf87a6b7">9</a>.
The cumulative amplitude spectrum is now computed and shown in Figure <a href="#orgff7d2cd">13</a>.
</p>
<p>
@ -346,24 +431,24 @@ We can see that the Root Mean Square value of the measurement noise is \(\approx
</p>
<div id="orgf87a6b7" class="figure">
<div id="orgff7d2cd" class="figure">
<p><img src="figs/vionic_noise_cas_model.png" alt="vionic_noise_cas_model.png" />
</p>
<p><span class="figure-number">Figure 9: </span>Meassured CAS of the noise and modeled one</p>
<p><span class="figure-number">Figure 13: </span>Meassured CAS of the noise and modeled one</p>
</div>
</div>
</div>
</div>
<div id="outline-container-orgbcdb22e" class="outline-2">
<h2 id="orgbcdb22e"><span class="section-number-2">4</span> Linearity Measurement</h2>
<div id="outline-container-orgbc58807" class="outline-2">
<h2 id="orgbc58807"><span class="section-number-2">4</span> Linearity Measurement</h2>
<div class="outline-text-2" id="text-4">
<p>
<a id="org0a6ada3"></a>
<a id="org3767bd5"></a>
</p>
</div>
<div id="outline-container-org0508ec2" class="outline-3">
<h3 id="org0508ec2"><span class="section-number-3">4.1</span> Test Bench</h3>
<div id="outline-container-org38d4317" class="outline-3">
<h3 id="org38d4317"><span class="section-number-3">4.1</span> Test Bench</h3>
<div class="outline-text-3" id="text-4-1">
<p>
In order to measure the linearity, we have to compare the measured displacement with a reference sensor with a known linearity.
@ -372,7 +457,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="#orge0a809b">10</a>.
One idea is to use the test-bench shown in Figure <a href="#org5a7f983">14</a>.
</p>
<p>
@ -385,22 +470,22 @@ As the interferometer has a very large bandwidth, we should be able to estimate
</p>
<div id="orge0a809b" class="figure">
<div id="org5a7f983" class="figure">
<p><img src="figs/test_bench_encoder_calibration.png" alt="test_bench_encoder_calibration.png" />
</p>
<p><span class="figure-number">Figure 10: </span>Schematic of the test bench</p>
<p><span class="figure-number">Figure 14: </span>Schematic of the test bench</p>
</div>
</div>
</div>
<div id="outline-container-org4e41106" class="outline-3">
<h3 id="org4e41106"><span class="section-number-3">4.2</span> Results</h3>
<div id="outline-container-org9a6927b" class="outline-3">
<h3 id="org9a6927b"><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-10 mer. 15:14</p>
<p class="date">Created: 2021-02-11 jeu. 15:21</p>
</div>
</body>
</html>

View File

@ -169,7 +169,18 @@ We can also use a transfer function $G_n(s)$ to shape a noise $\tilde{n}$ with u
* Noise Measurement
<<sec:noise_measurement>>
** Introduction :ignore:
This part is structured as follow:
- Section [[sec:noise_bench]]: the measurement bench is described
- Section [[sec:thermal_drifts]]: long measurement is performed to estimate the low frequency drifts in the measurement
- Section [[sec:vionic_noise_time]]: high frequency measurements are performed to estimate the high frequency noise
- Section [[sec:noise_asd]]: the Spectral density of the measurement noise is estimated
- Section [[sec:vionic_noise_model]]: finally, the measured noise is modeled
** Test Bench
<<sec:noise_bench>>
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.
Then, the measured signal $y_m$ corresponds to the noise $n$.
@ -192,16 +203,21 @@ addpath('./matlab/');
addpath('./mat/');
#+end_src
** TODO Thermal drifts
- [ ] picture of the setup
- [ ] long thermal drifts
- [ ] Identification of the drifts (exponential fit)
- [ ] once stabilize, look at the noise
- [ ] compute low frequency ASD (may still be thermal drifts of the mechanics and not noise)
** Thermal drifts
<<sec:thermal_drifts>>
Measured displacement were recording during approximately 40 hours with a sample frequency of 100Hz.
A first order low pass filter with a corner frequency of 1Hz
#+begin_src matlab
enc_l = load('mat/noise_meas_40h_200Hz_1.mat', 't', 'x');
enc_l = load('mat/noise_meas_40h_100Hz_1.mat', 't', 'x');
#+end_src
The measured time domain data are shown in Figure [[fig:vionic_drifts_time]].
#+begin_src matlab :exports none
enc_l.x = enc_l.x(enc_l.t > 5); % Remove first 5 seconds
enc_l.t = enc_l.t(enc_l.t > 5); % Remove first 5 seconds
enc_l.t = enc_l.t - enc_l.t(1); % Start at 0
enc_l.x = enc_l.x - mean(enc_l.x(enc_l.t < 1)); % Start at zero displacement
#+end_src
@ -212,67 +228,94 @@ plot(enc_l.t/3600, 1e9*enc_l.x, '-');
hold off;
xlabel('Time [h]');
ylabel('Displacement [nm]');
xlim([0, 40]);
#+end_src
Exponential fit
#+begin_src matlab
f = @(b,x) b(1)*(1 - exp(-x/b(2)));
y_cur = enc_l.x;
t_cur = end_l.t;
nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function
B0 = [400e-9, 2*60*60]; % Choose Appropriate Initial Estimates
[B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters B
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/vionic_drifts_time.pdf', 'width', 'wide', 'height', 'normal');
#+end_src
#+name: fig:vionic_drifts_time
#+caption: Measured thermal drifts
#+RESULTS:
[[file:figs/vionic_drifts_time.png]]
The measured data seems to experience a constant drift after approximately 20 hour.
Let's estimate this drift.
#+begin_src matlab :exports none
t0 = 20*3600; % Start time [s]
x_stab = enc_l.x(enc_l.t > t0);
x_stab = x_stab - x_stab(1);
t_stab = enc_l.t(enc_l.t > t0);
t_stab = t_stab - t_stab(1);
#+end_src
The corresponding time constant is (in [h]):
#+begin_src matlab :results value replace :exports results
B(2)/60/60
sprintf('The mean drift is approximately %.1f [nm/hour] or %.1f [nm/min]', 3600*1e9*(t_stab\x_stab), 60*1e9*(t_stab\x_stab))
#+end_src
Comparison of the data and exponential fit
#+RESULTS:
: The mean drift is approximately 60.9 [nm/hour] or 1.0 [nm/min]
Comparison between the data and the linear fit is shown in Figure [[fig:vionic_drifts_linear_fit]].
#+begin_src matlab :exports none
figure;
hold on;
plot(enc_l.t/60/60, 1e9*enc_l.x);
plot(enc_l.t/60/60, 1e9*f(B, enc_l.t));
plot(t_stab/3600, 1e9*x_stab, '-');
plot(t_stab/3600, 1e9*t_stab*(t_stab\x_stab), 'k--');
hold off;
xlim([0, 17.5])
xlabel('Time [h]'); ylabel('Displacement [nm]');
xlabel('Time [h]');
ylabel('Displacement [nm]');
xlim([0, 20]);
#+end_src
Let's get only the data once it is stabilized
#+begin_src matlab
x_stab = enc_l.x(enc_l.t > 20*3600);
x_stab = x_stab - mean(x_stab);
t_stab = enc_l.t(enc_l.t > 20*3600);
x_stab = x_stab - x_stab(1);
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/vionic_drifts_linear_fit.pdf', 'width', 'wide', 'height', 'normal');
#+end_src
#+name: fig:vionic_drifts_linear_fit
#+caption: Measured drift and linear fit
#+RESULTS:
[[file:figs/vionic_drifts_linear_fit.png]]
Let's now estimate the Power Spectral Density of the measured displacement.
The obtained low frequency ASD is shown in Figure [[fig:vionic_noise_asd_low_freq]].
#+begin_src matlab :exports none
% Compute sampling Frequency
Ts = (enc{1}.t(end) - enc{1}.t(1))/(length(enc{1}.t)-1);
Ts = (enc_l.t(end) - enc_l.t(1))/(length(enc_l.t)-1);
Fs = 1/Ts;
% Hannning Windows
win = hanning(ceil(60/Ts));
win = hanning(ceil(60*10/Ts));
[pxx, f] = pwelch(x_stab, win, [], [], Fs);
[pxx_l, f_l] = pwelch(x_stab, win, [], [], Fs);
#+end_src
#+begin_src matlab :exports none
figure;
hold on;
plot(f, sqrt(pxx))
plot(f_l, sqrt(pxx_l))
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');
% xlim([10, Fs/2]);
% ylim([1e-11, 1e-10]);
xlim([1e-2, 1e0]);
ylim([1e-11, 1e-8]);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/vionic_noise_asd_low_freq.pdf', 'width', 'side', 'height', 'normal');
#+end_src
#+name: fig:vionic_noise_asd_low_freq
#+caption: Amplitude Spectral density of the measured displacement
#+RESULTS:
[[file:figs/vionic_noise_asd_low_freq.png]]
** Time Domain signals
First we load the data.
<<sec:vionic_noise_time>>
Then, and for all the 7 encoders, we record the measured motion during 100s with a sampling frequency of 20kHz.
#+begin_src matlab :exports none
%% Load all the measurements
enc = {};
@ -310,6 +353,9 @@ exportFig('figs/vionic_noise_raw_lpf.pdf', 'width', 'wide', 'height', 'normal');
[[file:figs/vionic_noise_raw_lpf.png]]
The time domain data for all the encoders are compared in Figure [[fig:vionic_noise_time]].
We can see some drifts that are in the order of few nm to 20nm per minute.
As shown in Section [[sec:thermal_drifts]], these drifts should diminish over time down to 1nm/min.
#+begin_src matlab :exports none
figure;
hold on;
@ -333,7 +379,9 @@ exportFig('figs/vionic_noise_time.pdf', 'width', 'wide', 'height', 'normal');
[[file:figs/vionic_noise_time.png]]
** Noise Spectral Density
The amplitude spectral density is computed and shown in Figure [[fig:vionic_noise_asd]].
<<sec:noise_asd>>
The amplitude spectral densities for all the encoder are computed and shown in Figure [[fig:vionic_noise_asd]].
#+begin_src matlab :exports none
% Compute sampling Frequency
Ts = (enc{1}.t(end) - enc{1}.t(1))/(length(enc{1}.t)-1);
@ -361,7 +409,7 @@ end
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');
xlim([10, Fs/2]);
ylim([1e-11, 1e-10]);
ylim([1e-11, 1e-9]);
legend('location', 'northeast');
#+end_src
@ -374,7 +422,33 @@ exportFig('figs/vionic_noise_asd.pdf', 'width', 'wide', 'height', 'normal');
#+RESULTS:
[[file:figs/vionic_noise_asd.png]]
We can combine these measurements with the low frequency noise computed in Section [[sec:thermal_drifts]].
The obtained ASD is shown in Figure [[fig:vionic_noise_asd_combined]].
#+begin_src matlab :exports none
[pxx_h, f_h] = pwelch(enc{2}.x, hanning(ceil(10/Ts)), [], [], Fs);
figure;
hold on;
plot(f_h(f_h>0.6), sqrt(pxx_h(f_h>0.6)), 'k-');
plot(f_l(f_l<1), sqrt(pxx_l(f_l<1)), 'k-')
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');
xlim([1e-2, Fs/2]);
ylim([1e-12, 1e-8]);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/vionic_noise_asd_combined.pdf', 'width', 'wide', 'height', 'normal');
#+end_src
#+name: fig:vionic_noise_asd_combined
#+caption: Combined low frequency and high frequency noise measurements
#+RESULTS:
[[file:figs/vionic_noise_asd_combined.png]]
** Noise Model
<<sec:vionic_noise_model>>
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/1e4);
@ -385,7 +459,7 @@ 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(p1), 'color', [0, 0, 0, 0.5], 'DisplayName', '$\Gamma_n(\omega)$');
plot(f, sqrt(enc{1}.pxx), 'color', [0, 0, 0, 0.5], 'DisplayName', '$\Gamma_n(\omega)$');
for i=2:7
plot(f, sqrt(enc{i}.pxx), 'color', [0, 0, 0, 0.5], ...
'HandleVisibility', 'off');
@ -408,7 +482,6 @@ exportFig('figs/vionic_noise_asd_model.pdf', 'width', 'wide', 'height', 'normal'
#+RESULTS:
[[file:figs/vionic_noise_asd_model.png]]
** Validity of the noise model
The cumulative amplitude spectrum is now computed and shown in Figure [[fig:vionic_noise_cas_model]].
We can see that the Root Mean Square value of the measurement noise is $\approx 1.6 \, nm$ as advertise in the datasheet.

Binary file not shown.