nass-simscape/active_damping/index.html

1607 lines
67 KiB
HTML
Raw Normal View History

2019-10-08 11:13:38 +02:00
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
2019-10-08 11:13:38 +02:00
<!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>
<!-- 2020-01-20 lun. 17:18 -->
2019-10-08 11:13:38 +02:00
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Active Damping applied on the Simscape Model</title>
2019-10-08 11:13:38 +02:00
<meta name="generator" content="Org mode" />
<meta name="author" content="Dehaeze Thomas" />
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #ccc;
box-shadow: 3px 3px 3px #eee;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: visible;
padding-top: 1.2em;
}
pre.src:before {
display: none;
position: absolute;
background-color: white;
top: -10px;
right: 10px;
padding: 3px;
border: 1px solid black;
}
pre.src:hover:before { display: inline;}
/* Languages per Org manual */
pre.src-asymptote:before { content: 'Asymptote'; }
pre.src-awk:before { content: 'Awk'; }
pre.src-C:before { content: 'C'; }
/* pre.src-C++ doesn't work in CSS */
pre.src-clojure:before { content: 'Clojure'; }
pre.src-css:before { content: 'CSS'; }
pre.src-D:before { content: 'D'; }
pre.src-ditaa:before { content: 'ditaa'; }
pre.src-dot:before { content: 'Graphviz'; }
pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-fortran:before { content: 'Fortran'; }
pre.src-gnuplot:before { content: 'gnuplot'; }
pre.src-haskell:before { content: 'Haskell'; }
pre.src-hledger:before { content: 'hledger'; }
pre.src-java:before { content: 'Java'; }
pre.src-js:before { content: 'Javascript'; }
pre.src-latex:before { content: 'LaTeX'; }
pre.src-ledger:before { content: 'Ledger'; }
pre.src-lisp:before { content: 'Lisp'; }
pre.src-lilypond:before { content: 'Lilypond'; }
pre.src-lua:before { content: 'Lua'; }
pre.src-matlab:before { content: 'MATLAB'; }
pre.src-mscgen:before { content: 'Mscgen'; }
pre.src-ocaml:before { content: 'Objective Caml'; }
pre.src-octave:before { content: 'Octave'; }
pre.src-org:before { content: 'Org mode'; }
pre.src-oz:before { content: 'OZ'; }
pre.src-plantuml:before { content: 'Plantuml'; }
pre.src-processing:before { content: 'Processing.js'; }
pre.src-python:before { content: 'Python'; }
pre.src-R:before { content: 'R'; }
pre.src-ruby:before { content: 'Ruby'; }
pre.src-sass:before { content: 'Sass'; }
pre.src-scheme:before { content: 'Scheme'; }
pre.src-screen:before { content: 'Gnu Screen'; }
pre.src-sed:before { content: 'Sed'; }
pre.src-sh:before { content: 'shell'; }
pre.src-sql:before { content: 'SQL'; }
pre.src-sqlite:before { content: 'SQLite'; }
/* additional languages in org.el's org-babel-load-languages alist */
pre.src-forth:before { content: 'Forth'; }
pre.src-io:before { content: 'IO'; }
pre.src-J:before { content: 'J'; }
pre.src-makefile:before { content: 'Makefile'; }
pre.src-maxima:before { content: 'Maxima'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-picolisp:before { content: 'Pico Lisp'; }
pre.src-scala:before { content: 'Scala'; }
pre.src-shell:before { content: 'Shell Script'; }
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
/* additional language identifiers per "defun org-babel-execute"
in ob-*.el */
pre.src-cpp:before { content: 'C++'; }
pre.src-abc:before { content: 'ABC'; }
pre.src-coq:before { content: 'Coq'; }
pre.src-groovy:before { content: 'Groovy'; }
/* additional language identifiers from org-babel-shell-names in
ob-shell.el: ob-shell is the only babel language using a lambda to put
the execution function name together. */
pre.src-bash:before { content: 'bash'; }
pre.src-csh:before { content: 'csh'; }
pre.src-ash:before { content: 'ash'; }
pre.src-dash:before { content: 'dash'; }
pre.src-ksh:before { content: 'ksh'; }
pre.src-mksh:before { content: 'mksh'; }
pre.src-posh:before { content: 'posh'; }
/* Additional Emacs modes also supported by the LaTeX listings package */
pre.src-ada:before { content: 'Ada'; }
pre.src-asm:before { content: 'Assembler'; }
pre.src-caml:before { content: 'Caml'; }
pre.src-delphi:before { content: 'Delphi'; }
pre.src-html:before { content: 'HTML'; }
pre.src-idl:before { content: 'IDL'; }
pre.src-mercury:before { content: 'Mercury'; }
pre.src-metapost:before { content: 'MetaPost'; }
pre.src-modula-2:before { content: 'Modula-2'; }
pre.src-pascal:before { content: 'Pascal'; }
pre.src-ps:before { content: 'PostScript'; }
pre.src-prolog:before { content: 'Prolog'; }
pre.src-simula:before { content: 'Simula'; }
pre.src-tcl:before { content: 'tcl'; }
pre.src-tex:before { content: 'TeX'; }
pre.src-plain-tex:before { content: 'Plain TeX'; }
pre.src-verilog:before { content: 'Verilog'; }
pre.src-vhdl:before { content: 'VHDL'; }
pre.src-xml:before { content: 'XML'; }
pre.src-nxml:before { content: 'XML'; }
/* add a generic configuration mode; LaTeX export needs an additional
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
pre.src-conf:before { content: 'Configuration File'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.equation-container {
display: table;
text-align: center;
width: 100%;
}
.equation {
vertical-align: middle;
}
.equation-label {
display: table-cell;
text-align: right;
vertical-align: middle;
}
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
.org-svg { width: 90%; }
/*]]>*/-->
</style>
<link rel="stylesheet" type="text/css" href="../css/htmlize.css"/>
<link rel="stylesheet" type="text/css" href="../css/readtheorg.css"/>
<link rel="stylesheet" type="text/css" href="../css/zenburn.css"/>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/jquery.stickytableheaders.min.js"></script>
<script type="text/javascript" src="../js/readtheorg.js"></script>
<script type="text/javascript">
/*
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2020 Free Software Foundation, Inc.
2019-10-08 11:13:38 +02:00
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version. The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
displayAlign: "center",
displayIndent: "0em",
"HTML-CSS": { scale: 100,
linebreaks: { automatic: "false" },
webFont: "TeX"
},
SVG: {scale: 100,
linebreaks: { automatic: "false" },
font: "TeX"},
NativeMML: {scale: 100},
TeX: { equationNumbers: {autoNumber: "AMS"},
MultLineWidth: "85%",
TagSide: "right",
TagIndent: ".8em",
Macros: {
bm: ["{\\boldsymbol #1}",1],
}
}
});
</script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML"></script>
2019-10-08 11:13:38 +02:00
</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">Active Damping applied on the Simscape Model</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org21b7020">1. Undamped System</a>
<ul>
<li><a href="#org5851b7a">1.1. Identification of the dynamics for Active Damping</a>
<ul>
<li><a href="#org74aed57">1.1.1. Initialize the Simulation</a></li>
<li><a href="#org32dc6b8">1.1.2. Identification</a></li>
<li><a href="#org467a586">1.1.3. Obtained Plants for Active Damping</a></li>
</ul>
</li>
<li><a href="#orgcd8379a">1.2. Tomography Experiment</a>
<ul>
<li><a href="#org3284883">1.2.1. Simulation</a></li>
<li><a href="#org700a2b4">1.2.2. Results</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org4f2a70b">2. Integral Force Feedback</a>
<ul>
<li><a href="#orgf33234d">2.1. Control Design</a>
<ul>
<li><a href="#orgd9afa23">2.1.1. Plant</a></li>
<li><a href="#org43379d2">2.1.2. Control Design</a></li>
<li><a href="#orgbc20ed4">2.1.3. Diagonal Controller</a></li>
<li><a href="#org90db654">2.1.4. IFF with High Pass Filter</a></li>
</ul>
</li>
<li><a href="#orgaaa96ff">2.2. Tomography Experiment</a>
<ul>
<li><a href="#orgf74a390">2.2.1. Simulation with IFF Controller</a></li>
<li><a href="#org95de904">2.2.2. Simulation with IFF Controller with added High Pass Filter</a></li>
<li><a href="#org2b12e17">2.2.3. Compare with Undamped system</a></li>
</ul>
</li>
<li><a href="#org0fd785e">2.3. Conclusion</a></li>
</ul>
</li>
<li><a href="#org9c38d50">3. Direct Velocity Feedback</a>
<ul>
<li><a href="#org03f9812">3.1. Control Design</a>
<ul>
<li><a href="#org0426ac1">3.1.1. Plant</a></li>
<li><a href="#orgbb062d7">3.1.2. Control Design</a></li>
<li><a href="#org1bdfb4e">3.1.3. Diagonal Controller</a></li>
</ul>
</li>
<li><a href="#org1787430">3.2. Tomography Experiment</a>
<ul>
<li><a href="#org8c867a4">3.2.1. Initialize the Simulation</a></li>
<li><a href="#org8ca9d2f">3.2.2. Simulation</a></li>
<li><a href="#org85c9eb6">3.2.3. Compare with Undamped system</a></li>
</ul>
</li>
<li><a href="#org7ea48ad">3.3. Conclusion</a></li>
</ul>
</li>
<li><a href="#orgddee501">4. Inertial Control</a>
<ul>
<li><a href="#org183d718">4.1. Control Design</a>
<ul>
<li><a href="#org3b0c93b">4.1.1. Plant</a></li>
<li><a href="#org0613819">4.1.2. Control Design</a></li>
<li><a href="#org7eb6d4a">4.1.3. Diagonal Controller</a></li>
</ul>
</li>
<li><a href="#orgb837286">4.2. Tomography Experiment</a>
<ul>
<li><a href="#org088d0cf">4.2.1. Initialize the Simulation</a></li>
<li><a href="#orge0acdea">4.2.2. Simulation</a></li>
<li><a href="#orgb9346a9">4.2.3. Compare with Undamped system</a></li>
</ul>
</li>
<li><a href="#org971b7df">4.3. Conclusion</a></li>
</ul>
</li>
<li><a href="#orgb30a5ab">5. Comparison</a>
<ul>
<li><a href="#org056c3e4">5.1. Load the plants</a></li>
<li><a href="#org75158e7">5.2. Sensitivity to Disturbance</a></li>
<li><a href="#orgca4880d">5.3. Damped Plant</a></li>
<li><a href="#org4b14fbd">5.4. Tomography Experiment</a>
<ul>
<li><a href="#org2213b1c">5.4.1. Frequency Domain</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#orge02060f">6. Useful Functions</a>
<ul>
<li><a href="#org0b9e75d">6.1. prepareTomographyExperiment</a>
<ul>
<li><a href="#org637f0d7">Function Description</a></li>
<li><a href="#orgac8374d">Optional Parameters</a></li>
<li><a href="#orgb19cd54">Initialize the Simulation</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<p>
First, in section <a href="#orgcb992ae">1</a>, we will looked at the undamped system.
</p>
<p>
Then, we will compare three active damping techniques:
</p>
<ul class="org-ul">
<li>In section <a href="#org0e807ab">2</a>: the integral force feedback is used</li>
<li>In section <a href="#orgef7f6c4">3</a>: the direct velocity feedback is used</li>
<li>In section <a href="#org1930728">4</a>: inertial control is used</li>
</ul>
<p>
For each of the active damping technique, we will:
</p>
<ul class="org-ul">
<li>Look at the damped plant</li>
<li>Simulate tomography experiments</li>
<li>Compare the sensitivity from disturbances</li>
</ul>
<p>
The disturbances are:
</p>
<ul class="org-ul">
<li>Ground motion</li>
<li>Motion errors of all the stages</li>
</ul>
<div id="outline-container-org21b7020" class="outline-2">
<h2 id="org21b7020"><span class="section-number-2">1</span> Undamped System</h2>
<div class="outline-text-2" id="text-1">
<p>
<a id="orgcb992ae"></a>
</p>
<div class="note">
<p>
All the files (data and Matlab scripts) are accessible <a href="data/undamped_system.zip">here</a>.
</p>
</div>
<p>
We first look at the undamped system.
The performance of this undamped system will be compared with the damped system using various techniques.
</p>
</div>
<div id="outline-container-org5851b7a" class="outline-3">
<h3 id="org5851b7a"><span class="section-number-3">1.1</span> Identification of the dynamics for Active Damping</h3>
<div class="outline-text-3" id="text-1-1">
</div>
<div id="outline-container-org74aed57" class="outline-4">
<h4 id="org74aed57"><span class="section-number-4">1.1.1</span> Initialize the Simulation</h4>
<div class="outline-text-4" id="text-1-1-1">
<p>
We initialize all the stages with the default parameters.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
</pre>
</div>
<p>
The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeNanoHexapod(<span class="org-string">'actuator'</span>, <span class="org-string">'piezo'</span>);
initializeSample(<span class="org-string">'mass'</span>, 50);
</pre>
</div>
<p>
We set the references to zero.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeReferences();
</pre>
</div>
<p>
And all the controllers are set to 0.
</p>
<div class="org-src-container">
<pre class="src src-matlab">K = tf(zeros(6));
save(<span class="org-string">'./mat/controllers.mat'</span>, <span class="org-string">'K'</span>, <span class="org-string">'-append'</span>);
K_ine = tf(zeros(6));
save(<span class="org-string">'./mat/controllers.mat'</span>, <span class="org-string">'K_ine'</span>, <span class="org-string">'-append'</span>);
K_iff = tf(zeros(6));
save(<span class="org-string">'./mat/controllers.mat'</span>, <span class="org-string">'K_iff'</span>, <span class="org-string">'-append'</span>);
K_dvf = tf(zeros(6));
save(<span class="org-string">'./mat/controllers.mat'</span>, <span class="org-string">'K_dvf'</span>, <span class="org-string">'-append'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-org32dc6b8" class="outline-4">
<h4 id="org32dc6b8"><span class="section-number-4">1.1.2</span> Identification</h4>
<div class="outline-text-4" id="text-1-1-2">
<p>
First, we identify the dynamics of the system using the <code>linearize</code> function.
</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">'sim_nass_active_damping'</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">'/Fnl'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1;
io(io_i) = linio([mdl, <span class="org-string">'/Micro-Station'</span>], 3, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'Dnlm'</span>); io_i = io_i <span class="org-type">+</span> 1;
io(io_i) = linio([mdl, <span class="org-string">'/Micro-Station'</span>], 3, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'Fnlm'</span>); io_i = io_i <span class="org-type">+</span> 1;
io(io_i) = linio([mdl, <span class="org-string">'/Micro-Station'</span>], 3, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'Vlm'</span>); io_i = io_i <span class="org-type">+</span> 1;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'Fnl1'</span>, <span class="org-string">'Fnl2'</span>, <span class="org-string">'Fnl3'</span>, <span class="org-string">'Fnl4'</span>, <span class="org-string">'Fnl5'</span>, <span class="org-string">'Fnl6'</span>};
G.OutputName = {<span class="org-string">'Dnlm1'</span>, <span class="org-string">'Dnlm2'</span>, <span class="org-string">'Dnlm3'</span>, <span class="org-string">'Dnlm4'</span>, <span class="org-string">'Dnlm5'</span>, <span class="org-string">'Dnlm6'</span>, ...
<span class="org-string">'Fnlm1'</span>, <span class="org-string">'Fnlm2'</span>, <span class="org-string">'Fnlm3'</span>, <span class="org-string">'Fnlm4'</span>, <span class="org-string">'Fnlm5'</span>, <span class="org-string">'Fnlm6'</span>, ...
<span class="org-string">'Vnlm1'</span>, <span class="org-string">'Vnlm2'</span>, <span class="org-string">'Vnlm3'</span>, <span class="org-string">'Vnlm4'</span>, <span class="org-string">'Vnlm5'</span>, <span class="org-string">'Vnlm6'</span>};
</pre>
</div>
<p>
We then create transfer functions corresponding to the active damping plants.
</p>
<div class="org-src-container">
<pre class="src src-matlab">G_iff = minreal(G({<span class="org-string">'Fnlm1'</span>, <span class="org-string">'Fnlm2'</span>, <span class="org-string">'Fnlm3'</span>, <span class="org-string">'Fnlm4'</span>, <span class="org-string">'Fnlm5'</span>, <span class="org-string">'Fnlm6'</span>}, {<span class="org-string">'Fnl1'</span>, <span class="org-string">'Fnl2'</span>, <span class="org-string">'Fnl3'</span>, <span class="org-string">'Fnl4'</span>, <span class="org-string">'Fnl5'</span>, <span class="org-string">'Fnl6'</span>}));
G_dvf = minreal(G({<span class="org-string">'Dnlm1'</span>, <span class="org-string">'Dnlm2'</span>, <span class="org-string">'Dnlm3'</span>, <span class="org-string">'Dnlm4'</span>, <span class="org-string">'Dnlm5'</span>, <span class="org-string">'Dnlm6'</span>}, {<span class="org-string">'Fnl1'</span>, <span class="org-string">'Fnl2'</span>, <span class="org-string">'Fnl3'</span>, <span class="org-string">'Fnl4'</span>, <span class="org-string">'Fnl5'</span>, <span class="org-string">'Fnl6'</span>}));
G_ine = minreal(G({<span class="org-string">'Vnlm1'</span>, <span class="org-string">'Vnlm2'</span>, <span class="org-string">'Vnlm3'</span>, <span class="org-string">'Vnlm4'</span>, <span class="org-string">'Vnlm5'</span>, <span class="org-string">'Vnlm6'</span>}, {<span class="org-string">'Fnl1'</span>, <span class="org-string">'Fnl2'</span>, <span class="org-string">'Fnl3'</span>, <span class="org-string">'Fnl4'</span>, <span class="org-string">'Fnl5'</span>, <span class="org-string">'Fnl6'</span>}));
</pre>
</div>
<p>
And we save them for further analysis.
</p>
<div class="org-src-container">
<pre class="src src-matlab">save(<span class="org-string">'./active_damping/mat/undamped_plants.mat'</span>, <span class="org-string">'G_iff'</span>, <span class="org-string">'G_dvf'</span>, <span class="org-string">'G_ine'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-org467a586" class="outline-4">
<h4 id="org467a586"><span class="section-number-4">1.1.3</span> Obtained Plants for Active Damping</h4>
<div class="outline-text-4" id="text-1-1-3">
<div id="org9992a9d" class="figure">
<p><img src="figs/nass_active_damping_iff_plant.png" alt="nass_active_damping_iff_plant.png" />
</p>
<p><span class="figure-number">Figure 1: </span><code>G_iff</code>: IFF Plant (<a href="./figs/nass_active_damping_iff_plant.png">png</a>, <a href="./figs/nass_active_damping_iff_plant.pdf">pdf</a>)</p>
</div>
<div id="org5adefaa" class="figure">
<p><img src="figs/nass_active_damping_ine_plant.png" alt="nass_active_damping_ine_plant.png" />
</p>
<p><span class="figure-number">Figure 2: </span><code>G_dvf</code>: Plant for Direct Velocity Feedback (<a href="./figs/nass_active_damping_dvf_plant.png">png</a>, <a href="./figs/nass_active_damping_dvf_plant.pdf">pdf</a>)</p>
</div>
<div id="org071d839" class="figure">
<p><img src="figs/nass_active_damping_inertial_plant.png" alt="nass_active_damping_inertial_plant.png" />
</p>
<p><span class="figure-number">Figure 3: </span>Inertial Feedback Plant (<a href="./figs/nass_active_damping_inertial_plant.png">png</a>, <a href="./figs/nass_active_damping_inertial_plant.pdf">pdf</a>)</p>
</div>
</div>
</div>
</div>
<div id="outline-container-orgcd8379a" class="outline-3">
<h3 id="orgcd8379a"><span class="section-number-3">1.2</span> Tomography Experiment</h3>
<div class="outline-text-3" id="text-1-2">
</div>
<div id="outline-container-org3284883" class="outline-4">
<h4 id="org3284883"><span class="section-number-4">1.2.1</span> Simulation</h4>
<div class="outline-text-4" id="text-1-2-1">
<p>
We initialize elements for the tomography experiment.
</p>
<div class="org-src-container">
<pre class="src src-matlab">prepareTomographyExperiment();
</pre>
</div>
<p>
We change the simulation stop time.
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'mat/conf_simscape.mat'</span>);
<span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-variable-name">conf_simscape</span>, <span class="org-string">'StopTime'</span>, <span class="org-string">'3'</span>);
</pre>
</div>
<p>
And we simulate the system.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'sim_nass_active_damping'</span>);
</pre>
</div>
<p>
Finally, we save the simulation results for further analysis
</p>
<div class="org-src-container">
<pre class="src src-matlab">save(<span class="org-string">'./active_damping/mat/tomo_exp.mat'</span>, <span class="org-string">'En'</span>, <span class="org-string">'Eg'</span>, <span class="org-string">'-append'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-org700a2b4" class="outline-4">
<h4 id="org700a2b4"><span class="section-number-4">1.2.2</span> Results</h4>
<div class="outline-text-4" id="text-1-2-2">
<p>
We load the results of tomography experiments.
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./active_damping/mat/tomo_exp.mat'</span>, <span class="org-string">'En'</span>);
t = linspace(0, 3, length(En(<span class="org-type">:</span>,1)));
</pre>
</div>
<div id="org9eef789" class="figure">
<p><img src="figs/nass_act_damp_undamped_sim_tomo_trans.png" alt="nass_act_damp_undamped_sim_tomo_trans.png" />
</p>
<p><span class="figure-number">Figure 4: </span>Position Error during tomography experiment - Translations (<a href="./figs/nass_act_damp_undamped_sim_tomo_trans.png">png</a>, <a href="./figs/nass_act_damp_undamped_sim_tomo_trans.pdf">pdf</a>)</p>
</div>
<div id="org5e9adc2" class="figure">
<p><img src="figs/nass_act_damp_undamped_sim_tomo_rot.png" alt="nass_act_damp_undamped_sim_tomo_rot.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Position Error during tomography experiment - Rotations (<a href="./figs/nass_act_damp_undamped_sim_tomo_rot.png">png</a>, <a href="./figs/nass_act_damp_undamped_sim_tomo_rot.pdf">pdf</a>)</p>
</div>
</div>
</div>
</div>
</div>
<div id="outline-container-org4f2a70b" class="outline-2">
<h2 id="org4f2a70b"><span class="section-number-2">2</span> Integral Force Feedback</h2>
<div class="outline-text-2" id="text-2">
<p>
<a id="org0e807ab"></a>
</p>
<div class="note">
<p>
All the files (data and Matlab scripts) are accessible <a href="data/iff.zip">here</a>.
</p>
</div>
<p>
Integral Force Feedback is applied on the simscape model.
</p>
</div>
<div id="outline-container-orgf33234d" class="outline-3">
<h3 id="orgf33234d"><span class="section-number-3">2.1</span> Control Design</h3>
<div class="outline-text-3" id="text-2-1">
</div>
<div id="outline-container-orgd9afa23" class="outline-4">
<h4 id="orgd9afa23"><span class="section-number-4">2.1.1</span> Plant</h4>
<div class="outline-text-4" id="text-2-1-1">
<p>
Let&rsquo;s load the previously indentified undamped plant:
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./active_damping/mat/undamped_plants.mat'</span>, <span class="org-string">'G_iff'</span>);
</pre>
</div>
<p>
Let&rsquo;s look at the transfer function from actuator forces in the nano-hexapod to the force sensor in the nano-hexapod legs for all 6 pairs of actuator/sensor (figure <a href="#org2c9189d">6</a>).
</p>
<div id="org2c9189d" class="figure">
<p><img src="figs/iff_plant.png" alt="iff_plant.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Transfer function from forces applied in the legs to force sensor (<a href="./figs/iff_plant.png">png</a>, <a href="./figs/iff_plant.pdf">pdf</a>)</p>
</div>
</div>
</div>
<div id="outline-container-org43379d2" class="outline-4">
<h4 id="org43379d2"><span class="section-number-4">2.1.2</span> Control Design</h4>
<div class="outline-text-4" id="text-2-1-2">
<p>
The controller for each pair of actuator/sensor is:
</p>
<div class="org-src-container">
<pre class="src src-matlab">K_iff = 1000<span class="org-type">/</span>s;
</pre>
</div>
<p>
The corresponding loop gains are shown in figure <a href="#org85fcfd6">7</a>.
</p>
<div id="org85fcfd6" class="figure">
<p><img src="figs/iff_open_loop.png" alt="iff_open_loop.png" />
</p>
<p><span class="figure-number">Figure 7: </span>Loop Gain for the Integral Force Feedback (<a href="./figs/iff_open_loop.png">png</a>, <a href="./figs/iff_open_loop.pdf">pdf</a>)</p>
</div>
</div>
</div>
<div id="outline-container-orgbc20ed4" class="outline-4">
<h4 id="orgbc20ed4"><span class="section-number-4">2.1.3</span> Diagonal Controller</h4>
<div class="outline-text-4" id="text-2-1-3">
<p>
We create the diagonal controller and we add a minus sign as we have a positive
feedback architecture.
</p>
<div class="org-src-container">
<pre class="src src-matlab">K_iff = <span class="org-type">-</span>K_iff<span class="org-type">*</span>eye(6);
</pre>
</div>
<p>
We save the controller for further analysis.
</p>
<div class="org-src-container">
<pre class="src src-matlab">save(<span class="org-string">'./active_damping/mat/K_iff.mat'</span>, <span class="org-string">'K_iff'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-org90db654" class="outline-4">
<h4 id="org90db654"><span class="section-number-4">2.1.4</span> IFF with High Pass Filter</h4>
<div class="outline-text-4" id="text-2-1-4">
<div class="org-src-container">
<pre class="src src-matlab">w_hpf = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>10; <span class="org-comment">% Cut-off frequency for the high pass filter [rad/s]</span>
w_lpf = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>200; <span class="org-comment">% Cut-off frequency for the low pass filter [rad/s]</span>
K_iff = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>200<span class="org-type">/</span>s <span class="org-type">*</span> (s<span class="org-type">/</span>w_hpf)<span class="org-type">/</span>(s<span class="org-type">/</span>w_hpf <span class="org-type">+</span> 1) <span class="org-type">*</span> 1<span class="org-type">/</span>(s<span class="org-type">/</span>w_lpf <span class="org-type">+</span> 1);
</pre>
</div>
<p>
The corresponding loop gains are shown in figure <a href="#org7f0bc2b">8</a>.
</p>
<div id="org7f0bc2b" class="figure">
<p><img src="figs/iff_hpf_open_loop.png" alt="iff_hpf_open_loop.png" />
</p>
<p><span class="figure-number">Figure 8: </span>Loop Gain for the Integral Force Feedback with an High pass filter (<a href="./figs/iff_hpf_open_loop.png">png</a>, <a href="./figs/iff_hpf_open_loop.pdf">pdf</a>)</p>
</div>
<p>
We create the diagonal controller and we add a minus sign as we have a positive
feedback architecture.
</p>
<div class="org-src-container">
<pre class="src src-matlab">K_iff = <span class="org-type">-</span>K_iff<span class="org-type">*</span>eye(6);
</pre>
</div>
<p>
We save the controller for further analysis.
</p>
<div class="org-src-container">
<pre class="src src-matlab">save(<span class="org-string">'./active_damping/mat/K_iff_hpf.mat'</span>, <span class="org-string">'K_iff'</span>);
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgaaa96ff" class="outline-3">
<h3 id="orgaaa96ff"><span class="section-number-3">2.2</span> Tomography Experiment</h3>
<div class="outline-text-3" id="text-2-2">
</div>
<div id="outline-container-orgf74a390" class="outline-4">
<h4 id="orgf74a390"><span class="section-number-4">2.2.1</span> Simulation with IFF Controller</h4>
<div class="outline-text-4" id="text-2-2-1">
<p>
We initialize elements for the tomography experiment.
</p>
<div class="org-src-container">
<pre class="src src-matlab">prepareTomographyExperiment();
</pre>
</div>
<p>
We set the IFF controller.
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./active_damping/mat/K_iff.mat'</span>, <span class="org-string">'K_iff'</span>);
save(<span class="org-string">'./mat/controllers.mat'</span>, <span class="org-string">'K_iff'</span>, <span class="org-string">'-append'</span>);
</pre>
</div>
<p>
We change the simulation stop time.
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'mat/conf_simscape.mat'</span>);
<span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-variable-name">conf_simscape</span>, <span class="org-string">'StopTime'</span>, <span class="org-string">'3'</span>);
</pre>
</div>
<p>
And we simulate the system.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'sim_nass_active_damping'</span>);
</pre>
</div>
<p>
Finally, we save the simulation results for further analysis
</p>
<div class="org-src-container">
<pre class="src src-matlab">En_iff = En;
Eg_iff = Eg;
save(<span class="org-string">'./active_damping/mat/tomo_exp.mat'</span>, <span class="org-string">'En_iff'</span>, <span class="org-string">'Eg_iff'</span>, <span class="org-string">'-append'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-org95de904" class="outline-4">
<h4 id="org95de904"><span class="section-number-4">2.2.2</span> Simulation with IFF Controller with added High Pass Filter</h4>
<div class="outline-text-4" id="text-2-2-2">
<p>
We initialize elements for the tomography experiment.
</p>
<div class="org-src-container">
<pre class="src src-matlab">prepareTomographyExperiment();
</pre>
</div>
<p>
We set the IFF controller with the High Pass Filter.
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./active_damping/mat/K_iff_hpf.mat'</span>, <span class="org-string">'K_iff'</span>);
save(<span class="org-string">'./mat/controllers.mat'</span>, <span class="org-string">'K_iff'</span>, <span class="org-string">'-append'</span>);
</pre>
</div>
<p>
We change the simulation stop time.
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'mat/conf_simscape.mat'</span>);
<span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-variable-name">conf_simscape</span>, <span class="org-string">'StopTime'</span>, <span class="org-string">'3'</span>);
</pre>
</div>
<p>
And we simulate the system.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'sim_nass_active_damping'</span>);
</pre>
</div>
<p>
Finally, we save the simulation results for further analysis
</p>
<div class="org-src-container">
<pre class="src src-matlab">En_iff_hpf = En;
Eg_iff_hpf = Eg;
save(<span class="org-string">'./active_damping/mat/tomo_exp.mat'</span>, <span class="org-string">'En_iff_hpf'</span>, <span class="org-string">'Eg_iff_hpf'</span>, <span class="org-string">'-append'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-org2b12e17" class="outline-4">
<h4 id="org2b12e17"><span class="section-number-4">2.2.3</span> Compare with Undamped system</h4>
<div class="outline-text-4" id="text-2-2-3">
<p>
We load the results of tomography experiments.
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./active_damping/mat/tomo_exp.mat'</span>, <span class="org-string">'En'</span>, <span class="org-string">'En_iff'</span>, <span class="org-string">'En_iff_hpf'</span>);
t = linspace(0, 3, length(En(<span class="org-type">:</span>,1)));
</pre>
</div>
<div id="orgb5b8a36" class="figure">
<p><img src="figs/nass_act_damp_iff_sim_tomo_xy.png" alt="nass_act_damp_iff_sim_tomo_xy.png" />
</p>
<p><span class="figure-number">Figure 9: </span>Position Error during tomography experiment - XY Motion (<a href="./figs/nass_act_damp_iff_sim_tomo_xy.png">png</a>, <a href="./figs/nass_act_damp_iff_sim_tomo_xy.pdf">pdf</a>)</p>
</div>
<div id="org013fbdc" class="figure">
<p><img src="figs/nass_act_damp_iff_sim_tomo_trans.png" alt="nass_act_damp_iff_sim_tomo_trans.png" />
</p>
<p><span class="figure-number">Figure 10: </span>Position Error during tomography experiment - Translations (<a href="./figs/nass_act_damp_iff_sim_tomo_trans.png">png</a>, <a href="./figs/nass_act_damp_iff_sim_tomo_trans.pdf">pdf</a>)</p>
</div>
<div id="org9a53f55" class="figure">
<p><img src="figs/nass_act_damp_iff_sim_tomo_rot.png" alt="nass_act_damp_iff_sim_tomo_rot.png" />
</p>
<p><span class="figure-number">Figure 11: </span>Position Error during tomography experiment - Rotations (<a href="./figs/nass_act_damp_iff_sim_tomo_rot.png">png</a>, <a href="./figs/nass_act_damp_iff_sim_tomo_rot.pdf">pdf</a>)</p>
</div>
</div>
</div>
</div>
<div id="outline-container-org0fd785e" class="outline-3">
<h3 id="org0fd785e"><span class="section-number-3">2.3</span> Conclusion</h3>
<div class="outline-text-3" id="text-2-3">
<div class="important">
<p>
Integral Force Feedback:
</p>
<ul class="org-ul">
<li>Robust (guaranteed stability)</li>
<li>Acceptable Damping</li>
<li>Increase the sensitivity to disturbances at low frequencies</li>
</ul>
</div>
</div>
</div>
</div>
<div id="outline-container-org9c38d50" class="outline-2">
<h2 id="org9c38d50"><span class="section-number-2">3</span> Direct Velocity Feedback</h2>
<div class="outline-text-2" id="text-3">
<p>
<a id="orgef7f6c4"></a>
</p>
<div class="note">
<p>
All the files (data and Matlab scripts) are accessible <a href="data/dvf.zip">here</a>.
</p>
</div>
<p>
In the Direct Velocity Feedback (DVF), a derivative feedback is applied between the measured actuator displacement to the actuator force input.
The actuator displacement can be measured with a capacitive sensor for instance.
</p>
</div>
<div id="outline-container-org03f9812" class="outline-3">
<h3 id="org03f9812"><span class="section-number-3">3.1</span> Control Design</h3>
<div class="outline-text-3" id="text-3-1">
</div>
<div id="outline-container-org0426ac1" class="outline-4">
<h4 id="org0426ac1"><span class="section-number-4">3.1.1</span> Plant</h4>
<div class="outline-text-4" id="text-3-1-1">
<p>
Let&rsquo;s load the undamped plant:
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./active_damping/mat/undamped_plants.mat'</span>, <span class="org-string">'G_dvf'</span>);
</pre>
</div>
<p>
Let&rsquo;s look at the transfer function from actuator forces in the nano-hexapod to the measured displacement of the actuator for all 6 pairs of actuator/sensor (figure <a href="#orgce4a669">12</a>).
</p>
<div id="orgce4a669" class="figure">
<p><img src="figs/dvf_plant.png" alt="dvf_plant.png" />
</p>
<p><span class="figure-number">Figure 12: </span>Transfer function from forces applied in the legs to leg displacement sensor (<a href="./figs/dvf_plant.png">png</a>, <a href="./figs/dvf_plant.pdf">pdf</a>)</p>
</div>
</div>
</div>
<div id="outline-container-orgbb062d7" class="outline-4">
<h4 id="orgbb062d7"><span class="section-number-4">3.1.2</span> Control Design</h4>
<div class="outline-text-4" id="text-3-1-2">
<p>
The Direct Velocity Feedback is defined below.
A Low pass Filter is added to make the controller transfer function proper.
</p>
<div class="org-src-container">
<pre class="src src-matlab">K_dvf = s<span class="org-type">*</span>20000<span class="org-type">/</span>(1 <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>10000);
</pre>
</div>
<p>
The obtained loop gains are shown in figure <a href="#org5e3387d">13</a>.
</p>
<div id="org5e3387d" class="figure">
<p><img src="figs/dvf_open_loop.png" alt="dvf_open_loop.png" />
</p>
<p><span class="figure-number">Figure 13: </span>Loop Gain for the Integral Force Feedback (<a href="./figs/dvf_open_loop.png">png</a>, <a href="./figs/dvf_open_loop.pdf">pdf</a>)</p>
</div>
</div>
</div>
<div id="outline-container-org1bdfb4e" class="outline-4">
<h4 id="org1bdfb4e"><span class="section-number-4">3.1.3</span> Diagonal Controller</h4>
<div class="outline-text-4" id="text-3-1-3">
<p>
We create the diagonal controller and we add a minus sign as we have a positive feedback architecture.
</p>
<div class="org-src-container">
<pre class="src src-matlab">K_dvf = <span class="org-type">-</span>K_dvf<span class="org-type">*</span>eye(6);
</pre>
</div>
<p>
We save the controller for further analysis.
</p>
<div class="org-src-container">
<pre class="src src-matlab">save(<span class="org-string">'./active_damping/mat/K_dvf.mat'</span>, <span class="org-string">'K_dvf'</span>);
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org1787430" class="outline-3">
<h3 id="org1787430"><span class="section-number-3">3.2</span> Tomography Experiment</h3>
<div class="outline-text-3" id="text-3-2">
</div>
<div id="outline-container-org8c867a4" class="outline-4">
<h4 id="org8c867a4"><span class="section-number-4">3.2.1</span> Initialize the Simulation</h4>
<div class="outline-text-4" id="text-3-2-1">
<p>
We initialize elements for the tomography experiment.
</p>
<div class="org-src-container">
<pre class="src src-matlab">prepareTomographyExperiment();
</pre>
</div>
<p>
We set the DVF controller.
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./active_damping/mat/K_dvf.mat'</span>, <span class="org-string">'K_dvf'</span>);
save(<span class="org-string">'./mat/controllers.mat'</span>, <span class="org-string">'K_dvf'</span>, <span class="org-string">'-append'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-org8ca9d2f" class="outline-4">
<h4 id="org8ca9d2f"><span class="section-number-4">3.2.2</span> Simulation</h4>
<div class="outline-text-4" id="text-3-2-2">
<p>
We change the simulation stop time.
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'mat/conf_simscape.mat'</span>);
<span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-variable-name">conf_simscape</span>, <span class="org-string">'StopTime'</span>, <span class="org-string">'3'</span>);
</pre>
</div>
<p>
And we simulate the system.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'sim_nass_active_damping'</span>);
</pre>
</div>
<p>
Finally, we save the simulation results for further analysis
</p>
<div class="org-src-container">
<pre class="src src-matlab">En_dvf = En;
Eg_dvf = Eg;
save(<span class="org-string">'./active_damping/mat/tomo_exp.mat'</span>, <span class="org-string">'En_dvf'</span>, <span class="org-string">'Eg_dvf'</span>, <span class="org-string">'-append'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-org85c9eb6" class="outline-4">
<h4 id="org85c9eb6"><span class="section-number-4">3.2.3</span> Compare with Undamped system</h4>
<div class="outline-text-4" id="text-3-2-3">
<p>
We load the results of tomography experiments.
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./active_damping/mat/tomo_exp.mat'</span>, <span class="org-string">'En'</span>, <span class="org-string">'En_dvf'</span>);
t = linspace(0, 3, length(En(<span class="org-type">:</span>,1)));
</pre>
</div>
<div id="org8d6a1b3" class="figure">
<p><img src="figs/nass_act_damp_dvf_sim_tomo_xy.png" alt="nass_act_damp_dvf_sim_tomo_xy.png" />
</p>
<p><span class="figure-number">Figure 14: </span>Position Error during tomography experiment - XY Motion (<a href="./figs/nass_act_damp_dvf_sim_tomo_xy.png">png</a>, <a href="./figs/nass_act_damp_dvf_sim_tomo_xy.pdf">pdf</a>)</p>
</div>
<div id="org1faad36" class="figure">
<p><img src="figs/nass_act_damp_dvf_sim_tomo_trans.png" alt="nass_act_damp_dvf_sim_tomo_trans.png" />
</p>
<p><span class="figure-number">Figure 15: </span>Position Error during tomography experiment - Translations (<a href="./figs/nass_act_damp_dvf_sim_tomo_trans.png">png</a>, <a href="./figs/nass_act_damp_dvf_sim_tomo_trans.pdf">pdf</a>)</p>
</div>
<div id="org1d30432" class="figure">
<p><img src="figs/nass_act_damp_dvf_sim_tomo_rot.png" alt="nass_act_damp_dvf_sim_tomo_rot.png" />
</p>
<p><span class="figure-number">Figure 16: </span>Position Error during tomography experiment - Rotations (<a href="./figs/nass_act_damp_dvf_sim_tomo_rot.png">png</a>, <a href="./figs/nass_act_damp_dvf_sim_tomo_rot.pdf">pdf</a>)</p>
</div>
</div>
</div>
</div>
<div id="outline-container-org7ea48ad" class="outline-3">
<h3 id="org7ea48ad"><span class="section-number-3">3.3</span> Conclusion</h3>
<div class="outline-text-3" id="text-3-3">
<div class="important">
<p>
Direct Velocity Feedback:
</p>
<ul class="org-ul">
<li></li>
</ul>
</div>
</div>
</div>
</div>
<div id="outline-container-orgddee501" class="outline-2">
<h2 id="orgddee501"><span class="section-number-2">4</span> Inertial Control</h2>
<div class="outline-text-2" id="text-4">
<p>
<a id="org1930728"></a>
</p>
<div class="note">
<p>
All the files (data and Matlab scripts) are accessible <a href="data/ine.zip">here</a>.
</p>
</div>
<p>
In Inertial Control, a feedback is applied between the measured <b>absolute</b> motion (velocity or acceleration) of the platform to the actuator force input.
</p>
</div>
<div id="outline-container-org183d718" class="outline-3">
<h3 id="org183d718"><span class="section-number-3">4.1</span> Control Design</h3>
<div class="outline-text-3" id="text-4-1">
</div>
<div id="outline-container-org3b0c93b" class="outline-4">
<h4 id="org3b0c93b"><span class="section-number-4">4.1.1</span> Plant</h4>
<div class="outline-text-4" id="text-4-1-1">
<p>
Let&rsquo;s load the undamped plant:
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./active_damping/mat/undamped_plants.mat'</span>, <span class="org-string">'G_ine'</span>);
</pre>
</div>
<p>
Let&rsquo;s look at the transfer function from actuator forces in the nano-hexapod to the measured velocity of the nano-hexapod platform in the direction of the corresponding actuator for all 6 pairs of actuator/sensor (figure <a href="#orgd2495ce">17</a>).
</p>
<div id="orgd2495ce" class="figure">
<p><img src="figs/ine_plant.png" alt="ine_plant.png" />
</p>
<p><span class="figure-number">Figure 17: </span>Transfer function from forces applied in the legs to leg velocity sensor (<a href="./figs/ine_plant.png">png</a>, <a href="./figs/ine_plant.pdf">pdf</a>)</p>
</div>
</div>
</div>
<div id="outline-container-org0613819" class="outline-4">
<h4 id="org0613819"><span class="section-number-4">4.1.2</span> Control Design</h4>
<div class="outline-text-4" id="text-4-1-2">
<p>
The controller is defined below and the obtained loop gain is shown in figure <a href="#org766b991">18</a>.
</p>
<div class="org-src-container">
<pre class="src src-matlab">K_ine = 1e4<span class="org-type">/</span>(1<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>100));
</pre>
</div>
<div id="org766b991" class="figure">
<p><img src="figs/ine_open_loop_gain.png" alt="ine_open_loop_gain.png" />
</p>
<p><span class="figure-number">Figure 18: </span>Loop Gain for Inertial Control (<a href="./figs/ine_open_loop_gain.png">png</a>, <a href="./figs/ine_open_loop_gain.pdf">pdf</a>)</p>
</div>
</div>
</div>
<div id="outline-container-org7eb6d4a" class="outline-4">
<h4 id="org7eb6d4a"><span class="section-number-4">4.1.3</span> Diagonal Controller</h4>
<div class="outline-text-4" id="text-4-1-3">
<p>
We create the diagonal controller and we add a minus sign as we have a positive feedback architecture.
</p>
<div class="org-src-container">
<pre class="src src-matlab">K_ine = <span class="org-type">-</span>K_ine<span class="org-type">*</span>eye(6);
</pre>
</div>
<p>
We save the controller for further analysis.
</p>
<div class="org-src-container">
<pre class="src src-matlab">save(<span class="org-string">'./active_damping/mat/K_ine.mat'</span>, <span class="org-string">'K_ine'</span>);
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgb837286" class="outline-3">
<h3 id="orgb837286"><span class="section-number-3">4.2</span> Tomography Experiment</h3>
<div class="outline-text-3" id="text-4-2">
</div>
<div id="outline-container-org088d0cf" class="outline-4">
<h4 id="org088d0cf"><span class="section-number-4">4.2.1</span> Initialize the Simulation</h4>
<div class="outline-text-4" id="text-4-2-1">
<p>
We initialize elements for the tomography experiment.
</p>
<div class="org-src-container">
<pre class="src src-matlab">prepareTomographyExperiment();
</pre>
</div>
<p>
We set the Inertial controller.
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./active_damping/mat/K_ine.mat'</span>, <span class="org-string">'K_ine'</span>);
save(<span class="org-string">'./mat/controllers.mat'</span>, <span class="org-string">'K_ine'</span>, <span class="org-string">'-append'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-orge0acdea" class="outline-4">
<h4 id="orge0acdea"><span class="section-number-4">4.2.2</span> Simulation</h4>
<div class="outline-text-4" id="text-4-2-2">
<p>
We change the simulation stop time.
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'mat/conf_simscape.mat'</span>);
<span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-variable-name">conf_simscape</span>, <span class="org-string">'StopTime'</span>, <span class="org-string">'3'</span>);
</pre>
</div>
<p>
And we simulate the system.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'sim_nass_active_damping'</span>);
</pre>
</div>
<p>
Finally, we save the simulation results for further analysis
</p>
<div class="org-src-container">
<pre class="src src-matlab">En_ine = En;
Eg_ine = Eg;
save(<span class="org-string">'./active_damping/mat/tomo_exp.mat'</span>, <span class="org-string">'En_ine'</span>, <span class="org-string">'Eg_ine'</span>, <span class="org-string">'-append'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-orgb9346a9" class="outline-4">
<h4 id="orgb9346a9"><span class="section-number-4">4.2.3</span> Compare with Undamped system</h4>
<div class="outline-text-4" id="text-4-2-3">
<p>
We load the results of tomography experiments.
</p>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./active_damping/mat/tomo_exp.mat'</span>, <span class="org-string">'En'</span>, <span class="org-string">'En_ine'</span>);
t = linspace(0, 3, length(En_ine(<span class="org-type">:</span>,1)));
</pre>
</div>
<div id="orga44ff4c" class="figure">
<p><img src="figs/nass_act_damp_ine_sim_tomo_xy.png" alt="nass_act_damp_ine_sim_tomo_xy.png" />
</p>
<p><span class="figure-number">Figure 19: </span>Position Error during tomography experiment - XY Motion (<a href="./figs/nass_act_damp_ine_sim_tomo_xy.png">png</a>, <a href="./figs/nass_act_damp_ine_sim_tomo_xy.pdf">pdf</a>)</p>
</div>
<div id="orgaf24027" class="figure">
<p><img src="figs/nass_act_damp_ine_sim_tomo_trans.png" alt="nass_act_damp_ine_sim_tomo_trans.png" />
</p>
<p><span class="figure-number">Figure 20: </span>Position Error during tomography experiment - Translations (<a href="./figs/nass_act_damp_ine_sim_tomo_trans.png">png</a>, <a href="./figs/nass_act_damp_ine_sim_tomo_trans.pdf">pdf</a>)</p>
</div>
<div id="org3935c70" class="figure">
<p><img src="figs/nass_act_damp_ine_sim_tomo_rot.png" alt="nass_act_damp_ine_sim_tomo_rot.png" />
</p>
<p><span class="figure-number">Figure 21: </span>Position Error during tomography experiment - Rotations (<a href="./figs/nass_act_damp_ine_sim_tomo_rot.png">png</a>, <a href="./figs/nass_act_damp_ine_sim_tomo_rot.pdf">pdf</a>)</p>
</div>
</div>
</div>
</div>
<div id="outline-container-org971b7df" class="outline-3">
<h3 id="org971b7df"><span class="section-number-3">4.3</span> Conclusion</h3>
<div class="outline-text-3" id="text-4-3">
<div class="important">
<p>
Inertial Control:
</p>
</div>
</div>
</div>
</div>
<div id="outline-container-orgb30a5ab" class="outline-2">
<h2 id="orgb30a5ab"><span class="section-number-2">5</span> Comparison</h2>
<div class="outline-text-2" id="text-5">
<p>
<a id="org145a075"></a>
</p>
</div>
<div id="outline-container-org056c3e4" class="outline-3">
<h3 id="org056c3e4"><span class="section-number-3">5.1</span> Load the plants</h3>
<div class="outline-text-3" id="text-5-1">
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./active_damping/mat/plants.mat'</span>, <span class="org-string">'G'</span>, <span class="org-string">'G_iff'</span>, <span class="org-string">'G_ine'</span>, <span class="org-string">'G_dvf'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-org75158e7" class="outline-3">
<h3 id="org75158e7"><span class="section-number-3">5.2</span> Sensitivity to Disturbance</h3>
<div class="outline-text-3" id="text-5-2">
<div id="org1fd62ca" class="figure">
<p><img src="figs/sensitivity_comp_ground_motion_z.png" alt="sensitivity_comp_ground_motion_z.png" />
</p>
<p><span class="figure-number">Figure 22: </span>caption (<a href="./figs/sensitivity_comp_ground_motion_z.png">png</a>, <a href="./figs/sensitivity_comp_ground_motion_z.pdf">pdf</a>)</p>
</div>
<div id="orgf88bf41" class="figure">
<p><img src="figs/sensitivity_comp_direct_forces_z.png" alt="sensitivity_comp_direct_forces_z.png" />
</p>
<p><span class="figure-number">Figure 23: </span>caption (<a href="./figs/sensitivity_comp_direct_forces_z.png">png</a>, <a href="./figs/sensitivity_comp_direct_forces_z.pdf">pdf</a>)</p>
</div>
<div id="org38bd3f1" class="figure">
<p><img src="figs/sensitivity_comp_spindle_z.png" alt="sensitivity_comp_spindle_z.png" />
</p>
<p><span class="figure-number">Figure 24: </span>caption (<a href="./figs/sensitivity_comp_spindle_z.png">png</a>, <a href="./figs/sensitivity_comp_spindle_z.pdf">pdf</a>)</p>
</div>
<div id="org028eb1e" class="figure">
<p><img src="figs/sensitivity_comp_ty_z.png" alt="sensitivity_comp_ty_z.png" />
</p>
<p><span class="figure-number">Figure 25: </span>caption (<a href="./figs/sensitivity_comp_ty_z.png">png</a>, <a href="./figs/sensitivity_comp_ty_z.pdf">pdf</a>)</p>
</div>
<div id="org35bcb61" class="figure">
<p><img src="figs/sensitivity_comp_ty_x.png" alt="sensitivity_comp_ty_x.png" />
</p>
<p><span class="figure-number">Figure 26: </span>caption (<a href="./figs/sensitivity_comp_ty_x.png">png</a>, <a href="./figs/sensitivity_comp_ty_x.pdf">pdf</a>)</p>
</div>
</div>
</div>
<div id="outline-container-orgca4880d" class="outline-3">
<h3 id="orgca4880d"><span class="section-number-3">5.3</span> Damped Plant</h3>
<div class="outline-text-3" id="text-5-3">
<div id="org8b00ca9" class="figure">
<p><img src="figs/plant_comp_damping_z.png" alt="plant_comp_damping_z.png" />
</p>
<p><span class="figure-number">Figure 27: </span>Plant for the \(z\) direction for different active damping technique used (<a href="./figs/plant_comp_damping_z.png">png</a>, <a href="./figs/plant_comp_damping_z.pdf">pdf</a>)</p>
</div>
<div id="org9b6dd84" class="figure">
<p><img src="figs/plant_comp_damping_x.png" alt="plant_comp_damping_x.png" />
</p>
<p><span class="figure-number">Figure 28: </span>Plant for the \(x\) direction for different active damping technique used (<a href="./figs/plant_comp_damping_x.png">png</a>, <a href="./figs/plant_comp_damping_x.pdf">pdf</a>)</p>
</div>
<div id="orga1e06be" class="figure">
<p><img src="figs/plant_comp_damping_coupling.png" alt="plant_comp_damping_coupling.png" />
</p>
<p><span class="figure-number">Figure 29: </span>Comparison of one off-diagonal plant for different damping technique applied (<a href="./figs/plant_comp_damping_coupling.png">png</a>, <a href="./figs/plant_comp_damping_coupling.pdf">pdf</a>)</p>
</div>
</div>
</div>
<div id="outline-container-org4b14fbd" class="outline-3">
<h3 id="org4b14fbd"><span class="section-number-3">5.4</span> Tomography Experiment</h3>
<div class="outline-text-3" id="text-5-4">
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'./active_damping/mat/tomo_exp.mat'</span>, <span class="org-string">'En'</span>, <span class="org-string">'En_iff'</span>, <span class="org-string">'En_dvf'</span>, <span class="org-string">'En_ine'</span>);
t = linspace(0, 3, length(En(<span class="org-type">:</span>,1)));
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">rms(sqrt(En(<span class="org-type">:</span>, 1)<span class="org-type">.^</span>2 <span class="org-type">+</span> En(<span class="org-type">:</span>, 2)<span class="org-type">.^</span>2 <span class="org-type">+</span> En(<span class="org-type">:</span>, 3)<span class="org-type">.^</span>2))
rms(sqrt(En_ine(<span class="org-type">:</span>, 1)<span class="org-type">.^</span>2 <span class="org-type">+</span> En_ine(<span class="org-type">:</span>, 2)<span class="org-type">.^</span>2 <span class="org-type">+</span> En_ine(<span class="org-type">:</span>, 3)<span class="org-type">.^</span>2))
rms(sqrt(En_dvf(<span class="org-type">:</span>, 1)<span class="org-type">.^</span>2 <span class="org-type">+</span> En_dvf(<span class="org-type">:</span>, 2)<span class="org-type">.^</span>2 <span class="org-type">+</span> En_dvf(<span class="org-type">:</span>, 3)<span class="org-type">.^</span>2))
rms(sqrt(En_iff(<span class="org-type">:</span>, 1)<span class="org-type">.^</span>2 <span class="org-type">+</span> En_iff(<span class="org-type">:</span>, 2)<span class="org-type">.^</span>2 <span class="org-type">+</span> En_iff(<span class="org-type">:</span>, 3)<span class="org-type">.^</span>2))
</pre>
</div>
</div>
<div id="outline-container-org2213b1c" class="outline-4">
<h4 id="org2213b1c"><span class="section-number-4">5.4.1</span> Frequency Domain</h4>
<div class="outline-text-4" id="text-5-4-1">
<div class="org-src-container">
<pre class="src src-matlab">Ts = t(2)<span class="org-type">-</span>t(1); <span class="org-comment">% Sample Time for the Data [s]</span>
n_av = 8;
han_win = hanning(ceil(length(En(<span class="org-type">:</span>, 1))<span class="org-type">/</span>n_av));
[pxx, f] = pwelch(En(<span class="org-type">:</span>, 1), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pxx_ine, <span class="org-type">~</span>] = pwelch(En_ine(<span class="org-type">:</span>, 1), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pxx_dvf, <span class="org-type">~</span>] = pwelch(En_dvf(<span class="org-type">:</span>, 1), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pxx_iff, <span class="org-type">~</span>] = pwelch(En_iff(<span class="org-type">:</span>, 1), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pyy, <span class="org-type">~</span>] = pwelch(En(<span class="org-type">:</span>, 2), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pyy_ine, <span class="org-type">~</span>] = pwelch(En_ine(<span class="org-type">:</span>, 2), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pyy_dvf, <span class="org-type">~</span>] = pwelch(En_dvf(<span class="org-type">:</span>, 2), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pyy_iff, <span class="org-type">~</span>] = pwelch(En_iff(<span class="org-type">:</span>, 2), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pzz, <span class="org-type">~</span>] = pwelch(En(<span class="org-type">:</span>, 3), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pzz_ine, <span class="org-type">~</span>] = pwelch(En_ine(<span class="org-type">:</span>, 3), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pzz_dvf, <span class="org-type">~</span>] = pwelch(En_dvf(<span class="org-type">:</span>, 3), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pzz_iff, <span class="org-type">~</span>] = pwelch(En_iff(<span class="org-type">:</span>, 3), han_win, [], [], 1<span class="org-type">/</span>Ts);
[prx, <span class="org-type">~</span>] = pwelch(En(<span class="org-type">:</span>, 4), han_win, [], [], 1<span class="org-type">/</span>Ts);
[prx_ine, <span class="org-type">~</span>] = pwelch(En_ine(<span class="org-type">:</span>, 4), han_win, [], [], 1<span class="org-type">/</span>Ts);
[prx_dvf, <span class="org-type">~</span>] = pwelch(En_dvf(<span class="org-type">:</span>, 4), han_win, [], [], 1<span class="org-type">/</span>Ts);
[prx_iff, <span class="org-type">~</span>] = pwelch(En_iff(<span class="org-type">:</span>, 4), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pry, <span class="org-type">~</span>] = pwelch(En(<span class="org-type">:</span>, 5), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pry_ine, <span class="org-type">~</span>] = pwelch(En_ine(<span class="org-type">:</span>, 5), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pry_dvf, <span class="org-type">~</span>] = pwelch(En_dvf(<span class="org-type">:</span>, 5), han_win, [], [], 1<span class="org-type">/</span>Ts);
[pry_iff, <span class="org-type">~</span>] = pwelch(En_iff(<span class="org-type">:</span>, 5), han_win, [], [], 1<span class="org-type">/</span>Ts);
[prz, <span class="org-type">~</span>] = pwelch(En(<span class="org-type">:</span>, 6), han_win, [], [], 1<span class="org-type">/</span>Ts);
[prz_ine, <span class="org-type">~</span>] = pwelch(En_ine(<span class="org-type">:</span>, 6), han_win, [], [], 1<span class="org-type">/</span>Ts);
[prz_dvf, <span class="org-type">~</span>] = pwelch(En_dvf(<span class="org-type">:</span>, 6), han_win, [], [], 1<span class="org-type">/</span>Ts);
[prz_iff, <span class="org-type">~</span>] = pwelch(En_iff(<span class="org-type">:</span>, 6), han_win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">figure</span>;
hold on;
plot(f, prx_ine, <span class="org-string">'DisplayName'</span>, <span class="org-string">'Inertial'</span>)
plot(f, prx_dvf, <span class="org-string">'DisplayName'</span>, <span class="org-string">'DVF'</span>)
plot(f, prx_iff, <span class="org-string">'DisplayName'</span>, <span class="org-string">'IFF'</span>)
plot(f, prx, <span class="org-string">'k--'</span>, <span class="org-string">'DisplayName'</span>, <span class="org-string">'Undamped'</span>)
hold off;
xlabel(<span class="org-string">'Frequency [Hz]'</span>);
ylabel(<span class="org-string">'Power Spectral Density [$m^2/Hz$]'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'xscale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'yscale'</span>, <span class="org-string">'log'</span>);
legend(<span class="org-string">'location'</span>, <span class="org-string">'northeast'</span>);
xlim([1, 500]);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">figure</span>;
hold on;
plot(f, pxx_ine, <span class="org-string">'DisplayName'</span>, <span class="org-string">'Inertial'</span>)
plot(f, pxx_dvf, <span class="org-string">'DisplayName'</span>, <span class="org-string">'DVF'</span>)
plot(f, pxx_iff, <span class="org-string">'DisplayName'</span>, <span class="org-string">'IFF'</span>)
plot(f, pxx, <span class="org-string">'k--'</span>, <span class="org-string">'DisplayName'</span>, <span class="org-string">'Undamped'</span>)
hold off;
xlabel(<span class="org-string">'Frequency [Hz]'</span>);
ylabel(<span class="org-string">'Power Spectral Density [$m^2/Hz$]'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'xscale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'yscale'</span>, <span class="org-string">'log'</span>);
legend(<span class="org-string">'location'</span>, <span class="org-string">'northeast'</span>);
xlim([1, 500]);
</pre>
</div>
</div>
</div>
</div>
</div>
<div id="outline-container-orge02060f" class="outline-2">
<h2 id="orge02060f"><span class="section-number-2">6</span> Useful Functions</h2>
<div class="outline-text-2" id="text-6">
</div>
<div id="outline-container-org0b9e75d" class="outline-3">
<h3 id="org0b9e75d"><span class="section-number-3">6.1</span> prepareTomographyExperiment</h3>
<div class="outline-text-3" id="text-6-1">
<p>
<a id="orgbc5dfba"></a>
</p>
<p>
This Matlab function is accessible <a href="src/prepareTomographyExperiment.m">here</a>.
</p>
</div>
<div id="outline-container-org637f0d7" class="outline-4">
<h4 id="org637f0d7">Function Description</h4>
<div class="outline-text-4" id="text-org637f0d7">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[]</span> = <span class="org-function-name">prepareTomographyExperiment</span>(<span class="org-variable-name">args</span>)
</pre>
</div>
</div>
</div>
<div id="outline-container-orgac8374d" class="outline-4">
<h4 id="orgac8374d">Optional Parameters</h4>
<div class="outline-text-4" id="text-orgac8374d">
<div class="org-src-container">
<pre class="src src-matlab">arguments
args.nass_actuator char {mustBeMember(args.nass_actuator,{<span class="org-string">'piezo'</span>, <span class="org-string">'lorentz'</span>})} = <span class="org-string">'piezo'</span>
args.sample_mass (1,1) double {mustBeNumeric, mustBePositive} = 50
args.Ry_period (1,1) double {mustBeNumeric, mustBePositive} = 1
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgb19cd54" class="outline-4">
<h4 id="orgb19cd54">Initialize the Simulation</h4>
<div class="outline-text-4" id="text-orgb19cd54">
<p>
We initialize all the stages with the default parameters.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
</pre>
</div>
<p>
The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeNanoHexapod(<span class="org-string">'actuator'</span>, args.nass_actuator);
initializeSample(<span class="org-string">'mass'</span>, args.sample_mass);
</pre>
</div>
<p>
We set the references to zero.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeReferences(<span class="org-string">'Rz_type'</span>, <span class="org-string">'rotating'</span>, <span class="org-string">'Rz_period'</span>, args.Ry_period);
</pre>
</div>
<p>
And all the controllers are set to 0.
</p>
<div class="org-src-container">
<pre class="src src-matlab">K = tf(zeros(6));
save(<span class="org-string">'./mat/controllers.mat'</span>, <span class="org-string">'K'</span>, <span class="org-string">'-append'</span>);
K_ine = tf(zeros(6));
save(<span class="org-string">'./mat/controllers.mat'</span>, <span class="org-string">'K_ine'</span>, <span class="org-string">'-append'</span>);
K_iff = tf(zeros(6));
save(<span class="org-string">'./mat/controllers.mat'</span>, <span class="org-string">'K_iff'</span>, <span class="org-string">'-append'</span>);
K_dvf = tf(zeros(6));
save(<span class="org-string">'./mat/controllers.mat'</span>, <span class="org-string">'K_dvf'</span>, <span class="org-string">'-append'</span>);
</pre>
</div>
</div>
</div>
</div>
</div>
2019-10-08 11:13:38 +02:00
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2020-01-20 lun. 17:18</p>
2019-10-08 11:13:38 +02:00
</div>
</body>
</html>