Started to rework the experiment file

This commit is contained in:
2020-03-17 11:23:39 +01:00
parent c7207b96cb
commit 0e28b2d4f5
9 changed files with 123 additions and 57 deletions
+89 -49
View File
@@ -4,10 +4,10 @@
"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-13 ven. 17:39 --> <!-- 2020-03-17 mar. 11:21 -->
<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>Tomography Experiment</title> <title>Simulation of Scientific Experiments</title>
<meta name="generator" content="Org mode" /> <meta name="generator" content="Org mode" />
<meta name="author" content="Dehaeze Thomas" /> <meta name="author" content="Dehaeze Thomas" />
<style type="text/css"> <style type="text/css">
@@ -232,7 +232,7 @@
| |
<a accesskey="H" href="./index.html"> HOME </a> <a accesskey="H" href="./index.html"> HOME </a>
</div><div id="content"> </div><div id="content">
<h1 class="title">Tomography Experiment</h1> <h1 class="title">Simulation of Scientific Experiments</h1>
<div id="table-of-contents"> <div id="table-of-contents">
<h2>Table of Contents</h2> <h2>Table of Contents</h2>
<div id="text-table-of-contents"> <div id="text-table-of-contents">
@@ -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="#orgab2c05f">2.1. Simulation Setup</a></li> <li><a href="#org06c656a">2.1. Simulation Setup</a></li>
<li><a href="#org7d6c417">2.2. Analysis</a></li> <li><a href="#orgc5cbe68">2.2. Analysis</a></li>
<li><a href="#orgc8896a6">2.3. Conclusion</a></li> <li><a href="#org6c038f1">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="#org89b64b9">3.1. Simulation Setup</a></li> <li><a href="#org134f479">3.1. Simulation Setup</a></li>
<li><a href="#orgd3d5cc3">3.2. Analysis</a></li> <li><a href="#org378d406">3.2. Analysis</a></li>
<li><a href="#org744b6a3">3.3. Conclusion</a></li> <li><a href="#orgc315488">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="#org3c7fe25">4.1. Simulation Setup</a></li> <li><a href="#org0d9f411">4.1. Simulation Setup</a></li>
<li><a href="#orgbf003b8">4.2. Analysis</a></li> <li><a href="#org80c3cd8">4.2. Analysis</a></li>
<li><a href="#org0577a39">4.3. Conclusion</a></li> <li><a href="#orgb310f81">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="#org06c656a">5.1. Simulation Setup</a></li> <li><a href="#org0ba0ddd">5.1. Simulation Setup</a></li>
<li><a href="#orgc5cbe68">5.2. Analysis</a></li> <li><a href="#org140576f">5.2. Analysis</a></li>
<li><a href="#org6c038f1">5.3. Conclusion</a></li> <li><a href="#org26e3394">5.3. Conclusion</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@@ -271,7 +271,7 @@
</div> </div>
<p> <p>
The goal here is to simulate some scientific experiments with the tuned Simscape model when no control is applied to the nano-hexapod. The goal here is to simulate some scientific experiments with the Simscape model when no control is applied to the nano-hexapod.
</p> </p>
<p> <p>
@@ -281,6 +281,7 @@ This has several goals:
<li>Validate the model</li> <li>Validate the model</li>
<li>Estimate the expected error motion for the experiments</li> <li>Estimate the expected error motion for the experiments</li>
<li>Estimate the stroke that we may need for the nano-hexapod</li> <li>Estimate the stroke that we may need for the nano-hexapod</li>
<li>Compare with experiments when control is applied</li>
</ul> </ul>
<p> <p>
@@ -301,22 +302,18 @@ The document in organized as follow:
<a id="orgfc7d050"></a> <a id="orgfc7d050"></a>
</p> </p>
<div class="org-src-container">
<pre class="src src-matlab">open(<span class="org-string">'nass_model.slx'</span>);
</pre>
</div>
<p> <p>
We load the shared simulink configuration and we set the <code>StopTime</code>. We load the shared simulink configuration and we set the <code>StopTime</code>.
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'mat/conf_simulink.mat'</span>); <pre class="src src-matlab">load(<span class="org-string">'mat/conf_simulink.mat'</span>);
<span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-variable-name">conf_simulink</span>, <span class="org-string">'StopTime'</span>, <span class="org-string">'5'</span>); <span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-variable-name">conf_simulink</span>, <span class="org-string">'StopTime'</span>, <span class="org-string">'2'</span>);
</pre> </pre>
</div> </div>
<p> <p>
We first initialize all the stages. We first initialize all the stages.
The nano-hexapod is considered to be a rigid body.
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">initializeGround(); <pre class="src src-matlab">initializeGround();
@@ -327,7 +324,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>
@@ -340,6 +337,30 @@ All stage is set to its zero position except the Spindle which is rotating at 60
<pre class="src src-matlab">initializeReferences(<span class="org-string">'Rz_type'</span>, <span class="org-string">'rotating'</span>, <span class="org-string">'Rz_period'</span>, 1); <pre class="src src-matlab">initializeReferences(<span class="org-string">'Rz_type'</span>, <span class="org-string">'rotating'</span>, <span class="org-string">'Rz_period'</span>, 1);
</pre> </pre>
</div> </div>
<p>
No controller is used (Open Loop).
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
<p>
And we put some gravity.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeSimscapeConfiguration(<span class="org-string">'gravity'</span>, <span class="org-constant">true</span>);
</pre>
</div>
<p>
We log the signals for further analysis.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeLoggingConfiguration(<span class="org-string">'log'</span>, <span class="org-string">'all'</span>);
</pre>
</div>
</div> </div>
</div> </div>
@@ -349,9 +370,13 @@ All stage is set to its zero position except the Spindle which is rotating at 60
<p> <p>
<a id="org3effbb8"></a> <a id="org3effbb8"></a>
</p> </p>
<p>
In this section, a tomography experiment is performed with the sample aligned with the rotation axis.
No disturbance is included.
</p>
</div> </div>
<div id="outline-container-orgab2c05f" class="outline-3"> <div id="outline-container-org06c656a" class="outline-3">
<h3 id="orgab2c05f"><span class="section-number-3">2.1</span> Simulation Setup</h3> <h3 id="org06c656a"><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.
@@ -380,15 +405,15 @@ 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_no_dist = struct(<span class="org-string">'t'</span>, t, <span class="org-string">'MTr'</span>, MTr); <pre class="src src-matlab">tomo_align_no_dist = simout;
save(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'tomo_align_no_dist'</span>, <span class="org-string">'-append'</span>); save(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span class="org-string">'tomo_align_no_dist'</span>, <span class="org-string">'-append'</span>);
</pre> </pre>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org7d6c417" class="outline-3"> <div id="outline-container-orgc5cbe68" class="outline-3">
<h3 id="org7d6c417"><span class="section-number-3">2.2</span> Analysis</h3> <h3 id="orgc5cbe68"><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>);
@@ -424,8 +449,8 @@ Erz = atan2(<span class="org-type">-</span>squeeze(MTr(1, 2, <span class="org-ty
</div> </div>
</div> </div>
<div id="outline-container-orgc8896a6" class="outline-3"> <div id="outline-container-org6c038f1" class="outline-3">
<h3 id="orgc8896a6"><span class="section-number-3">2.3</span> Conclusion</h3> <h3 id="org6c038f1"><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>
@@ -444,9 +469,13 @@ This residual error motion probably comes from a small misalignment somewhere.
<p> <p>
<a id="org4e7f626"></a> <a id="org4e7f626"></a>
</p> </p>
<p>
In this section, we also perform a tomography experiment with the sample&rsquo;s center of mass aligned with the rotation axis.
However this time, we include perturbations such as ground motion and stage vibrations.
</p>
</div> </div>
<div id="outline-container-org89b64b9" class="outline-3"> <div id="outline-container-org134f479" class="outline-3">
<h3 id="org89b64b9"><span class="section-number-3">3.1</span> Simulation Setup</h3> <h3 id="org134f479"><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.
@@ -482,8 +511,8 @@ save(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span cl
</div> </div>
</div> </div>
<div id="outline-container-orgd3d5cc3" class="outline-3"> <div id="outline-container-org378d406" class="outline-3">
<h3 id="orgd3d5cc3"><span class="section-number-3">3.2</span> Analysis</h3> <h3 id="org378d406"><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>);
@@ -519,8 +548,8 @@ Erz = atan2(<span class="org-type">-</span>squeeze(MTr(1, 2, <span class="org-ty
</div> </div>
</div> </div>
<div id="outline-container-org744b6a3" class="outline-3"> <div id="outline-container-orgc315488" class="outline-3">
<h3 id="org744b6a3"><span class="section-number-3">3.3</span> Conclusion</h3> <h3 id="orgc315488"><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>
@@ -538,9 +567,17 @@ Error motion is what expected from the disturbance measurements.
<p> <p>
<a id="orgb31e3fb"></a> <a id="orgb31e3fb"></a>
</p> </p>
<p>
In this section, the sample&rsquo;s center of mass is not aligned with the rotation axis anymore.
This is due to the fact that the micro-hexapod has performed some displacement.
</p>
<p>
No disturbances are included.
</p>
</div> </div>
<div id="outline-container-org3c7fe25" class="outline-3"> <div id="outline-container-org0d9f411" class="outline-3">
<h3 id="org3c7fe25"><span class="section-number-3">4.1</span> Simulation Setup</h3> <h3 id="org0d9f411"><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.
@@ -600,8 +637,8 @@ save(<span class="org-string">'./mat/experiment_tomography.mat'</span>, <span cl
</div> </div>
</div> </div>
<div id="outline-container-orgbf003b8" class="outline-3"> <div id="outline-container-org80c3cd8" class="outline-3">
<h3 id="orgbf003b8"><span class="section-number-3">4.2</span> Analysis</h3> <h3 id="org80c3cd8"><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>);
@@ -637,8 +674,8 @@ Erz = atan2(<span class="org-type">-</span>squeeze(MTr(1, 2, <span class="org-ty
</div> </div>
</div> </div>
<div id="outline-container-org0577a39" class="outline-3"> <div id="outline-container-orgb310f81" class="outline-3">
<h3 id="org0577a39"><span class="section-number-3">4.3</span> Conclusion</h3> <h3 id="orgb310f81"><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>
@@ -656,9 +693,12 @@ The main motions are translations in the X direction of the mobile platform (cor
<p> <p>
<a id="org6aaeb53"></a> <a id="org6aaeb53"></a>
</p> </p>
<p>
In this section, scans with the translation stage are performed.
</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">5.1</span> Simulation Setup</h3> <h3 id="org0ba0ddd"><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> <p>
We set the reference path. We set the reference path.
@@ -719,8 +759,8 @@ 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">5.2</span> Analysis</h3> <h3 id="org140576f"><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'</span>);
@@ -756,8 +796,8 @@ Erz = atan2(<span class="org-type">-</span>squeeze(MTr(1, 2, <span class="org-ty
</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">5.3</span> Conclusion</h3> <h3 id="org26e3394"><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>
@@ -772,7 +812,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-13 ven. 17:39</p> <p class="date">Created: 2020-03-17 mar. 11:21</p>
</div> </div>
</body> </body>
</html> </html>
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+34 -8
View File
@@ -1,4 +1,4 @@
#+TITLE: Tomography Experiment #+TITLE: Simulation of Scientific Experiments
:DRAWER: :DRAWER:
#+STARTUP: overview #+STARTUP: overview
@@ -42,12 +42,13 @@
:END: :END:
* Introduction :ignore: * Introduction :ignore:
The goal here is to simulate some scientific experiments with the tuned Simscape model when no control is applied to the nano-hexapod. The goal here is to simulate some scientific experiments with the Simscape model when no control is applied to the nano-hexapod.
This has several goals: This has several goals:
- Validate the model - Validate the model
- Estimate the expected error motion for the experiments - Estimate the expected error motion for the experiments
- Estimate the stroke that we may need for the nano-hexapod - Estimate the stroke that we may need for the nano-hexapod
- Compare with experiments when control is applied
The document in organized as follow: The document in organized as follow:
- In section [[sec:simscape_model]] the Simscape model is initialized - In section [[sec:simscape_model]] the Simscape model is initialized
@@ -69,20 +70,21 @@ The document in organized as follow:
simulinkproject('../'); simulinkproject('../');
#+end_src #+end_src
* Simscape Model
<<sec:simscape_model>>
#+begin_src matlab #+begin_src matlab
open('nass_model.slx'); open('nass_model.slx');
#+end_src #+end_src
* Simscape Model
<<sec:simscape_model>>
We load the shared simulink configuration and we set the =StopTime=. We load the shared simulink configuration and we set the =StopTime=.
#+begin_src matlab #+begin_src matlab
load('mat/conf_simulink.mat'); load('mat/conf_simulink.mat');
set_param(conf_simulink, 'StopTime', '5'); set_param(conf_simulink, 'StopTime', '2');
#+end_src #+end_src
We first initialize all the stages. We first initialize all the stages.
The nano-hexapod is considered to be a rigid body.
#+begin_src matlab #+begin_src matlab
initializeGround(); initializeGround();
initializeGranite(); initializeGranite();
@@ -92,7 +94,7 @@ We first initialize all the stages.
initializeMicroHexapod(); initializeMicroHexapod();
initializeAxisc(); initializeAxisc();
initializeMirror(); initializeMirror();
initializeNanoHexapod('actuator', 'piezo'); initializeNanoHexapod('type', 'rigid');
initializeSample('mass', 1); initializeSample('mass', 1);
#+end_src #+end_src
@@ -102,9 +104,26 @@ All stage is set to its zero position except the Spindle which is rotating at 60
initializeReferences('Rz_type', 'rotating', 'Rz_period', 1); initializeReferences('Rz_type', 'rotating', 'Rz_period', 1);
#+end_src #+end_src
No controller is used (Open Loop).
#+begin_src matlab
initializeController('type', 'open-loop');
#+end_src
And we put some gravity.
#+begin_src matlab
initializeSimscapeConfiguration('gravity', true);
#+end_src
We log the signals for further analysis.
#+begin_src matlab
initializeLoggingConfiguration('log', 'all');
#+end_src
* Tomography Experiment with no disturbances * Tomography Experiment with no disturbances
<<sec:tomo_no_dist>> <<sec:tomo_no_dist>>
** Introduction :ignore: ** Introduction :ignore:
In this section, a tomography experiment is performed with the sample aligned with the rotation axis.
No disturbance is included.
** Simulation Setup ** Simulation Setup
And we initialize the disturbances to be equal to zero. And we initialize the disturbances to be equal to zero.
@@ -126,7 +145,7 @@ We simulate the model.
And we save the obtained data. And we save the obtained data.
#+begin_src matlab #+begin_src matlab
tomo_align_no_dist = struct('t', t, 'MTr', MTr); tomo_align_no_dist = simout;
save('./mat/experiment_tomography.mat', 'tomo_align_no_dist', '-append'); save('./mat/experiment_tomography.mat', 'tomo_align_no_dist', '-append');
#+end_src #+end_src
@@ -214,6 +233,8 @@ And we save the obtained data.
* Tomography Experiment with included perturbations * Tomography Experiment with included perturbations
<<sec:tomo_dist>> <<sec:tomo_dist>>
** Introduction :ignore: ** Introduction :ignore:
In this section, we also perform a tomography experiment with the sample's center of mass aligned with the rotation axis.
However this time, we include perturbations such as ground motion and stage vibrations.
** Simulation Setup ** Simulation Setup
We now activate the disturbances. We now activate the disturbances.
@@ -323,6 +344,10 @@ And we save the obtained data.
* Tomography when the micro-hexapod is not centered * Tomography when the micro-hexapod is not centered
<<sec:tomo_hexa_trans>> <<sec:tomo_hexa_trans>>
** Introduction :ignore: ** Introduction :ignore:
In this section, the sample's center of mass is not aligned with the rotation axis anymore.
This is due to the fact that the micro-hexapod has performed some displacement.
No disturbances are included.
** Simulation Setup ** Simulation Setup
We first set the wanted translation of the Micro Hexapod. We first set the wanted translation of the Micro Hexapod.
@@ -447,6 +472,7 @@ And we save the obtained data.
* Raster Scans with the translation stage * Raster Scans with the translation stage
<<sec:ty_scans>> <<sec:ty_scans>>
** Introduction :ignore: ** Introduction :ignore:
In this section, scans with the translation stage are performed.
** Simulation Setup ** Simulation Setup
We set the reference path. We set the reference path.