Totally reworked the experiment file

This commit is contained in:
Thomas Dehaeze 2020-03-17 12:32:31 +01:00
parent 763dbfd36a
commit 1c342403c2
28 changed files with 314 additions and 394 deletions

View File

@ -4,7 +4,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>
<!-- 2020-03-17 mar. 11:21 --> <!-- 2020-03-17 mar. 12:32 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Simulation of Scientific Experiments</title> <title>Simulation of Scientific Experiments</title>
@ -240,30 +240,30 @@
<li><a href="#org03b2a76">1. Simscape Model</a></li> <li><a href="#org03b2a76">1. Simscape Model</a></li>
<li><a href="#org6ed78a0">2. Tomography Experiment with no disturbances</a> <li><a href="#org6ed78a0">2. Tomography Experiment with no disturbances</a>
<ul> <ul>
<li><a href="#org06c656a">2.1. Simulation Setup</a></li> <li><a href="#org0ba0ddd">2.1. Simulation Setup</a></li>
<li><a href="#orgc5cbe68">2.2. Analysis</a></li> <li><a href="#org140576f">2.2. Analysis</a></li>
<li><a href="#org6c038f1">2.3. Conclusion</a></li> <li><a href="#org26e3394">2.3. Conclusion</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org16d8e58">3. Tomography Experiment with included perturbations</a> <li><a href="#org16d8e58">3. Tomography Experiment with included perturbations</a>
<ul> <ul>
<li><a href="#org134f479">3.1. Simulation Setup</a></li> <li><a href="#org3da7cb0">3.1. Simulation Setup</a></li>
<li><a href="#org378d406">3.2. Analysis</a></li> <li><a href="#orgdb56a7f">3.2. Analysis</a></li>
<li><a href="#orgc315488">3.3. Conclusion</a></li> <li><a href="#org722f52a">3.3. Conclusion</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org72f01ab">4. Tomography when the micro-hexapod is not centered</a> <li><a href="#org72f01ab">4. Tomography when the micro-hexapod is not centered</a>
<ul> <ul>
<li><a href="#org0d9f411">4.1. Simulation Setup</a></li> <li><a href="#org6137b17">4.1. Simulation Setup</a></li>
<li><a href="#org80c3cd8">4.2. Analysis</a></li> <li><a href="#org92c4f21">4.2. Analysis</a></li>
<li><a href="#orgb310f81">4.3. Conclusion</a></li> <li><a href="#org92f12cd">4.3. Conclusion</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org8fa1632">5. Raster Scans with the translation stage</a> <li><a href="#org8fa1632">5. Raster Scans with the translation stage</a>
<ul> <ul>
<li><a href="#org0ba0ddd">5.1. Simulation Setup</a></li> <li><a href="#org4110173">5.1. Simulation Setup</a></li>
<li><a href="#org140576f">5.2. Analysis</a></li> <li><a href="#org1e50cb1">5.2. Analysis</a></li>
<li><a href="#org26e3394">5.3. Conclusion</a></li> <li><a href="#org98199a0">5.3. Conclusion</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -350,7 +350,7 @@ No controller is used (Open Loop).
And we put some gravity. And we put some gravity.
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">initializeSimscapeConfiguration(<span class="org-string">'gravity'</span>, <span class="org-constant">true</span>); <pre class="src src-matlab">initializeSimscapeConfiguration(<span class="org-string">'gravity'</span>, <span class="org-constant">false</span>);
</pre> </pre>
</div> </div>
@ -375,8 +375,8 @@ In this section, a tomography experiment is performed with the sample aligned wi
No disturbance is included. No disturbance is included.
</p> </p>
</div> </div>
<div id="outline-container-org06c656a" class="outline-3"> <div id="outline-container-org0ba0ddd" class="outline-3">
<h3 id="org06c656a"><span class="section-number-3">2.1</span> Simulation Setup</h3> <h3 id="org0ba0ddd"><span class="section-number-3">2.1</span> Simulation Setup</h3>
<div class="outline-text-3" id="text-2-1"> <div class="outline-text-3" id="text-2-1">
<p> <p>
And we initialize the disturbances to be equal to zero. And we initialize the disturbances to be equal to zero.
@ -412,45 +412,25 @@ save(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span cl
</div> </div>
</div> </div>
<div id="outline-container-orgc5cbe68" class="outline-3"> <div id="outline-container-org140576f" class="outline-3">
<h3 id="orgc5cbe68"><span class="section-number-3">2.2</span> Analysis</h3> <h3 id="org140576f"><span class="section-number-3">2.2</span> Analysis</h3>
<div class="outline-text-3" id="text-2-2"> <div class="outline-text-3" id="text-2-2">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'tomo_align_no_dist'</span>); <pre class="src src-matlab">load(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'tomo_align_no_dist'</span>);
t = tomo_align_no_dist.t;
MTr = tomo_align_no_dist.MTr;
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">Edx = squeeze(MTr(1, 4, <span class="org-type">:</span>));
Edy = squeeze(MTr(2, 4, <span class="org-type">:</span>));
Edz = squeeze(MTr(3, 4, <span class="org-type">:</span>));
<span class="org-comment">% The angles obtained are u-v-w Euler angles (rotations in the moving frame)</span>
Ery = atan2( squeeze(MTr(1, 3, <span class="org-type">:</span>)), squeeze(sqrt(MTr(1, 1, <span class="org-type">:</span>)<span class="org-type">.^</span>2 <span class="org-type">+</span> MTr(1, 2, <span class="org-type">:</span>)<span class="org-type">.^</span>2)));
Erx = atan2(<span class="org-type">-</span>squeeze(MTr(2, 3, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery), squeeze(MTr(3, 3, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery));
Erz = atan2(<span class="org-type">-</span>squeeze(MTr(1, 2, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery), squeeze(MTr(1, 1, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery));
</pre> </pre>
</div> </div>
<div id="org47272c3" class="figure"> <div id="orgfcc6055" class="figure">
<p><img src="figs/exp_tomo_without_dist_trans.png" alt="exp_tomo_without_dist_trans.png" /> <p><img src="figs/exp_tomo_without_dist.png" alt="exp_tomo_without_dist.png" />
</p> </p>
<p><span class="figure-number">Figure 1: </span>X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances (<a href="./figs/exp_tomo_without_dist_trans.png">png</a>, <a href="./figs/exp_tomo_without_dist_trans.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 1: </span>X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances (<a href="./figs/exp_tomo_without_dist.png">png</a>, <a href="./figs/exp_tomo_without_dist.pdf">pdf</a>)</p>
</div>
<div id="org72f4825" class="figure">
<p><img src="figs/exp_tomo_without_dist_rot.png" alt="exp_tomo_without_dist_rot.png" />
</p>
<p><span class="figure-number">Figure 2: </span>X-Y-Z rotations of the sample w.r.t. granite when performing tomography experiment with no disturbances (<a href="./figs/exp_tomo_without_dist_rot.png">png</a>, <a href="./figs/exp_tomo_without_dist_rot.pdf">pdf</a>)</p>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org6c038f1" class="outline-3"> <div id="outline-container-org26e3394" class="outline-3">
<h3 id="org6c038f1"><span class="section-number-3">2.3</span> Conclusion</h3> <h3 id="org26e3394"><span class="section-number-3">2.3</span> Conclusion</h3>
<div class="outline-text-3" id="text-2-3"> <div class="outline-text-3" id="text-2-3">
<div class="important"> <div class="important">
<p> <p>
@ -474,8 +454,8 @@ In this section, we also perform a tomography experiment with the sample&rsquo;s
However this time, we include perturbations such as ground motion and stage vibrations. However this time, we include perturbations such as ground motion and stage vibrations.
</p> </p>
</div> </div>
<div id="outline-container-org134f479" class="outline-3"> <div id="outline-container-org3da7cb0" class="outline-3">
<h3 id="org134f479"><span class="section-number-3">3.1</span> Simulation Setup</h3> <h3 id="org3da7cb0"><span class="section-number-3">3.1</span> Simulation Setup</h3>
<div class="outline-text-3" id="text-3-1"> <div class="outline-text-3" id="text-3-1">
<p> <p>
We now activate the disturbances. We now activate the disturbances.
@ -504,52 +484,32 @@ We simulate the model.
And we save the obtained data. And we save the obtained data.
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">tomo_align_dist = struct(<span class="org-string">'t'</span>, t, <span class="org-string">'MTr'</span>, MTr); <pre class="src src-matlab">tomo_align_dist = simout;
save(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'tomo_align_dist'</span>, <span class="org-string">'-append'</span>); save(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'tomo_align_dist'</span>, <span class="org-string">'-append'</span>);
</pre> </pre>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org378d406" class="outline-3"> <div id="outline-container-orgdb56a7f" class="outline-3">
<h3 id="org378d406"><span class="section-number-3">3.2</span> Analysis</h3> <h3 id="orgdb56a7f"><span class="section-number-3">3.2</span> Analysis</h3>
<div class="outline-text-3" id="text-3-2"> <div class="outline-text-3" id="text-3-2">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'tomo_align_dist'</span>); <pre class="src src-matlab">load(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'tomo_align_dist'</span>, <span class="org-string">'tomo_align_no_dist'</span>);
t = tomo_align_dist.t;
MTr = tomo_align_dist.MTr;
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">Edx = squeeze(MTr(1, 4, <span class="org-type">:</span>));
Edy = squeeze(MTr(2, 4, <span class="org-type">:</span>));
Edz = squeeze(MTr(3, 4, <span class="org-type">:</span>));
<span class="org-comment">% The angles obtained are u-v-w Euler angles (rotations in the moving frame)</span>
Ery = atan2( squeeze(MTr(1, 3, <span class="org-type">:</span>)), squeeze(sqrt(MTr(1, 1, <span class="org-type">:</span>)<span class="org-type">.^</span>2 <span class="org-type">+</span> MTr(1, 2, <span class="org-type">:</span>)<span class="org-type">.^</span>2)));
Erx = atan2(<span class="org-type">-</span>squeeze(MTr(2, 3, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery), squeeze(MTr(3, 3, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery));
Erz = atan2(<span class="org-type">-</span>squeeze(MTr(1, 2, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery), squeeze(MTr(1, 1, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery));
</pre> </pre>
</div> </div>
<div id="org5b3411f" class="figure"> <div id="org8030dba" class="figure">
<p><img src="figs/exp_tomo_dist_trans.png" alt="exp_tomo_dist_trans.png" /> <p><img src="figs/exp_tomo_dist.png" alt="exp_tomo_dist.png" />
</p> </p>
<p><span class="figure-number">Figure 3: </span>X-Y-Z translation of the sample w.r.t. the granite when performing tomography experiment with disturbances (<a href="./figs/exp_tomo_dist_trans.png">png</a>, <a href="./figs/exp_tomo_dist_trans.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 2: </span>X-Y-Z translations and rotations of the sample w.r.t. the granite when performing tomography experiment with disturbances (<a href="./figs/exp_tomo_dist.png">png</a>, <a href="./figs/exp_tomo_dist.pdf">pdf</a>)</p>
</div>
<div id="org7934376" class="figure">
<p><img src="figs/exp_tomo_dist_rot.png" alt="exp_tomo_dist_rot.png" />
</p>
<p><span class="figure-number">Figure 4: </span>X-Y-Z rotations of the sample w.r.t. the granite when performing tomography experiment with disturbances (<a href="./figs/exp_tomo_dist_rot.png">png</a>, <a href="./figs/exp_tomo_dist_rot.pdf">pdf</a>)</p>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-orgc315488" class="outline-3"> <div id="outline-container-org722f52a" class="outline-3">
<h3 id="orgc315488"><span class="section-number-3">3.3</span> Conclusion</h3> <h3 id="org722f52a"><span class="section-number-3">3.3</span> Conclusion</h3>
<div class="outline-text-3" id="text-3-3"> <div class="outline-text-3" id="text-3-3">
<div class="important"> <div class="important">
<p> <p>
@ -576,8 +536,8 @@ This is due to the fact that the micro-hexapod has performed some displacement.
No disturbances are included. No disturbances are included.
</p> </p>
</div> </div>
<div id="outline-container-org0d9f411" class="outline-3"> <div id="outline-container-org6137b17" class="outline-3">
<h3 id="org0d9f411"><span class="section-number-3">4.1</span> Simulation Setup</h3> <h3 id="org6137b17"><span class="section-number-3">4.1</span> Simulation Setup</h3>
<div class="outline-text-3" id="text-4-1"> <div class="outline-text-3" id="text-4-1">
<p> <p>
We first set the wanted translation of the Micro Hexapod. We first set the wanted translation of the Micro Hexapod.
@ -630,56 +590,37 @@ We simulate the model.
And we save the obtained data. And we save the obtained data.
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">tomo_not_align = struct(<span class="org-string">'t'</span>, t, <span class="org-string">'MTr'</span>, MTr); <pre class="src src-matlab">tomo_not_align = simout;
save(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'tomo_not_align'</span>, <span class="org-string">'-append'</span>); save(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'tomo_not_align'</span>, <span class="org-string">'-append'</span>);
</pre> </pre>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org80c3cd8" class="outline-3"> <div id="outline-container-org92c4f21" class="outline-3">
<h3 id="org80c3cd8"><span class="section-number-3">4.2</span> Analysis</h3> <h3 id="org92c4f21"><span class="section-number-3">4.2</span> Analysis</h3>
<div class="outline-text-3" id="text-4-2"> <div class="outline-text-3" id="text-4-2">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'tomo_not_align'</span>); <pre class="src src-matlab">load(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'tomo_not_align'</span>, <span class="org-string">'tomo_align_no_dist'</span>);
t = tomo_not_align.t;
MTr = tomo_not_align.MTr;
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">Edx = squeeze(MTr(1, 4, <span class="org-type">:</span>));
Edy = squeeze(MTr(2, 4, <span class="org-type">:</span>));
Edz = squeeze(MTr(3, 4, <span class="org-type">:</span>));
<span class="org-comment">% The angles obtained are u-v-w Euler angles (rotations in the moving frame)</span>
Ery = atan2( squeeze(MTr(1, 3, <span class="org-type">:</span>)), squeeze(sqrt(MTr(1, 1, <span class="org-type">:</span>)<span class="org-type">.^</span>2 <span class="org-type">+</span> MTr(1, 2, <span class="org-type">:</span>)<span class="org-type">.^</span>2)));
Erx = atan2(<span class="org-type">-</span>squeeze(MTr(2, 3, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery), squeeze(MTr(3, 3, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery));
Erz = atan2(<span class="org-type">-</span>squeeze(MTr(1, 2, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery), squeeze(MTr(1, 1, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery));
</pre> </pre>
</div> </div>
<div id="org40355c3" class="figure"> <div id="orgb824a01" class="figure">
<p><img src="figs/exp_tomo_offset_trans.png" alt="exp_tomo_offset_trans.png" /> <p><img src="figs/exp_tomo_offset.png" alt="exp_tomo_offset.png" />
</p> </p>
<p><span class="figure-number">Figure 5: </span>X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances (<a href="./figs/exp_tomo_offset_trans.png">png</a>, <a href="./figs/exp_tomo_offset_trans.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 3: </span>X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances (<a href="./figs/exp_tomo_offset.png">png</a>, <a href="./figs/exp_tomo_offset.pdf">pdf</a>)</p>
</div>
<div id="org3f64362" class="figure">
<p><img src="figs/exp_tomo_offset_rot.png" alt="exp_tomo_offset_rot.png" />
</p>
<p><span class="figure-number">Figure 6: </span>X-Y-Z rotations of the sample w.r.t. granite when performing tomography experiment with no disturbances (<a href="./figs/exp_tomo_offset_rot.png">png</a>, <a href="./figs/exp_tomo_offset_rot.pdf">pdf</a>)</p>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-orgb310f81" class="outline-3"> <div id="outline-container-org92f12cd" class="outline-3">
<h3 id="orgb310f81"><span class="section-number-3">4.3</span> Conclusion</h3> <h3 id="org92f12cd"><span class="section-number-3">4.3</span> Conclusion</h3>
<div class="outline-text-3" id="text-4-3"> <div class="outline-text-3" id="text-4-3">
<div class="important"> <div class="important">
<p> <p>
The main motions are translations in the X direction of the mobile platform (corresponds to the eccentricity of the micro-hexapod) and rotations along the rotating Y axis. The main motion error are 1Hz X-Y translations and constant Ry error.
This is mainly due to finite stiffness of the elements.
</p> </p>
</div> </div>
@ -697,17 +638,9 @@ The main motions are translations in the X direction of the mobile platform (cor
In this section, scans with the translation stage are performed. In this section, scans with the translation stage are performed.
</p> </p>
</div> </div>
<div id="outline-container-org0ba0ddd" class="outline-3"> <div id="outline-container-org4110173" class="outline-3">
<h3 id="org0ba0ddd"><span class="section-number-3">5.1</span> Simulation Setup</h3> <h3 id="org4110173"><span class="section-number-3">5.1</span> Simulation Setup</h3>
<div class="outline-text-3" id="text-5-1"> <div class="outline-text-3" id="text-5-1">
<p>
We set the reference path.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeReferences(<span class="org-string">'Dy_type'</span>, <span class="org-string">'triangular'</span>, <span class="org-string">'Dy_amplitude'</span>, 10e<span class="org-type">-</span>3, <span class="org-string">'Dy_period'</span>, 1);
</pre>
</div>
<p> <p>
We initialize the stages. We initialize the stages.
</p> </p>
@ -720,7 +653,7 @@ initializeRz();
initializeMicroHexapod(); initializeMicroHexapod();
initializeAxisc(); initializeAxisc();
initializeMirror(); initializeMirror();
initializeNanoHexapod(<span class="org-string">'actuator'</span>, <span class="org-string">'piezo'</span>); initializeNanoHexapod(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>);
initializeSample(<span class="org-string">'mass'</span>, 1); initializeSample(<span class="org-string">'mass'</span>, 1);
</pre> </pre>
</div> </div>
@ -740,6 +673,14 @@ And we initialize the disturbances to zero.
</pre> </pre>
</div> </div>
<p>
We set the reference path to be a triangular signal for the Translation Stage.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeReferences(<span class="org-string">'Dy_type'</span>, <span class="org-string">'triangular'</span>, <span class="org-string">'Dy_amplitude'</span>, 10e<span class="org-type">-</span>3, <span class="org-string">'Dy_period'</span>, 1);
</pre>
</div>
<p> <p>
We simulate the model. We simulate the model.
</p> </p>
@ -752,57 +693,66 @@ We simulate the model.
And we save the obtained data. And we save the obtained data.
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">ty_scan = struct(<span class="org-string">'t'</span>, t, <span class="org-string">'MTr'</span>, MTr); <pre class="src src-matlab">ty_scan_triangle = simout;
save(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'ty_scan'</span>, <span class="org-string">'-append'</span>); save(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'ty_scan_triangle'</span>, <span class="org-string">'-append'</span>);
</pre>
</div>
<p>
We now set the reference path to be a sinusoidal signal for the Translation Stage.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeReferences(<span class="org-string">'Dy_type'</span>, <span class="org-string">'sinusoidal'</span>, <span class="org-string">'Dy_amplitude'</span>, 10e<span class="org-type">-</span>3, <span class="org-string">'Dy_period'</span>, 1);
</pre>
</div>
<p>
We simulate the model.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'nass_model'</span>);
</pre>
</div>
<p>
And we save the obtained data.
</p>
<div class="org-src-container">
<pre class="src src-matlab">ty_scan_sinus = simout;
save(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'ty_scan_sinus'</span>, <span class="org-string">'-append'</span>);
</pre> </pre>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org140576f" class="outline-3"> <div id="outline-container-org1e50cb1" class="outline-3">
<h3 id="org140576f"><span class="section-number-3">5.2</span> Analysis</h3> <h3 id="org1e50cb1"><span class="section-number-3">5.2</span> Analysis</h3>
<div class="outline-text-3" id="text-5-2"> <div class="outline-text-3" id="text-5-2">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'ty_scan'</span>); <pre class="src src-matlab">load(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'ty_scan_triangle'</span>, <span class="org-string">'ty_scan_sinus'</span>);
t = ty_scan.t;
MTr = ty_scan.MTr;
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">Edx = squeeze(MTr(1, 4, <span class="org-type">:</span>));
Edy = squeeze(MTr(2, 4, <span class="org-type">:</span>));
Edz = squeeze(MTr(3, 4, <span class="org-type">:</span>));
<span class="org-comment">% The angles obtained are u-v-w Euler angles (rotations in the moving frame)</span>
Ery = atan2( squeeze(MTr(1, 3, <span class="org-type">:</span>)), squeeze(sqrt(MTr(1, 1, <span class="org-type">:</span>)<span class="org-type">.^</span>2 <span class="org-type">+</span> MTr(1, 2, <span class="org-type">:</span>)<span class="org-type">.^</span>2)));
Erx = atan2(<span class="org-type">-</span>squeeze(MTr(2, 3, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery), squeeze(MTr(3, 3, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery));
Erz = atan2(<span class="org-type">-</span>squeeze(MTr(1, 2, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery), squeeze(MTr(1, 1, <span class="org-type">:</span>))<span class="org-type">./</span>cos(Ery));
</pre> </pre>
</div> </div>
<div id="org042610c" class="figure"> <div id="org888f0bf" class="figure">
<p><img src="figs/exp_ty_scan_trans.png" alt="exp_ty_scan_trans.png" /> <p><img src="figs/exp_ty_scan.png" alt="exp_ty_scan.png" />
</p> </p>
<p><span class="figure-number">Figure 7: </span>X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances (<a href="./figs/exp_ty_scan_trans.png">png</a>, <a href="./figs/exp_ty_scan_trans.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 4: </span>X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances (<a href="./figs/exp_ty_scan.png">png</a>, <a href="./figs/exp_ty_scan.pdf">pdf</a>)</p>
</div>
<div id="org26a730c" class="figure">
<p><img src="figs/exp_ty_scan_rot.png" alt="exp_ty_scan_rot.png" />
</p>
<p><span class="figure-number">Figure 8: </span>X-Y-Z rotations of the sample w.r.t. granite when performing tomography experiment with no disturbances (<a href="./figs/exp_ty_scan_rot.png">png</a>, <a href="./figs/exp_ty_scan_rot.pdf">pdf</a>)</p>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org26e3394" class="outline-3"> <div id="outline-container-org98199a0" class="outline-3">
<h3 id="org26e3394"><span class="section-number-3">5.3</span> Conclusion</h3> <h3 id="org98199a0"><span class="section-number-3">5.3</span> Conclusion</h3>
<div class="outline-text-3" id="text-5-3"> <div class="outline-text-3" id="text-5-3">
<div class="important"> <div class="important">
<p> <p>
This is logic that the main error moving is translation along the Y axis and rotation along the X axis. Scans with the translation stage induces some errors in the Y direction and Rx translations.
In order to reduce the errors, we can make a smoother reference path for the translation stage. </p>
<p>
Also, scanning with a sinusoidal wave induces less position errors and at lower frequencies.
Thus, this should be preferred.
</p> </p>
</div> </div>
@ -812,7 +762,7 @@ In order to reduce the errors, we can make a smoother reference path for the tra
</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: 2020-03-17 mar. 11:21</p> <p class="date">Created: 2020-03-17 mar. 12:32</p>
</div> </div>
</body> </body>
</html> </html>

BIN
docs/figs/exp_tomo_dist.pdf Normal file

Binary file not shown.

BIN
docs/figs/exp_tomo_dist.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

BIN
docs/figs/exp_ty_scan.pdf Normal file

Binary file not shown.

BIN
docs/figs/exp_ty_scan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Binary file not shown.

View File

@ -111,7 +111,7 @@ No controller is used (Open Loop).
And we put some gravity. And we put some gravity.
#+begin_src matlab #+begin_src matlab
initializeSimscapeConfiguration('gravity', true); initializeSimscapeConfiguration('gravity', false);
#+end_src #+end_src
We log the signals for further analysis. We log the signals for further analysis.
@ -152,77 +152,60 @@ And we save the obtained data.
** Analysis ** Analysis
#+begin_src matlab #+begin_src matlab
load('./mat/experiment_tomography.mat', 'tomo_align_no_dist'); load('./mat/experiment_tomography.mat', 'tomo_align_no_dist');
t = tomo_align_no_dist.t;
MTr = tomo_align_no_dist.MTr;
#+end_src
#+begin_src matlab
Edx = squeeze(MTr(1, 4, :));
Edy = squeeze(MTr(2, 4, :));
Edz = squeeze(MTr(3, 4, :));
% The angles obtained are u-v-w Euler angles (rotations in the moving frame)
Ery = atan2( squeeze(MTr(1, 3, :)), squeeze(sqrt(MTr(1, 1, :).^2 + MTr(1, 2, :).^2)));
Erx = atan2(-squeeze(MTr(2, 3, :))./cos(Ery), squeeze(MTr(3, 3, :))./cos(Ery));
Erz = atan2(-squeeze(MTr(1, 2, :))./cos(Ery), squeeze(MTr(1, 1, :))./cos(Ery));
#+end_src #+end_src
#+begin_src matlab :exports none #+begin_src matlab :exports none
figure; figure;
ax1 = subplot(1, 3, 1); ax1 = subplot(2, 3, 1);
plot(t, Edx, 'DisplayName', '$\epsilon_{x}$') hold on;
ylabel('Displacement [m]'); plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 1))
legend('location', 'northeast'); hold off;
ylabel('Displacement $\epsilon_x$ [m]');
ax2 = subplot(1, 3, 2); ax2 = subplot(2, 3, 2);
plot(t, Edy, 'DisplayName', '$\epsilon_{y}$') hold on;
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 2))
hold off;
ylabel('Displacement $\epsilon_y$ [m]');
ax3 = subplot(2, 3, 3);
hold on;
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 3))
hold off;
ylabel('Displacement $\epsilon_z$ [m]');
ax4 = subplot(2, 3, 4);
hold on;
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 4))
hold off;
ylabel('Rotation $\epsilon_{R_x}$ [rad]');
ax5 = subplot(2, 3, 5);
hold on;
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 5))
hold off;
xlabel('Time [s]'); xlabel('Time [s]');
legend('location', 'northeast'); ylabel('Rotation $\epsilon_{R_y}$ [rad]');
ax3 = subplot(1, 3, 3); ax6 = subplot(2, 3, 6);
plot(t, Edz, 'DisplayName', '$\epsilon_{z}$') hold on;
legend('location', 'northeast'); plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 6))
hold off;
ylabel('Rotation $\epsilon_{R_z}$ [rad]');
linkaxes([ax1,ax2,ax3],'x');
xlim([2, inf]); linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
xlim([0.5, inf]);
#+end_src #+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes #+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/exp_tomo_without_dist_trans.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png") #+begin_src matlab :var filepath="figs/exp_tomo_without_dist.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>> <<plt-matlab>>
#+end_src #+end_src
#+NAME: fig:exp_tomo_without_dist_trans #+NAME: fig:exp_tomo_without_dist
#+CAPTION: X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_tomo_without_dist_trans.png][png]], [[./figs/exp_tomo_without_dist_trans.pdf][pdf]]) #+CAPTION: X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_tomo_without_dist.png][png]], [[./figs/exp_tomo_without_dist.pdf][pdf]])
[[file:figs/exp_tomo_without_dist_trans.png]] [[file:figs/exp_tomo_without_dist.png]]
#+begin_src matlab :exports none
figure;
ax1 = subplot(1, 3, 1);
plot(t, Erx, 'DisplayName', '$\epsilon_{\theta x}$')
ylabel('Rotation [rad]');
legend('location', 'northeast');
ax2 = subplot(1, 3, 2);
plot(t, Ery, 'DisplayName', '$\epsilon_{\theta y}$')
xlabel('Time [s]');
legend('location', 'northeast');
ax3 = subplot(1, 3, 3);
plot(t, Erz, 'DisplayName', '$\epsilon_{\theta z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x');
xlim([2, inf]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/exp_tomo_without_dist_rot.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:exp_tomo_without_dist_rot
#+CAPTION: X-Y-Z rotations of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_tomo_without_dist_rot.png][png]], [[./figs/exp_tomo_without_dist_rot.pdf][pdf]])
[[file:figs/exp_tomo_without_dist_rot.png]]
** Conclusion ** Conclusion
#+begin_important #+begin_important
@ -256,84 +239,74 @@ We simulate the model.
And we save the obtained data. And we save the obtained data.
#+begin_src matlab #+begin_src matlab
tomo_align_dist = struct('t', t, 'MTr', MTr); tomo_align_dist = simout;
save('./mat/experiment_tomography.mat', 'tomo_align_dist', '-append'); save('./mat/experiment_tomography.mat', 'tomo_align_dist', '-append');
#+end_src #+end_src
** Analysis ** Analysis
#+begin_src matlab #+begin_src matlab
load('./mat/experiment_tomography.mat', 'tomo_align_dist'); load('./mat/experiment_tomography.mat', 'tomo_align_dist', 'tomo_align_no_dist');
t = tomo_align_dist.t;
MTr = tomo_align_dist.MTr;
#+end_src
#+begin_src matlab
Edx = squeeze(MTr(1, 4, :));
Edy = squeeze(MTr(2, 4, :));
Edz = squeeze(MTr(3, 4, :));
% The angles obtained are u-v-w Euler angles (rotations in the moving frame)
Ery = atan2( squeeze(MTr(1, 3, :)), squeeze(sqrt(MTr(1, 1, :).^2 + MTr(1, 2, :).^2)));
Erx = atan2(-squeeze(MTr(2, 3, :))./cos(Ery), squeeze(MTr(3, 3, :))./cos(Ery));
Erz = atan2(-squeeze(MTr(1, 2, :))./cos(Ery), squeeze(MTr(1, 1, :))./cos(Ery));
#+end_src #+end_src
#+begin_src matlab :exports none #+begin_src matlab :exports none
figure; figure;
ax1 = subplot(1, 3, 1); ax1 = subplot(2, 3, 1);
plot(t, Edx, 'DisplayName', '$\epsilon_{x}$') hold on;
ylabel('Displacement [m]'); plot(tomo_align_dist.Em.Eg.Time, tomo_align_dist.Em.Eg.Data(:, 1))
legend('location', 'northeast'); plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 1))
hold off;
ylabel('Displacement $\epsilon_x$ [m]');
ax2 = subplot(1, 3, 2); ax2 = subplot(2, 3, 2);
plot(t, Edy, 'DisplayName', '$\epsilon_{y}$') hold on;
plot(tomo_align_dist.Em.Eg.Time, tomo_align_dist.Em.Eg.Data(:, 2))
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 2))
hold off;
ylabel('Displacement $\epsilon_y$ [m]');
ax3 = subplot(2, 3, 3);
hold on;
plot(tomo_align_dist.Em.Eg.Time, tomo_align_dist.Em.Eg.Data(:, 3))
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 3))
hold off;
ylabel('Displacement $\epsilon_z$ [m]');
ax4 = subplot(2, 3, 4);
hold on;
plot(tomo_align_dist.Em.En.Time, tomo_align_dist.Em.En.Data(:, 4))
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 4))
hold off;
ylabel('Rotation $\epsilon_{R_x}$ [rad]');
ax5 = subplot(2, 3, 5);
hold on;
plot(tomo_align_dist.Em.En.Time, tomo_align_dist.Em.En.Data(:, 5))
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 5))
hold off;
xlabel('Time [s]'); xlabel('Time [s]');
ylabel('Rotation $\epsilon_{R_y}$ [rad]');
ax6 = subplot(2, 3, 6);
hold on;
plot(tomo_align_dist.Em.En.Time, tomo_align_dist.Em.En.Data(:, 6), 'DisplayName', 'Dist')
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 6), 'DisplayName', 'Ideal')
hold off;
ylabel('Rotation $\epsilon_{R_z}$ [rad]');
legend('location', 'northeast'); legend('location', 'northeast');
ax3 = subplot(1, 3, 3);
plot(t, Edz, 'DisplayName', '$\epsilon_{z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x'); linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
xlim([2, inf]); xlim([0.5, inf]);
#+end_src #+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes #+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/exp_tomo_dist_trans.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png") #+begin_src matlab :var filepath="figs/exp_tomo_dist.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>> <<plt-matlab>>
#+end_src #+end_src
#+NAME: fig:exp_tomo_dist_trans #+NAME: fig:exp_tomo_dist
#+CAPTION: X-Y-Z translation of the sample w.r.t. the granite when performing tomography experiment with disturbances ([[./figs/exp_tomo_dist_trans.png][png]], [[./figs/exp_tomo_dist_trans.pdf][pdf]]) #+CAPTION: X-Y-Z translations and rotations of the sample w.r.t. the granite when performing tomography experiment with disturbances ([[./figs/exp_tomo_dist.png][png]], [[./figs/exp_tomo_dist.pdf][pdf]])
[[file:figs/exp_tomo_dist_trans.png]] [[file:figs/exp_tomo_dist.png]]
#+begin_src matlab :exports none
figure;
ax1 = subplot(1, 3, 1);
plot(t, Erx, 'DisplayName', '$\epsilon_{\theta x}$')
ylabel('Rotation [rad]');
legend('location', 'northeast');
ax2 = subplot(1, 3, 2);
plot(t, Ery, 'DisplayName', '$\epsilon_{\theta y}$')
xlabel('Time [s]');
legend('location', 'northeast');
ax3 = subplot(1, 3, 3);
plot(t, Erz, 'DisplayName', '$\epsilon_{\theta z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x');
xlim([2, inf]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/exp_tomo_dist_rot.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:exp_tomo_dist_rot
#+CAPTION: X-Y-Z rotations of the sample w.r.t. the granite when performing tomography experiment with disturbances ([[./figs/exp_tomo_dist_rot.png][png]], [[./figs/exp_tomo_dist_rot.pdf][pdf]])
[[file:figs/exp_tomo_dist_rot.png]]
** Conclusion ** Conclusion
@ -384,89 +357,79 @@ We simulate the model.
And we save the obtained data. And we save the obtained data.
#+begin_src matlab #+begin_src matlab
tomo_not_align = struct('t', t, 'MTr', MTr); tomo_not_align = simout;
save('./mat/experiment_tomography.mat', 'tomo_not_align', '-append'); save('./mat/experiment_tomography.mat', 'tomo_not_align', '-append');
#+end_src #+end_src
** Analysis ** Analysis
#+begin_src matlab #+begin_src matlab
load('./mat/experiment_tomography.mat', 'tomo_not_align'); load('./mat/experiment_tomography.mat', 'tomo_not_align', 'tomo_align_no_dist');
t = tomo_not_align.t;
MTr = tomo_not_align.MTr;
#+end_src
#+begin_src matlab
Edx = squeeze(MTr(1, 4, :));
Edy = squeeze(MTr(2, 4, :));
Edz = squeeze(MTr(3, 4, :));
% The angles obtained are u-v-w Euler angles (rotations in the moving frame)
Ery = atan2( squeeze(MTr(1, 3, :)), squeeze(sqrt(MTr(1, 1, :).^2 + MTr(1, 2, :).^2)));
Erx = atan2(-squeeze(MTr(2, 3, :))./cos(Ery), squeeze(MTr(3, 3, :))./cos(Ery));
Erz = atan2(-squeeze(MTr(1, 2, :))./cos(Ery), squeeze(MTr(1, 1, :))./cos(Ery));
#+end_src #+end_src
#+begin_src matlab :exports none #+begin_src matlab :exports none
figure; figure;
ax1 = subplot(1, 3, 1); ax1 = subplot(2, 3, 1);
plot(t, Edx, 'DisplayName', '$\epsilon_{x}$') hold on;
ylabel('Displacement [m]'); plot(tomo_not_align.Em.Eg.Time, tomo_not_align.Em.Eg.Data(:, 1))
legend('location', 'northeast'); plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 1))
hold off;
ylabel('Displacement $\epsilon_x$ [m]');
ax2 = subplot(1, 3, 2); ax2 = subplot(2, 3, 2);
plot(t, Edy, 'DisplayName', '$\epsilon_{y}$') hold on;
plot(tomo_not_align.Em.Eg.Time, tomo_not_align.Em.Eg.Data(:, 2))
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 2))
hold off;
ylabel('Displacement $\epsilon_y$ [m]');
ax3 = subplot(2, 3, 3);
hold on;
plot(tomo_not_align.Em.Eg.Time, tomo_not_align.Em.Eg.Data(:, 3))
plot(tomo_align_no_dist.Em.Eg.Time, tomo_align_no_dist.Em.Eg.Data(:, 3))
hold off;
ylabel('Displacement $\epsilon_z$ [m]');
ax4 = subplot(2, 3, 4);
hold on;
plot(tomo_not_align.Em.En.Time, tomo_not_align.Em.En.Data(:, 4))
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 4))
hold off;
ylabel('Rotation $\epsilon_{R_x}$ [rad]');
ax5 = subplot(2, 3, 5);
hold on;
plot(tomo_not_align.Em.En.Time, tomo_not_align.Em.En.Data(:, 5))
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 5))
hold off;
xlabel('Time [s]'); xlabel('Time [s]');
ylabel('Rotation $\epsilon_{R_y}$ [rad]');
ax6 = subplot(2, 3, 6);
hold on;
plot(tomo_not_align.Em.En.Time, tomo_not_align.Em.En.Data(:, 6), 'DisplayName', 'Offset')
plot(tomo_align_no_dist.Em.En.Time, tomo_align_no_dist.Em.En.Data(:, 6), 'DisplayName', 'Ideal')
hold off;
ylabel('Rotation $\epsilon_{R_z}$ [rad]');
legend('location', 'northeast'); legend('location', 'northeast');
ax3 = subplot(1, 3, 3);
plot(t, Edz, 'DisplayName', '$\epsilon_{z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x'); linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
xlim([2, inf]); xlim([0.5, inf]);
#+end_src #+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes #+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/exp_tomo_offset_trans.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png") #+begin_src matlab :var filepath="figs/exp_tomo_offset.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>> <<plt-matlab>>
#+end_src #+end_src
#+NAME: fig:exp_tomo_offset_trans #+NAME: fig:exp_tomo_offset
#+CAPTION: X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_tomo_offset_trans.png][png]], [[./figs/exp_tomo_offset_trans.pdf][pdf]]) #+CAPTION: X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_tomo_offset.png][png]], [[./figs/exp_tomo_offset.pdf][pdf]])
[[file:figs/exp_tomo_offset_trans.png]] [[file:figs/exp_tomo_offset.png]]
#+begin_src matlab :exports none
figure;
ax1 = subplot(1, 3, 1);
plot(t, Erx, 'DisplayName', '$\epsilon_{\theta x}$')
ylabel('Rotation [rad]');
legend('location', 'northeast');
ax2 = subplot(1, 3, 2);
plot(t, Ery, 'DisplayName', '$\epsilon_{\theta y}$')
xlabel('Time [s]');
legend('location', 'northeast');
ax3 = subplot(1, 3, 3);
plot(t, Erz, 'DisplayName', '$\epsilon_{\theta z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x');
xlim([2, inf]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/exp_tomo_offset_rot.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:exp_tomo_offset_rot
#+CAPTION: X-Y-Z rotations of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_tomo_offset_rot.png][png]], [[./figs/exp_tomo_offset_rot.pdf][pdf]])
[[file:figs/exp_tomo_offset_rot.png]]
** Conclusion ** Conclusion
#+begin_important #+begin_important
The main motions are translations in the X direction of the mobile platform (corresponds to the eccentricity of the micro-hexapod) and rotations along the rotating Y axis. The main motion error are 1Hz X-Y translations and constant Ry error.
This is mainly due to finite stiffness of the elements.
#+end_important #+end_important
* Raster Scans with the translation stage * Raster Scans with the translation stage
@ -475,11 +438,6 @@ And we save the obtained data.
In this section, scans with the translation stage are performed. In this section, scans with the translation stage are performed.
** Simulation Setup ** Simulation Setup
We set the reference path.
#+begin_src matlab
initializeReferences('Dy_type', 'triangular', 'Dy_amplitude', 10e-3, 'Dy_period', 1);
#+end_src
We initialize the stages. We initialize the stages.
#+begin_src matlab #+begin_src matlab
initializeGround(); initializeGround();
@ -490,7 +448,7 @@ We initialize the stages.
initializeMicroHexapod(); initializeMicroHexapod();
initializeAxisc(); initializeAxisc();
initializeMirror(); initializeMirror();
initializeNanoHexapod('actuator', 'piezo'); initializeNanoHexapod('type', 'rigid');
initializeSample('mass', 1); initializeSample('mass', 1);
#+end_src #+end_src
@ -506,6 +464,11 @@ And we initialize the disturbances to zero.
); );
#+end_src #+end_src
We set the reference path to be a triangular signal for the Translation Stage.
#+begin_src matlab
initializeReferences('Dy_type', 'triangular', 'Dy_amplitude', 10e-3, 'Dy_period', 1);
#+end_src
We simulate the model. We simulate the model.
#+begin_src matlab #+begin_src matlab
sim('nass_model'); sim('nass_model');
@ -513,88 +476,95 @@ We simulate the model.
And we save the obtained data. And we save the obtained data.
#+begin_src matlab #+begin_src matlab
ty_scan = struct('t', t, 'MTr', MTr); ty_scan_triangle = simout;
save('./mat/experiment_tomography.mat', 'ty_scan', '-append'); save('./mat/experiment_tomography.mat', 'ty_scan_triangle', '-append');
#+end_src
We now set the reference path to be a sinusoidal signal for the Translation Stage.
#+begin_src matlab
initializeReferences('Dy_type', 'sinusoidal', 'Dy_amplitude', 10e-3, 'Dy_period', 1);
#+end_src
We simulate the model.
#+begin_src matlab
sim('nass_model');
#+end_src
And we save the obtained data.
#+begin_src matlab
ty_scan_sinus = simout;
save('./mat/experiment_tomography.mat', 'ty_scan_sinus', '-append');
#+end_src #+end_src
** Analysis ** Analysis
#+begin_src matlab #+begin_src matlab
load('./mat/experiment_tomography.mat', 'ty_scan'); load('./mat/experiment_tomography.mat', 'ty_scan_triangle', 'ty_scan_sinus');
t = ty_scan.t;
MTr = ty_scan.MTr;
#+end_src
#+begin_src matlab
Edx = squeeze(MTr(1, 4, :));
Edy = squeeze(MTr(2, 4, :));
Edz = squeeze(MTr(3, 4, :));
% The angles obtained are u-v-w Euler angles (rotations in the moving frame)
Ery = atan2( squeeze(MTr(1, 3, :)), squeeze(sqrt(MTr(1, 1, :).^2 + MTr(1, 2, :).^2)));
Erx = atan2(-squeeze(MTr(2, 3, :))./cos(Ery), squeeze(MTr(3, 3, :))./cos(Ery));
Erz = atan2(-squeeze(MTr(1, 2, :))./cos(Ery), squeeze(MTr(1, 1, :))./cos(Ery));
#+end_src #+end_src
#+begin_src matlab :exports none #+begin_src matlab :exports none
figure; figure;
ax1 = subplot(1, 3, 1); ax1 = subplot(2, 3, 1);
plot(t, Edx, 'DisplayName', '$\epsilon_{x}$') hold on;
ylabel('Displacement [m]'); plot(ty_scan_triangle.Em.Eg.Time, ty_scan_triangle.Em.Eg.Data(:, 1))
legend('location', 'northeast'); plot(ty_scan_sinus.Em.Eg.Time, ty_scan_sinus.Em.Eg.Data(:, 1))
hold off;
ylabel('Displacement $\epsilon_x$ [m]');
ax2 = subplot(1, 3, 2); ax2 = subplot(2, 3, 2);
plot(t, Edy, 'DisplayName', '$\epsilon_{y}$') hold on;
plot(ty_scan_triangle.Em.Eg.Time, ty_scan_triangle.Em.Eg.Data(:, 2))
plot(ty_scan_sinus.Em.Eg.Time, ty_scan_sinus.Em.Eg.Data(:, 2))
hold off;
ylabel('Displacement $\epsilon_y$ [m]');
ax3 = subplot(2, 3, 3);
hold on;
plot(ty_scan_triangle.Em.Eg.Time, ty_scan_triangle.Em.Eg.Data(:, 3))
plot(ty_scan_sinus.Em.Eg.Time, ty_scan_sinus.Em.Eg.Data(:, 3))
hold off;
ylabel('Displacement $\epsilon_z$ [m]');
ax4 = subplot(2, 3, 4);
hold on;
plot(ty_scan_triangle.Em.En.Time, ty_scan_triangle.Em.En.Data(:, 4))
plot(ty_scan_sinus.Em.En.Time, ty_scan_sinus.Em.En.Data(:, 4))
hold off;
ylabel('Rotation $\epsilon_{R_x}$ [rad]');
ax5 = subplot(2, 3, 5);
hold on;
plot(ty_scan_triangle.Em.En.Time, ty_scan_triangle.Em.En.Data(:, 5))
plot(ty_scan_sinus.Em.En.Time, ty_scan_sinus.Em.En.Data(:, 5))
hold off;
xlabel('Time [s]'); xlabel('Time [s]');
ylabel('Rotation $\epsilon_{R_y}$ [rad]');
ax6 = subplot(2, 3, 6);
hold on;
plot(ty_scan_triangle.Em.En.Time, ty_scan_triangle.Em.En.Data(:, 6), 'DisplayName', 'triangle')
plot(ty_scan_sinus.Em.En.Time, ty_scan_sinus.Em.En.Data(:, 6), 'DisplayName', 'sinus')
hold off;
ylabel('Rotation $\epsilon_{R_z}$ [rad]');
legend('location', 'northeast'); legend('location', 'northeast');
ax3 = subplot(1, 3, 3);
plot(t, Edz, 'DisplayName', '$\epsilon_{z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x'); linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'x');
xlim([2, inf]); xlim([0.5, inf]);
#+end_src #+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes #+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/exp_ty_scan_trans.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png") #+begin_src matlab :var filepath="figs/exp_ty_scan.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>> <<plt-matlab>>
#+end_src #+end_src
#+NAME: fig:exp_ty_scan_trans #+NAME: fig:exp_ty_scan
#+CAPTION: X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_ty_scan_trans.png][png]], [[./figs/exp_ty_scan_trans.pdf][pdf]]) #+CAPTION: X-Y-Z translation of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_ty_scan.png][png]], [[./figs/exp_ty_scan.pdf][pdf]])
[[file:figs/exp_ty_scan_trans.png]] [[file:figs/exp_ty_scan.png]]
#+begin_src matlab :exports none
figure;
ax1 = subplot(1, 3, 1);
plot(t, Erx, 'DisplayName', '$\epsilon_{\theta x}$')
ylabel('Rotation [rad]');
legend('location', 'northeast');
ax2 = subplot(1, 3, 2);
plot(t, Ery, 'DisplayName', '$\epsilon_{\theta y}$')
xlabel('Time [s]');
legend('location', 'northeast');
ax3 = subplot(1, 3, 3);
plot(t, Erz, 'DisplayName', '$\epsilon_{\theta z}$')
legend('location', 'northeast');
linkaxes([ax1,ax2,ax3],'x');
xlim([2, inf]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/exp_ty_scan_rot.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:exp_ty_scan_rot
#+CAPTION: X-Y-Z rotations of the sample w.r.t. granite when performing tomography experiment with no disturbances ([[./figs/exp_ty_scan_rot.png][png]], [[./figs/exp_ty_scan_rot.pdf][pdf]])
[[file:figs/exp_ty_scan_rot.png]]
** Conclusion ** Conclusion
#+begin_important #+begin_important
This is logic that the main error moving is translation along the Y axis and rotation along the X axis. Scans with the translation stage induces some errors in the Y direction and Rx translations.
In order to reduce the errors, we can make a smoother reference path for the translation stage.
Also, scanning with a sinusoidal wave induces less position errors and at lower frequencies.
Thus, this should be preferred.
#+end_important #+end_important