nass-simscape/docs/nano_hexapod.html

2376 lines
109 KiB
HTML
Raw Normal View History

2021-04-19 16:32:49 +02:00
<?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>
<!-- 2021-04-23 ven. 13:22 -->
2021-04-19 16:32:49 +02:00
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Nano-Hexapod</title>
<meta name="author" content="Dehaeze Thomas" />
<meta name="generator" content="Org Mode" />
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
<script>
MathJax = {
svg: {
scale: 1,
fontCache: "global"
},
tex: {
tags: "ams",
multlineWidth: "%MULTLINEWIDTH",
tagSide: "right",
macros: {bm: ["\\boldsymbol{#1}",1],},
tagIndent: ".8em"
}
};
</script>
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
</head>
<body>
<div id="org-div-home-and-up">
<a accesskey="h" href="./index.html"> UP </a>
|
<a accesskey="H" href="../../index.html"> HOME </a>
</div><div id="content">
<h1 class="title">Nano-Hexapod</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org3cc44d5">1. Nano-Hexapod</a>
<ul>
<li><a href="#org17a9502">1.1. Nano Hexapod - Configuration</a></li>
<li><a href="#orgf279891">1.2. Effect of encoders on the decentralized plant</a></li>
<li><a href="#orgbea8fbc">1.3. Effect of APA flexibility</a></li>
<li><a href="#orgb2e1d3b">1.4. Nano Hexapod - Number of DoF</a></li>
<li><a href="#orgcd30976">1.5. Direct Velocity Feedback Plant</a></li>
<li><a href="#orgdefb22f">1.6. Integral Force Feedback Plant</a></li>
<li><a href="#orgde9c23b">1.7. Decentralized Plant - Cartesian coordinates</a>
2021-04-19 16:32:49 +02:00
<ul>
<li><a href="#org435b7fd">1.7.1. Verification of the Sensor Jacobian</a></li>
<li><a href="#org664eab9">1.7.2. Comparison of the decentralized plants</a></li>
2021-04-19 16:32:49 +02:00
</ul>
</li>
<li><a href="#org6cf8089">1.8. Decentralized Plant - Decoupling at the Center of Stiffness</a>
2021-04-19 16:32:49 +02:00
<ul>
<li><a href="#org8c0186d">1.8.1. Center of Stiffness</a></li>
<li><a href="#org58e2a5b">1.8.2. Obtained plant</a></li>
2021-04-19 16:32:49 +02:00
</ul>
</li>
<li><a href="#orgd60e2b2">1.9. Stiffness matrix</a>
<ul>
<li><a href="#org97c57ea">1.9.1. Compute the theoretical stiffness of the nano-hexapod</a></li>
<li><a href="#orgc388f2b">1.9.2. Comparison with Simscape Model</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org2fc54dd">2. Active Damping using Integral Force Feedback</a>
<ul>
<li><a href="#org662836c">2.1. Plant Identification</a></li>
<li><a href="#org639a7fd">2.2. Root Locus</a></li>
<li><a href="#org78de4b8">2.3. Effect of IFF on the plant</a></li>
<li><a href="#org8db31cb">2.4. Effect of IFF on the compliance</a></li>
</ul>
</li>
<li><a href="#org605df2e">3. Active Damping using Direct Velocity Feedback - Encoders on the struts</a>
<ul>
<li><a href="#org60e2c2e">3.1. Plant Identification</a></li>
<li><a href="#org2df6ab2">3.2. Root Locus</a></li>
<li><a href="#org13ae74e">3.3. Effect of DVF on the plant</a></li>
<li><a href="#org6b386dc">3.4. Effect of DVF on the compliance</a></li>
</ul>
</li>
<li><a href="#orgac5a0fc">4. Active Damping using Direct Velocity Feedback - Encoders on the plates</a>
<ul>
<li><a href="#org27a5a1e">4.1. Plant Identification</a></li>
<li><a href="#orgec02bca">4.2. Root Locus</a></li>
<li><a href="#org193f208">4.3. Effect of DVF on the plant</a></li>
<li><a href="#org9d023b0">4.4. Effect of DVF on the compliance</a></li>
2021-04-19 16:32:49 +02:00
</ul>
</li>
<li><a href="#org8862f6b">5. Function - Initialize Nano Hexapod</a>
2021-04-19 16:32:49 +02:00
<ul>
<li><a href="#org438f7d8">Function description</a></li>
<li><a href="#org49bef56">Optional Parameters</a></li>
<li><a href="#org33f6631">Nano Hexapod Object</a></li>
<li><a href="#orgdc3de74">Flexible Joints - Bot</a></li>
<li><a href="#org7d4d003">Flexible Joints - Top</a></li>
<li><a href="#org3744992">Relative Motion Sensor</a></li>
<li><a href="#orgdaa740a">Amplified Piezoelectric Actuator</a></li>
<li><a href="#org8d598c9">Geometry</a></li>
<li><a href="#org8d741d2">Jacobian for Actuators</a></li>
<li><a href="#orgea27820">Jacobian for Sensors</a></li>
<li><a href="#org90b9ac2">Controller</a></li>
2021-04-19 16:32:49 +02:00
<li><a href="#org8187b3b">Save the Structure</a></li>
</ul>
</li>
</ul>
</div>
</div>
<p>
In this document, a Simscape model of the nano-hexapod is developed.
</p>
<ul class="org-ul">
<li>Section <a href="#orgc205d20">1</a>:</li>
<li>Section <a href="#org2b71e9b">2</a>:</li>
<li>Section <a href="#org4a93b60">3</a>:</li>
<li>Section <a href="#org4793eb6">4</a>:</li>
</ul>
2021-04-19 16:32:49 +02:00
<div id="outline-container-org3cc44d5" class="outline-2">
<h2 id="org3cc44d5"><span class="section-number-2">1</span> Nano-Hexapod</h2>
<div class="outline-text-2" id="text-1">
<p>
<a id="orgc205d20"></a>
</p>
2021-04-19 16:32:49 +02:00
</div>
<div id="outline-container-org17a9502" class="outline-3">
<h3 id="org17a9502"><span class="section-number-3">1.1</span> Nano Hexapod - Configuration</h3>
2021-04-19 16:32:49 +02:00
<div class="outline-text-3" id="text-1-1">
<p>
<a id="org45617af"></a>
</p>
<p>
The nano-hexapod can be initialized and configured using the <code>initializeNanoHexapodFinal</code> function (<a href="#orgfdb5239">link</a>).
2021-04-19 16:32:49 +02:00
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'3dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>, ...
<span class="org-string">'MO_B'</span>, 150e<span class="org-type">-</span>3);
</pre>
</div>
<p>
We initialize the identification parameters.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'nano_hexapod'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/F'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Inputs</span>
io(io_i) = linio([mdl, <span class="org-string">'/D'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Motion Outputs</span>
2021-04-19 16:32:49 +02:00
</pre>
</div>
</div>
</div>
<div id="outline-container-orgf279891" class="outline-3">
<h3 id="orgf279891"><span class="section-number-3">1.2</span> Effect of encoders on the decentralized plant</h3>
2021-04-19 16:32:49 +02:00
<div class="outline-text-3" id="text-1-2">
<p>
<a id="org0520e45"></a>
</p>
<p>
We here wish to compare the plant from actuators to the encoders when the encoders are either fixed on the struts or on the plates.
</p>
<p>
Identify the plant when the encoders are on the struts:
2021-04-19 16:32:49 +02:00
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'3dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>);
Gs = linearize(mdl, io, 0.0, options);
Gs.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gs.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
2021-04-19 16:32:49 +02:00
</pre>
</div>
<p>
And identify the plant when the encoders are fixed on the plates:
2021-04-19 16:32:49 +02:00
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'3dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'plates'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>);
Gp = linearize(mdl, io, 0.0, options);
Gp.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gp.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
2021-04-19 16:32:49 +02:00
</pre>
</div>
<p>
The obtained plants are compared in Figure <a href="#org4585596">1</a>.
</p>
2021-04-19 16:32:49 +02:00
<div id="org4585596" class="figure">
<p><img src="figs/nano_hexapod_effect_encoder.png" alt="nano_hexapod_effect_encoder.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Comparison of the plants from actuator to associated encoder when the encoders are either fixed to the struts or to the plates</p>
</div>
<div class="question" id="org012b9d6">
<p>
Why do we have zeros at 400Hz and 800Hz when the encoders are fixed on the struts?
</p>
</div>
</div>
2021-04-19 16:32:49 +02:00
</div>
<div id="outline-container-orgbea8fbc" class="outline-3">
<h3 id="orgbea8fbc"><span class="section-number-3">1.3</span> Effect of APA flexibility</h3>
<div class="outline-text-3" id="text-1-3">
<p>
<a id="orgf47e33d"></a>
</p>
<p>
First identify the plant for APA represented by 2DoF system:
</p>
2021-04-19 16:32:49 +02:00
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'3dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>, ...
<span class="org-string">'actuator_Ga'</span>, 2);
Gs = linearize(mdl, io, 0.0, options);
Gs.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gs.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
2021-04-19 16:32:49 +02:00
</pre>
</div>
<p>
First identify the plant for APA represented by a flexible element:
</p>
2021-04-19 16:32:49 +02:00
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'3dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'flexible'</span>);
Gf = linearize(mdl, io, 0.0, options);
Gf.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gf.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
2021-04-19 16:32:49 +02:00
</pre>
</div>
<div id="orgcc0638d" class="figure">
<p><img src="figs/nano_hexapod_effect_flexible_apa.png" alt="nano_hexapod_effect_flexible_apa.png" />
</p>
<p><span class="figure-number">Figure 2: </span>Comparison of the plants from actuator to associated strut encoder when the APA are modelled with a 2DoF system of with a flexible one</p>
</div>
2021-04-19 16:32:49 +02:00
<div class="question" id="orgbb86739">
<p>
The first resonance is strange when using the flexible APA model (Figure <a href="#orgcc0638d">2</a>).
Moreover the system is unstable.
Otherwise, the 2DoF model matches quite well the flexible model considering its simplicity.
</p>
2021-04-19 16:32:49 +02:00
</div>
</div>
</div>
2021-04-19 16:32:49 +02:00
<div id="outline-container-orgb2e1d3b" class="outline-3">
<h3 id="orgb2e1d3b"><span class="section-number-3">1.4</span> Nano Hexapod - Number of DoF</h3>
<div class="outline-text-3" id="text-1-4">
<p>
<a id="org675547a"></a>
</p>
2021-04-19 16:32:49 +02:00
<p>
In this section, we wish to see how the configuration of each element changes the number of the states of the obtained system.
</p>
2021-04-19 16:32:49 +02:00
<p>
The most minimalist model is the following:
</p>
2021-04-19 16:32:49 +02:00
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'3dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'2dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>);
G = linearize(mdl, io, 0.0, options);
2021-04-19 16:32:49 +02:00
</pre>
</div>
<pre class="example">
There are 24 states.
</pre>
<p>
These states are summarized on table <a href="#org3695be1">1</a>.
</p>
2021-04-19 16:32:49 +02:00
<table id="org3695be1" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 1:</span> Number of states for the minimalist model</caption>
2021-04-19 16:32:49 +02:00
<colgroup>
<col class="org-left" />
2021-04-19 16:32:49 +02:00
<col class="org-right" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">Element</th>
<th scope="col" class="org-right">States</th>
</tr>
</thead>
2021-04-19 16:32:49 +02:00
<tbody>
<tr>
<td class="org-left">Struts</td>
<td class="org-right">2*6</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-left">Top Plate</td>
<td class="org-right">12</td>
2021-04-19 16:32:49 +02:00
</tr>
</tbody>
<tbody>
2021-04-19 16:32:49 +02:00
<tr>
<td class="org-left">Total:</td>
<td class="org-right">24</td>
2021-04-19 16:32:49 +02:00
</tr>
</tbody>
</table>
<p>
If we add axial stiffness on the top joints, we should add 2 states for each struts.
2021-04-19 16:32:49 +02:00
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'2dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>);
G = linearize(mdl, io, 0.0, options);
</pre>
</div>
<pre class="example">
There are 36 states.
</pre>
2021-04-19 16:32:49 +02:00
<p>
If we add torsional stiffness on the bottom joints, we should again add 2 states for each struts.
2021-04-19 16:32:49 +02:00
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'3dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>);
G = linearize(mdl, io, 0.0, options);
2021-04-19 16:32:49 +02:00
</pre>
</div>
<pre class="example">
There are 48 states.
</pre>
2021-04-19 16:32:49 +02:00
<p>
Finally, if we add axial stiffness on the bottom joint, we should add 2 states for each struts.
2021-04-19 16:32:49 +02:00
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>);
G = linearize(mdl, io, 0.0, options);
2021-04-19 16:32:49 +02:00
</pre>
</div>
<pre class="example">
There are 60 states.
</pre>
<div class="important" id="org86d0d8a">
<p>
Obtained number of states is very comprehensible.
Depending on the physical effects we want to model, we therefore know how many states are added when configuring the model.
</p>
</div>
</div>
</div>
<div id="outline-container-orgcd30976" class="outline-3">
<h3 id="orgcd30976"><span class="section-number-3">1.5</span> Direct Velocity Feedback Plant</h3>
<div class="outline-text-3" id="text-1-5">
<p>
<a id="orgd0e4a36"></a>
</p>
<p>
The transfer function from actuator forces \(\tau_i\) to the encoder measurements \(\mathcal{L}_i\) is now identified both when the encoders are fixed to the struts.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'nano_hexapod'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/F'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/D'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative displacements [m]</span>
n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'3dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>);
Gdvf = linearize(mdl, io, 0.0, options);
</pre>
</div>
<p>
The DC gain from actuator to relative motion sensor should be equal to (for the 2dof APA):
\[ \frac{1}{k + k_a + kk_a/k_e} \]
</p>
2021-04-19 16:32:49 +02:00
<p>
Which is equal to:
</p>
<pre class="example">
DCgain = 1.87e-08 [m/N]
</pre>
<p>
Let&rsquo;s verify that by looking at the DC gain of the \(6 \times 6\) DVF plant in Table <a href="#orgb62153c">2</a>.
</p>
<table id="orgb62153c" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 2:</span> DC gain of the DVF plant</caption>
2021-04-19 16:32:49 +02:00
<colgroup>
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
</colgroup>
<tbody>
<tr>
<td class="org-right">1.8617e-08</td>
<td class="org-right">-1.0408e-10</td>
<td class="org-right">1.3034e-10</td>
<td class="org-right">3.2559e-11</td>
<td class="org-right">-1.1188e-10</td>
<td class="org-right">9.0385e-11</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-right">-5.1839e-11</td>
<td class="org-right">1.8593e-08</td>
<td class="org-right">-4.4868e-11</td>
<td class="org-right">8.016e-11</td>
<td class="org-right">4.3558e-11</td>
<td class="org-right">-1.1164e-10</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-right">5.1963e-12</td>
<td class="org-right">-6.9001e-12</td>
<td class="org-right">1.8564e-08</td>
<td class="org-right">3.0844e-11</td>
<td class="org-right">4.0097e-11</td>
<td class="org-right">-3.4387e-11</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-right">1.9359e-11</td>
<td class="org-right">1.7432e-10</td>
<td class="org-right">-5.0928e-11</td>
<td class="org-right">1.855e-08</td>
<td class="org-right">1.6406e-10</td>
<td class="org-right">4.5757e-12</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-right">-2.1185e-11</td>
<td class="org-right">2.1724e-10</td>
<td class="org-right">1.5333e-12</td>
<td class="org-right">-8.802e-11</td>
<td class="org-right">1.8803e-08</td>
<td class="org-right">-4.6946e-11</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-right">-1.1728e-11</td>
<td class="org-right">-5.7682e-11</td>
<td class="org-right">1.6213e-10</td>
<td class="org-right">2.1934e-12</td>
<td class="org-right">-1.6237e-10</td>
<td class="org-right">1.8715e-08</td>
2021-04-19 16:32:49 +02:00
</tr>
</tbody>
</table>
<p>
And the bode plot of the DVF plant is shown in Figure <a href="#orgc57a8a2">3</a>.
2021-04-19 16:32:49 +02:00
</p>
<div id="orgc57a8a2" class="figure">
<p><img src="figs/nano_hexapod_struts_2dof_dvf_plant.png" alt="nano_hexapod_struts_2dof_dvf_plant.png" />
2021-04-19 16:32:49 +02:00
</p>
<p><span class="figure-number">Figure 3: </span>Bode plot of the transfer functions from actuator forces \(\tau_i\) to relative motion sensors attached to the struts \(\mathcal{L}_i\). Diagonal terms are shown in blue, and off-diagonal terms in black.</p>
</div>
2021-04-19 16:32:49 +02:00
</div>
</div>
<div id="outline-container-orgdefb22f" class="outline-3">
<h3 id="orgdefb22f"><span class="section-number-3">1.6</span> Integral Force Feedback Plant</h3>
<div class="outline-text-3" id="text-1-6">
<p>
<a id="org6a3fac8"></a>
</p>
<p>
The transfer function from actuators to force sensors is identified.
</p>
2021-04-19 16:32:49 +02:00
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'nano_hexapod'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/F'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Inputs</span>
io(io_i) = linio([mdl, <span class="org-string">'/Fm'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Force Sensors</span>
2021-04-19 16:32:49 +02:00
n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'3dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>);
2021-04-19 16:32:49 +02:00
Giff = linearize(mdl, io, 0.0, options);
2021-04-19 16:32:49 +02:00
</pre>
</div>
<p>
This is corresponding to the dynamics for the Integral Force Feedback (IFF) control strategy.
</p>
2021-04-19 16:32:49 +02:00
<p>
The bode plot is shown in Figure <a href="#org07c51e9">4</a>.
</p>
<div id="org07c51e9" class="figure">
<p><img src="figs/nano_hexapod_struts_2dof_iff_plant.png" alt="nano_hexapod_struts_2dof_iff_plant.png" />
</p>
<p><span class="figure-number">Figure 4: </span>Bode plot of the transfer functions from actuator forces \(\tau_i\) to force sensors \(F_{m,i}\). Diagonal terms are shown in blue, and off-diagonal terms in black.</p>
2021-04-19 16:32:49 +02:00
</div>
</div>
</div>
<div id="outline-container-orgde9c23b" class="outline-3">
<h3 id="orgde9c23b"><span class="section-number-3">1.7</span> Decentralized Plant - Cartesian coordinates</h3>
<div class="outline-text-3" id="text-1-7">
<p>
<a id="org57dae9c"></a>
</p>
<p>
Consider the plant shown in Figure <a href="#org936dad1">5</a> with:
</p>
<ul class="org-ul">
<li>\(\tau\) the 6 input forces (APA)</li>
<li>\(d\mathcal{L}\) the relative motion sensor outputs (encoders)</li>
<li>\(\mathcal{X}\) the motion of the top platform measured with &ldquo;perfect&rdquo; 6-dof sensor</li>
<li>\(J_a\) and \(J_s\) the Jacobians for the actuators and sensors</li>
</ul>
<div id="org936dad1" class="figure">
<p><img src="figs/nano_hexapod_decentralized_schematic.png" alt="nano_hexapod_decentralized_schematic.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Plant in the cartesian Frame</p>
</div>
</div>
<div id="outline-container-org435b7fd" class="outline-4">
<h4 id="org435b7fd"><span class="section-number-4">1.7.1</span> Verification of the Sensor Jacobian</h4>
<div class="outline-text-4" id="text-1-7-1">
<p>
The &ldquo;perfect&rdquo; sensor output \(\mathcal{X}\) is used to verify that the sensor Jacobian is working correctly both when the encoders are fixed to the struts and to the plates.
</p>
<p>
Let&rsquo;s then identify the plant for both configuration, and compare the transfer functions from \(\mathcal{F}\) to \(d\mathcal{X}\) and to \(\mathcal{X}\).
</p>
2021-04-19 16:32:49 +02:00
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'nano_hexapod'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/F'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Inputs</span>
io(io_i) = linio([mdl, <span class="org-string">'/D'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Motion Outputs</span>
io(io_i) = linio([mdl, <span class="org-string">'/X'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Motion Outputs</span>
</pre>
</div>
2021-04-19 16:32:49 +02:00
<p>
Start when the encoders are fixed on the struts.
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'3dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>, ...
<span class="org-string">'MO_B'</span>, 150e<span class="org-type">-</span>3);
Gs = linearize(mdl, io, 0.0, options);
Gs.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gs.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>, ...
<span class="org-string">'Dx'</span>, <span class="org-string">'Dy'</span>, <span class="org-string">'Dz'</span>, <span class="org-string">'Rx'</span>, <span class="org-string">'Ry'</span>, <span class="org-string">'Rz'</span>};
<span class="org-comment">% Cartesian plant using the Jacobians</span>
Gsc = inv(n_hexapod.geometry.Js)<span class="org-type">*</span>Gs({<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>}, {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>})<span class="org-type">*</span>inv(n_hexapod.geometry.J)<span class="org-type">'</span>;
<span class="org-comment">% Cartesian plant using the perfect sensor</span>
Gsp = <span class="org-type">-</span>Gs({<span class="org-string">'Dx'</span>, <span class="org-string">'Dy'</span>, <span class="org-string">'Dz'</span>, <span class="org-string">'Rx'</span>, <span class="org-string">'Ry'</span>, <span class="org-string">'Rz'</span>}, {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>})<span class="org-type">*</span>inv(n_hexapod.geometry.J)<span class="org-type">'</span>;
2021-04-19 16:32:49 +02:00
</pre>
</div>
<p>
The diagonal elements of the plant are shown in Figure <a href="#orgb411f26">6</a>.
</p>
<div id="orgb411f26" class="figure">
<p><img src="figs/nano_hexapod_comp_cartesian_plants_struts.png" alt="nano_hexapod_comp_cartesian_plants_struts.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Bode plot of the diagonal elements of the decentralized (cartesian) plant when using the sensor Jacobian (solid) and when using &ldquo;perfect&rdquo; 6dof sensor (dashed). The encoders are fixed on the struts.</p>
</div>
<p>
The same if performed when the encoders are fixed to the plates.
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'3dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'plates'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>, ...
<span class="org-string">'MO_B'</span>, 150e<span class="org-type">-</span>3);
Gp = linearize(mdl, io, 0.0, options);
Gp.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gp.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>, ...
<span class="org-string">'Dx'</span>, <span class="org-string">'Dy'</span>, <span class="org-string">'Dz'</span>, <span class="org-string">'Rx'</span>, <span class="org-string">'Ry'</span>, <span class="org-string">'Rz'</span>};
<span class="org-comment">% Cartesian plant using the Jacobians</span>
Gpc = inv(n_hexapod.geometry.Js)<span class="org-type">*</span>Gp({<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>}, {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>})<span class="org-type">*</span>inv(n_hexapod.geometry.J)<span class="org-type">'</span>;
<span class="org-comment">% Cartesian plant using the perfect sensor</span>
Gpp = <span class="org-type">-</span>Gp({<span class="org-string">'Dx'</span>, <span class="org-string">'Dy'</span>, <span class="org-string">'Dz'</span>, <span class="org-string">'Rx'</span>, <span class="org-string">'Ry'</span>, <span class="org-string">'Rz'</span>}, {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>})<span class="org-type">*</span>inv(n_hexapod.geometry.J)<span class="org-type">'</span>;
2021-04-19 16:32:49 +02:00
</pre>
</div>
<p>
The obtained bode plots are shown in Figure <a href="#org0f87318">7</a>.
</p>
2021-04-19 16:32:49 +02:00
<div id="org0f87318" class="figure">
<p><img src="figs/nano_hexapod_comp_cartesian_plants_plates.png" alt="nano_hexapod_comp_cartesian_plants_plates.png" />
</p>
<p><span class="figure-number">Figure 7: </span>Bode plot of the diagonal elements of the decentralized (cartesian) plant when using the sensor Jacobian (solid) and when using &ldquo;perfect&rdquo; 6dof sensor (dashed). The encoders are fixed on the plates.</p>
</div>
2021-04-19 16:32:49 +02:00
<div class="important" id="org041f76c">
2021-04-19 16:32:49 +02:00
<p>
The Jacobian for the encoders is working properly both when the encoders are fixed to the plates or to the struts.
2021-04-19 16:32:49 +02:00
</p>
<p>
However, then the encoders are fixed to the struts, there is a mismatch between the estimated motion and the measured motion above 100Hz due to a complex conjugate zero.
</p>
2021-04-19 16:32:49 +02:00
</div>
</div>
</div>
2021-04-19 16:32:49 +02:00
<div id="outline-container-org664eab9" class="outline-4">
<h4 id="org664eab9"><span class="section-number-4">1.7.2</span> Comparison of the decentralized plants</h4>
<div class="outline-text-4" id="text-1-7-2">
<p>
The decentralized plants are now compared whether the encoders are fixed on the struts or on the plates in Figure <a href="#org34e7dd6">8</a>.
</p>
2021-04-19 16:32:49 +02:00
<div id="org34e7dd6" class="figure">
<p><img src="figs/nano_hexapod_cartesian_plant_encoder_comp.png" alt="nano_hexapod_cartesian_plant_encoder_comp.png" />
</p>
<p><span class="figure-number">Figure 8: </span>Bode plot of the &ldquo;cartesian&rdquo; plant (transfer function from \(\mathcal{F}\) to \(d\mathcal{X}\)) when the encoders are fixed on the struts (solid) and on the plates (dashed)</p>
</div>
</div>
</div>
</div>
2021-04-19 16:32:49 +02:00
<div id="outline-container-org6cf8089" class="outline-3">
<h3 id="org6cf8089"><span class="section-number-3">1.8</span> Decentralized Plant - Decoupling at the Center of Stiffness</h3>
<div class="outline-text-3" id="text-1-8">
<p>
<a id="org739aa2c"></a>
</p>
2021-04-19 16:32:49 +02:00
</div>
<div id="outline-container-org8c0186d" class="outline-4">
<h4 id="org8c0186d"><span class="section-number-4">1.8.1</span> Center of Stiffness</h4>
<div class="outline-text-4" id="text-1-8-1">
2021-04-19 16:32:49 +02:00
<p>
<a id="org2cf36ac"></a>
2021-04-19 16:32:49 +02:00
</p>
<p>
Let&rsquo;s define some parameters that will be used for the computation of the stiffness matrix:
</p>
<div class="org-src-container">
<pre class="src src-matlab">si = n_hexapod.geometry.si; <span class="org-comment">% Orientation of struts</span>
bi = n_hexapod.geometry.Fb; <span class="org-comment">% Location of bi w.r.t. {F}</span>
ki = ones(1,6); <span class="org-comment">% Normalized strut stiffness</span>
2021-04-19 16:32:49 +02:00
</pre>
</div>
2021-04-19 16:32:49 +02:00
<p>
In order to find is the Center of Stiffness (CoK) exists, we have to verify is the following is diagonal:
2021-04-19 16:32:49 +02:00
</p>
<div class="org-src-container">
<pre class="src src-matlab">ki<span class="org-type">.*</span>si<span class="org-type">*</span>si<span class="org-type">'</span>
</pre>
</div>
2021-04-19 16:32:49 +02:00
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
</colgroup>
<tbody>
<tr>
<td class="org-right">1.8977</td>
<td class="org-right">2.4659e-17</td>
<td class="org-right">5.1838e-19</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-right">2.4659e-17</td>
<td class="org-right">1.8977</td>
<td class="org-right">-2.3143e-05</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-right">5.1838e-19</td>
<td class="org-right">-2.3143e-05</td>
<td class="org-right">2.2046</td>
2021-04-19 16:32:49 +02:00
</tr>
</tbody>
</table>
<p>
And we can find the location of the CoK with respect to {F}:
</p>
<div class="org-src-container">
<pre class="src src-matlab">OkX = (ki<span class="org-type">.*</span>cross(bi, si)<span class="org-type">*</span>si<span class="org-type">'</span>)<span class="org-type">/</span>(ki<span class="org-type">.*</span>si<span class="org-type">*</span>si<span class="org-type">'</span>);
Ok = [OkX(3,2);OkX(1,3);OkX(2,1)]
</pre>
</div>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
2021-04-19 16:32:49 +02:00
<colgroup>
<col class="org-right" />
</colgroup>
<tbody>
2021-04-19 16:32:49 +02:00
<tr>
<td class="org-right">-1.7444e-18</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-right">2.1511e-06</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-right">0.052707</td>
2021-04-19 16:32:49 +02:00
</tr>
</tbody>
</table>
<p>
The &ldquo;center of stiffness&rdquo; is therefore 52.7mm above the bottom platform {F} frame.
2021-04-19 16:32:49 +02:00
</p>
<p>
Let&rsquo;s initialize the hexapod with frame {A} and {B} at the CoK:
2021-04-19 16:32:49 +02:00
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'3dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>, ...
<span class="org-string">'MO_B'</span>, Ok(3)<span class="org-type">-</span>95e<span class="org-type">-</span>3);
</pre>
2021-04-19 16:32:49 +02:00
</div>
<p>
And the (normalized) stiffness matrix is computed as follows:
2021-04-19 16:32:49 +02:00
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod.geometry.J<span class="org-type">'*</span>diag(ki)<span class="org-type">*</span>n_hexapod.geometry.J
2021-04-19 16:32:49 +02:00
</pre>
</div>
<table id="org2e66ef4" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 3:</span> Normalized Stiffness Matrix - Center of Stiffness</caption>
2021-04-19 16:32:49 +02:00
<colgroup>
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
</colgroup>
<tbody>
<tr>
<td class="org-right">1.8977</td>
<td class="org-right">0</td>
<td class="org-right">0</td>
<td class="org-right">0</td>
<td class="org-right">-2.0817e-17</td>
<td class="org-right">-1.5311e-06</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-right">0</td>
<td class="org-right">1.8977</td>
<td class="org-right">-2.3143e-05</td>
<td class="org-right">4.175e-06</td>
<td class="org-right">0</td>
<td class="org-right">0</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-right">0</td>
<td class="org-right">-2.3143e-05</td>
<td class="org-right">2.2046</td>
<td class="org-right">4.7422e-06</td>
<td class="org-right">0</td>
<td class="org-right">0</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-right">0</td>
<td class="org-right">4.175e-06</td>
<td class="org-right">4.7422e-06</td>
<td class="org-right">0.012594</td>
<td class="org-right">2.1684e-19</td>
<td class="org-right">-8.6736e-19</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-right">-1.8521e-17</td>
<td class="org-right">0</td>
<td class="org-right">0</td>
<td class="org-right">0</td>
<td class="org-right">0.012594</td>
<td class="org-right">-9.3183e-08</td>
2021-04-19 16:32:49 +02:00
</tr>
<tr>
<td class="org-right">-1.5311e-06</td>
<td class="org-right">-6.9389e-18</td>
<td class="org-right">2.7756e-17</td>
<td class="org-right">-8.6736e-19</td>
<td class="org-right">-9.3183e-08</td>
<td class="org-right">0.043362</td>
2021-04-19 16:32:49 +02:00
</tr>
</tbody>
</table>
<p>
And we indeed obtain a diagonal stiffness matrix.
</p>
2021-04-19 16:32:49 +02:00
</div>
</div>
<div id="outline-container-org58e2a5b" class="outline-4">
<h4 id="org58e2a5b"><span class="section-number-4">1.8.2</span> Obtained plant</h4>
<div class="outline-text-4" id="text-1-8-2">
<p>
Let&rsquo;s identify the transfer function from \(\tau\) to \(d\mathcal{L}\) and from \(\tau\) to \(\mathcal{X}\).
</p>
2021-04-19 16:32:49 +02:00
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'nano_hexapod'</span>;
2021-04-19 16:32:49 +02:00
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/F'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Inputs</span>
io(io_i) = linio([mdl, <span class="org-string">'/D'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Motion Outputs</span>
io(io_i) = linio([mdl, <span class="org-string">'/X'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% 6DoF perfect measurement</span>
2021-04-19 16:32:49 +02:00
G = linearize(mdl, io, 0.0, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>, ...
<span class="org-string">'Dx'</span>, <span class="org-string">'Dy'</span>, <span class="org-string">'Dz'</span>, <span class="org-string">'Rx'</span>, <span class="org-string">'Ry'</span>, <span class="org-string">'Rz'</span>};
2021-04-19 16:32:49 +02:00
</pre>
</div>
<p>
Then use the Jacobian matrices to obtain the &ldquo;cartesian&rdquo; centralized plant.
</p>
2021-04-19 16:32:49 +02:00
<div class="org-src-container">
<pre class="src src-matlab">Gc = inv(n_hexapod.geometry.J)<span class="org-type">*</span>...
G({<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>}, {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>})<span class="org-type">*</span>...
inv(n_hexapod.geometry.J<span class="org-type">'</span>);
2021-04-19 16:32:49 +02:00
</pre>
</div>
<p>
The DC gain of the obtained plant is shown in Table <a href="#orga2e492a">4</a>.
</p>
<table id="orga2e492a" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 4:</span> DC gain of the centralized plant at the center of stiffness</caption>
<colgroup>
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
</colgroup>
<tbody>
<tr>
<td class="org-right">9.8602e-09</td>
<td class="org-right">7.8692e-11</td>
<td class="org-right">1.4426e-11</td>
<td class="org-right">-2.663e-10</td>
<td class="org-right">2.8e-10</td>
<td class="org-right">-4.7559e-11</td>
</tr>
<tr>
<td class="org-right">8.457e-11</td>
<td class="org-right">9.8788e-09</td>
<td class="org-right">-2.4002e-11</td>
<td class="org-right">-2.9502e-11</td>
<td class="org-right">-1.3262e-10</td>
<td class="org-right">-8.7346e-11</td>
</tr>
<tr>
<td class="org-right">-4.3244e-11</td>
<td class="org-right">2.4075e-13</td>
<td class="org-right">8.4775e-09</td>
<td class="org-right">1.1442e-11</td>
<td class="org-right">-2.5809e-10</td>
<td class="org-right">2.8796e-11</td>
</tr>
<tr>
<td class="org-right">-1.8326e-09</td>
<td class="org-right">-9.318e-10</td>
<td class="org-right">6.8188e-10</td>
<td class="org-right">1.4697e-06</td>
<td class="org-right">5.5936e-09</td>
<td class="org-right">8.7632e-10</td>
</tr>
<tr>
<td class="org-right">4.6906e-10</td>
<td class="org-right">1.5911e-09</td>
<td class="org-right">1.6989e-10</td>
<td class="org-right">-5.223e-09</td>
<td class="org-right">1.4729e-06</td>
<td class="org-right">-2.6059e-10</td>
</tr>
<tr>
<td class="org-right">-6.5754e-11</td>
<td class="org-right">-3.0408e-12</td>
<td class="org-right">5.394e-11</td>
<td class="org-right">-1.0917e-10</td>
<td class="org-right">6.9479e-10</td>
<td class="org-right">4.2979e-07</td>
</tr>
</tbody>
</table>
<p>
As the rotations and translations have very different gains, we normalize each motion to one.
</p>
<div class="org-src-container">
<pre class="src src-matlab">Gc = diag(1<span class="org-type">./</span>diag(dcgain(Gc)))<span class="org-type">*</span>Gc;
</pre>
</div>
<p>
The diagonal and off-diagonal elements are shown in Figure <a href="#org8fa550f">9</a>, and we can see good decoupling at low frequency.
</p>
<div id="org8fa550f" class="figure">
<p><img src="figs/nano_hexapod_diagonal_plant_cok.png" alt="nano_hexapod_diagonal_plant_cok.png" />
</p>
<p><span class="figure-number">Figure 9: </span>Diagonal and off-diagonal elements of the (normalized) decentralized plant with the Jacobians estimated at the &ldquo;center of stiffness&rdquo;</p>
</div>
<div class="important" id="org8ee6347">
<p>
The Jacobian matrices can be used to decoupled the plant at low frequency.
</p>
</div>
</div>
</div>
</div>
<div id="outline-container-orgd60e2b2" class="outline-3">
<h3 id="orgd60e2b2"><span class="section-number-3">1.9</span> Stiffness matrix</h3>
<div class="outline-text-3" id="text-1-9">
<p>
<a id="org71036b9"></a>
</p>
<p>
The stiffness matrix of the nano-hexapod describes its induced static displacement/rotation when a force/torque is applied on its top platform.
The location of the applied force/torque and the expressed displacement/rotation can be defined as wanted.
Such location (or frame) is then used for the computation of the Jacobian which in turns is used to compute the stiffness matrix.
</p>
</div>
<div id="outline-container-org97c57ea" class="outline-4">
<h4 id="org97c57ea"><span class="section-number-4">1.9.1</span> Compute the theoretical stiffness of the nano-hexapod</h4>
<div class="outline-text-4" id="text-1-9-1">
<p>
Neglecting stiffness of the joints, we have:
\[ K = J^t \mathcal{K} J \]
where \(\mathcal{K}\) is a diagonal 6x6 matrix with axial stiffness of the struts on the diagonal.
</p>
<p>
Let&rsquo;s note the axial stiffness of the APA:
\[ k_{\text{APA}} = k + \frac{k_e k_a}{k_e + k_a} \]
</p>
<p>
Them axial stiffness of the struts \(k_s\):
\[ k_s = \frac{k_z k_{\text{APA}}}{k_z + 2 k_{\text{APA}}} \]
with \(k_z\) the axial stiffness of the flexible joints.
</p>
<p>
Let&rsquo;s initialize the nano-hexapod.
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>);
</pre>
</div>
<p>
The axial stiffness of the joints and stiffnesses of the 2-DoF actuators are defined below.
</p>
<div class="org-src-container">
<pre class="src src-matlab">k = n_hexapod.actuator.k(1);
ke = n_hexapod.actuator.ke(1);
ka = n_hexapod.actuator.ka(1);
kz = n_hexapod.flex_top.kz(1); <span class="org-comment">% Joint's axial stiffness [m/N]</span>
</pre>
</div>
<p>
The total axial stiffness of the APA is:
</p>
<div class="org-src-container">
<pre class="src src-matlab">kAPA = k <span class="org-type">+</span> ke<span class="org-type">*</span>ka<span class="org-type">/</span>(ke <span class="org-type">+</span> ka);
</pre>
</div>
<pre class="example">
kAPA = 1.799e+06 [N/m]
</pre>
<p>
And the total axial stiffness of the struts is:
</p>
<div class="org-src-container">
<pre class="src src-matlab">ks = kz<span class="org-type">*</span>kAPA<span class="org-type">/</span>(kz <span class="org-type">+</span> 2<span class="org-type">*</span>kAPA);
</pre>
</div>
<pre class="example">
ks = 1.737e+06 [N/m]
</pre>
<div class="important" id="orgc54f51b">
<p>
We can see that the axial stiffness of the flexible joint as little impact on the total axial stiffness of the struts.
</p>
</div>
<p>
Let&rsquo;s now compute the stiffness matrix corresponding to an hexapod with perfect joints and the above computed axial strut stiffness:
</p>
<div class="org-src-container">
<pre class="src src-matlab">Ks = n_hexapod.geometry.J<span class="org-type">'*</span>(ks<span class="org-type">*</span>eye(6))<span class="org-type">*</span>n_hexapod.geometry.J;
</pre>
</div>
<p>
And the compliance matrix can be computed as the inverse of the stiffness matrix.
</p>
<div class="org-src-container">
<pre class="src src-matlab">C = inv(Ks);
</pre>
</div>
<p>
The obtained compliance matrix is shown in Table <a href="#orgd518990">5</a>.
</p>
<table id="orgd518990" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 5:</span> Compliance Matrix - Perfect Joints</caption>
<colgroup>
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
</colgroup>
<tbody>
<tr>
<td class="org-right">1.9938e-06</td>
<td class="org-right">-2.3138e-22</td>
<td class="org-right">3.3403e-23</td>
<td class="org-right">1.0202e-21</td>
<td class="org-right">8.7906e-06</td>
<td class="org-right">2.9603e-11</td>
</tr>
<tr>
<td class="org-right">-3.1875e-23</td>
<td class="org-right">1.9938e-06</td>
<td class="org-right">2.2094e-11</td>
<td class="org-right">-8.7909e-06</td>
<td class="org-right">-1.6576e-22</td>
<td class="org-right">-3.5622e-28</td>
</tr>
<tr>
<td class="org-right">6.6811e-23</td>
<td class="org-right">2.2094e-11</td>
<td class="org-right">2.6115e-07</td>
<td class="org-right">-9.8337e-11</td>
<td class="org-right">3.4744e-22</td>
<td class="org-right">7.4663e-28</td>
</tr>
<tr>
<td class="org-right">1.4054e-22</td>
<td class="org-right">-8.7909e-06</td>
<td class="org-right">-9.8337e-11</td>
<td class="org-right">4.5715e-05</td>
<td class="org-right">7.3086e-22</td>
<td class="org-right">1.5706e-27</td>
</tr>
<tr>
<td class="org-right">8.7906e-06</td>
<td class="org-right">-1.0202e-21</td>
<td class="org-right">1.7371e-22</td>
<td class="org-right">4.498e-21</td>
<td class="org-right">4.5714e-05</td>
<td class="org-right">9.8237e-11</td>
</tr>
<tr>
<td class="org-right">2.9603e-11</td>
<td class="org-right">-1.9261e-22</td>
<td class="org-right">-1.7611e-27</td>
<td class="org-right">8.4925e-22</td>
<td class="org-right">9.8237e-11</td>
<td class="org-right">1.3277e-05</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="outline-container-orgc388f2b" class="outline-4">
<h4 id="orgc388f2b"><span class="section-number-4">1.9.2</span> Comparison with Simscape Model</h4>
<div class="outline-text-4" id="text-1-9-2">
<p>
Let&rsquo;s now identify the compliance matrix using Simscape.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'nano_hexapod'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Fe'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% External forces [N, Nm/rad]</span>
io(io_i) = linio([mdl, <span class="org-string">'/X'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Induced motion [m, rad]</span>
G = linearize(mdl, io, 0.0, options);
</pre>
</div>
<p>
The DC gain of the identified plant is therefore the compliance matrix of the nano-hexapod.
It takes into account the bending and torsional stiffness of the flexible joints.
</p>
<p>
The obtained compliance matrix is shown in Table <a href="#orge9fdbd7">6</a>.
</p>
<table id="orge9fdbd7" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 6:</span> Compliance Matrix - Estimated from Simscape</caption>
<colgroup>
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
</colgroup>
<tbody>
<tr>
<td class="org-right">1.9863e-06</td>
<td class="org-right">2.4683e-08</td>
<td class="org-right">2.2859e-09</td>
<td class="org-right">-6.4768e-08</td>
<td class="org-right">8.7307e-06</td>
<td class="org-right">3.2754e-10</td>
</tr>
<tr>
<td class="org-right">-3.693e-09</td>
<td class="org-right">1.9663e-06</td>
<td class="org-right">-7.4503e-09</td>
<td class="org-right">-8.615e-06</td>
<td class="org-right">-6.7926e-08</td>
<td class="org-right">-2.0193e-08</td>
</tr>
<tr>
<td class="org-right">-3.5525e-09</td>
<td class="org-right">-8.8671e-10</td>
<td class="org-right">2.6042e-07</td>
<td class="org-right">4.7504e-09</td>
<td class="org-right">-9.9677e-09</td>
<td class="org-right">1.7242e-10</td>
</tr>
<tr>
<td class="org-right">2.1133e-08</td>
<td class="org-right">-8.6554e-06</td>
<td class="org-right">3.2841e-08</td>
<td class="org-right">4.4849e-05</td>
<td class="org-right">3.0873e-07</td>
<td class="org-right">8.1525e-08</td>
</tr>
<tr>
<td class="org-right">8.7375e-06</td>
<td class="org-right">9.9165e-08</td>
<td class="org-right">8.135e-09</td>
<td class="org-right">-2.5208e-07</td>
<td class="org-right">4.5331e-05</td>
<td class="org-right">3.0602e-09</td>
</tr>
<tr>
<td class="org-right">6.1611e-09</td>
<td class="org-right">6.1733e-09</td>
<td class="org-right">2.6778e-09</td>
<td class="org-right">-3.3188e-08</td>
<td class="org-right">3.3887e-08</td>
<td class="org-right">1.3212e-05</td>
</tr>
</tbody>
</table>
<div class="important" id="orga2489c7">
<p>
The bending and torsional stiffness of the flexible joints induces a lot of coupling between forces/torques applied to the to platform to its displacement/rotation.
It can be seen by comparison the compliance matrices in Tables <a href="#orgd518990">5</a> and <a href="#orge9fdbd7">6</a>.
</p>
</div>
</div>
</div>
</div>
</div>
<div id="outline-container-org2fc54dd" class="outline-2">
<h2 id="org2fc54dd"><span class="section-number-2">2</span> Active Damping using Integral Force Feedback</h2>
<div class="outline-text-2" id="text-2">
<p>
<a id="org2b71e9b"></a>
</p>
<p>
In this section <b>Integral Force Feedback</b> (IFF) strategy is used to damp the nano-hexapod resonances.
</p>
<p>
It is structured as follows:
</p>
<ul class="org-ul">
<li>Section <a href="#orgefb596b">2.1</a>: the IFF plant is identified</li>
<li>Section <a href="#org73c92c6">2.2</a>: the optimal control gain is identified using the Root Locus plot</li>
<li>Section <a href="#orga004b43">2.3</a>: the IFF is applied, and the effect on the damped plant is identified and compared with the un-damped one</li>
<li>Section <a href="#org4218d2b">2.4</a>: the IFF is applied, and the effect on the compliance is identified</li>
</ul>
</div>
<div id="outline-container-org662836c" class="outline-3">
<h3 id="org662836c"><span class="section-number-3">2.1</span> Plant Identification</h3>
<div class="outline-text-3" id="text-2-1">
<p>
<a id="orgefb596b"></a>
</p>
<p>
The nano-hexapod is initialized as usual.
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>);
</pre>
</div>
<p>
The transfer function from actuator inputs to force sensors outputs is identified.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'nano_hexapod'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/F'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Inputs</span>
io(io_i) = linio([mdl, <span class="org-string">'/Fm'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Force Sensors</span>
Giff = linearize(mdl, io, 0.0, options);
Giff.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Giff.OutputName = {<span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
</pre>
</div>
<p>
Its bode plot is shown in Figure
</p>
<div id="org04c9b24" class="figure">
<p><img src="figs/nano_hexapod_iff_plant_bode_plot.png" alt="nano_hexapod_iff_plant_bode_plot.png" />
</p>
<p><span class="figure-number">Figure 10: </span>Integral Force Feedback plant</p>
</div>
</div>
</div>
<div id="outline-container-org639a7fd" class="outline-3">
<h3 id="org639a7fd"><span class="section-number-3">2.2</span> Root Locus</h3>
<div class="outline-text-3" id="text-2-2">
<p>
<a id="org73c92c6"></a>
</p>
<p>
The controller is a diagonal (i.e. decentralized) controller with simple low pass filters (i.e. pseudo integrators) on the diagonal:
</p>
\begin{equation}
K_{\text{IFF}} = \frac{g}{s + \omega_c} \bm{I}_{6 \times 6}
\end{equation}
<p>
The value of \(\omega_c\) has quite a large impact both on the attainable damping and on the compliance degradation at low frequency.
</p>
<p>
It is here chosen to have quite a large \(\omega_c\) in order to not modify the plant at low frequency.
</p>
<div class="org-src-container">
<pre class="src src-matlab">wc = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>20;
</pre>
</div>
<p>
The obtained Root Locus is shown in Figure <a href="#orgbabd5ad">11</a>.
The control gain chosen for future plots is shown by the red crosses.
</p>
<div id="orgbabd5ad" class="figure">
<p><img src="figs/nano_hexapod_iff_root_locus.png" alt="nano_hexapod_iff_root_locus.png" />
</p>
<p><span class="figure-number">Figure 11: </span>Root locus for the decentralized IFF control strategy</p>
</div>
<p>
The obtained controller is then:
</p>
<div class="org-src-container">
<pre class="src src-matlab">Kiff = 1.5e4<span class="org-type">/</span>(s <span class="org-type">+</span> 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>20)<span class="org-type">*</span>eye(6); <span class="org-comment">% IFF Controller</span>
</pre>
</div>
<p>
The corresponding loop gain of the diagonal terms are shown in Figure <a href="#orgf2697cd">12</a>.
It is shown that the loop gain is quite large around resonances (which allows to add lots of damping) and less than one at low frequency thanks to the large value of \(\omega_c\).
</p>
<div id="orgf2697cd" class="figure">
<p><img src="figs/nano_hexapod_iff_loop_gain.png" alt="nano_hexapod_iff_loop_gain.png" />
</p>
<p><span class="figure-number">Figure 12: </span>Loop gain of the diagonal terms \(G(i,i) \cdot K_{\text{IFF}}(i,i)\)</p>
</div>
</div>
</div>
<div id="outline-container-org78de4b8" class="outline-3">
<h3 id="org78de4b8"><span class="section-number-3">2.3</span> Effect of IFF on the plant</h3>
<div class="outline-text-3" id="text-2-3">
<p>
<a id="orga004b43"></a>
</p>
<p>
Let&rsquo;s now see how the IFF control strategy effectively damps the plant and how it affects the transfer functions from the actuator forces to the relative motion sensors (encoders).
First identify the plant in open-loop.
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'3dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>, ...
<span class="org-string">'controller_type'</span>, <span class="org-string">'none'</span>);
Gol = linearize(mdl, io, 0.0, options);
Gol.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gol.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
</pre>
</div>
<p>
And then with the IFF controller.
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'3dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>, ...
<span class="org-string">'controller_type'</span>, <span class="org-string">'iff'</span>);
Giff = linearize(mdl, io, 0.0, options);
Giff.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Giff.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
</pre>
</div>
<p>
The obtained plants are compared in Figure <a href="#org6f0aecc">13</a>.
</p>
<div id="org6f0aecc" class="figure">
<p><img src="figs/nano_hexapod_effect_iff_plant.png" alt="nano_hexapod_effect_iff_plant.png" />
</p>
<p><span class="figure-number">Figure 13: </span>Bode plots of the transfer functions from actuator forces \(\tau_i\) to relative motion sensors \(\mathcal{L}_i\) with and without the IFF controller.</p>
</div>
<div class="important" id="orgc82f9c7">
<p>
The Integral Force Feedback Strategy is very effective to damp the 6 suspension modes of the nano-hexapod.
</p>
</div>
</div>
</div>
<div id="outline-container-org8db31cb" class="outline-3">
<h3 id="org8db31cb"><span class="section-number-3">2.4</span> Effect of IFF on the compliance</h3>
<div class="outline-text-3" id="text-2-4">
<p>
<a id="org4218d2b"></a>
</p>
<p>
The IFF strategy has the well known drawback of degrading the compliance (transfer function from external forces/torques applied to the top platform to the motion of the top platform), especially at low frequency where the control gain is large.
Let&rsquo;s quantify that for the nano-hexapod.
The obtained compliances are compared in Figure
</p>
<div id="org967b766" class="figure">
<p><img src="figs/nano_hexapod_iff_compare_compliance.png" alt="nano_hexapod_iff_compare_compliance.png" />
</p>
<p><span class="figure-number">Figure 14: </span>Comparison of the compliances in Open Loop and with Integral Force Feedback controller</p>
</div>
<div class="important" id="org5963287">
<p>
The use of IFF induces a degradation of the compliance.
This degradation is limited due to the use of a pseudo integrator (instead of a pure integrator).
Also, it should not be a major problem for the NASS, as no direct forces should be applied to the top platform.
</p>
</div>
</div>
</div>
</div>
<div id="outline-container-org605df2e" class="outline-2">
<h2 id="org605df2e"><span class="section-number-2">3</span> Active Damping using Direct Velocity Feedback - Encoders on the struts</h2>
<div class="outline-text-2" id="text-3">
<p>
<a id="org4a93b60"></a>
</p>
<p>
In this section, the <b>Direct Velocity Feedback</b> (DVF) strategy is used to damp the nano-hexapod resonances.
</p>
<p>
It is structured as follows:
</p>
<ul class="org-ul">
<li>Section <a href="#org4001a2b">3.1</a>: the DVF plant is identified</li>
<li>Section <a href="#orgdc1ec5b">3.2</a>: the optimal control gain is identified using the Root Locus plot</li>
<li>Section <a href="#orgabd539f">3.3</a>: the DVF is applied, and the effect on the damped plant is identified and compared with the un-damped one</li>
<li>Section <a href="#orga2ec7d1">3.4</a>: the DVF is applied, and the effect on the compliance is identified</li>
</ul>
</div>
<div id="outline-container-org60e2c2e" class="outline-3">
<h3 id="org60e2c2e"><span class="section-number-3">3.1</span> Plant Identification</h3>
<div class="outline-text-3" id="text-3-1">
<p>
<a id="org4001a2b"></a>
</p>
<p>
The nano-hexapod is initialized as usual.
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>);
</pre>
</div>
<p>
The transfer function from actuator inputs to force sensors outputs is identified.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'nano_hexapod'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/F'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Inputs</span>
io(io_i) = linio([mdl, <span class="org-string">'/D'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Motion Outputs</span>
Gdvf = linearize(mdl, io, 0.0, options);
Gdvf.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gdvf.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
</pre>
</div>
<p>
Its bode plot is shown in Figure <a href="#org74d2115">15</a>.
</p>
<div id="org74d2115" class="figure">
<p><img src="figs/nano_hexapod_dvf_plant_bode_plot_struts.png" alt="nano_hexapod_dvf_plant_bode_plot_struts.png" />
</p>
<p><span class="figure-number">Figure 15: </span>Direct Velocity Feedback plant</p>
</div>
</div>
</div>
<div id="outline-container-org2df6ab2" class="outline-3">
<h3 id="org2df6ab2"><span class="section-number-3">3.2</span> Root Locus</h3>
<div class="outline-text-3" id="text-3-2">
<p>
<a id="orgdc1ec5b"></a>
</p>
<p>
The controller is a diagonal (i.e. decentralized) controller with simple high pass filters (i.e. pseudo derivators) on the diagonal:
</p>
\begin{equation}
K_{\text{DVF}} = g \frac{s}{s + \omega_d} \bm{I}_{6 \times 6}
\end{equation}
<p>
The value of \(\omega_d\) sets the frequency above high the derivative action is stopped.
</p>
<div class="org-src-container">
<pre class="src src-matlab">wd = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>150;
</pre>
</div>
<p>
The obtained Root Locus is shown in Figure <a href="#org97058e3">16</a>.
The control gain chosen for future plots is shown by the red crosses.
</p>
<div id="org97058e3" class="figure">
<p><img src="figs/nano_hexapod_dvf_root_locus_struts.png" alt="nano_hexapod_dvf_root_locus_struts.png" />
</p>
<p><span class="figure-number">Figure 16: </span>Root locus for the decentralized DVF control strategy</p>
</div>
<p>
The obtained controller is then:
</p>
<div class="org-src-container">
<pre class="src src-matlab">Kdvf = 5e8<span class="org-type">*</span>s<span class="org-type">/</span>(s <span class="org-type">+</span> wd)<span class="org-type">*</span>eye(6); <span class="org-comment">% DVF Controller</span>
</pre>
</div>
<p>
The corresponding loop gain of the diagonal terms are shown in Figure <a href="#org9d6044c">17</a>.
It is shown that the loop gain is quite large around resonances (which allows to add lots of damping) and less than one at low frequency thanks to the large value of \(\omega_c\).
</p>
<div id="org9d6044c" class="figure">
<p><img src="figs/nano_hexapod_dvf_loop_gain_struts.png" alt="nano_hexapod_dvf_loop_gain_struts.png" />
</p>
<p><span class="figure-number">Figure 17: </span>Loop gain of the diagonal terms \(G(i,i) \cdot K_{\text{DVF}}(i,i)\)</p>
</div>
</div>
</div>
<div id="outline-container-org13ae74e" class="outline-3">
<h3 id="org13ae74e"><span class="section-number-3">3.3</span> Effect of DVF on the plant</h3>
<div class="outline-text-3" id="text-3-3">
<p>
<a id="orgabd539f"></a>
</p>
<p>
Let&rsquo;s now see how the DVF control strategy effectively damps the plant and how it affects the transfer functions from the actuator forces to the relative motion sensors (encoders).
First identify the plant in open-loop.
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>, ...
<span class="org-string">'controller_type'</span>, <span class="org-string">'none'</span>);
Gol = linearize(mdl, io, 0.0, options);
Gol.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gol.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
</pre>
</div>
<p>
And then with the DVF controller.
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'struts'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>, ...
<span class="org-string">'controller_type'</span>, <span class="org-string">'dvf'</span>);
Gdvf = linearize(mdl, io, 0.0, options);
Gdvf.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gdvf.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
</pre>
</div>
<p>
The obtained plants are compared in Figure <a href="#org0a91ea3">18</a>.
</p>
<div id="org0a91ea3" class="figure">
<p><img src="figs/nano_hexapod_effect_dvf_plant_struts.png" alt="nano_hexapod_effect_dvf_plant_struts.png" />
</p>
<p><span class="figure-number">Figure 18: </span>Bode plots of the transfer functions from actuator forces \(\tau_i\) to relative motion sensors \(\mathcal{L}_i\) with and without the DVF controller.</p>
</div>
<div class="important" id="org93cd044">
<p>
The Direct Velocity Feedback Strategy is very effective to damp the 6 suspension modes of the nano-hexapod.
</p>
</div>
</div>
</div>
<div id="outline-container-org6b386dc" class="outline-3">
<h3 id="org6b386dc"><span class="section-number-3">3.4</span> Effect of DVF on the compliance</h3>
<div class="outline-text-3" id="text-3-4">
<p>
<a id="orga2ec7d1"></a>
</p>
<p>
The DVF strategy has the well known drawback of degrading the compliance (transfer function from external forces/torques applied to the top platform to the motion of the top platform), especially at low frequency where the control gain is large.
Let&rsquo;s quantify that for the nano-hexapod.
The obtained compliances are compared in Figure <a href="#org914f0c2">19</a>.
</p>
<div id="org914f0c2" class="figure">
<p><img src="figs/nano_hexapod_dvf_compare_compliance_struts.png" alt="nano_hexapod_dvf_compare_compliance_struts.png" />
</p>
<p><span class="figure-number">Figure 19: </span>Comparison of the compliances in Open Loop and with Direct Velocity Feedback controller</p>
</div>
</div>
</div>
</div>
<div id="outline-container-orgac5a0fc" class="outline-2">
<h2 id="orgac5a0fc"><span class="section-number-2">4</span> Active Damping using Direct Velocity Feedback - Encoders on the plates</h2>
<div class="outline-text-2" id="text-4">
<p>
<a id="org4793eb6"></a>
</p>
<p>
In this section, the <b>Direct Velocity Feedback</b> (DVF) strategy is used to damp the nano-hexapod resonances.
</p>
<p>
It is structured as follows:
</p>
<ul class="org-ul">
<li>Section <a href="#org3b01a3d">4.1</a>: the DVF plant is identified</li>
<li>Section <a href="#org40fe804">4.2</a>: the optimal control gain is identified using the Root Locus plot</li>
<li>Section <a href="#org405f6f4">4.3</a>: the DVF is applied, and the effect on the damped plant is identified and compared with the un-damped one</li>
<li>Section <a href="#org3d1c930">4.4</a>: the DVF is applied, and the effect on the compliance is identified</li>
</ul>
2021-04-19 16:32:49 +02:00
</div>
<div id="outline-container-org27a5a1e" class="outline-3">
<h3 id="org27a5a1e"><span class="section-number-3">4.1</span> Plant Identification</h3>
<div class="outline-text-3" id="text-4-1">
<p>
<a id="org3b01a3d"></a>
</p>
2021-04-19 16:32:49 +02:00
<p>
The nano-hexapod is initialized as usual.
</p>
2021-04-19 16:32:49 +02:00
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'plates'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>);
2021-04-19 16:32:49 +02:00
</pre>
</div>
<p>
The transfer function from actuator inputs to force sensors outputs is identified.
</p>
2021-04-19 16:32:49 +02:00
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
2021-04-19 16:32:49 +02:00
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'nano_hexapod'</span>;
2021-04-19 16:32:49 +02:00
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/F'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Inputs</span>
io(io_i) = linio([mdl, <span class="org-string">'/D'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Motion Outputs</span>
2021-04-19 16:32:49 +02:00
Gdvf = linearize(mdl, io, 0.0, options);
Gdvf.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gdvf.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
2021-04-19 16:32:49 +02:00
</pre>
</div>
<p>
Its bode plot is shown in Figure <a href="#org1fb624b">20</a>.
</p>
<div id="org1fb624b" class="figure">
<p><img src="figs/nano_hexapod_dvf_plant_bode_plot_plates.png" alt="nano_hexapod_dvf_plant_bode_plot_plates.png" />
</p>
<p><span class="figure-number">Figure 20: </span>Direct Velocity Feedback plant</p>
2021-04-19 16:32:49 +02:00
</div>
</div>
</div>
<div id="outline-container-orgec02bca" class="outline-3">
<h3 id="orgec02bca"><span class="section-number-3">4.2</span> Root Locus</h3>
<div class="outline-text-3" id="text-4-2">
2021-04-19 16:32:49 +02:00
<p>
<a id="org40fe804"></a>
2021-04-19 16:32:49 +02:00
</p>
<p>
The controller is a diagonal (i.e. decentralized) controller with simple high pass filters (i.e. pseudo derivators) on the diagonal:
2021-04-19 16:32:49 +02:00
</p>
\begin{equation}
K_{\text{DVF}} = g \frac{s}{s + \omega_d} \bm{I}_{6 \times 6}
\end{equation}
2021-04-19 16:32:49 +02:00
<p>
The value of \(\omega_d\) sets the frequency above high the derivative action is stopped.
2021-04-19 16:32:49 +02:00
</p>
<div class="org-src-container">
<pre class="src src-matlab">wd = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>150;
2021-04-19 16:32:49 +02:00
</pre>
</div>
<p>
The obtained Root Locus is shown in Figure <a href="#org1804a8d">21</a>.
The control gain chosen for future plots is shown by the red crosses.
2021-04-19 16:32:49 +02:00
</p>
<div id="org1804a8d" class="figure">
<p><img src="figs/nano_hexapod_dvf_root_locus_plates.png" alt="nano_hexapod_dvf_root_locus_plates.png" />
</p>
<p><span class="figure-number">Figure 21: </span>Root locus for the decentralized DVF control strategy</p>
2021-04-19 16:32:49 +02:00
</div>
2021-04-19 16:32:49 +02:00
<p>
The obtained controller is then:
2021-04-19 16:32:49 +02:00
</p>
<div class="org-src-container">
<pre class="src src-matlab">Kdvf = 2e8<span class="org-type">*</span>s<span class="org-type">/</span>(s <span class="org-type">+</span> wd)<span class="org-type">*</span>eye(6); <span class="org-comment">% DVF Controller</span>
2021-04-19 16:32:49 +02:00
</pre>
</div>
<p>
The corresponding loop gain of the diagonal terms are shown in Figure <a href="#orgb9967dd">22</a>.
It is shown that the loop gain is quite large around resonances (which allows to add lots of damping).
2021-04-19 16:32:49 +02:00
</p>
<div id="orgb9967dd" class="figure">
<p><img src="figs/nano_hexapod_dvf_loop_gain_plates.png" alt="nano_hexapod_dvf_loop_gain_plates.png" />
</p>
<p><span class="figure-number">Figure 22: </span>Loop gain of the diagonal terms \(G(i,i) \cdot K_{\text{DVF}}(i,i)\)</p>
2021-04-19 16:32:49 +02:00
</div>
</div>
</div>
<div id="outline-container-org193f208" class="outline-3">
<h3 id="org193f208"><span class="section-number-3">4.3</span> Effect of DVF on the plant</h3>
<div class="outline-text-3" id="text-4-3">
2021-04-19 16:32:49 +02:00
<p>
<a id="org405f6f4"></a>
2021-04-19 16:32:49 +02:00
</p>
<p>
Let&rsquo;s now see how the DVF control strategy effectively damps the plant and how it affects the transfer functions from the actuator forces to the relative motion sensors (encoders).
First identify the plant in open-loop.
2021-04-19 16:32:49 +02:00
</p>
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'plates'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>, ...
<span class="org-string">'controller_type'</span>, <span class="org-string">'none'</span>);
Gol = linearize(mdl, io, 0.0, options);
Gol.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gol.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
2021-04-19 16:32:49 +02:00
</pre>
</div>
<p>
And then with the DVF controller.
</p>
2021-04-19 16:32:49 +02:00
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = initializeNanoHexapodFinal(<span class="org-string">'flex_bot_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'flex_top_type'</span>, <span class="org-string">'4dof'</span>, ...
<span class="org-string">'motion_sensor_type'</span>, <span class="org-string">'plates'</span>, ...
<span class="org-string">'actuator_type'</span>, <span class="org-string">'2dof'</span>, ...
<span class="org-string">'controller_type'</span>, <span class="org-string">'dvf'</span>);
Gdvf = linearize(mdl, io, 0.0, options);
Gdvf.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gdvf.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
2021-04-19 16:32:49 +02:00
</pre>
</div>
<p>
The obtained plants are compared in Figure <a href="#org4dcecf3">23</a>.
2021-04-19 16:32:49 +02:00
</p>
<div id="org4dcecf3" class="figure">
<p><img src="figs/nano_hexapod_effect_dvf_plant_plates.png" alt="nano_hexapod_effect_dvf_plant_plates.png" />
</p>
<p><span class="figure-number">Figure 23: </span>Bode plots of the transfer functions from actuator forces \(\tau_i\) to relative motion sensors \(\mathcal{L}_i\) with and without the DVF controller.</p>
</div>
2021-04-19 16:32:49 +02:00
<div class="important" id="orgcb28fec">
<p>
The Direct Velocity Feedback Strategy is very effective in damping the 6 suspension modes of the nano-hexapod.
</p>
2021-04-19 16:32:49 +02:00
</div>
</div>
</div>
2021-04-19 16:32:49 +02:00
<div id="outline-container-org9d023b0" class="outline-3">
<h3 id="org9d023b0"><span class="section-number-3">4.4</span> Effect of DVF on the compliance</h3>
<div class="outline-text-3" id="text-4-4">
<p>
<a id="org3d1c930"></a>
</p>
2021-04-19 16:32:49 +02:00
<p>
The DVF strategy has the well known drawback of degrading the compliance (transfer function from external forces/torques applied to the top platform to the motion of the top platform), especially at low frequency where the control gain is large.
Let&rsquo;s quantify that for the nano-hexapod.
The obtained compliances are compared in Figure <a href="#org5baf997">24</a>.
</p>
2021-04-19 16:32:49 +02:00
<div id="org5baf997" class="figure">
<p><img src="figs/nano_hexapod_dvf_compare_compliance_plates.png" alt="nano_hexapod_dvf_compare_compliance_plates.png" />
</p>
<p><span class="figure-number">Figure 24: </span>Comparison of the compliances in Open Loop and with Direct Velocity Feedback controller</p>
</div>
2021-04-19 16:32:49 +02:00
</div>
</div>
</div>
<div id="outline-container-org8862f6b" class="outline-2">
<h2 id="org8862f6b"><span class="section-number-2">5</span> Function - Initialize Nano Hexapod</h2>
<div class="outline-text-2" id="text-5">
2021-04-19 16:32:49 +02:00
<p>
<a id="orgfdb5239"></a>
</p>
</div>
<div id="outline-container-org438f7d8" class="outline-3">
<h3 id="org438f7d8">Function description</h3>
<div class="outline-text-3" id="text-org438f7d8">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[nano_hexapod]</span> = <span class="org-function-name">initializeNanoHexapodFinal</span>(<span class="org-variable-name">args</span>)
2021-04-19 16:32:49 +02:00
</pre>
</div>
</div>
</div>
<div id="outline-container-org49bef56" class="outline-3">
<h3 id="org49bef56">Optional Parameters</h3>
<div class="outline-text-3" id="text-org49bef56">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Bottom Flexible Joints</span></span>
<span class="org-variable-name">args</span>.flex_bot_type char {mustBeMember(args.flex_bot_type,{<span class="org-string">'2dof'</span>, <span class="org-string">'3dof'</span>, <span class="org-string">'4dof'</span>, <span class="org-string">'flexible'</span>})} = <span class="org-string">'4dof'</span>
<span class="org-variable-name">args</span>.flex_bot_kRx (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>5 <span class="org-comment">% X bending stiffness [Nm/rad]</span>
<span class="org-variable-name">args</span>.flex_bot_kRy (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>5 <span class="org-comment">% Y bending stiffness [Nm/rad]</span>
<span class="org-variable-name">args</span>.flex_bot_kRz (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>260 <span class="org-comment">% Torsionnal stiffness [Nm/rad]</span>
<span class="org-variable-name">args</span>.flex_bot_kz (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>1e8 <span class="org-comment">% Axial Stiffness [N/m]</span>
<span class="org-variable-name">args</span>.flex_bot_cRx (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>0.1 <span class="org-comment">% X bending Damping [Nm/(rad/s)]</span>
<span class="org-variable-name">args</span>.flex_bot_cRy (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>0.1 <span class="org-comment">% Y bending Damping [Nm/(rad/s)]</span>
<span class="org-variable-name">args</span>.flex_bot_cRz (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>0.1 <span class="org-comment">% Torsionnal Damping [Nm/(rad/s)]</span>
<span class="org-variable-name">args</span>.flex_bot_cz (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>1e2 <span class="org-comment">% Axial Damping [N/(m/s)]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Top Flexible Joints</span></span>
<span class="org-variable-name">args</span>.flex_top_type char {mustBeMember(args.flex_top_type,{<span class="org-string">'2dof'</span>, <span class="org-string">'3dof'</span>, <span class="org-string">'4dof'</span>, <span class="org-string">'flexible'</span>})} = <span class="org-string">'4dof'</span>
<span class="org-variable-name">args</span>.flex_top_kRx (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>5 <span class="org-comment">% X bending stiffness [Nm/rad]</span>
<span class="org-variable-name">args</span>.flex_top_kRy (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>5 <span class="org-comment">% Y bending stiffness [Nm/rad]</span>
<span class="org-variable-name">args</span>.flex_top_kRz (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>260 <span class="org-comment">% Torsionnal stiffness [Nm/rad]</span>
<span class="org-variable-name">args</span>.flex_top_kz (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>1e8 <span class="org-comment">% Axial Stiffness [N/m]</span>
<span class="org-variable-name">args</span>.flex_top_cRx (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>0.1 <span class="org-comment">% X bending Damping [Nm/(rad/s)]</span>
<span class="org-variable-name">args</span>.flex_top_cRy (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>0.1 <span class="org-comment">% Y bending Damping [Nm/(rad/s)]</span>
<span class="org-variable-name">args</span>.flex_top_cRz (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>0.1 <span class="org-comment">% Torsionnal Damping [Nm/(rad/s)]</span>
<span class="org-variable-name">args</span>.flex_top_cz (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>1e2 <span class="org-comment">% Axial Damping [N/(m/s)]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Jacobian - Location of frame {A} and {B}</span></span>
<span class="org-variable-name">args</span>.MO_B (1,1) double {mustBeNumeric} = 150e<span class="org-type">-</span>3 <span class="org-comment">% Height of {B} w.r.t. {M} [m]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Relative Motion Sensor</span></span>
<span class="org-variable-name">args</span>.motion_sensor_type char {mustBeMember(args.motion_sensor_type,{<span class="org-string">'struts'</span>, <span class="org-string">'plates'</span>})} = <span class="org-string">'struts'</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Actuators</span></span>
<span class="org-variable-name">args</span>.actuator_type char {mustBeMember(args.actuator_type,{<span class="org-string">'2dof'</span>, <span class="org-string">'flexible frame'</span>, <span class="org-string">'flexible'</span>})} = <span class="org-string">'flexible'</span>
<span class="org-variable-name">args</span>.actuator_Ga (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>1 <span class="org-comment">% Actuator gain [N/V]</span>
<span class="org-variable-name">args</span>.actuator_Gs (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>1 <span class="org-comment">% Sensor gain [V/m]</span>
<span class="org-comment">% For 2DoF</span>
<span class="org-variable-name">args</span>.actuator_k (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>0.35e6 <span class="org-comment">% [N/m]</span>
<span class="org-variable-name">args</span>.actuator_ke (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>1.5e6 <span class="org-comment">% [N/m]</span>
<span class="org-variable-name">args</span>.actuator_ka (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>43e6 <span class="org-comment">% [N/m]</span>
<span class="org-variable-name">args</span>.actuator_c (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>3e1 <span class="org-comment">% [N/(m/s)]</span>
<span class="org-variable-name">args</span>.actuator_ce (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>1e1 <span class="org-comment">% [N/(m/s)]</span>
<span class="org-variable-name">args</span>.actuator_ca (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>1e1 <span class="org-comment">% [N/(m/s)]</span>
<span class="org-variable-name">args</span>.actuator_Leq (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>0.056 <span class="org-comment">% [m]</span>
<span class="org-comment">% For Flexible Frame</span>
<span class="org-variable-name">args</span>.actuator_ks (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>235e6 <span class="org-comment">% Stiffness of one stack [N/m]</span>
<span class="org-variable-name">args</span>.actuator_cs (6,1) double {mustBeNumeric} = ones(6,1)<span class="org-type">*</span>1e1 <span class="org-comment">% Stiffness of one stack [N/m]</span>
<span class="org-comment">% For Flexible</span>
<span class="org-variable-name">args</span>.actuator_xi (1,1) double {mustBeNumeric} = 0.01 <span class="org-comment">% Damping Ratio</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Controller</span></span>
<span class="org-variable-name">args</span>.controller_type char {mustBeMember(args.controller_type,{<span class="org-string">'none'</span>, <span class="org-string">'iff'</span>, <span class="org-string">'dvf'</span>})} = <span class="org-string">'none'</span>
<span class="org-keyword">end</span>
2021-04-19 16:32:49 +02:00
</pre>
</div>
</div>
</div>
<div id="outline-container-org33f6631" class="outline-3">
<h3 id="org33f6631">Nano Hexapod Object</h3>
<div class="outline-text-3" id="text-org33f6631">
<div class="org-src-container">
<pre class="src src-matlab">nano_hexapod = struct();
</pre>
</div>
</div>
</div>
<div id="outline-container-orgdc3de74" class="outline-3">
<h3 id="orgdc3de74">Flexible Joints - Bot</h3>
<div class="outline-text-3" id="text-orgdc3de74">
<div class="org-src-container">
<pre class="src src-matlab">nano_hexapod.flex_bot = struct();
<span class="org-keyword">switch</span> <span class="org-constant">args.flex_bot_type</span>
<span class="org-keyword">case</span> <span class="org-string">'2dof'</span>
nano_hexapod.flex_bot.type = 1;
<span class="org-keyword">case</span> <span class="org-string">'3dof'</span>
nano_hexapod.flex_bot.type = 2;
<span class="org-keyword">case</span> <span class="org-string">'4dof'</span>
nano_hexapod.flex_bot.type = 3;
<span class="org-keyword">case</span> <span class="org-string">'flexible'</span>
nano_hexapod.flex_bot.type = 4;
<span class="org-keyword">end</span>
nano_hexapod.flex_bot.kRx = args.flex_bot_kRx; <span class="org-comment">% X bending stiffness [Nm/rad]</span>
nano_hexapod.flex_bot.kRy = args.flex_bot_kRy; <span class="org-comment">% Y bending stiffness [Nm/rad]</span>
nano_hexapod.flex_bot.kRz = args.flex_bot_kRz; <span class="org-comment">% Torsionnal stiffness [Nm/rad]</span>
nano_hexapod.flex_bot.kz = args.flex_bot_kz; <span class="org-comment">% Axial stiffness [N/m]</span>
nano_hexapod.flex_bot.cRx = args.flex_bot_cRx; <span class="org-comment">% [Nm/(rad/s)]</span>
nano_hexapod.flex_bot.cRy = args.flex_bot_cRy; <span class="org-comment">% [Nm/(rad/s)]</span>
nano_hexapod.flex_bot.cRz = args.flex_bot_cRz; <span class="org-comment">% [Nm/(rad/s)]</span>
nano_hexapod.flex_bot.cz = args.flex_bot_cz; <span class="org-comment">%[N/(m/s)]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org7d4d003" class="outline-3">
<h3 id="org7d4d003">Flexible Joints - Top</h3>
<div class="outline-text-3" id="text-org7d4d003">
<div class="org-src-container">
<pre class="src src-matlab">nano_hexapod.flex_top = struct();
<span class="org-keyword">switch</span> <span class="org-constant">args.flex_top_type</span>
<span class="org-keyword">case</span> <span class="org-string">'2dof'</span>
nano_hexapod.flex_top.type = 1;
<span class="org-keyword">case</span> <span class="org-string">'3dof'</span>
nano_hexapod.flex_top.type = 2;
<span class="org-keyword">case</span> <span class="org-string">'4dof'</span>
nano_hexapod.flex_top.type = 3;
<span class="org-keyword">case</span> <span class="org-string">'flexible'</span>
nano_hexapod.flex_top.type = 4;
<span class="org-keyword">end</span>
nano_hexapod.flex_top.kRx = args.flex_top_kRx; <span class="org-comment">% X bending stiffness [Nm/rad]</span>
nano_hexapod.flex_top.kRy = args.flex_top_kRy; <span class="org-comment">% Y bending stiffness [Nm/rad]</span>
nano_hexapod.flex_top.kRz = args.flex_top_kRz; <span class="org-comment">% Torsionnal stiffness [Nm/rad]</span>
nano_hexapod.flex_top.kz = args.flex_top_kz; <span class="org-comment">% Axial stiffness [N/m]</span>
nano_hexapod.flex_top.cRx = args.flex_top_cRx; <span class="org-comment">% [Nm/(rad/s)]</span>
nano_hexapod.flex_top.cRy = args.flex_top_cRy; <span class="org-comment">% [Nm/(rad/s)]</span>
nano_hexapod.flex_top.cRz = args.flex_top_cRz; <span class="org-comment">% [Nm/(rad/s)]</span>
nano_hexapod.flex_top.cz = args.flex_top_cz; <span class="org-comment">%[N/(m/s)]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org3744992" class="outline-3">
<h3 id="org3744992">Relative Motion Sensor</h3>
<div class="outline-text-3" id="text-org3744992">
<div class="org-src-container">
<pre class="src src-matlab">nano_hexapod.motion_sensor = struct();
<span class="org-keyword">switch</span> <span class="org-constant">args.motion_sensor_type</span>
<span class="org-keyword">case</span> <span class="org-string">'struts'</span>
nano_hexapod.motion_sensor.type = 1;
<span class="org-keyword">case</span> <span class="org-string">'plates'</span>
nano_hexapod.motion_sensor.type = 2;
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgdaa740a" class="outline-3">
<h3 id="orgdaa740a">Amplified Piezoelectric Actuator</h3>
<div class="outline-text-3" id="text-orgdaa740a">
<div class="org-src-container">
<pre class="src src-matlab">nano_hexapod.actuator = struct();
<span class="org-keyword">switch</span> <span class="org-constant">args.actuator_type</span>
<span class="org-keyword">case</span> <span class="org-string">'2dof'</span>
nano_hexapod.actuator.type = 1;
<span class="org-keyword">case</span> <span class="org-string">'flexible frame'</span>
nano_hexapod.actuator.type = 2;
<span class="org-keyword">case</span> <span class="org-string">'flexible'</span>
nano_hexapod.actuator.type = 3;
<span class="org-keyword">end</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">nano_hexapod.actuator.Ga = args.actuator_Ga; <span class="org-comment">% Actuator gain [N/V]</span>
nano_hexapod.actuator.Gs = args.actuator_Gs; <span class="org-comment">% Sensor gain [V/m]</span>
</pre>
</div>
<p>
2dof
</p>
<div class="org-src-container">
<pre class="src src-matlab">nano_hexapod.actuator.k = args.actuator_k; <span class="org-comment">% [N/m]</span>
nano_hexapod.actuator.ke = args.actuator_ke; <span class="org-comment">% [N/m]</span>
nano_hexapod.actuator.ka = args.actuator_ka; <span class="org-comment">% [N/m]</span>
nano_hexapod.actuator.c = args.actuator_c; <span class="org-comment">% [N/(m/s)]</span>
nano_hexapod.actuator.ce = args.actuator_ce; <span class="org-comment">% [N/(m/s)]</span>
nano_hexapod.actuator.ca = args.actuator_ca; <span class="org-comment">% [N/(m/s)]</span>
nano_hexapod.actuator.Leq = args.actuator_Leq; <span class="org-comment">% [m]</span>
</pre>
</div>
<p>
Flexible frame and fully flexible
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">switch</span> <span class="org-constant">args.actuator_type</span>
<span class="org-keyword">case</span> <span class="org-string">'flexible frame'</span>
nano_hexapod.actuator.K = readmatrix(<span class="org-string">'APA300ML_b_mat_K.CSV'</span>); <span class="org-comment">% Stiffness Matrix</span>
nano_hexapod.actuator.M = readmatrix(<span class="org-string">'APA300ML_b_mat_M.CSV'</span>); <span class="org-comment">% Mass Matrix</span>
nano_hexapod.actuator.P = extractNodes(<span class="org-string">'APA300ML_b_out_nodes_3D.txt'</span>); <span class="org-comment">% Node coordinates [m]</span>
<span class="org-keyword">case</span> <span class="org-string">'flexible'</span>
nano_hexapod.actuator.K = readmatrix(<span class="org-string">'full_APA300ML_K.CSV'</span>); <span class="org-comment">% Stiffness Matrix</span>
nano_hexapod.actuator.M = readmatrix(<span class="org-string">'full_APA300ML_M.CSV'</span>); <span class="org-comment">% Mass Matrix</span>
nano_hexapod.actuator.P = extractNodes(<span class="org-string">'full_APA300ML_out_nodes_3D.txt'</span>); <span class="org-comment">% Node coordiantes [m]</span>
2021-04-19 16:32:49 +02:00
<span class="org-keyword">end</span>
nano_hexapod.actuator.xi = args.actuator_xi; <span class="org-comment">% Damping ratio</span>
nano_hexapod.actuator.ks = args.actuator_ks; <span class="org-comment">% Stiffness of one stack [N/m]</span>
nano_hexapod.actuator.cs = args.actuator_cs; <span class="org-comment">% Damping of one stack [N/m]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org8d598c9" class="outline-3">
<h3 id="org8d598c9">Geometry</h3>
<div class="outline-text-3" id="text-org8d598c9">
<div class="org-src-container">
<pre class="src src-matlab">nano_hexapod.geometry = struct();
</pre>
</div>
<p>
Center of joints \(a_i\) with respect to {F}:
</p>
<div class="org-src-container">
<pre class="src src-matlab">Fa = [[<span class="org-type">-</span>86.05, <span class="org-type">-</span>74.78, 22.49],
[ 86.05, <span class="org-type">-</span>74.78, 22.49],
[ 107.79, <span class="org-type">-</span>37.13, 22.49],
[ 21.74, 111.91, 22.49],
[<span class="org-type">-</span>21.74, 111.91, 22.49],
[<span class="org-type">-</span>107.79, <span class="org-type">-</span>37.13, 22.49]]<span class="org-type">'*</span>1e<span class="org-type">-</span>3; <span class="org-comment">% Ai w.r.t. {F} [m]</span>
</pre>
</div>
<p>
Center of joints \(b_i\) with respect to {M}:
</p>
<div class="org-src-container">
<pre class="src src-matlab">Mb = [[<span class="org-type">-</span>28.47, <span class="org-type">-</span>106.25, <span class="org-type">-</span>22.50],
[ 28.47, <span class="org-type">-</span>106.25, <span class="org-type">-</span>22.50],
[ 106.25, 28.47, <span class="org-type">-</span>22.50],
[ 77.78, 77.78, <span class="org-type">-</span>22.50],
[<span class="org-type">-</span>77.78, 77.78, <span class="org-type">-</span>22.50],
[<span class="org-type">-</span>106.25, 28.47, <span class="org-type">-</span>22.50]]<span class="org-type">'*</span>1e<span class="org-type">-</span>3; <span class="org-comment">% Bi w.r.t. {M} [m]</span>
</pre>
</div>
<p>
Now compute the positions \(b_i\) with respect to {F}:
</p>
<div class="org-src-container">
<pre class="src src-matlab">Fb = Mb <span class="org-type">+</span> [0; 0; 95e<span class="org-type">-</span>3]; <span class="org-comment">% Bi w.r.t. {F} [m]</span>
</pre>
</div>
<p>
The unit vector representing the orientation of the struts can then be computed:
</p>
<div class="org-src-container">
<pre class="src src-matlab">si = Fb <span class="org-type">-</span> Fa;
si = si<span class="org-type">./</span>vecnorm(si); <span class="org-comment">% Normalize</span>
</pre>
</div>
<p>
Location of encoder measurement points when fixed on the plates:
</p>
<div class="org-src-container">
<pre class="src src-matlab">Fc = [[<span class="org-type">-</span>29.362, <span class="org-type">-</span>105.765, 52.605]
[ 29.362, <span class="org-type">-</span>105.765, 52.605]
[ 106.276, 27.454, 52.605]
[ 76.914, 78.31, 52.605]
[<span class="org-type">-</span>76.914, 78.31, 52.605]
[<span class="org-type">-</span>106.276, 27.454, 52.605]]<span class="org-type">'*</span>1e<span class="org-type">-</span>3; <span class="org-comment">% Meas pos w.r.t. {F}</span>
Mc = Fc <span class="org-type">-</span> [0; 0; 95e<span class="org-type">-</span>3]; <span class="org-comment">% Meas pos w.r.t. {M}</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">nano_hexapod.geometry.Fa = Fa;
nano_hexapod.geometry.Fb = Fb;
nano_hexapod.geometry.Fc = Fc;
nano_hexapod.geometry.Mb = Mb;
nano_hexapod.geometry.Mc = Mc;
nano_hexapod.geometry.si = si;
nano_hexapod.geometry.MO_B = args.MO_B;
</pre>
</div>
</div>
</div>
<div id="outline-container-org8d741d2" class="outline-3">
<h3 id="org8d741d2">Jacobian for Actuators</h3>
<div class="outline-text-3" id="text-org8d741d2">
<div class="org-src-container">
<pre class="src src-matlab">Bb = Mb <span class="org-type">-</span> [0; 0; args.MO_B];
nano_hexapod.geometry.J = [nano_hexapod.geometry.si<span class="org-type">'</span>, cross(Bb, nano_hexapod.geometry.si)<span class="org-type">'</span>];
</pre>
</div>
</div>
</div>
<div id="outline-container-orgea27820" class="outline-3">
<h3 id="orgea27820">Jacobian for Sensors</h3>
<div class="outline-text-3" id="text-orgea27820">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">switch</span> <span class="org-constant">args.motion_sensor_type</span>
<span class="org-keyword">case</span> <span class="org-string">'struts'</span>
nano_hexapod.geometry.Js = nano_hexapod.geometry.J;
<span class="org-keyword">case</span> <span class="org-string">'plates'</span>
Bc = Mc <span class="org-type">-</span> [0; 0; args.MO_B];
nano_hexapod.geometry.Js = [nano_hexapod.geometry.si<span class="org-type">'</span>, cross(Bc, nano_hexapod.geometry.si)<span class="org-type">'</span>];
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org90b9ac2" class="outline-3">
<h3 id="org90b9ac2">Controller</h3>
<div class="outline-text-3" id="text-org90b9ac2">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">switch</span> <span class="org-constant">args.controller_type</span>
<span class="org-keyword">case</span> <span class="org-string">'none'</span>
nano_hexapod.controller.type = 1;
<span class="org-keyword">case</span> <span class="org-string">'iff'</span>
nano_hexapod.controller.type = 2;
<span class="org-keyword">case</span> <span class="org-string">'dvf'</span>
nano_hexapod.controller.type = 3;
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-04-19 16:32:49 +02:00
<div id="outline-container-org8187b3b" class="outline-3">
<h3 id="org8187b3b">Save the Structure</h3>
<div class="outline-text-3" id="text-org8187b3b">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">if</span> nargout <span class="org-type">==</span> 0
save(<span class="org-string">'./mat/stages.mat'</span>, <span class="org-string">'nano_hexapod'</span>, <span class="org-string">'-append'</span>);
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-04-23 ven. 13:22</p>
2021-04-19 16:32:49 +02:00
</div>
</body>
</html>