Update html page

This commit is contained in:
Thomas Dehaeze 2020-01-22 09:36:43 +01:00
parent 946a09f739
commit 6bce9108cd
2 changed files with 157 additions and 148 deletions

View File

@ -320,6 +320,7 @@ This Matlab function is accessible [[file:src/inverseKinematicsHexapod.m][here]]
end
end
#+end_src
** computeReferencePose
:PROPERTIES:
:header-args:matlab+: :tangle ../src/computeReferencePose.m

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2019-12-13 ven. 11:05 -->
<!-- 2020-01-22 mer. 09:36 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Computation of the Positioning Error with respect to the nano-hexapod</title>
@ -205,7 +206,7 @@
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2019 Free Software Foundation, Inc.
Copyright (C) 2012-2020 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
@ -283,19 +284,19 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgfec69a9">1. Verify that the function to compute the reference pose is correct</a>
<li><a href="#org6d16893">1. Verify that the function to compute the reference pose is correct</a>
<ul>
<li><a href="#orgf92ae6f">1.1. Prepare the Simulation</a></li>
<li><a href="#orgf02914f">1.2. Verify that the pose of the sample is the same as the computed one</a></li>
<li><a href="#org694b331">1.3. Conclusion</a></li>
<li><a href="#org7dc24f7">1.1. Prepare the Simulation</a></li>
<li><a href="#orge08b690">1.2. Verify that the pose of the sample is the same as the computed one</a></li>
<li><a href="#org05ca20d">1.3. Conclusion</a></li>
</ul>
</li>
<li><a href="#orgde75002">2. Verify that the function to convert the position error in the frame fixed to the nano-hexapod is working</a>
<li><a href="#org77fd04d">2. Verify that the function to convert the position error in the frame fixed to the nano-hexapod is working</a>
<ul>
<li><a href="#orgdd3b23d">2.1. Prepare the Simulation</a></li>
<li><a href="#org919e4c0">2.2. Compute the wanted pose of the sample in the NASS Base from the metrology and the reference</a></li>
<li><a href="#org8c406f5">2.3. Verify that be imposing the error motion on the nano-hexapod, we indeed have zero error at the end</a></li>
<li><a href="#org1025ff4">2.4. Conclusion</a></li>
<li><a href="#org7de22c7">2.1. Prepare the Simulation</a></li>
<li><a href="#org54ffaf9">2.2. Compute the wanted pose of the sample in the NASS Base from the metrology and the reference</a></li>
<li><a href="#org2d21dda">2.3. Verify that be imposing the error motion on the nano-hexapod, we indeed have zero error at the end</a></li>
<li><a href="#orgd9ee154">2.4. Conclusion</a></li>
</ul>
</li>
</ul>
@ -303,11 +304,11 @@ for the JavaScript code in this tag.
</div>
<p>
The global measurement and control schematic is shown in figure <a href="#org4153b3d">1</a>.
The global measurement and control schematic is shown in figure <a href="#org43a68ad">1</a>.
</p>
<div id="org4153b3d" class="figure">
<div id="org43a68ad" class="figure">
<p><img src="figs/control-schematic-nass.png" alt="control-schematic-nass.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Global Control Schematic for the Station</p>
@ -319,9 +320,9 @@ In this document, we develop and verify that the two green blocs are working.
<p>
We suppose that we are able to measure perfectly the position of the sample with respect to the granite.
This means that we do not care about the bloc "Compute Sample Position w.r.t. Granite" that makes the transformation from the interferometer measurements to the position of the sample.
This means that we do not care about the bloc &ldquo;Compute Sample Position w.r.t. Granite&rdquo; that makes the transformation from the interferometer measurements to the position of the sample.
We suppose that we can directly measure perfectly the position of the sample with respect to the granite.
This is actually done with a "transform sensor block" that outputs the x-y-z translation of the sample with respect to the granite as well as the rotation matrix that maps the granite frame to the sample frame.
This is actually done with a &ldquo;transform sensor block&rdquo; that outputs the x-y-z translation of the sample with respect to the granite as well as the rotation matrix that maps the granite frame to the sample frame.
</p>
<p>
@ -329,34 +330,34 @@ Also, all the stages can be perfectly positioned.
</p>
<p>
In section <a href="#org9d27621">1</a>, we verify that the function developed to compute the wanted pose (translation and orientation) of the sample with respect to the granite can be determined from the wanted position of each stage (translation stage, tilt stage, spindle and micro-hexapod). This corresponds to the bloc "Compute Wanted Sample Position w.r.t. Granite" in figure <a href="#org4153b3d">1</a>.
In section <a href="#org859babf">1</a>, we verify that the function developed to compute the wanted pose (translation and orientation) of the sample with respect to the granite can be determined from the wanted position of each stage (translation stage, tilt stage, spindle and micro-hexapod). This corresponds to the bloc &ldquo;Compute Wanted Sample Position w.r.t. Granite&rdquo; in figure <a href="#org43a68ad">1</a>.
To do so, we impose a perfect displacement and all the stage, we perfectly measure the position of the sample with respect to the granite, and we verify that this measured position corresponds to the computed wanted pose of the sample.
</p>
<p>
Then, in section <a href="#orgaef8c87">2</a>, we introduce some positioning error in the micro-station's stages.
The positioning error of the sample expressed with respect to the granite frame (the one measured) is expressed in a frame connected to the NASS top platform (corresponding to the green bloc "Compute Sample Position Error w.r.t. NASS" in figure <a href="#org4153b3d">1</a>).
Then, in section <a href="#org724d4cf">2</a>, we introduce some positioning error in the micro-station&rsquo;s stages.
The positioning error of the sample expressed with respect to the granite frame (the one measured) is expressed in a frame connected to the NASS top platform (corresponding to the green bloc &ldquo;Compute Sample Position Error w.r.t. NASS&rdquo; in figure <a href="#org43a68ad">1</a>).
Then, we move the NASS such that it compensate for the positioning error that are expressed in the frame of the NASS, and we verify that the positioning error of the sample is well compensated.
</p>
<div id="outline-container-orgfec69a9" class="outline-2">
<h2 id="orgfec69a9"><span class="section-number-2">1</span> Verify that the function to compute the reference pose is correct</h2>
<div id="outline-container-org6d16893" class="outline-2">
<h2 id="org6d16893"><span class="section-number-2">1</span> Verify that the function to compute the reference pose is correct</h2>
<div class="outline-text-2" id="text-1">
<p>
<a id="org9d27621"></a>
<a id="org859babf"></a>
</p>
<p>
The goal here is to perfectly move the station and verify that there is no mismatch between the metrology measurement and the computation of the reference pose.
</p>
</div>
<div id="outline-container-orgf92ae6f" class="outline-3">
<h3 id="orgf92ae6f"><span class="section-number-3">1.1</span> Prepare the Simulation</h3>
<div id="outline-container-org7dc24f7" class="outline-3">
<h3 id="org7dc24f7"><span class="section-number-3">1.1</span> Prepare the Simulation</h3>
<div class="outline-text-3" id="text-1-1">
<p>
We set a small <code>StopTime</code>.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">set_param</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-variable-name">conf_simscape</span>, <span class="org-string">'StopTime'</span>, '<span class="org-highlight-numbers-number">0</span>.<span class="org-highlight-numbers-number">5</span><span class="org-type">'</span><span class="org-rainbow-delimiters-depth-1">)</span>;
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-variable-name">conf_simscape</span>, <span class="org-string">'StopTime'</span>, <span class="org-string">'0.5'</span>);
</pre>
</div>
@ -364,16 +365,16 @@ We set a small <code>StopTime</code>.
We initialize all the stages.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeGround<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeGranite<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeTy<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeRy<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeRz<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeMicroHexapod<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeAxisc<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeMirror<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeNanoHexapod<span class="org-rainbow-delimiters-depth-1">(</span>struct<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-string">'actuator'</span>, <span class="org-string">'piezo'</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>;
initializeSample<span class="org-rainbow-delimiters-depth-1">(</span>struct<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-string">'mass'</span>, <span class="org-highlight-numbers-number">50</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>;
<pre class="src src-matlab">initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
initializeNanoHexapod(<span class="org-string">'actuator'</span>, <span class="org-string">'piezo'</span>);
initializeSample(<span class="org-string">'mass'</span>, 50);
</pre>
</div>
@ -381,27 +382,24 @@ initializeSample<span class="org-rainbow-delimiters-depth-1">(</span>struct<span
We setup the reference path to be constant.
</p>
<div class="org-src-container">
<pre class="src src-matlab">opts = struct<span class="org-rainbow-delimiters-depth-1">(</span> ...
<span class="org-string">'Ts'</span>, <span class="org-highlight-numbers-number">1e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">3</span>, ...<span class="org-comment"> % Sampling Frequency [s]</span>
<pre class="src src-matlab">initializeReferences(...
<span class="org-string">'Ts'</span>, 1e<span class="org-type">-</span>3, ...<span class="org-comment"> % Sampling Frequency [s]</span>
<span class="org-string">'Dy_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % Either "constant" / "triangular" / "sinusoidal"</span>
<span class="org-string">'Dy_amplitude'</span>, <span class="org-highlight-numbers-number">5e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">3</span>, ...<span class="org-comment"> % Amplitude of the displacement [m]</span>
<span class="org-string">'Dy_period'</span>, <span class="org-highlight-numbers-number">1</span>, ...<span class="org-comment"> % Period of the displacement [s]</span>
<span class="org-string">'Dy_amplitude'</span>, 5e<span class="org-type">-</span>3, ...<span class="org-comment"> % Amplitude of the displacement [m]</span>
<span class="org-string">'Dy_period'</span>, 1, ...<span class="org-comment"> % Period of the displacement [s]</span>
<span class="org-string">'Ry_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % Either "constant" / "triangular" / "sinusoidal"</span>
<span class="org-string">'Ry_amplitude'</span>, <span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span><span class="org-highlight-numbers-number">180</span>, ...<span class="org-comment"> % Amplitude [rad]</span>
<span class="org-string">'Ry_period'</span>, <span class="org-highlight-numbers-number">10</span>, ...<span class="org-comment"> % Period of the displacement [s]</span>
<span class="org-string">'Ry_amplitude'</span>, <span class="org-type">-</span>1<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span>180, ...<span class="org-comment"> % Amplitude [rad]</span>
<span class="org-string">'Ry_period'</span>, 10, ...<span class="org-comment"> % Period of the displacement [s]</span>
<span class="org-string">'Rz_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % Either "constant" / "rotating"</span>
<span class="org-string">'Rz_amplitude'</span>, <span class="org-type">-</span><span class="org-highlight-numbers-number">135</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span><span class="org-highlight-numbers-number">180</span>, ...<span class="org-comment"> % Initial angle [rad]</span>
<span class="org-string">'Rz_period'</span>, <span class="org-highlight-numbers-number">1</span>, ...<span class="org-comment"> % Period of the rotating [s]</span>
<span class="org-string">'Rz_amplitude'</span>, <span class="org-type">-</span>135<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span>180, ...<span class="org-comment"> % Initial angle [rad]</span>
<span class="org-string">'Rz_period'</span>, 1, ...<span class="org-comment"> % Period of the rotating [s]</span>
<span class="org-string">'Dh_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % For now, only constant is implemented</span>
<span class="org-string">'Dh_pos'</span>, <span class="org-rainbow-delimiters-depth-2">[</span><span class="org-highlight-numbers-number">0</span>.<span class="org-highlight-numbers-number">01</span>; <span class="org-highlight-numbers-number">0</span>.<span class="org-highlight-numbers-number">02</span>; <span class="org-type">-</span><span class="org-highlight-numbers-number">0</span>.<span class="org-highlight-numbers-number">03</span>; <span class="org-type">-</span><span class="org-highlight-numbers-number">3</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span><span class="org-highlight-numbers-number">180</span>; <span class="org-highlight-numbers-number">1</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span><span class="org-highlight-numbers-number">180</span>; <span class="org-highlight-numbers-number">3</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span><span class="org-highlight-numbers-number">180</span><span class="org-rainbow-delimiters-depth-2">]</span>, ...<span class="org-comment"> % Initial position [m,m,m,rad,rad,rad] of the top platform</span>
<span class="org-string">'Dh_pos'</span>, [0.01; 0.02; <span class="org-type">-</span>0.03; <span class="org-type">-</span>3<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span>180; 1<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span>180; 3<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span>180], ...<span class="org-comment"> % Initial position [m,m,m,rad,rad,rad] of the top platform</span>
<span class="org-string">'Rm_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % For now, only constant is implemented</span>
<span class="org-string">'Rm_pos'</span>, <span class="org-rainbow-delimiters-depth-2">[</span><span class="org-highlight-numbers-number">0</span>, <span class="org-constant">pi</span><span class="org-rainbow-delimiters-depth-2">]</span><span class="org-type">'</span>, ...<span class="org-comment"> % Initial position of the two masses</span>
<span class="org-string">'Rm_pos'</span>, [0, <span class="org-constant">pi</span>]<span class="org-type">'</span>, ...<span class="org-comment"> % Initial position of the two masses</span>
<span class="org-string">'Dn_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % For now, only constant is implemented</span>
<span class="org-string">'Dn_pos'</span>, <span class="org-rainbow-delimiters-depth-2">[</span><span class="org-highlight-numbers-number">1e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">3</span>; <span class="org-highlight-numbers-number">2e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">3</span>; <span class="org-highlight-numbers-number">3e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">3</span>; <span class="org-highlight-numbers-number">1</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span><span class="org-highlight-numbers-number">180</span>; <span class="org-highlight-numbers-number">0</span>; <span class="org-highlight-numbers-number">1</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span><span class="org-highlight-numbers-number">180</span><span class="org-rainbow-delimiters-depth-2">]</span> ...<span class="org-comment"> % Initial position [m,m,m,rad,rad,rad] of the top platform</span>
<span class="org-rainbow-delimiters-depth-1">)</span>;
initializeReferences<span class="org-rainbow-delimiters-depth-1">(</span>opts<span class="org-rainbow-delimiters-depth-1">)</span>;
<span class="org-string">'Dn_pos'</span>, [1e<span class="org-type">-</span>3; 2e<span class="org-type">-</span>3; 3e<span class="org-type">-</span>3; 1<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span>180; 0; 1<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span>180] ...<span class="org-comment"> % Initial position [m,m,m,rad,rad,rad] of the top platform</span>
);
</pre>
</div>
@ -409,12 +407,12 @@ initializeReferences<span class="org-rainbow-delimiters-depth-1">(</span>opts<sp
No position error for now (perfect positioning).
</p>
<div class="org-src-container">
<pre class="src src-matlab">Dye = <span class="org-highlight-numbers-number">0</span>; <span class="org-comment">% [m]</span>
Rye = <span class="org-highlight-numbers-number">0</span>; <span class="org-comment">% [rad]</span>
Rze = <span class="org-highlight-numbers-number">0</span>; <span class="org-comment">% [rad]</span>
Dhe = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">6</span>,<span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">)</span>; <span class="org-comment">% [m,m,m,rad,rad,rad]</span>
Dhle = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">6</span>,<span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">)</span>; <span class="org-comment">% [m,m,m,m,m,m]</span>
Dne = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">6</span>,<span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">)</span>; <span class="org-comment">% [m,m,m,rad,rad,rad]</span>
<pre class="src src-matlab">Dye = 0; <span class="org-comment">% [m]</span>
Rye = 0; <span class="org-comment">% [rad]</span>
Rze = 0; <span class="org-comment">% [rad]</span>
Dhe = zeros(6,1); <span class="org-comment">% [m,m,m,rad,rad,rad]</span>
Dhle = zeros(6,1); <span class="org-comment">% [m,m,m,m,m,m]</span>
Dne = zeros(6,1); <span class="org-comment">% [m,m,m,rad,rad,rad]</span>
</pre>
</div>
@ -422,17 +420,17 @@ Dne = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org
And we run the simulation.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">sim</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-string">'sim_nano_station_metrology'</span><span class="org-rainbow-delimiters-depth-1">)</span>;
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'sim_nano_station_metrology'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-orgf02914f" class="outline-3">
<h3 id="orgf02914f"><span class="section-number-3">1.2</span> Verify that the pose of the sample is the same as the computed one</h3>
<div id="outline-container-orge08b690" class="outline-3">
<h3 id="orge08b690"><span class="section-number-3">1.2</span> Verify that the pose of the sample is the same as the computed one</h3>
<div class="outline-text-3" id="text-1-2">
<p>
Let's denote:
Let&rsquo;s denote:
</p>
<ul class="org-ul">
<li>\(\{W\}\) the initial fixed frame (base in which the interferometric measurement is done)</li>
@ -452,10 +450,10 @@ We have then computed:
We load the reference and we compute the desired trajectory of the sample in the form of an homogeneous transformation matrix \({}^W\bm{T}_R\).
</p>
<div class="org-src-container">
<pre class="src src-matlab">n = length<span class="org-rainbow-delimiters-depth-1">(</span>Dref.Dy.Time<span class="org-rainbow-delimiters-depth-1">)</span>;
WTr = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">4</span>, <span class="org-highlight-numbers-number">4</span>, n<span class="org-rainbow-delimiters-depth-1">)</span>;
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant"><span class="org-highlight-numbers-number">1</span></span><span class="org-constant">:n</span>
WTr<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-1">)</span> = computeReferencePose<span class="org-rainbow-delimiters-depth-1">(</span>Dref.Dy.Data<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-2">)</span>, Dref.Ry.Data<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-2">)</span>, Dref.Rz.Data<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-2">)</span>, Dref.Dh.Data<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-constant">i</span>,<span class="org-type">:</span><span class="org-rainbow-delimiters-depth-2">)</span>, Dref.Dn.Data<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-constant">i</span>,<span class="org-type">:</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>;
<pre class="src src-matlab">n = length(Dref.Dy.Time);
WTr = zeros(4, 4, n);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:n</span>
WTr(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = computeReferencePose(Dref.Dy.Data(<span class="org-constant">i</span>), Dref.Ry.Data(<span class="org-constant">i</span>), Dref.Rz.Data(<span class="org-constant">i</span>), Dref.Dh.Data(<span class="org-constant">i</span>,<span class="org-type">:</span>), Dref.Dn.Data(<span class="org-constant">i</span>,<span class="org-type">:</span>));
<span class="org-keyword">end</span>
</pre>
</div>
@ -465,11 +463,11 @@ As the displacement is perfect, we also measure in simulation the pose of the sa
From that we can compute the homogeneous transformation matrix \({}^W\bm{T}_M\).
</p>
<div class="org-src-container">
<pre class="src src-matlab">n = length<span class="org-rainbow-delimiters-depth-1">(</span>Dsm.R.Time<span class="org-rainbow-delimiters-depth-1">)</span>;
WTm = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">4</span>, <span class="org-highlight-numbers-number">4</span>, n<span class="org-rainbow-delimiters-depth-1">)</span>;
WTm<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, <span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, <span class="org-type">:</span><span class="org-rainbow-delimiters-depth-1">)</span> = Dsm.R.Data;
WTm<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, <span class="org-highlight-numbers-number">4</span>, <span class="org-type">:</span><span class="org-rainbow-delimiters-depth-1">)</span> = <span class="org-rainbow-delimiters-depth-1">[</span>Dsm.x.Data<span class="org-type">'</span> ; Dsm.y.Data<span class="org-type">'</span> ; Dsm.z.Data<span class="org-type">'</span><span class="org-rainbow-delimiters-depth-1">]</span>;
WTm<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">4</span>, <span class="org-highlight-numbers-number">4</span>, <span class="org-type">:</span><span class="org-rainbow-delimiters-depth-1">)</span> = <span class="org-highlight-numbers-number">1</span>;
<pre class="src src-matlab">n = length(Dsm.R.Time);
WTm = zeros(4, 4, n);
WTm(1<span class="org-type">:</span>3, 1<span class="org-type">:</span>3, <span class="org-type">:</span>) = Dsm.R.Data;
WTm(1<span class="org-type">:</span>3, 4, <span class="org-type">:</span>) = [Dsm.x.Data<span class="org-type">'</span> ; Dsm.y.Data<span class="org-type">'</span> ; Dsm.z.Data<span class="org-type">'</span>];
WTm(4, 4, <span class="org-type">:</span>) = 1;
</pre>
</div>
@ -485,8 +483,8 @@ Or are least:
</p>
<div class="org-src-container">
<pre class="src src-matlab">WTr<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, <span class="org-highlight-numbers-number">4</span>, end<span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">-</span>WTm<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, <span class="org-highlight-numbers-number">4</span>, end<span class="org-rainbow-delimiters-depth-1">)</span>
WTr<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, <span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, end<span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">'*</span>WTm<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, <span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, end<span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">-</span>eye<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">3</span><span class="org-rainbow-delimiters-depth-1">)</span>
<pre class="src src-matlab">WTr(1<span class="org-type">:</span>3, 4, end)<span class="org-type">-</span>WTm(1<span class="org-type">:</span>3, 4, end)
WTr(1<span class="org-type">:</span>3, 1<span class="org-type">:</span>3, end)<span class="org-type">'*</span>WTm(1<span class="org-type">:</span>3, 1<span class="org-type">:</span>3, end)<span class="org-type">-</span>eye(3)
</pre>
</div>
@ -505,8 +503,8 @@ ans =
</div>
</div>
<div id="outline-container-org694b331" class="outline-3">
<h3 id="org694b331"><span class="section-number-3">1.3</span> Conclusion</h3>
<div id="outline-container-org05ca20d" class="outline-3">
<h3 id="org05ca20d"><span class="section-number-3">1.3</span> Conclusion</h3>
<div class="outline-text-3" id="text-1-3">
<div class="important">
<p>
@ -519,11 +517,11 @@ Both the measurement and the theory gives the same result.
</div>
</div>
<div id="outline-container-orgde75002" class="outline-2">
<h2 id="orgde75002"><span class="section-number-2">2</span> Verify that the function to convert the position error in the frame fixed to the nano-hexapod is working</h2>
<div id="outline-container-org77fd04d" class="outline-2">
<h2 id="org77fd04d"><span class="section-number-2">2</span> Verify that the function to convert the position error in the frame fixed to the nano-hexapod is working</h2>
<div class="outline-text-2" id="text-2">
<p>
<a id="orgaef8c87"></a>
<a id="org724d4cf"></a>
</p>
<p>
We now introduce some positioning error in the stage.
@ -534,14 +532,14 @@ This will induce a global positioning error of the sample with respect to the de
We want to verify that we are able to measure this positioning error and convert it in the frame attached to the Nano-hexapod.
</p>
</div>
<div id="outline-container-orgdd3b23d" class="outline-3">
<h3 id="orgdd3b23d"><span class="section-number-3">2.1</span> Prepare the Simulation</h3>
<div id="outline-container-org7de22c7" class="outline-3">
<h3 id="org7de22c7"><span class="section-number-3">2.1</span> Prepare the Simulation</h3>
<div class="outline-text-3" id="text-2-1">
<p>
We load the configuration.
</p>
<div class="org-src-container">
<pre class="src src-matlab">load<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-string">'mat/conf_simscape.mat'</span><span class="org-rainbow-delimiters-depth-1">)</span>;
<pre class="src src-matlab">load(<span class="org-string">'mat/conf_simscape.mat'</span>);
</pre>
</div>
@ -549,7 +547,7 @@ We load the configuration.
We set a small <code>StopTime</code>.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">set_param</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-variable-name">conf_simscape</span>, <span class="org-string">'StopTime'</span>, '<span class="org-highlight-numbers-number">0</span>.<span class="org-highlight-numbers-number">5</span><span class="org-type">'</span><span class="org-rainbow-delimiters-depth-1">)</span>;
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-variable-name">conf_simscape</span>, <span class="org-string">'StopTime'</span>, <span class="org-string">'0.5'</span>);
</pre>
</div>
@ -557,16 +555,16 @@ We set a small <code>StopTime</code>.
We initialize all the stages.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeGround<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeGranite<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeTy<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeRy<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeRz<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeMicroHexapod<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeAxisc<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeMirror<span class="org-rainbow-delimiters-depth-1">()</span>;
initializeNanoHexapod<span class="org-rainbow-delimiters-depth-1">(</span>struct<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-string">'actuator'</span>, <span class="org-string">'piezo'</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>;
initializeSample<span class="org-rainbow-delimiters-depth-1">(</span>struct<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-string">'mass'</span>, <span class="org-highlight-numbers-number">50</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>;
<pre class="src src-matlab">initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
initializeNanoHexapod(<span class="org-string">'actuator'</span>, <span class="org-string">'piezo'</span>);
initializeSample(<span class="org-string">'mass'</span>, 50);
</pre>
</div>
@ -574,23 +572,21 @@ initializeSample<span class="org-rainbow-delimiters-depth-1">(</span>struct<span
We setup the reference path to be constant.
</p>
<div class="org-src-container">
<pre class="src src-matlab">opts = struct<span class="org-rainbow-delimiters-depth-1">(</span> ...
<span class="org-string">'Ts'</span>, <span class="org-highlight-numbers-number">1e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">3</span>, ...<span class="org-comment"> % Sampling Frequency [s]</span>
<pre class="src src-matlab">initializeReferences(...
<span class="org-string">'Ts'</span>, 1e<span class="org-type">-</span>3, ...<span class="org-comment"> % Sampling Frequency [s]</span>
<span class="org-string">'Dy_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % Either "constant" / "triangular" / "sinusoidal"</span>
<span class="org-string">'Dy_amplitude'</span>, <span class="org-highlight-numbers-number">0</span>, ...<span class="org-comment"> % Amplitude of the displacement [m]</span>
<span class="org-string">'Dy_amplitude'</span>, 0, ...<span class="org-comment"> % Amplitude of the displacement [m]</span>
<span class="org-string">'Ry_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % Either "constant" / "triangular" / "sinusoidal"</span>
<span class="org-string">'Ry_amplitude'</span>, <span class="org-highlight-numbers-number">0</span>, ...<span class="org-comment"> % Amplitude [rad]</span>
<span class="org-string">'Ry_amplitude'</span>, 0, ...<span class="org-comment"> % Amplitude [rad]</span>
<span class="org-string">'Rz_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % Either "constant" / "rotating"</span>
<span class="org-string">'Rz_amplitude'</span>, <span class="org-highlight-numbers-number">0</span><span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span><span class="org-highlight-numbers-number">180</span>, ...<span class="org-comment"> % Initial angle [rad]</span>
<span class="org-string">'Rz_amplitude'</span>, 0<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span>180, ...<span class="org-comment"> % Initial angle [rad]</span>
<span class="org-string">'Dh_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % For now, only constant is implemented</span>
<span class="org-string">'Dh_pos'</span>, <span class="org-rainbow-delimiters-depth-2">[</span><span class="org-highlight-numbers-number">0</span>; <span class="org-highlight-numbers-number">0</span>; <span class="org-highlight-numbers-number">0</span>; <span class="org-highlight-numbers-number">0</span>; <span class="org-highlight-numbers-number">0</span>; <span class="org-highlight-numbers-number">0</span><span class="org-rainbow-delimiters-depth-2">]</span>, ...<span class="org-comment"> % Initial position [m,m,m,rad,rad,rad] of the top platform</span>
<span class="org-string">'Dh_pos'</span>, [0; 0; 0; 0; 0; 0], ...<span class="org-comment"> % Initial position [m,m,m,rad,rad,rad] of the top platform</span>
<span class="org-string">'Rm_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % For now, only constant is implemented</span>
<span class="org-string">'Rm_pos'</span>, <span class="org-rainbow-delimiters-depth-2">[</span><span class="org-highlight-numbers-number">0</span>, <span class="org-constant">pi</span><span class="org-rainbow-delimiters-depth-2">]</span><span class="org-type">'</span>, ...<span class="org-comment"> % Initial position of the two masses</span>
<span class="org-string">'Rm_pos'</span>, [0, <span class="org-constant">pi</span>]<span class="org-type">'</span>, ...<span class="org-comment"> % Initial position of the two masses</span>
<span class="org-string">'Dn_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % For now, only constant is implemented</span>
<span class="org-string">'Dn_pos'</span>, <span class="org-rainbow-delimiters-depth-2">[</span><span class="org-highlight-numbers-number">0</span>; <span class="org-highlight-numbers-number">0</span>; <span class="org-highlight-numbers-number">0</span>; <span class="org-highlight-numbers-number">0</span>; <span class="org-highlight-numbers-number">0</span>; <span class="org-highlight-numbers-number">0</span><span class="org-rainbow-delimiters-depth-2">]</span> ...<span class="org-comment"> % Initial position [m,m,m,rad,rad,rad] of the top platform</span>
<span class="org-rainbow-delimiters-depth-1">)</span>;
initializeReferences<span class="org-rainbow-delimiters-depth-1">(</span>opts<span class="org-rainbow-delimiters-depth-1">)</span>;
<span class="org-string">'Dn_pos'</span>, [0; 0; 0; 0; 0; 0] ...<span class="org-comment"> % Initial position [m,m,m,rad,rad,rad] of the top platform</span>
);
</pre>
</div>
@ -598,12 +594,12 @@ initializeReferences<span class="org-rainbow-delimiters-depth-1">(</span>opts<sp
Now we introduce some positioning error.
</p>
<div class="org-src-container">
<pre class="src src-matlab">Dye = <span class="org-highlight-numbers-number">1e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">6</span>; <span class="org-comment">% [m]</span>
Rye = <span class="org-highlight-numbers-number">2e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">4</span>; <span class="org-comment">% [rad]</span>
Rze = <span class="org-highlight-numbers-number">1e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">5</span>; <span class="org-comment">% [rad]</span>
Dhe = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">6</span>,<span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">)</span>;
Dhle = <span class="org-rainbow-delimiters-depth-1">[</span><span class="org-highlight-numbers-number">1e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">6</span> ; <span class="org-highlight-numbers-number">2e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">6</span> ; <span class="org-highlight-numbers-number">3e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">6</span> ; <span class="org-type">-</span><span class="org-highlight-numbers-number">2e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">6</span> ; <span class="org-highlight-numbers-number">1e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">6</span> ; <span class="org-highlight-numbers-number">2e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">6</span><span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-comment">% [m]</span>
Dne = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">6</span>,<span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">)</span>;
<pre class="src src-matlab">Dye = 1e<span class="org-type">-</span>6; <span class="org-comment">% [m]</span>
Rye = 2e<span class="org-type">-</span>4; <span class="org-comment">% [rad]</span>
Rze = 1e<span class="org-type">-</span>5; <span class="org-comment">% [rad]</span>
Dhe = zeros(6,1);
Dhle = [1e<span class="org-type">-</span>6 ; 2e<span class="org-type">-</span>6 ; 3e<span class="org-type">-</span>6 ; <span class="org-type">-</span>2e<span class="org-type">-</span>6 ; 1e<span class="org-type">-</span>6 ; 2e<span class="org-type">-</span>6]; <span class="org-comment">% [m]</span>
Dne = zeros(6,1);
</pre>
</div>
@ -611,14 +607,14 @@ Dne = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org
And we run the simulation.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">sim</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-string">'sim_nano_station_metrology'</span><span class="org-rainbow-delimiters-depth-1">)</span>;
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'sim_nano_station_metrology'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-org919e4c0" class="outline-3">
<h3 id="org919e4c0"><span class="section-number-3">2.2</span> Compute the wanted pose of the sample in the NASS Base from the metrology and the reference</h3>
<div id="outline-container-org54ffaf9" class="outline-3">
<h3 id="org54ffaf9"><span class="section-number-3">2.2</span> Compute the wanted pose of the sample in the NASS Base from the metrology and the reference</h3>
<div class="outline-text-3" id="text-2-2">
<p>
Now that we have introduced some positioning error, the computed wanted pose and the measured pose will not be the same.
@ -644,10 +640,10 @@ The top platform of the nano-hexapod is considered to be rigidly connected to th
We load the reference and we compute the desired trajectory of the sample in the form of an homogeneous transformation matrix \({}^W\bm{T}_R\).
</p>
<div class="org-src-container">
<pre class="src src-matlab">n = length<span class="org-rainbow-delimiters-depth-1">(</span>Dref.Dy.Time<span class="org-rainbow-delimiters-depth-1">)</span>;
WTr = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">4</span>, <span class="org-highlight-numbers-number">4</span>, n<span class="org-rainbow-delimiters-depth-1">)</span>;
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant"><span class="org-highlight-numbers-number">1</span></span><span class="org-constant">:n</span>
WTr<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-1">)</span> = computeReferencePose<span class="org-rainbow-delimiters-depth-1">(</span>Dref.Dy.Data<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-2">)</span>, Dref.Ry.Data<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-2">)</span>, Dref.Rz.Data<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-2">)</span>, Dref.Dh.Data<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-constant">i</span>,<span class="org-type">:</span><span class="org-rainbow-delimiters-depth-2">)</span>, Dref.Dn.Data<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-constant">i</span>,<span class="org-type">:</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>;
<pre class="src src-matlab">n = length(Dref.Dy.Time);
WTr = zeros(4, 4, n);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:n</span>
WTr(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = computeReferencePose(Dref.Dy.Data(<span class="org-constant">i</span>), Dref.Ry.Data(<span class="org-constant">i</span>), Dref.Rz.Data(<span class="org-constant">i</span>), Dref.Dh.Data(<span class="org-constant">i</span>,<span class="org-type">:</span>), Dref.Dn.Data(<span class="org-constant">i</span>,<span class="org-type">:</span>));
<span class="org-keyword">end</span>
</pre>
</div>
@ -657,11 +653,11 @@ We also measure in simulation the pose of the sample with respect to the granite
From that we can compute the homogeneous transformation matrix \({}^W\bm{T}_M\).
</p>
<div class="org-src-container">
<pre class="src src-matlab">n = length<span class="org-rainbow-delimiters-depth-1">(</span>Dsm.R.Time<span class="org-rainbow-delimiters-depth-1">)</span>;
WTm = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">4</span>, <span class="org-highlight-numbers-number">4</span>, n<span class="org-rainbow-delimiters-depth-1">)</span>;
WTm<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, <span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, <span class="org-type">:</span><span class="org-rainbow-delimiters-depth-1">)</span> = Dsm.R.Data;
WTm<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, <span class="org-highlight-numbers-number">4</span>, <span class="org-type">:</span><span class="org-rainbow-delimiters-depth-1">)</span> = <span class="org-rainbow-delimiters-depth-1">[</span>Dsm.x.Data<span class="org-type">'</span> ; Dsm.y.Data<span class="org-type">'</span> ; Dsm.z.Data<span class="org-type">'</span><span class="org-rainbow-delimiters-depth-1">]</span>;
WTm<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">4</span>, <span class="org-highlight-numbers-number">4</span>, <span class="org-type">:</span><span class="org-rainbow-delimiters-depth-1">)</span> = <span class="org-highlight-numbers-number">1</span>;
<pre class="src src-matlab">n = length(Dsm.R.Time);
WTm = zeros(4, 4, n);
WTm(1<span class="org-type">:</span>3, 1<span class="org-type">:</span>3, <span class="org-type">:</span>) = Dsm.R.Data;
WTm(1<span class="org-type">:</span>3, 4, <span class="org-type">:</span>) = [Dsm.x.Data<span class="org-type">'</span> ; Dsm.y.Data<span class="org-type">'</span> ; Dsm.z.Data<span class="org-type">'</span>];
WTm(4, 4, <span class="org-type">:</span>) = 1;
</pre>
</div>
@ -683,9 +679,9 @@ The <b>inverse of the transformation matrix</b> can be obtain by (it is less com
Finally, we compute \({}^M\bm{T}_R\).
</p>
<div class="org-src-container">
<pre class="src src-matlab">MTr = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">4</span>, <span class="org-highlight-numbers-number">4</span>, n<span class="org-rainbow-delimiters-depth-1">)</span>;
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant"><span class="org-highlight-numbers-number">1</span></span><span class="org-constant">:n</span>
MTr<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-1">)</span> = <span class="org-rainbow-delimiters-depth-1">[</span>WTm<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>,<span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>,<span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">'</span>, <span class="org-type">-</span>WTm<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>,<span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>,<span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">'*</span>WTm<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>,<span class="org-highlight-numbers-number">4</span>,<span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-2">)</span> ; <span class="org-highlight-numbers-number">0</span> <span class="org-highlight-numbers-number">0</span> <span class="org-highlight-numbers-number">0</span> <span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">]</span><span class="org-type">*</span>WTr<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-1">)</span>;
<pre class="src src-matlab">MTr = zeros(4, 4, n);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:n</span>
MTr(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = [WTm(1<span class="org-type">:</span>3,1<span class="org-type">:</span>3,<span class="org-constant">i</span>)<span class="org-type">'</span>, <span class="org-type">-</span>WTm(1<span class="org-type">:</span>3,1<span class="org-type">:</span>3,<span class="org-constant">i</span>)<span class="org-type">'*</span>WTm(1<span class="org-type">:</span>3,4,<span class="org-constant">i</span>) ; 0 0 0 1]<span class="org-type">*</span>WTr(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>);
<span class="org-keyword">end</span>
</pre>
</div>
@ -694,18 +690,18 @@ Finally, we compute \({}^M\bm{T}_R\).
Verify that the pose error corresponds to the positioning error of the stages.
</p>
<div class="org-src-container">
<pre class="src src-matlab">MTr<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, <span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, end<span class="org-rainbow-delimiters-depth-1">)</span>
Rx = <span class="org-rainbow-delimiters-depth-1">[</span><span class="org-highlight-numbers-number">1</span> <span class="org-highlight-numbers-number">0</span> <span class="org-highlight-numbers-number">0</span>;
<span class="org-highlight-numbers-number">0</span> cos<span class="org-rainbow-delimiters-depth-2">(</span>Erx<span class="org-rainbow-delimiters-depth-2">)</span> <span class="org-type">-</span>sin<span class="org-rainbow-delimiters-depth-2">(</span>Erx<span class="org-rainbow-delimiters-depth-2">)</span>;
<span class="org-highlight-numbers-number">0</span> sin<span class="org-rainbow-delimiters-depth-2">(</span>Erx<span class="org-rainbow-delimiters-depth-2">)</span> cos<span class="org-rainbow-delimiters-depth-2">(</span>Erx<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">]</span>;
<pre class="src src-matlab">MTr(1<span class="org-type">:</span>3, 1<span class="org-type">:</span>3, end)
Rx = [1 0 0;
0 cos(Erx) <span class="org-type">-</span>sin(Erx);
0 sin(Erx) cos(Erx)];
Ry = <span class="org-rainbow-delimiters-depth-1">[</span> cos<span class="org-rainbow-delimiters-depth-2">(</span>Ery<span class="org-rainbow-delimiters-depth-2">)</span> <span class="org-highlight-numbers-number">0</span> sin<span class="org-rainbow-delimiters-depth-2">(</span>Ery<span class="org-rainbow-delimiters-depth-2">)</span>;
<span class="org-highlight-numbers-number">0</span> <span class="org-highlight-numbers-number">1</span> <span class="org-highlight-numbers-number">0</span>;
<span class="org-type">-</span>sin<span class="org-rainbow-delimiters-depth-2">(</span>Ery<span class="org-rainbow-delimiters-depth-2">)</span> <span class="org-highlight-numbers-number">0</span> cos<span class="org-rainbow-delimiters-depth-2">(</span>Ery<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">]</span>;
Ry = [ cos(Ery) 0 sin(Ery);
0 1 0;
<span class="org-type">-</span>sin(Ery) 0 cos(Ery)];
Rz = <span class="org-rainbow-delimiters-depth-1">[</span>cos<span class="org-rainbow-delimiters-depth-2">(</span>Erz<span class="org-rainbow-delimiters-depth-2">)</span> <span class="org-type">-</span>sin<span class="org-rainbow-delimiters-depth-2">(</span>Erz<span class="org-rainbow-delimiters-depth-2">)</span> <span class="org-highlight-numbers-number">0</span>;
sin<span class="org-rainbow-delimiters-depth-2">(</span>Erz<span class="org-rainbow-delimiters-depth-2">)</span> cos<span class="org-rainbow-delimiters-depth-2">(</span>Erz<span class="org-rainbow-delimiters-depth-2">)</span> <span class="org-highlight-numbers-number">0</span>;
<span class="org-highlight-numbers-number">0</span> <span class="org-highlight-numbers-number">0</span> <span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">]</span>;
Rz = [cos(Erz) <span class="org-type">-</span>sin(Erz) 0;
sin(Erz) cos(Erz) 0;
0 0 1];
</pre>
</div>
@ -753,15 +749,28 @@ Rz = <span class="org-rainbow-delimiters-depth-1">[</span>cos<span class="org-ra
</div>
</div>
<div id="outline-container-org8c406f5" class="outline-3">
<h3 id="org8c406f5"><span class="section-number-3">2.3</span> Verify that be imposing the error motion on the nano-hexapod, we indeed have zero error at the end</h3>
<div id="outline-container-org2d21dda" class="outline-3">
<h3 id="org2d21dda"><span class="section-number-3">2.3</span> Verify that be imposing the error motion on the nano-hexapod, we indeed have zero error at the end</h3>
<div class="outline-text-3" id="text-2-3">
<p>
We now keep the wanted pose but we impose a displacement of the nano hexapod corresponding to the measured position error.
</p>
<div class="org-src-container">
<pre class="src src-matlab">opts.Dn_pos = <span class="org-rainbow-delimiters-depth-1">[</span>Edx, Edy, Edz, Erx, Ery, Erz<span class="org-rainbow-delimiters-depth-1">]</span><span class="org-type">'</span>;
initializeReferences<span class="org-rainbow-delimiters-depth-1">(</span>opts<span class="org-rainbow-delimiters-depth-1">)</span>;
<pre class="src src-matlab">initializeReferences(...
<span class="org-string">'Ts'</span>, 1e<span class="org-type">-</span>3, ...<span class="org-comment"> % Sampling Frequency [s]</span>
<span class="org-string">'Dy_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % Either "constant" / "triangular" / "sinusoidal"</span>
<span class="org-string">'Dy_amplitude'</span>, 0, ...<span class="org-comment"> % Amplitude of the displacement [m]</span>
<span class="org-string">'Ry_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % Either "constant" / "triangular" / "sinusoidal"</span>
<span class="org-string">'Ry_amplitude'</span>, 0, ...<span class="org-comment"> % Amplitude [rad]</span>
<span class="org-string">'Rz_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % Either "constant" / "rotating"</span>
<span class="org-string">'Rz_amplitude'</span>, 0<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span>180, ...<span class="org-comment"> % Initial angle [rad]</span>
<span class="org-string">'Dh_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % For now, only constant is implemented</span>
<span class="org-string">'Dh_pos'</span>, [0; 0; 0; 0; 0; 0], ...<span class="org-comment"> % Initial position [m,m,m,rad,rad,rad] of the top platform</span>
<span class="org-string">'Rm_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % For now, only constant is implemented</span>
<span class="org-string">'Rm_pos'</span>, [0, <span class="org-constant">pi</span>]<span class="org-type">'</span>, ...<span class="org-comment"> % Initial position of the two masses</span>
<span class="org-string">'Dn_type'</span>, <span class="org-string">'constant'</span>, ...<span class="org-comment"> % For now, only constant is implemented</span>
<span class="org-string">'Dn_pos'</span>, [Edx, Edy, Edz, Erx, Ery, Erz]<span class="org-type">'</span> ...<span class="org-comment"> % Initial position [m,m,m,rad,rad,rad] of the top platform</span>
);
</pre>
</div>
@ -769,7 +778,7 @@ initializeReferences<span class="org-rainbow-delimiters-depth-1">(</span>opts<sp
And we run the simulation.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">sim</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-string">'sim_nano_station_metrology'</span><span class="org-rainbow-delimiters-depth-1">)</span>;
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'sim_nano_station_metrology'</span>);
</pre>
</div>
@ -782,11 +791,11 @@ As the displacement is perfect, we also measure in simulation the pose of the sa
From that we can compute the homogeneous transformation matrix \({}^W\bm{T}_M\).
</p>
<div class="org-src-container">
<pre class="src src-matlab">n = length<span class="org-rainbow-delimiters-depth-1">(</span>Dsm.R.Time<span class="org-rainbow-delimiters-depth-1">)</span>;
WTm = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">4</span>, <span class="org-highlight-numbers-number">4</span>, n<span class="org-rainbow-delimiters-depth-1">)</span>;
WTm<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, <span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, <span class="org-type">:</span><span class="org-rainbow-delimiters-depth-1">)</span> = Dsm.R.Data;
WTm<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>, <span class="org-highlight-numbers-number">4</span>, <span class="org-type">:</span><span class="org-rainbow-delimiters-depth-1">)</span> = <span class="org-rainbow-delimiters-depth-1">[</span>Dsm.x.Data<span class="org-type">'</span> ; Dsm.y.Data<span class="org-type">'</span> ; Dsm.z.Data<span class="org-type">'</span><span class="org-rainbow-delimiters-depth-1">]</span>;
WTm<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">4</span>, <span class="org-highlight-numbers-number">4</span>, <span class="org-type">:</span><span class="org-rainbow-delimiters-depth-1">)</span> = <span class="org-highlight-numbers-number">1</span>;
<pre class="src src-matlab">n = length(Dsm.R.Time);
WTm = zeros(4, 4, n);
WTm(1<span class="org-type">:</span>3, 1<span class="org-type">:</span>3, <span class="org-type">:</span>) = Dsm.R.Data;
WTm(1<span class="org-type">:</span>3, 4, <span class="org-type">:</span>) = [Dsm.x.Data<span class="org-type">'</span> ; Dsm.y.Data<span class="org-type">'</span> ; Dsm.z.Data<span class="org-type">'</span>];
WTm(4, 4, <span class="org-type">:</span>) = 1;
</pre>
</div>
@ -794,9 +803,9 @@ WTm<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlig
Finally, we compute \({}^M\bm{T}_R\).
</p>
<div class="org-src-container">
<pre class="src src-matlab">MTr = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">4</span>, <span class="org-highlight-numbers-number">4</span>, n<span class="org-rainbow-delimiters-depth-1">)</span>;
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant"><span class="org-highlight-numbers-number">1</span></span><span class="org-constant">:n</span>
MTr<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-1">)</span> = <span class="org-rainbow-delimiters-depth-1">[</span>WTm<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>,<span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>,<span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">'</span>, <span class="org-type">-</span>WTm<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>,<span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>,<span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">'*</span>WTm<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span><span class="org-highlight-numbers-number">3</span>,<span class="org-highlight-numbers-number">4</span>,<span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-2">)</span> ; <span class="org-highlight-numbers-number">0</span> <span class="org-highlight-numbers-number">0</span> <span class="org-highlight-numbers-number">0</span> <span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">]</span><span class="org-type">*</span>WTr<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span><span class="org-rainbow-delimiters-depth-1">)</span>;
<pre class="src src-matlab">MTr = zeros(4, 4, n);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:n</span>
MTr(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = [WTm(1<span class="org-type">:</span>3,1<span class="org-type">:</span>3,<span class="org-constant">i</span>)<span class="org-type">'</span>, <span class="org-type">-</span>WTm(1<span class="org-type">:</span>3,1<span class="org-type">:</span>3,<span class="org-constant">i</span>)<span class="org-type">'*</span>WTm(1<span class="org-type">:</span>3,4,<span class="org-constant">i</span>) ; 0 0 0 1]<span class="org-type">*</span>WTr(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>);
<span class="org-keyword">end</span>
</pre>
</div>
@ -848,8 +857,8 @@ Verify that the pose error is small.
</div>
</div>
<div id="outline-container-org1025ff4" class="outline-3">
<h3 id="org1025ff4"><span class="section-number-3">2.4</span> Conclusion</h3>
<div id="outline-container-orgd9ee154" class="outline-3">
<h3 id="orgd9ee154"><span class="section-number-3">2.4</span> Conclusion</h3>
<div class="outline-text-3" id="text-2-4">
<div class="important">
<p>
@ -863,8 +872,7 @@ Indeed, we are able to convert the position error in the frame of the NASS and t
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2019-12-13 ven. 11:05</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
<p class="date">Created: 2020-01-22 mer. 09:36</p>
</div>
</body>
</html>