Deleted the initializeInputs and initializeExperiment functions

Now, the function initializeReferences should be used
This commit is contained in:
Thomas Dehaeze 2019-12-11 17:07:51 +01:00
parent 9b450095d4
commit 3e37f1edff
4 changed files with 186 additions and 379 deletions

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2019-10-25 ven. 16:00 -->
<!-- 2019-12-11 mer. 16:55 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Active Damping</title>
@ -262,7 +262,10 @@ for the JavaScript code in this tag.
TeX: { equationNumbers: {autoNumber: "AMS"},
MultLineWidth: "85%",
TagSide: "right",
TagIndent: ".8em"
TagIndent: ".8em",
Macros: {
bm: ["{\\boldsymbol #1}",1],
}
}
});
</script>
@ -280,82 +283,82 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgbcf03a9">1. Undamped System</a>
<li><a href="#org0c00f50">1. Undamped System</a>
<ul>
<li><a href="#org46a3e46">1.1. Init</a></li>
<li><a href="#org182ef44">1.2. Identification</a></li>
<li><a href="#org78e6984">1.3. Sensitivity to disturbances</a></li>
<li><a href="#orgac6dd79">1.4. Undamped Plant</a></li>
<li><a href="#orgf1476fa">1.1. Init</a></li>
<li><a href="#orgd3d2ff0">1.2. Identification</a></li>
<li><a href="#orge1d51ce">1.3. Sensitivity to disturbances</a></li>
<li><a href="#org58ffec6">1.4. Undamped Plant</a></li>
</ul>
</li>
<li><a href="#orgeea54a1">2. Integral Force Feedback</a>
<li><a href="#orgf769f9d">2. Integral Force Feedback</a>
<ul>
<li><a href="#org2c83f94">2.1. One degree-of-freedom example</a>
<li><a href="#orgf0e86b6">2.1. One degree-of-freedom example</a>
<ul>
<li><a href="#org4efeef1">2.1.1. Equations</a></li>
<li><a href="#orgb3880fc">2.1.2. Matlab Example</a></li>
<li><a href="#org00cf95e">2.1.1. Equations</a></li>
<li><a href="#org227d2a7">2.1.2. Matlab Example</a></li>
</ul>
</li>
<li><a href="#org731eb41">2.2. Control Design</a></li>
<li><a href="#orgcaee5e8">2.3. Identification of the damped plant</a></li>
<li><a href="#org92c8ec7">2.4. Sensitivity to disturbances</a></li>
<li><a href="#orgacc1bc1">2.5. Damped Plant</a></li>
<li><a href="#orged93d15">2.6. Conclusion</a></li>
<li><a href="#orga9d4adb">2.2. Control Design</a></li>
<li><a href="#org582d26c">2.3. Identification of the damped plant</a></li>
<li><a href="#org231207b">2.4. Sensitivity to disturbances</a></li>
<li><a href="#org9157c29">2.5. Damped Plant</a></li>
<li><a href="#org79a4305">2.6. Conclusion</a></li>
</ul>
</li>
<li><a href="#org087ecf6">3. Relative Motion Control</a>
<li><a href="#org56506d8">3. Relative Motion Control</a>
<ul>
<li><a href="#orga33a4fa">3.1. One degree-of-freedom example</a>
<li><a href="#org6502b14">3.1. One degree-of-freedom example</a>
<ul>
<li><a href="#orge6e79c5">3.1.1. Equations</a></li>
<li><a href="#orgfb8caad">3.1.2. Matlab Example</a></li>
<li><a href="#orga4b0d18">3.1.1. Equations</a></li>
<li><a href="#org6043cef">3.1.2. Matlab Example</a></li>
</ul>
</li>
<li><a href="#orgcb24491">3.2. Control Design</a></li>
<li><a href="#orgaeb6872">3.3. Identification of the damped plant</a></li>
<li><a href="#org2fc9fe6">3.4. Sensitivity to disturbances</a></li>
<li><a href="#org846d098">3.5. Damped Plant</a></li>
<li><a href="#org12f4764">3.6. Conclusion</a></li>
<li><a href="#orgdf908e5">3.2. Control Design</a></li>
<li><a href="#org9792b77">3.3. Identification of the damped plant</a></li>
<li><a href="#org4894be4">3.4. Sensitivity to disturbances</a></li>
<li><a href="#orgd89441e">3.5. Damped Plant</a></li>
<li><a href="#org04f7d21">3.6. Conclusion</a></li>
</ul>
</li>
<li><a href="#orgd92711d">4. Direct Velocity Feedback</a>
<li><a href="#org9af791d">4. Direct Velocity Feedback</a>
<ul>
<li><a href="#org189fb3b">4.1. One degree-of-freedom example</a>
<li><a href="#orgda71fbe">4.1. One degree-of-freedom example</a>
<ul>
<li><a href="#org5318c89">4.1.1. Equations</a></li>
<li><a href="#orgfb2a947">4.1.2. Matlab Example</a></li>
<li><a href="#org332c25e">4.1.1. Equations</a></li>
<li><a href="#org94d4a25">4.1.2. Matlab Example</a></li>
</ul>
</li>
<li><a href="#org3c87599">4.2. Control Design</a></li>
<li><a href="#org07e7826">4.3. Identification of the damped plant</a></li>
<li><a href="#org901fc2b">4.4. Sensitivity to disturbances</a></li>
<li><a href="#org22a4374">4.5. Damped Plant</a></li>
<li><a href="#org1c0a92c">4.6. Conclusion</a></li>
<li><a href="#org78afe53">4.2. Control Design</a></li>
<li><a href="#orgb4d1b92">4.3. Identification of the damped plant</a></li>
<li><a href="#org01d1d1c">4.4. Sensitivity to disturbances</a></li>
<li><a href="#orgeb00466">4.5. Damped Plant</a></li>
<li><a href="#orgfb13592">4.6. Conclusion</a></li>
</ul>
</li>
<li><a href="#org099228a">5. Comparison</a>
<li><a href="#org8970afd">5. Comparison</a>
<ul>
<li><a href="#org10b67a5">5.1. Load the plants</a></li>
<li><a href="#org0dcb40a">5.2. Sensitivity to Disturbance</a></li>
<li><a href="#orgcc0be93">5.3. Damped Plant</a></li>
<li><a href="#orgb3b1324">5.1. Load the plants</a></li>
<li><a href="#orga2db271">5.2. Sensitivity to Disturbance</a></li>
<li><a href="#org0d6cdc3">5.3. Damped Plant</a></li>
</ul>
</li>
<li><a href="#org0476571">6. Conclusion</a></li>
<li><a href="#org0c54368">6. Conclusion</a></li>
</ul>
</div>
</div>
<p>
First, in section <a href="#org86b2b5e">1</a>, we will looked at the undamped system.
First, in section <a href="#orgebcec60">1</a>, we will looked at the undamped system.
</p>
<p>
Then, we will compare three active damping techniques:
</p>
<ul class="org-ul">
<li>In section <a href="#org1e5669e">2</a>: the integral force feedback is used</li>
<li>In section <a href="#org42ae53a">3</a>: the relative motion control is used</li>
<li>In section <a href="#org556890f">4</a>: the direct velocity feedback is used</li>
<li>In section <a href="#org6c8af88">2</a>: the integral force feedback is used</li>
<li>In section <a href="#org5aaa6c2">3</a>: the relative motion control is used</li>
<li>In section <a href="#org6b8a067">4</a>: the direct velocity feedback is used</li>
</ul>
<p>
@ -375,11 +378,11 @@ The disturbances are:
<li>Motion errors of all the stages</li>
</ul>
<div id="outline-container-orgbcf03a9" class="outline-2">
<h2 id="orgbcf03a9"><span class="section-number-2">1</span> Undamped System</h2>
<div id="outline-container-org0c00f50" class="outline-2">
<h2 id="org0c00f50"><span class="section-number-2">1</span> Undamped System</h2>
<div class="outline-text-2" id="text-1">
<p>
<a id="org86b2b5e"></a>
<a id="orgebcec60"></a>
</p>
<div class="note">
<p>
@ -393,8 +396,8 @@ The performance of this undamped system will be compared with the damped system
</p>
</div>
<div id="outline-container-org46a3e46" class="outline-3">
<h3 id="org46a3e46"><span class="section-number-3">1.1</span> Init</h3>
<div id="outline-container-orgf1476fa" class="outline-3">
<h3 id="orgf1476fa"><span class="section-number-3">1.1</span> Init</h3>
<div class="outline-text-3" id="text-1-1">
<p>
We initialize all the stages with the default parameters.
@ -402,7 +405,7 @@ The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeInputs<span class="org-rainbow-delimiters-depth-1">()</span>;
<pre class="src src-matlab">initializeReferences<span class="org-rainbow-delimiters-depth-1">()</span>;
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>;
@ -433,8 +436,8 @@ save<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-string
</div>
</div>
<div id="outline-container-org182ef44" class="outline-3">
<h3 id="org182ef44"><span class="section-number-3">1.2</span> Identification</h3>
<div id="outline-container-orgd3d2ff0" class="outline-3">
<h3 id="orgd3d2ff0"><span class="section-number-3">1.2</span> Identification</h3>
<div class="outline-text-3" id="text-1-2">
<p>
We identify the various transfer functions of the system
@ -454,22 +457,22 @@ And we save it for further analysis.
</div>
</div>
<div id="outline-container-org78e6984" class="outline-3">
<h3 id="org78e6984"><span class="section-number-3">1.3</span> Sensitivity to disturbances</h3>
<div id="outline-container-orge1d51ce" class="outline-3">
<h3 id="orge1d51ce"><span class="section-number-3">1.3</span> Sensitivity to disturbances</h3>
<div class="outline-text-3" id="text-1-3">
<p>
The sensitivity to disturbances are shown on figure <a href="#orgf3b9fba">1</a>.
The sensitivity to disturbances are shown on figure <a href="#org3e75ea5">1</a>.
</p>
<div id="orgf3b9fba" class="figure">
<div id="org3e75ea5" class="figure">
<p><img src="figs/sensitivity_dist_undamped.png" alt="sensitivity_dist_undamped.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Undamped sensitivity to disturbances (<a href="./figs/sensitivity_dist_undamped.png">png</a>, <a href="./figs/sensitivity_dist_undamped.pdf">pdf</a>)</p>
</div>
<div id="orgb418189" class="figure">
<div id="orgf075746" class="figure">
<p><img src="figs/sensitivity_dist_stages.png" alt="sensitivity_dist_stages.png" />
</p>
<p><span class="figure-number">Figure 2: </span>Sensitivity to force disturbances in various stages (<a href="./figs/sensitivity_dist_stages.png">png</a>, <a href="./figs/sensitivity_dist_stages.pdf">pdf</a>)</p>
@ -477,15 +480,15 @@ The sensitivity to disturbances are shown on figure <a href="#orgf3b9fba">1</a>.
</div>
</div>
<div id="outline-container-orgac6dd79" class="outline-3">
<h3 id="orgac6dd79"><span class="section-number-3">1.4</span> Undamped Plant</h3>
<div id="outline-container-org58ffec6" class="outline-3">
<h3 id="org58ffec6"><span class="section-number-3">1.4</span> Undamped Plant</h3>
<div class="outline-text-3" id="text-1-4">
<p>
The "plant" (transfer function from forces applied by the nano-hexapod to the measured displacement of the sample with respect to the granite) bode plot is shown on figure <a href="#orgf3b9fba">1</a>.
The "plant" (transfer function from forces applied by the nano-hexapod to the measured displacement of the sample with respect to the granite) bode plot is shown on figure <a href="#org3e75ea5">1</a>.
</p>
<div id="orgcc5c0db" class="figure">
<div id="org2f56118" class="figure">
<p><img src="figs/plant_undamped.png" alt="plant_undamped.png" />
</p>
<p><span class="figure-number">Figure 3: </span>Transfer Function from cartesian forces to displacement for the undamped plant (<a href="./figs/plant_undamped.png">png</a>, <a href="./figs/plant_undamped.pdf">pdf</a>)</p>
@ -494,11 +497,11 @@ The "plant" (transfer function from forces applied by the nano-hexapod to the me
</div>
</div>
<div id="outline-container-orgeea54a1" class="outline-2">
<h2 id="orgeea54a1"><span class="section-number-2">2</span> Integral Force Feedback</h2>
<div id="outline-container-orgf769f9d" class="outline-2">
<h2 id="orgf769f9d"><span class="section-number-2">2</span> Integral Force Feedback</h2>
<div class="outline-text-2" id="text-2">
<p>
<a id="org1e5669e"></a>
<a id="org6c8af88"></a>
</p>
<div class="note">
<p>
@ -508,23 +511,23 @@ All the files (data and Matlab scripts) are accessible <a href="data/iff.zip">he
</div>
<p>
Integral Force Feedback is applied.
In section <a href="#org9620ec3">2.1</a>, IFF is applied on a uni-axial system to understand its behavior.
In section <a href="#org2307841">2.1</a>, IFF is applied on a uni-axial system to understand its behavior.
Then, it is applied on the simscape model.
</p>
</div>
<div id="outline-container-org2c83f94" class="outline-3">
<h3 id="org2c83f94"><span class="section-number-3">2.1</span> One degree-of-freedom example</h3>
<div id="outline-container-orgf0e86b6" class="outline-3">
<h3 id="orgf0e86b6"><span class="section-number-3">2.1</span> One degree-of-freedom example</h3>
<div class="outline-text-3" id="text-2-1">
<p>
<a id="org9620ec3"></a>
<a id="org2307841"></a>
</p>
</div>
<div id="outline-container-org4efeef1" class="outline-4">
<h4 id="org4efeef1"><span class="section-number-4">2.1.1</span> Equations</h4>
<div id="outline-container-org00cf95e" class="outline-4">
<h4 id="org00cf95e"><span class="section-number-4">2.1.1</span> Equations</h4>
<div class="outline-text-4" id="text-2-1-1">
<div id="orge1d8b91" class="figure">
<div id="org0cb97db" class="figure">
<p><img src="figs/iff_1dof.png" alt="iff_1dof.png" />
</p>
<p><span class="figure-number">Figure 4: </span>Integral Force Feedback applied to a 1dof system</p>
@ -587,8 +590,8 @@ This is attainable if we have:
</div>
</div>
<div id="outline-container-orgb3880fc" class="outline-4">
<h4 id="orgb3880fc"><span class="section-number-4">2.1.2</span> Matlab Example</h4>
<div id="outline-container-org227d2a7" class="outline-4">
<h4 id="org227d2a7"><span class="section-number-4">2.1.2</span> Matlab Example</h4>
<div class="outline-text-4" id="text-2-1-2">
<p>
Let define the system parameters.
@ -642,7 +645,7 @@ And the closed loop system is computed below.
</div>
<div id="orgb9563d1" class="figure">
<div id="org7642d37" class="figure">
<p><img src="figs/iff_1dof_sensitivitiy.png" alt="iff_1dof_sensitivitiy.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Sensitivity to disturbance when IFF is applied on the 1dof system (<a href="./figs/iff_1dof_sensitivitiy.png">png</a>, <a href="./figs/iff_1dof_sensitivitiy.pdf">pdf</a>)</p>
@ -651,8 +654,8 @@ And the closed loop system is computed below.
</div>
</div>
<div id="outline-container-org731eb41" class="outline-3">
<h3 id="org731eb41"><span class="section-number-3">2.2</span> Control Design</h3>
<div id="outline-container-orga9d4adb" class="outline-3">
<h3 id="orga9d4adb"><span class="section-number-3">2.2</span> Control Design</h3>
<div class="outline-text-3" id="text-2-2">
<p>
Let's load the undamped plant:
@ -663,11 +666,11 @@ Let's load the undamped plant:
</div>
<p>
Let's look at the transfer function from actuator forces in the nano-hexapod to the force sensor in the nano-hexapod legs for all 6 pairs of actuator/sensor (figure <a href="#orgeb9eff4">6</a>).
Let's look at the transfer function from actuator forces in the nano-hexapod to the force sensor in the nano-hexapod legs for all 6 pairs of actuator/sensor (figure <a href="#orgdaff411">6</a>).
</p>
<div id="orgeb9eff4" class="figure">
<div id="orgdaff411" class="figure">
<p><img src="figs/iff_plant.png" alt="iff_plant.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Transfer function from forces applied in the legs to force sensor (<a href="./figs/iff_plant.png">png</a>, <a href="./figs/iff_plant.pdf">pdf</a>)</p>
@ -682,11 +685,11 @@ The controller for each pair of actuator/sensor is:
</div>
<p>
The corresponding loop gains are shown in figure <a href="#org4e84d34">7</a>.
The corresponding loop gains are shown in figure <a href="#orge16a678">7</a>.
</p>
<div id="org4e84d34" class="figure">
<div id="orge16a678" class="figure">
<p><img src="figs/iff_open_loop.png" alt="iff_open_loop.png" />
</p>
<p><span class="figure-number">Figure 7: </span>Loop Gain for the Integral Force Feedback (<a href="./figs/iff_open_loop.png">png</a>, <a href="./figs/iff_open_loop.pdf">pdf</a>)</p>
@ -694,14 +697,14 @@ The corresponding loop gains are shown in figure <a href="#org4e84d34">7</a>.
</div>
</div>
<div id="outline-container-orgcaee5e8" class="outline-3">
<h3 id="orgcaee5e8"><span class="section-number-3">2.3</span> Identification of the damped plant</h3>
<div id="outline-container-org582d26c" class="outline-3">
<h3 id="org582d26c"><span class="section-number-3">2.3</span> Identification of the damped plant</h3>
<div class="outline-text-3" id="text-2-3">
<p>
Let's initialize the system prior to identification.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeInputs<span class="org-rainbow-delimiters-depth-1">()</span>;
<pre class="src src-matlab">initializeReferences<span class="org-rainbow-delimiters-depth-1">()</span>;
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>;
@ -748,11 +751,11 @@ And we save the damped plant for further analysis
</div>
</div>
<div id="outline-container-org92c8ec7" class="outline-3">
<h3 id="org92c8ec7"><span class="section-number-3">2.4</span> Sensitivity to disturbances</h3>
<div id="outline-container-org231207b" class="outline-3">
<h3 id="org231207b"><span class="section-number-3">2.4</span> Sensitivity to disturbances</h3>
<div class="outline-text-3" id="text-2-4">
<p>
As shown on figure <a href="#orgb6249ff">8</a>:
As shown on figure <a href="#org9e80cba">8</a>:
</p>
<ul class="org-ul">
<li>The top platform of the nano-hexapod how behaves as a "free-mass".</li>
@ -762,7 +765,7 @@ However, as the goal is to make the relative displacement \(D\) as small as poss
</ul>
<div id="orgb6249ff" class="figure">
<div id="org9e80cba" class="figure">
<p><img src="figs/sensitivity_dist_iff.png" alt="sensitivity_dist_iff.png" />
</p>
<p><span class="figure-number">Figure 8: </span>Sensitivity to disturbance once the IFF controller is applied to the system (<a href="./figs/sensitivity_dist_iff.png">png</a>, <a href="./figs/sensitivity_dist_iff.pdf">pdf</a>)</p>
@ -777,7 +780,7 @@ For instance, the plots are not the same when using <code>minreal</code>.
</div>
<div id="org89f676a" class="figure">
<div id="org75ad751" class="figure">
<p><img src="figs/sensitivity_dist_stages_iff.png" alt="sensitivity_dist_stages_iff.png" />
</p>
<p><span class="figure-number">Figure 9: </span>Sensitivity to force disturbances in various stages when IFF is applied (<a href="./figs/sensitivity_dist_stages_iff.png">png</a>, <a href="./figs/sensitivity_dist_stages_iff.pdf">pdf</a>)</p>
@ -785,29 +788,29 @@ For instance, the plots are not the same when using <code>minreal</code>.
</div>
</div>
<div id="outline-container-orgacc1bc1" class="outline-3">
<h3 id="orgacc1bc1"><span class="section-number-3">2.5</span> Damped Plant</h3>
<div id="outline-container-org9157c29" class="outline-3">
<h3 id="org9157c29"><span class="section-number-3">2.5</span> Damped Plant</h3>
<div class="outline-text-3" id="text-2-5">
<p>
Now, look at the new damped plant to control.
</p>
<p>
It damps the plant (resonance of the nano hexapod as well as other resonances) as shown in figure <a href="#orgef38522">10</a>.
It damps the plant (resonance of the nano hexapod as well as other resonances) as shown in figure <a href="#org9c69a8b">10</a>.
</p>
<div id="orgef38522" class="figure">
<div id="org9c69a8b" class="figure">
<p><img src="figs/plant_iff_damped.png" alt="plant_iff_damped.png" />
</p>
<p><span class="figure-number">Figure 10: </span>Damped Plant after IFF is applied (<a href="./figs/plant_iff_damped.png">png</a>, <a href="./figs/plant_iff_damped.pdf">pdf</a>)</p>
</div>
<p>
However, it increases coupling at low frequency (figure <a href="#org4f7739c">11</a>).
However, it increases coupling at low frequency (figure <a href="#org612b8f4">11</a>).
</p>
<div id="org4f7739c" class="figure">
<div id="org612b8f4" class="figure">
<p><img src="figs/plant_iff_coupling.png" alt="plant_iff_coupling.png" />
</p>
<p><span class="figure-number">Figure 11: </span>Coupling induced by IFF (<a href="./figs/plant_iff_coupling.png">png</a>, <a href="./figs/plant_iff_coupling.pdf">pdf</a>)</p>
@ -815,8 +818,8 @@ However, it increases coupling at low frequency (figure <a href="#org4f7739c">11
</div>
</div>
<div id="outline-container-orged93d15" class="outline-3">
<h3 id="orged93d15"><span class="section-number-3">2.6</span> Conclusion</h3>
<div id="outline-container-org79a4305" class="outline-3">
<h3 id="org79a4305"><span class="section-number-3">2.6</span> Conclusion</h3>
<div class="outline-text-3" id="text-2-6">
<div class="important">
<p>
@ -833,11 +836,11 @@ Integral Force Feedback:
</div>
</div>
<div id="outline-container-org087ecf6" class="outline-2">
<h2 id="org087ecf6"><span class="section-number-2">3</span> Relative Motion Control</h2>
<div id="outline-container-org56506d8" class="outline-2">
<h2 id="org56506d8"><span class="section-number-2">3</span> Relative Motion Control</h2>
<div class="outline-text-2" id="text-3">
<p>
<a id="org42ae53a"></a>
<a id="org5aaa6c2"></a>
</p>
<div class="note">
<p>
@ -850,18 +853,18 @@ In the Relative Motion Control (RMC), a derivative feedback is applied between t
</p>
</div>
<div id="outline-container-orga33a4fa" class="outline-3">
<h3 id="orga33a4fa"><span class="section-number-3">3.1</span> One degree-of-freedom example</h3>
<div id="outline-container-org6502b14" class="outline-3">
<h3 id="org6502b14"><span class="section-number-3">3.1</span> One degree-of-freedom example</h3>
<div class="outline-text-3" id="text-3-1">
<p>
<a id="org80ae5dd"></a>
<a id="orgfb4a669"></a>
</p>
</div>
<div id="outline-container-orge6e79c5" class="outline-4">
<h4 id="orge6e79c5"><span class="section-number-4">3.1.1</span> Equations</h4>
<div id="outline-container-orga4b0d18" class="outline-4">
<h4 id="orga4b0d18"><span class="section-number-4">3.1.1</span> Equations</h4>
<div class="outline-text-4" id="text-3-1-1">
<div id="orgdd8eb1b" class="figure">
<div id="orge0b1b15" class="figure">
<p><img src="figs/rmc_1dof.png" alt="rmc_1dof.png" />
</p>
<p><span class="figure-number">Figure 12: </span>Relative Motion Control applied to a 1dof system</p>
@ -917,8 +920,8 @@ This corresponds to a gain:
</div>
</div>
<div id="outline-container-orgfb8caad" class="outline-4">
<h4 id="orgfb8caad"><span class="section-number-4">3.1.2</span> Matlab Example</h4>
<div id="outline-container-org6043cef" class="outline-4">
<h4 id="org6043cef"><span class="section-number-4">3.1.2</span> Matlab Example</h4>
<div class="outline-text-4" id="text-3-1-2">
<p>
Let define the system parameters.
@ -972,7 +975,7 @@ And the closed loop system is computed below.
</div>
<div id="org32a5d85" class="figure">
<div id="org6f81ea6" class="figure">
<p><img src="figs/rmc_1dof_sensitivitiy.png" alt="rmc_1dof_sensitivitiy.png" />
</p>
<p><span class="figure-number">Figure 13: </span>Sensitivity to disturbance when RMC is applied on the 1dof system (<a href="./figs/rmc_1dof_sensitivitiy.png">png</a>, <a href="./figs/rmc_1dof_sensitivitiy.pdf">pdf</a>)</p>
@ -981,8 +984,8 @@ And the closed loop system is computed below.
</div>
</div>
<div id="outline-container-orgcb24491" class="outline-3">
<h3 id="orgcb24491"><span class="section-number-3">3.2</span> Control Design</h3>
<div id="outline-container-orgdf908e5" class="outline-3">
<h3 id="orgdf908e5"><span class="section-number-3">3.2</span> Control Design</h3>
<div class="outline-text-3" id="text-3-2">
<p>
Let's load the undamped plant:
@ -993,11 +996,11 @@ Let's load the undamped plant:
</div>
<p>
Let's look at the transfer function from actuator forces in the nano-hexapod to the measured displacement of the actuator for all 6 pairs of actuator/sensor (figure <a href="#org121c8a8">14</a>).
Let's look at the transfer function from actuator forces in the nano-hexapod to the measured displacement of the actuator for all 6 pairs of actuator/sensor (figure <a href="#org7711c21">14</a>).
</p>
<div id="org121c8a8" class="figure">
<div id="org7711c21" class="figure">
<p><img src="figs/rmc_plant.png" alt="rmc_plant.png" />
</p>
<p><span class="figure-number">Figure 14: </span>Transfer function from forces applied in the legs to leg displacement sensor (<a href="./figs/rmc_plant.png">png</a>, <a href="./figs/rmc_plant.pdf">pdf</a>)</p>
@ -1013,11 +1016,11 @@ A Low pass Filter is added to make the controller transfer function proper.
</div>
<p>
The obtained loop gains are shown in figure <a href="#orgcbece09">15</a>.
The obtained loop gains are shown in figure <a href="#org5ad6d50">15</a>.
</p>
<div id="orgcbece09" class="figure">
<div id="org5ad6d50" class="figure">
<p><img src="figs/rmc_open_loop.png" alt="rmc_open_loop.png" />
</p>
<p><span class="figure-number">Figure 15: </span>Loop Gain for the Integral Force Feedback (<a href="./figs/rmc_open_loop.png">png</a>, <a href="./figs/rmc_open_loop.pdf">pdf</a>)</p>
@ -1025,14 +1028,14 @@ The obtained loop gains are shown in figure <a href="#orgcbece09">15</a>.
</div>
</div>
<div id="outline-container-orgaeb6872" class="outline-3">
<h3 id="orgaeb6872"><span class="section-number-3">3.3</span> Identification of the damped plant</h3>
<div id="outline-container-org9792b77" class="outline-3">
<h3 id="org9792b77"><span class="section-number-3">3.3</span> Identification of the damped plant</h3>
<div class="outline-text-3" id="text-3-3">
<p>
Let's initialize the system prior to identification.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeInputs<span class="org-rainbow-delimiters-depth-1">()</span>;
<pre class="src src-matlab">initializeReferences<span class="org-rainbow-delimiters-depth-1">()</span>;
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>;
@ -1079,22 +1082,22 @@ And we save the damped plant for further analysis.
</div>
</div>
<div id="outline-container-org2fc9fe6" class="outline-3">
<h3 id="org2fc9fe6"><span class="section-number-3">3.4</span> Sensitivity to disturbances</h3>
<div id="outline-container-org4894be4" class="outline-3">
<h3 id="org4894be4"><span class="section-number-3">3.4</span> Sensitivity to disturbances</h3>
<div class="outline-text-3" id="text-3-4">
<p>
As shown in figure <a href="#org826fff4">16</a>, RMC control succeed in lowering the sensitivity to disturbances near resonance of the system.
As shown in figure <a href="#org2e950af">16</a>, RMC control succeed in lowering the sensitivity to disturbances near resonance of the system.
</p>
<div id="org826fff4" class="figure">
<div id="org2e950af" class="figure">
<p><img src="figs/sensitivity_dist_rmc.png" alt="sensitivity_dist_rmc.png" />
</p>
<p><span class="figure-number">Figure 16: </span>Sensitivity to disturbance once the RMC controller is applied to the system (<a href="./figs/sensitivity_dist_rmc.png">png</a>, <a href="./figs/sensitivity_dist_rmc.pdf">pdf</a>)</p>
</div>
<div id="org9de1750" class="figure">
<div id="org302ab8e" class="figure">
<p><img src="figs/sensitivity_dist_stages_rmc.png" alt="sensitivity_dist_stages_rmc.png" />
</p>
<p><span class="figure-number">Figure 17: </span>Sensitivity to force disturbances in various stages when RMC is applied (<a href="./figs/sensitivity_dist_stages_rmc.png">png</a>, <a href="./figs/sensitivity_dist_stages_rmc.pdf">pdf</a>)</p>
@ -1102,11 +1105,11 @@ As shown in figure <a href="#org826fff4">16</a>, RMC control succeed in lowering
</div>
</div>
<div id="outline-container-org846d098" class="outline-3">
<h3 id="org846d098"><span class="section-number-3">3.5</span> Damped Plant</h3>
<div id="outline-container-orgd89441e" class="outline-3">
<h3 id="orgd89441e"><span class="section-number-3">3.5</span> Damped Plant</h3>
<div class="outline-text-3" id="text-3-5">
<div id="orgd532fac" class="figure">
<div id="orgcead87e" class="figure">
<p><img src="figs/plant_rmc_damped.png" alt="plant_rmc_damped.png" />
</p>
<p><span class="figure-number">Figure 18: </span>Damped Plant after RMC is applied (<a href="./figs/plant_rmc_damped.png">png</a>, <a href="./figs/plant_rmc_damped.pdf">pdf</a>)</p>
@ -1114,8 +1117,8 @@ As shown in figure <a href="#org826fff4">16</a>, RMC control succeed in lowering
</div>
</div>
<div id="outline-container-org12f4764" class="outline-3">
<h3 id="org12f4764"><span class="section-number-3">3.6</span> Conclusion</h3>
<div id="outline-container-org04f7d21" class="outline-3">
<h3 id="org04f7d21"><span class="section-number-3">3.6</span> Conclusion</h3>
<div class="outline-text-3" id="text-3-6">
<div class="important">
<p>
@ -1130,11 +1133,11 @@ Relative Motion Control:
</div>
</div>
<div id="outline-container-orgd92711d" class="outline-2">
<h2 id="orgd92711d"><span class="section-number-2">4</span> Direct Velocity Feedback</h2>
<div id="outline-container-org9af791d" class="outline-2">
<h2 id="org9af791d"><span class="section-number-2">4</span> Direct Velocity Feedback</h2>
<div class="outline-text-2" id="text-4">
<p>
<a id="org556890f"></a>
<a id="org6b8a067"></a>
</p>
<div class="note">
<p>
@ -1147,18 +1150,18 @@ In the Relative Motion Control (RMC), a feedback is applied between the measured
</p>
</div>
<div id="outline-container-org189fb3b" class="outline-3">
<h3 id="org189fb3b"><span class="section-number-3">4.1</span> One degree-of-freedom example</h3>
<div id="outline-container-orgda71fbe" class="outline-3">
<h3 id="orgda71fbe"><span class="section-number-3">4.1</span> One degree-of-freedom example</h3>
<div class="outline-text-3" id="text-4-1">
<p>
<a id="org61e898c"></a>
<a id="org8de0a68"></a>
</p>
</div>
<div id="outline-container-org5318c89" class="outline-4">
<h4 id="org5318c89"><span class="section-number-4">4.1.1</span> Equations</h4>
<div id="outline-container-org332c25e" class="outline-4">
<h4 id="org332c25e"><span class="section-number-4">4.1.1</span> Equations</h4>
<div class="outline-text-4" id="text-4-1-1">
<div id="org558eae6" class="figure">
<div id="org6423df8" class="figure">
<p><img src="figs/dvf_1dof.png" alt="dvf_1dof.png" />
</p>
<p><span class="figure-number">Figure 19: </span>Direct Velocity Feedback applied to a 1dof system</p>
@ -1177,7 +1180,7 @@ In terms of the stage deformation \(d = x - w\):
(ms^2 + cs + k) d = -ms^2 w + F_d + F
\end{equation}
<p>
The direct velocity feedback law shown in figure <a href="#org558eae6">19</a> is:
The direct velocity feedback law shown in figure <a href="#org6423df8">19</a> is:
</p>
\begin{equation}
K = -g
@ -1214,8 +1217,8 @@ This corresponds to a gain:
</div>
</div>
<div id="outline-container-orgfb2a947" class="outline-4">
<h4 id="orgfb2a947"><span class="section-number-4">4.1.2</span> Matlab Example</h4>
<div id="outline-container-org94d4a25" class="outline-4">
<h4 id="org94d4a25"><span class="section-number-4">4.1.2</span> Matlab Example</h4>
<div class="outline-text-4" id="text-4-1-2">
<p>
Let define the system parameters.
@ -1290,10 +1293,10 @@ And the closed loop system is computed below.
</div>
<p>
The obtained sensitivity to disturbances is shown in figure <a href="#org8ff062e">20</a>.
The obtained sensitivity to disturbances is shown in figure <a href="#orgc650b55">20</a>.
</p>
<div id="org8ff062e" class="figure">
<div id="orgc650b55" class="figure">
<p><img src="figs/dvf_1dof_sensitivitiy.png" alt="dvf_1dof_sensitivitiy.png" />
</p>
<p><span class="figure-number">Figure 20: </span>Sensitivity to disturbance when DVF is applied on the 1dof system (<a href="./figs/dvf_1dof_sensitivitiy.png">png</a>, <a href="./figs/dvf_1dof_sensitivitiy.pdf">pdf</a>)</p>
@ -1302,8 +1305,8 @@ The obtained sensitivity to disturbances is shown in figure <a href="#org8ff062e
</div>
</div>
<div id="outline-container-org3c87599" class="outline-3">
<h3 id="org3c87599"><span class="section-number-3">4.2</span> Control Design</h3>
<div id="outline-container-org78afe53" class="outline-3">
<h3 id="org78afe53"><span class="section-number-3">4.2</span> Control Design</h3>
<div class="outline-text-3" id="text-4-2">
<p>
Let's load the undamped plant:
@ -1314,18 +1317,18 @@ Let's load the undamped plant:
</div>
<p>
Let's look at the transfer function from actuator forces in the nano-hexapod to the measured velocity of the nano-hexapod platform in the direction of the corresponding actuator for all 6 pairs of actuator/sensor (figure <a href="#orgffe220b">21</a>).
Let's look at the transfer function from actuator forces in the nano-hexapod to the measured velocity of the nano-hexapod platform in the direction of the corresponding actuator for all 6 pairs of actuator/sensor (figure <a href="#org7709a09">21</a>).
</p>
<div id="orgffe220b" class="figure">
<div id="org7709a09" class="figure">
<p><img src="figs/dvf_plant.png" alt="dvf_plant.png" />
</p>
<p><span class="figure-number">Figure 21: </span>Transfer function from forces applied in the legs to leg velocity sensor (<a href="./figs/dvf_plant.png">png</a>, <a href="./figs/dvf_plant.pdf">pdf</a>)</p>
</div>
<p>
The controller is defined below and the obtained loop gain is shown in figure <a href="#org9506f40">22</a>.
The controller is defined below and the obtained loop gain is shown in figure <a href="#org8244266">22</a>.
</p>
<div class="org-src-container">
@ -1334,7 +1337,7 @@ The controller is defined below and the obtained loop gain is shown in figure <a
</div>
<div id="org9506f40" class="figure">
<div id="org8244266" class="figure">
<p><img src="figs/dvf_open_loop_gain.png" alt="dvf_open_loop_gain.png" />
</p>
<p><span class="figure-number">Figure 22: </span>Loop Gain for DVF (<a href="./figs/dvf_open_loop_gain.png">png</a>, <a href="./figs/dvf_open_loop_gain.pdf">pdf</a>)</p>
@ -1342,14 +1345,14 @@ The controller is defined below and the obtained loop gain is shown in figure <a
</div>
</div>
<div id="outline-container-org07e7826" class="outline-3">
<h3 id="org07e7826"><span class="section-number-3">4.3</span> Identification of the damped plant</h3>
<div id="outline-container-orgb4d1b92" class="outline-3">
<h3 id="orgb4d1b92"><span class="section-number-3">4.3</span> Identification of the damped plant</h3>
<div class="outline-text-3" id="text-4-3">
<p>
Let's initialize the system prior to identification.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeInputs<span class="org-rainbow-delimiters-depth-1">()</span>;
<pre class="src src-matlab">initializeReferences<span class="org-rainbow-delimiters-depth-1">()</span>;
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>;
@ -1396,11 +1399,11 @@ And we save the damped plant for further analysis.
</div>
</div>
<div id="outline-container-org901fc2b" class="outline-3">
<h3 id="org901fc2b"><span class="section-number-3">4.4</span> Sensitivity to disturbances</h3>
<div id="outline-container-org01d1d1c" class="outline-3">
<h3 id="org01d1d1c"><span class="section-number-3">4.4</span> Sensitivity to disturbances</h3>
<div class="outline-text-3" id="text-4-4">
<div id="orgc1ce7ef" class="figure">
<div id="org5ffb6d0" class="figure">
<p><img src="figs/sensitivity_dist_dvf.png" alt="sensitivity_dist_dvf.png" />
</p>
<p><span class="figure-number">Figure 23: </span>Sensitivity to disturbance once the DVF controller is applied to the system (<a href="./figs/sensitivity_dist_dvf.png">png</a>, <a href="./figs/sensitivity_dist_dvf.pdf">pdf</a>)</p>
@ -1408,7 +1411,7 @@ And we save the damped plant for further analysis.
<div id="org19e919e" class="figure">
<div id="org29eec9f" class="figure">
<p><img src="figs/sensitivity_dist_stages_dvf.png" alt="sensitivity_dist_stages_dvf.png" />
</p>
<p><span class="figure-number">Figure 24: </span>Sensitivity to force disturbances in various stages when DVF is applied (<a href="./figs/sensitivity_dist_stages_dvf.png">png</a>, <a href="./figs/sensitivity_dist_stages_dvf.pdf">pdf</a>)</p>
@ -1416,11 +1419,11 @@ And we save the damped plant for further analysis.
</div>
</div>
<div id="outline-container-org22a4374" class="outline-3">
<h3 id="org22a4374"><span class="section-number-3">4.5</span> Damped Plant</h3>
<div id="outline-container-orgeb00466" class="outline-3">
<h3 id="orgeb00466"><span class="section-number-3">4.5</span> Damped Plant</h3>
<div class="outline-text-3" id="text-4-5">
<div id="org192575d" class="figure">
<div id="org17f042e" class="figure">
<p><img src="figs/plant_dvf_damped.png" alt="plant_dvf_damped.png" />
</p>
<p><span class="figure-number">Figure 25: </span>Damped Plant after DVF is applied (<a href="./figs/plant_dvf_damped.png">png</a>, <a href="./figs/plant_dvf_damped.pdf">pdf</a>)</p>
@ -1428,8 +1431,8 @@ And we save the damped plant for further analysis.
</div>
</div>
<div id="outline-container-org1c0a92c" class="outline-3">
<h3 id="org1c0a92c"><span class="section-number-3">4.6</span> Conclusion</h3>
<div id="outline-container-orgfb13592" class="outline-3">
<h3 id="orgfb13592"><span class="section-number-3">4.6</span> Conclusion</h3>
<div class="outline-text-3" id="text-4-6">
<div class="important">
<p>
@ -1441,15 +1444,15 @@ Direct Velocity Feedback:
</div>
</div>
<div id="outline-container-org099228a" class="outline-2">
<h2 id="org099228a"><span class="section-number-2">5</span> Comparison</h2>
<div id="outline-container-org8970afd" class="outline-2">
<h2 id="org8970afd"><span class="section-number-2">5</span> Comparison</h2>
<div class="outline-text-2" id="text-5">
<p>
<a id="orgcff0bce"></a>
<a id="org5e94b5c"></a>
</p>
</div>
<div id="outline-container-org10b67a5" class="outline-3">
<h3 id="org10b67a5"><span class="section-number-3">5.1</span> Load the plants</h3>
<div id="outline-container-orgb3b1324" class="outline-3">
<h3 id="orgb3b1324"><span class="section-number-3">5.1</span> Load the plants</h3>
<div class="outline-text-3" id="text-5-1">
<div class="org-src-container">
<pre class="src src-matlab">load<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-string">'./active_damping/mat/plants.mat'</span>, <span class="org-string">'G'</span>, <span class="org-string">'G_iff'</span>, <span class="org-string">'G_rmc'</span>, <span class="org-string">'G_dvf'</span><span class="org-rainbow-delimiters-depth-1">)</span>;
@ -1458,11 +1461,11 @@ Direct Velocity Feedback:
</div>
</div>
<div id="outline-container-org0dcb40a" class="outline-3">
<h3 id="org0dcb40a"><span class="section-number-3">5.2</span> Sensitivity to Disturbance</h3>
<div id="outline-container-orga2db271" class="outline-3">
<h3 id="orga2db271"><span class="section-number-3">5.2</span> Sensitivity to Disturbance</h3>
<div class="outline-text-3" id="text-5-2">
<div id="org919b8db" class="figure">
<div id="orgb501019" class="figure">
<p><img src="figs/sensitivity_comp_ground_motion_z.png" alt="sensitivity_comp_ground_motion_z.png" />
</p>
<p><span class="figure-number">Figure 26: </span>caption (<a href="./figs/sensitivity_comp_ground_motion_z.png">png</a>, <a href="./figs/sensitivity_comp_ground_motion_z.pdf">pdf</a>)</p>
@ -1470,21 +1473,21 @@ Direct Velocity Feedback:
<div id="orge4a04c8" class="figure">
<div id="org7a082ac" class="figure">
<p><img src="figs/sensitivity_comp_direct_forces_z.png" alt="sensitivity_comp_direct_forces_z.png" />
</p>
<p><span class="figure-number">Figure 27: </span>caption (<a href="./figs/sensitivity_comp_direct_forces_z.png">png</a>, <a href="./figs/sensitivity_comp_direct_forces_z.pdf">pdf</a>)</p>
</div>
<div id="orgd15d59b" class="figure">
<div id="org65d09c7" class="figure">
<p><img src="figs/sensitivity_comp_spindle_z.png" alt="sensitivity_comp_spindle_z.png" />
</p>
<p><span class="figure-number">Figure 28: </span>caption (<a href="./figs/sensitivity_comp_spindle_z.png">png</a>, <a href="./figs/sensitivity_comp_spindle_z.pdf">pdf</a>)</p>
</div>
<div id="orgcb6a783" class="figure">
<div id="org14eba88" class="figure">
<p><img src="figs/sensitivity_comp_ty_z.png" alt="sensitivity_comp_ty_z.png" />
</p>
<p><span class="figure-number">Figure 29: </span>caption (<a href="./figs/sensitivity_comp_ty_z.png">png</a>, <a href="./figs/sensitivity_comp_ty_z.pdf">pdf</a>)</p>
@ -1492,7 +1495,7 @@ Direct Velocity Feedback:
<div id="org154b81b" class="figure">
<div id="org20c4230" class="figure">
<p><img src="figs/sensitivity_comp_ty_x.png" alt="sensitivity_comp_ty_x.png" />
</p>
<p><span class="figure-number">Figure 30: </span>caption (<a href="./figs/sensitivity_comp_ty_x.png">png</a>, <a href="./figs/sensitivity_comp_ty_x.pdf">pdf</a>)</p>
@ -1500,25 +1503,25 @@ Direct Velocity Feedback:
</div>
</div>
<div id="outline-container-orgcc0be93" class="outline-3">
<h3 id="orgcc0be93"><span class="section-number-3">5.3</span> Damped Plant</h3>
<div id="outline-container-org0d6cdc3" class="outline-3">
<h3 id="org0d6cdc3"><span class="section-number-3">5.3</span> Damped Plant</h3>
<div class="outline-text-3" id="text-5-3">
<div id="orgf41f2bc" class="figure">
<div id="org19883c2" class="figure">
<p><img src="figs/plant_comp_damping_z.png" alt="plant_comp_damping_z.png" />
</p>
<p><span class="figure-number">Figure 31: </span>Plant for the \(z\) direction for different active damping technique used (<a href="./figs/plant_comp_damping_z.png">png</a>, <a href="./figs/plant_comp_damping_z.pdf">pdf</a>)</p>
</div>
<div id="org5183422" class="figure">
<div id="orgda8ddad" class="figure">
<p><img src="figs/plant_comp_damping_x.png" alt="plant_comp_damping_x.png" />
</p>
<p><span class="figure-number">Figure 32: </span>Plant for the \(x\) direction for different active damping technique used (<a href="./figs/plant_comp_damping_x.png">png</a>, <a href="./figs/plant_comp_damping_x.pdf">pdf</a>)</p>
</div>
<div id="org74505ba" class="figure">
<div id="orgdaa95b3" class="figure">
<p><img src="figs/plant_comp_damping_coupling.png" alt="plant_comp_damping_coupling.png" />
</p>
<p><span class="figure-number">Figure 33: </span>Comparison of one off-diagonal plant for different damping technique applied (<a href="./figs/plant_comp_damping_coupling.png">png</a>, <a href="./figs/plant_comp_damping_coupling.pdf">pdf</a>)</p>
@ -1527,18 +1530,18 @@ Direct Velocity Feedback:
</div>
</div>
<div id="outline-container-org0476571" class="outline-2">
<h2 id="org0476571"><span class="section-number-2">6</span> Conclusion</h2>
<div id="outline-container-org0c54368" class="outline-2">
<h2 id="org0c54368"><span class="section-number-2">6</span> Conclusion</h2>
<div class="outline-text-2" id="text-6">
<p>
<a id="org158aa9e"></a>
<a id="org42c2dd7"></a>
</p>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2019-10-25 ven. 16:00</p>
<p class="date">Created: 2019-12-11 mer. 16:55</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -105,7 +105,7 @@ We initialize all the stages with the default parameters.
The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.
#+begin_src matlab
initializeInputs();
initializeReferences();
initializeGround();
initializeGranite();
initializeTy();
@ -557,7 +557,7 @@ The corresponding loop gains are shown in figure [[fig:iff_open_loop]].
** Identification of the damped plant
Let's initialize the system prior to identification.
#+begin_src matlab
initializeInputs();
initializeReferences();
initializeGround();
initializeGranite();
initializeTy();
@ -1097,7 +1097,7 @@ The obtained loop gains are shown in figure [[fig:rmc_open_loop]].
** Identification of the damped plant
Let's initialize the system prior to identification.
#+begin_src matlab
initializeInputs();
initializeReferences();
initializeGround();
initializeGranite();
initializeTy();
@ -1608,7 +1608,7 @@ The controller is defined below and the obtained loop gain is shown in figure [[
** Identification of the damped plant
Let's initialize the system prior to identification.
#+begin_src matlab
initializeInputs();
initializeReferences();
initializeGround();
initializeGranite();
initializeTy();

View File

@ -1,21 +0,0 @@
function [] = initializeExperiment(exp_name, sys_mass)
if strcmp(exp_name, 'tomography')
if strcmp(sys_mass, 'light')
opts_inputs = struct(...
'Dw', true, ...
'Rz', 60 ... % rpm
);
elseif strcpm(sys_mass, 'heavy')
opts_inputs = struct(...
'Dw', true, ...
'Rz', 1 ... % rpm
);
else
error('sys_mass should be light or heavy');
end
initializeInputs(opts_inputs);
else
error('exp_name is only configured for tomography');
end
end

View File

@ -1,175 +0,0 @@
function [inputs] = initializeInputs(opts_param)
%% Default values for opts
opts = struct( ...
'Dw', false, ...
'Dy', false, ...
'Ry', false, ...
'Rz', false, ...
'Dh', false, ...
'Rm', false, ...
'Dn', false ...
);
%% Populate opts with input parameters
if exist('opts_param','var')
for opt = fieldnames(opts_param)'
opts.(opt{1}) = opts_param.(opt{1});
end
end
%% Load Sampling Time and Simulation Time
load('./mat/sim_conf.mat', 'sim_conf');
%% Define the time vector
t = 0:sim_conf.Ts:sim_conf.Tsim;
%% Ground motion - Dw
if islogical(opts.Dw) && opts.Dw == true
load('./mat/perturbations.mat', 'Wxg');
Dw = 1/sqrt(2)*100*random('norm', 0, 1, length(t), 3);
Dw(:, 1) = lsim(Wxg, Dw(:, 1), t);
Dw(:, 2) = lsim(Wxg, Dw(:, 2), t);
Dw(:, 3) = lsim(Wxg, Dw(:, 3), t);
elseif islogical(opts.Dw) && opts.Dw == false
Dw = zeros(length(t), 3);
else
Dw = opts.Dw;
end
%% Translation stage - Dy
if islogical(opts.Dy) && opts.Dy == true
Dy = zeros(length(t), 1);
elseif islogical(opts.Dy) && opts.Dy == false
Dy = zeros(length(t), 1);
else
Dy = opts.Dy;
end
%% Tilt Stage - Ry
if islogical(opts.Ry) && opts.Ry == true
Ry = 3*(2*pi/360)*sin(2*pi*0.2*t);
elseif islogical(opts.Ry) && opts.Ry == false
Ry = zeros(length(t), 1);
elseif isnumeric(opts.Ry) && length(opts.Ry) == 1
Ry = opts.Ry*(2*pi/360)*ones(length(t), 1);
else
Ry = opts.Ry;
end
%% Spindle - Rz
if islogical(opts.Rz) && opts.Rz == true
Rz = 2*pi*0.5*t;
elseif islogical(opts.Rz) && opts.Rz == false
Rz = zeros(length(t), 1);
elseif isnumeric(opts.Rz) && length(opts.Rz) == 1
Rz = opts.Rz*(2*pi/60)*t;
else
Rz = opts.Rz;
end
%% Micro Hexapod - Dh
if islogical(opts.Dh) && opts.Dh == true
Dh = zeros(length(t), 6);
elseif islogical(opts.Dh) && opts.Dh == false
Dh = zeros(length(t), 6);
else
Dh = opts.Dh;
end
%% Axis Compensation - Rm
if islogical(opts.Rm)
Rm = zeros(length(t), 2);
Rm(:, 2) = pi*ones(length(t), 1);
else
Rm = opts.Rm;
end
%% Nano Hexapod - Dn
if islogical(opts.Dn) && opts.Dn == true
Dn = zeros(length(t), 6);
elseif islogical(opts.Dn) && opts.Dn == false
Dn = zeros(length(t), 6);
else
Dn = opts.Dn;
end
%% Setpoint - Ds
Ds = zeros(length(t), 6);
for i = 1:length(t)
Ds(i, :) = computeSetpoint(Dy(i), Ry(i), Rz(i));
end
%% External Forces applied on the Granite
Fg = zeros(length(t), 3);
%% External Forces applied on the Sample
Fs = zeros(length(t), 6);
%% Create the input Structure that will contain all the inputs
inputs = struct( ...
'Ts', sim_conf.Ts, ...
'Dw', timeseries(Dw, t), ...
'Dy', timeseries(Dy, t), ...
'Ry', timeseries(Ry, t), ...
'Rz', timeseries(Rz, t), ...
'Dh', timeseries(Dh, t), ...
'Rm', timeseries(Rm, t), ...
'Dn', timeseries(Dn, t), ...
'Ds', timeseries(Ds, t), ...
'Fg', timeseries(Fg, t), ...
'Fs', timeseries(Fs, t) ...
);
%% Save
save('./mat/inputs.mat', 'inputs');
%% Custom Functions
function setpoint = computeSetpoint(ty, ry, rz)
%%
setpoint = zeros(6, 1);
%% Ty
TMTy = [1 0 0 0 ;
0 1 0 ty ;
0 0 1 0 ;
0 0 0 1 ];
%% Ry
TMRy = [ cos(ry) 0 sin(ry) 0 ;
0 1 0 0 ;
-sin(ry) 0 cos(ry) 0 ;
0 0 0 1 ];
%% Rz
TMRz = [cos(rz) -sin(rz) 0 0 ;
sin(rz) cos(rz) 0 0 ;
0 0 1 0 ;
0 0 0 1 ];
%% All stages
TM = TMTy*TMRy*TMRz;
[thetax, thetay, thetaz] = RM2angle(TM(1:3, 1:3));
setpoint(1:3) = TM(1:3, 4);
setpoint(4:6) = [thetax, thetay, thetaz];
%% Custom Functions
function [thetax, thetay, thetaz] = RM2angle(R)
if abs(abs(R(3, 1)) - 1) > 1e-6 % R31 != 1 and R31 != -1
thetay = -asin(R(3, 1));
thetax = atan2(R(3, 2)/cos(thetay), R(3, 3)/cos(thetay));
thetaz = atan2(R(2, 1)/cos(thetay), R(1, 1)/cos(thetay));
else
thetaz = 0;
if abs(R(3, 1)+1) < 1e-6 % R31 = -1
thetay = pi/2;
thetax = thetaz + atan2(R(1, 2), R(1, 3));
else
thetay = -pi/2;
thetax = -thetaz + atan2(-R(1, 2), -R(1, 3));
end
end
end
end
end