test-bench-nano-hexapod/test-bench-nano-hexapod.html

774 lines
36 KiB
HTML
Raw Normal View History

2021-06-07 19:00:29 +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-06-10 jeu. 17:52 -->
2021-06-07 19:00:29 +02:00
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Nano-Hexapod - Test Bench</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>
2021-06-08 22:39:35 +02:00
<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>
2021-06-07 19:00:29 +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">Nano-Hexapod - Test Bench</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org8cdd071">1. Encoders fixed to the Struts</a>
2021-06-08 22:14:48 +02:00
<ul>
<li><a href="#org3d72b93">1.1. Introduction</a></li>
<li><a href="#orgcb16db3">1.2. Identification of the dynamics</a>
2021-06-08 22:15:02 +02:00
<ul>
<li><a href="#org7810966">1.2.1. Load Data</a></li>
<li><a href="#orge39bc92">1.2.2. Spectral Analysis - Setup</a></li>
<li><a href="#orge971c61">1.2.3. DVF Plant</a></li>
<li><a href="#orgfe174fa">1.2.4. IFF Plant</a></li>
2021-06-09 18:14:45 +02:00
</ul>
</li>
<li><a href="#orgaa25438">1.3. Comparison with the Simscape Model</a>
2021-06-09 18:14:45 +02:00
<ul>
<li><a href="#org8c6e670">1.3.1. Dynamics from Actuator to Force Sensors</a></li>
<li><a href="#orgb40c194">1.3.2. Dynamics from Actuator to Encoder</a></li>
2021-06-09 18:14:45 +02:00
</ul>
</li>
<li><a href="#org07b83f4">1.4. Integral Force Feedback</a>
2021-06-09 18:14:45 +02:00
<ul>
<li><a href="#org32df075">1.4.1. Root Locus and Decentralized Loop gain</a></li>
<li><a href="#orge5e9cea">1.4.2. Multiple Gains - Simulation</a></li>
<li><a href="#orga581915">1.4.3. Experimental Results - Gains</a>
<ul>
<li><a href="#org7089ea1">1.4.3.1. Load Data</a></li>
<li><a href="#org54efadb">1.4.3.2. Spectral Analysis - Setup</a></li>
<li><a href="#org5262511">1.4.3.3. DVF Plant</a></li>
<li><a href="#org47db15b">1.4.3.4. Experimental Results - Comparison of the un-damped and fully damped system</a></li>
</ul>
</li>
<li><a href="#orgd48530e">1.4.4. Experimental Results - Damped Plant with Optimal gain</a>
<ul>
<li><a href="#orgf0af7da">1.4.4.1. Load Data</a></li>
<li><a href="#org1ce1b15">1.4.4.2. Spectral Analysis - Setup</a></li>
<li><a href="#orgac97ace">1.4.4.3. DVF Plant</a></li>
2021-06-08 22:15:02 +02:00
</ul>
</li>
2021-06-08 22:14:48 +02:00
</ul>
</li>
</ul>
</li>
<li><a href="#orgba38b08">2. Encoders fixed to the plates</a></li>
2021-06-07 19:00:29 +02:00
</ul>
</div>
</div>
<hr>
<p>This report is also available as a <a href="./test-bench-nano-hexapod.pdf">pdf</a>.</p>
<hr>
2021-06-09 18:14:45 +02:00
<p>
In this document, the dynamics of the nano-hexapod shown in Figure <a href="#org67868f6">1</a> is identified.
2021-06-09 18:14:45 +02:00
</p>
<div class="note" id="org61a7813">
2021-06-07 19:00:29 +02:00
<p>
Here are the documentation of the equipment used for this test bench:
</p>
<ul class="org-ul">
<li>Voltage Amplifier: PiezoDrive <a href="doc/PD200-V7-R1.pdf">PD200</a></li>
<li>Amplified Piezoelectric Actuator: Cedrat <a href="doc/APA300ML.pdf">APA300ML</a></li>
<li>DAC/ADC: Speedgoat <a href="doc/IO131-OEM-Datasheet.pdf">IO313</a></li>
<li>Encoder: Renishaw <a href="doc/L-9517-9678-05-A_Data_sheet_VIONiC_series_en.pdf">Vionic</a> and used <a href="doc/L-9517-9862-01-C_Data_sheet_RKLC_EN.pdf">Ruler</a></li>
<li>Interferometers: Attocube</li>
</ul>
</div>
2021-06-08 22:14:48 +02:00
<div id="org67868f6" class="figure">
2021-06-08 22:14:48 +02:00
<p><img src="figs/IMG_20210608_152917.jpg" alt="IMG_20210608_152917.jpg" />
</p>
<p><span class="figure-number">Figure 1: </span>Nano-Hexapod</p>
</div>
<div id="org492c735" class="figure">
2021-06-08 22:14:48 +02:00
<p><img src="figs/IMG_20210608_154722.jpg" alt="IMG_20210608_154722.jpg" />
</p>
<p><span class="figure-number">Figure 2: </span>Nano-Hexapod and the control electronics</p>
</div>
2021-06-09 18:14:45 +02:00
<div id="orgab57ea9" class="figure">
2021-06-09 18:14:45 +02:00
<p><img src="figs/nano_hexapod_signals.png" alt="nano_hexapod_signals.png" />
</p>
<p><span class="figure-number">Figure 3: </span>Block diagram of the system with named signals</p>
</div>
<table id="org3c0425e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
2021-06-09 18:14:45 +02:00
<caption class="t-above"><span class="table-number">Table 1:</span> List of signals</caption>
<colgroup>
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">&#xa0;</th>
<th scope="col" class="org-left"><b>Unit</b></th>
<th scope="col" class="org-left"><b>Matlab</b></th>
<th scope="col" class="org-left"><b>Vector</b></th>
<th scope="col" class="org-left"><b>Elements</b></th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">Control Input (wanted DAC voltage)</td>
<td class="org-left"><code>[V]</code></td>
<td class="org-left"><code>u</code></td>
<td class="org-left">\(\bm{u}\)</td>
<td class="org-left">\(u_i\)</td>
</tr>
<tr>
<td class="org-left">DAC Output Voltage</td>
<td class="org-left"><code>[V]</code></td>
<td class="org-left"><code>u</code></td>
<td class="org-left">\(\tilde{\bm{u}}\)</td>
<td class="org-left">\(\tilde{u}_i\)</td>
</tr>
<tr>
<td class="org-left">PD200 Output Voltage</td>
<td class="org-left"><code>[V]</code></td>
<td class="org-left"><code>ua</code></td>
<td class="org-left">\(\bm{u}_a\)</td>
<td class="org-left">\(u_{a,i}\)</td>
</tr>
<tr>
<td class="org-left">Actuator applied force</td>
<td class="org-left"><code>[N]</code></td>
<td class="org-left"><code>tau</code></td>
<td class="org-left">\(\bm{\tau}\)</td>
<td class="org-left">\(\tau_i\)</td>
</tr>
</tbody>
<tbody>
<tr>
<td class="org-left">Strut motion</td>
<td class="org-left"><code>[m]</code></td>
<td class="org-left"><code>dL</code></td>
<td class="org-left">\(d\bm{\mathcal{L}}\)</td>
<td class="org-left">\(d\mathcal{L}_i\)</td>
</tr>
<tr>
<td class="org-left">Encoder measured displacement</td>
<td class="org-left"><code>[m]</code></td>
<td class="org-left"><code>dLm</code></td>
<td class="org-left">\(d\bm{\mathcal{L}}_m\)</td>
<td class="org-left">\(d\mathcal{L}_{m,i}\)</td>
</tr>
</tbody>
<tbody>
<tr>
<td class="org-left">Force Sensor strain</td>
<td class="org-left"><code>[m]</code></td>
<td class="org-left"><code>epsilon</code></td>
<td class="org-left">\(\bm{\epsilon}\)</td>
<td class="org-left">\(\epsilon_i\)</td>
</tr>
<tr>
<td class="org-left">Force Sensor Generated Voltage</td>
<td class="org-left"><code>[V]</code></td>
<td class="org-left"><code>taum</code></td>
<td class="org-left">\(\tilde{\bm{\tau}}_m\)</td>
<td class="org-left">\(\tilde{\tau}_{m,i}\)</td>
</tr>
<tr>
<td class="org-left">Measured Generated Voltage</td>
<td class="org-left"><code>[V]</code></td>
<td class="org-left"><code>taum</code></td>
<td class="org-left">\(\bm{\tau}_m\)</td>
<td class="org-left">\(\tau_{m,i}\)</td>
</tr>
</tbody>
<tbody>
<tr>
<td class="org-left">Motion of the top platform</td>
<td class="org-left"><code>[m,rad]</code></td>
<td class="org-left"><code>dX</code></td>
<td class="org-left">\(d\bm{\mathcal{X}}\)</td>
<td class="org-left">\(d\mathcal{X}_i\)</td>
</tr>
<tr>
<td class="org-left">Metrology measured displacement</td>
<td class="org-left"><code>[m,rad]</code></td>
<td class="org-left"><code>dXm</code></td>
<td class="org-left">\(d\bm{\mathcal{X}}_m\)</td>
<td class="org-left">\(d\mathcal{X}_{m,i}\)</td>
</tr>
</tbody>
</table>
<div id="outline-container-org8cdd071" class="outline-2">
<h2 id="org8cdd071"><span class="section-number-2">1</span> Encoders fixed to the Struts</h2>
2021-06-08 22:15:02 +02:00
<div class="outline-text-2" id="text-1">
2021-06-08 22:14:48 +02:00
</div>
<div id="outline-container-org3d72b93" class="outline-3">
<h3 id="org3d72b93"><span class="section-number-3">1.1</span> Introduction</h3>
2021-06-08 22:39:35 +02:00
<div class="outline-text-3" id="text-1-1">
<p>
In this section, the encoders are fixed to the struts.
</p>
</div>
2021-06-08 22:14:48 +02:00
</div>
<div id="outline-container-orgcb16db3" class="outline-3">
<h3 id="orgcb16db3"><span class="section-number-3">1.2</span> Identification of the dynamics</h3>
2021-06-08 22:15:02 +02:00
<div class="outline-text-3" id="text-1-2">
2021-06-09 18:14:45 +02:00
</div>
<div id="outline-container-org7810966" class="outline-4">
<h4 id="org7810966"><span class="section-number-4">1.2.1</span> Load Data</h4>
2021-06-09 18:14:45 +02:00
<div class="outline-text-4" id="text-1-2-1">
2021-06-08 22:14:48 +02:00
<div class="org-src-container">
2021-06-09 18:14:45 +02:00
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Load Identification Data</span></span>
meas_data_lf = {};
2021-06-08 22:14:48 +02:00
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
meas_data_lf(<span class="org-constant">i</span>) = {load(sprintf(<span class="org-string">'mat/frf_data_exc_strut_%i_noise_lf.mat'</span>, <span class="org-constant">i</span>), <span class="org-string">'t'</span>, <span class="org-string">'Va'</span>, <span class="org-string">'Vs'</span>, <span class="org-string">'de'</span>)};
meas_data_hf(<span class="org-constant">i</span>) = {load(sprintf(<span class="org-string">'mat/frf_data_exc_strut_%i_noise_hf.mat'</span>, <span class="org-constant">i</span>), <span class="org-string">'t'</span>, <span class="org-string">'Va'</span>, <span class="org-string">'Vs'</span>, <span class="org-string">'de'</span>)};
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orge39bc92" class="outline-4">
<h4 id="orge39bc92"><span class="section-number-4">1.2.2</span> Spectral Analysis - Setup</h4>
2021-06-09 18:14:45 +02:00
<div class="outline-text-4" id="text-1-2-2">
2021-06-08 22:14:48 +02:00
<div class="org-src-container">
2021-06-09 18:14:45 +02:00
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Setup useful variables</span></span>
<span class="org-comment">% Sampling Time [s]</span>
2021-06-08 22:14:48 +02:00
Ts = (meas_data_lf{1}.t(end) <span class="org-type">-</span> (meas_data_lf{1}.t(1)))<span class="org-type">/</span>(length(meas_data_lf{1}.t)<span class="org-type">-</span>1);
<span class="org-comment">% Sampling Frequency [Hz]</span>
Fs = 1<span class="org-type">/</span>Ts;
<span class="org-comment">% Hannning Windows</span>
win = hanning(ceil(1<span class="org-type">*</span>Fs));
2021-06-09 18:14:45 +02:00
<span class="org-comment">% And we get the frequency vector</span>
[<span class="org-type">~</span>, f] = tfestimate(meas_data_lf{1}.Va, meas_data_lf{1}.de, win, [], [], 1<span class="org-type">/</span>Ts);
2021-06-08 22:14:48 +02:00
2021-06-09 18:14:45 +02:00
i_lf = f <span class="org-type">&lt;</span> 250; <span class="org-comment">% Points for low frequency excitation</span>
2021-06-08 22:14:48 +02:00
i_hf = f <span class="org-type">&gt;</span> 250; <span class="org-comment">% Points for high frequency excitation</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orge971c61" class="outline-4">
<h4 id="orge971c61"><span class="section-number-4">1.2.3</span> DVF Plant</h4>
2021-06-09 18:14:45 +02:00
<div class="outline-text-4" id="text-1-2-3">
2021-06-08 22:14:48 +02:00
<p>
First, let&rsquo;s compute the coherence from the excitation voltage and the displacement as measured by the encoders (Figure <a href="#orgc8a5209">4</a>).
2021-06-08 22:14:48 +02:00
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Coherence</span></span>
coh_dvf_lf = zeros(length(f), 6, 6);
coh_dvf_hf = zeros(length(f), 6, 6);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
coh_dvf_lf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = mscohere(meas_data_lf{<span class="org-constant">i</span>}.Va, meas_data_lf{<span class="org-constant">i</span>}.de, win, [], [], 1<span class="org-type">/</span>Ts);
coh_dvf_hf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = mscohere(meas_data_hf{<span class="org-constant">i</span>}.Va, meas_data_hf{<span class="org-constant">i</span>}.de, win, [], [], 1<span class="org-type">/</span>Ts);
<span class="org-keyword">end</span>
</pre>
</div>
<div id="orgc8a5209" class="figure">
2021-06-08 22:14:48 +02:00
<p><img src="figs/enc_struts_dvf_coh.png" alt="enc_struts_dvf_coh.png" />
</p>
2021-06-09 18:14:45 +02:00
<p><span class="figure-number">Figure 4: </span>Obtained coherence for the DVF plant</p>
2021-06-08 22:14:48 +02:00
</div>
<p>
Then the 6x6 transfer function matrix is estimated (Figure <a href="#orgb9f3fd5">5</a>).
2021-06-08 22:14:48 +02:00
</p>
<div class="org-src-container">
2021-06-09 18:14:45 +02:00
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% DVF Plant (transfer function from u to dLm)</span></span>
2021-06-08 22:14:48 +02:00
G_dvf_lf = zeros(length(f), 6, 6);
G_dvf_hf = zeros(length(f), 6, 6);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
G_dvf_lf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = tfestimate(meas_data_lf{<span class="org-constant">i</span>}.Va, meas_data_lf{<span class="org-constant">i</span>}.de, win, [], [], 1<span class="org-type">/</span>Ts);
G_dvf_hf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = tfestimate(meas_data_hf{<span class="org-constant">i</span>}.Va, meas_data_hf{<span class="org-constant">i</span>}.de, win, [], [], 1<span class="org-type">/</span>Ts);
<span class="org-keyword">end</span>
</pre>
</div>
<div id="orgb9f3fd5" class="figure">
2021-06-08 22:14:48 +02:00
<p><img src="figs/enc_struts_dvf_frf.png" alt="enc_struts_dvf_frf.png" />
</p>
2021-06-09 18:14:45 +02:00
<p><span class="figure-number">Figure 5: </span>Measured FRF for the DVF plant</p>
2021-06-08 22:14:48 +02:00
</div>
</div>
</div>
<div id="outline-container-orgfe174fa" class="outline-4">
<h4 id="orgfe174fa"><span class="section-number-4">1.2.4</span> IFF Plant</h4>
2021-06-09 18:14:45 +02:00
<div class="outline-text-4" id="text-1-2-4">
2021-06-08 22:14:48 +02:00
<p>
First, let&rsquo;s compute the coherence from the excitation voltage and the displacement as measured by the encoders (Figure <a href="#orgb8bd5d5">6</a>).
2021-06-08 22:14:48 +02:00
</p>
<div class="org-src-container">
2021-06-09 18:14:45 +02:00
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Coherence for the IFF plant</span></span>
2021-06-08 22:14:48 +02:00
coh_iff_lf = zeros(length(f), 6, 6);
coh_iff_hf = zeros(length(f), 6, 6);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
coh_iff_lf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = mscohere(meas_data_lf{<span class="org-constant">i</span>}.Va, meas_data_lf{<span class="org-constant">i</span>}.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
coh_iff_hf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = mscohere(meas_data_hf{<span class="org-constant">i</span>}.Va, meas_data_hf{<span class="org-constant">i</span>}.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
<span class="org-keyword">end</span>
</pre>
</div>
<div id="orgb8bd5d5" class="figure">
2021-06-08 22:14:48 +02:00
<p><img src="figs/enc_struts_iff_coh.png" alt="enc_struts_iff_coh.png" />
</p>
2021-06-09 18:14:45 +02:00
<p><span class="figure-number">Figure 6: </span>Obtained coherence for the IFF plant</p>
2021-06-08 22:14:48 +02:00
</div>
<p>
Then the 6x6 transfer function matrix is estimated (Figure <a href="#org7d9a20b">7</a>).
2021-06-08 22:14:48 +02:00
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% IFF Plant</span></span>
G_iff_lf = zeros(length(f), 6, 6);
G_iff_hf = zeros(length(f), 6, 6);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
G_iff_lf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = tfestimate(meas_data_lf{<span class="org-constant">i</span>}.Va, meas_data_lf{<span class="org-constant">i</span>}.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
G_iff_hf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = tfestimate(meas_data_hf{<span class="org-constant">i</span>}.Va, meas_data_hf{<span class="org-constant">i</span>}.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
<span class="org-keyword">end</span>
</pre>
</div>
<div id="org7d9a20b" class="figure">
2021-06-08 22:14:48 +02:00
<p><img src="figs/enc_struts_iff_frf.png" alt="enc_struts_iff_frf.png" />
</p>
2021-06-09 18:14:45 +02:00
<p><span class="figure-number">Figure 7: </span>Measured FRF for the IFF plant</p>
</div>
2021-06-08 22:14:48 +02:00
</div>
</div>
</div>
<div id="outline-container-orgaa25438" class="outline-3">
<h3 id="orgaa25438"><span class="section-number-3">1.3</span> Comparison with the Simscape Model</h3>
2021-06-09 18:14:45 +02:00
<div class="outline-text-3" id="text-1-3">
2021-06-08 22:39:35 +02:00
<p>
2021-06-09 18:14:45 +02:00
In this section, the measured dynamics is compared with the dynamics estimated from the Simscape model.
2021-06-08 22:39:35 +02:00
</p>
2021-06-09 18:14:45 +02:00
</div>
2021-06-08 22:39:35 +02:00
<div id="outline-container-org8c6e670" class="outline-4">
<h4 id="org8c6e670"><span class="section-number-4">1.3.1</span> Dynamics from Actuator to Force Sensors</h4>
2021-06-09 18:14:45 +02:00
<div class="outline-text-4" id="text-1-3-1">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Initialize Nano-Hexapod</span></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">'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>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Identify the IFF Plant (transfer function from u to taum)</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 = exp(<span class="org-type">-</span>s<span class="org-type">*</span>Ts)<span class="org-type">*</span>linearize(mdl, io, 0.0, options);
</pre>
</div>
<div id="orgf514a0e" class="figure">
2021-06-09 18:14:45 +02:00
<p><img src="figs/enc_struts_iff_comp_simscape.png" alt="enc_struts_iff_comp_simscape.png" />
2021-06-08 22:39:35 +02:00
</p>
2021-06-09 18:14:45 +02:00
<p><span class="figure-number">Figure 8: </span>Diagonal elements of the IFF Plant</p>
</div>
<div id="org5cb4798" class="figure">
2021-06-09 18:14:45 +02:00
<p><img src="figs/enc_struts_iff_comp_offdiag_simscape.png" alt="enc_struts_iff_comp_offdiag_simscape.png" />
</p>
<p><span class="figure-number">Figure 9: </span>Off diagonal elements of the IFF Plant</p>
</div>
</div>
</div>
<div id="outline-container-orgb40c194" class="outline-4">
<h4 id="orgb40c194"><span class="section-number-4">1.3.2</span> Dynamics from Actuator to Encoder</h4>
2021-06-09 18:14:45 +02:00
<div class="outline-text-4" id="text-1-3-2">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Initialization of the Nano-Hexapod</span></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">'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>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Identify the DVF Plant (transfer function from u to dLm)</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">% Encoders</span>
Gdvf = exp(<span class="org-type">-</span>s<span class="org-type">*</span>Ts)<span class="org-type">*</span>linearize(mdl, io, 0.0, options);
</pre>
</div>
2021-06-08 22:39:35 +02:00
<div id="org0adec37" class="figure">
2021-06-09 18:14:45 +02:00
<p><img src="figs/enc_struts_dvf_comp_simscape.png" alt="enc_struts_dvf_comp_simscape.png" />
2021-06-08 22:39:35 +02:00
</p>
2021-06-09 18:14:45 +02:00
<p><span class="figure-number">Figure 10: </span>Diagonal elements of the DVF Plant</p>
2021-06-08 22:39:35 +02:00
</div>
2021-06-09 18:14:45 +02:00
<div id="org97225e9" class="figure">
2021-06-09 18:14:45 +02:00
<p><img src="figs/enc_struts_dvf_comp_offdiag_simscape.png" alt="enc_struts_dvf_comp_offdiag_simscape.png" />
2021-06-08 22:39:35 +02:00
</p>
2021-06-09 18:14:45 +02:00
<p><span class="figure-number">Figure 11: </span>Off diagonal elements of the DVF Plant</p>
</div>
</div>
</div>
</div>
<div id="outline-container-org07b83f4" class="outline-3">
<h3 id="org07b83f4"><span class="section-number-3">1.4</span> Integral Force Feedback</h3>
2021-06-09 18:14:45 +02:00
<div class="outline-text-3" id="text-1-4">
</div>
<div id="outline-container-org32df075" class="outline-4">
<h4 id="org32df075"><span class="section-number-4">1.4.1</span> Root Locus and Decentralized Loop gain</h4>
2021-06-09 18:14:45 +02:00
<div class="outline-text-4" id="text-1-4-1">
2021-06-08 22:14:48 +02:00
<div class="org-src-container">
2021-06-09 18:14:45 +02:00
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% IFF Controller</span></span>
Kiff_g1 = (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>40))<span class="org-type">*</span>...<span class="org-comment"> % Low pass filter (provides integral action above 40Hz)</span>
(s<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>30))<span class="org-type">*</span>...<span class="org-comment"> % High pass filter to limit low frequency gain</span>
(1<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>500))<span class="org-type">*</span>...<span class="org-comment"> % Low pass filter to be more robust to high frequency resonances</span>
eye(6); <span class="org-comment">% Diagonal 6x6 controller</span>
2021-06-08 22:14:48 +02:00
</pre>
</div>
2021-06-09 18:14:45 +02:00
<div id="org605753e" class="figure">
2021-06-09 18:14:45 +02:00
<p><img src="figs/enc_struts_iff_root_locus.png" alt="enc_struts_iff_root_locus.png" />
</p>
<p><span class="figure-number">Figure 12: </span>Root Locus for the IFF control strategy</p>
2021-06-08 22:15:02 +02:00
</div>
2021-06-08 22:39:35 +02:00
<p>
2021-06-09 18:14:45 +02:00
Then the &ldquo;optimal&rdquo; IFF controller is:
2021-06-08 22:39:35 +02:00
</p>
2021-06-08 22:14:48 +02:00
<div class="org-src-container">
2021-06-09 18:14:45 +02:00
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% IFF controller with Optimal gain</span></span>
Kiff = g<span class="org-type">*</span>Kiff_g1;
2021-06-08 22:14:48 +02:00
</pre>
</div>
2021-06-08 22:39:35 +02:00
<div id="orgc1b7b46" class="figure">
2021-06-09 18:14:45 +02:00
<p><img src="figs/enc_struts_iff_opt_loop_gain.png" alt="enc_struts_iff_opt_loop_gain.png" />
2021-06-08 22:39:35 +02:00
</p>
2021-06-09 18:14:45 +02:00
<p><span class="figure-number">Figure 13: </span>Bode plot of the &ldquo;decentralized loop gain&rdquo; \(G_\text{iff}(i,i) \times K_\text{iff}(i,i)\)</p>
2021-06-08 22:39:35 +02:00
</div>
2021-06-08 22:15:02 +02:00
</div>
</div>
2021-06-08 22:14:48 +02:00
<div id="outline-container-orge5e9cea" class="outline-4">
<h4 id="orge5e9cea"><span class="section-number-4">1.4.2</span> Multiple Gains - Simulation</h4>
2021-06-09 18:14:45 +02:00
<div class="outline-text-4" id="text-1-4-2">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Tested IFF gains</span></span>
iff_gains = [4, 10, 20, 40, 100, 200, 400];
2021-06-09 18:14:45 +02:00
</pre>
</div>
2021-06-08 22:39:35 +02:00
2021-06-08 22:15:02 +02:00
<div class="org-src-container">
2021-06-09 18:14:45 +02:00
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Initialize the Simscape model in closed loop</span></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">'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">'iff'</span>);
2021-06-08 22:15:02 +02:00
</pre>
</div>
2021-06-08 22:39:35 +02:00
2021-06-09 18:14:45 +02:00
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Identify the (damped) transfer function from u to dLm for different values of the IFF gain</span></span>
Gd_iff = {zeros(1, length(iff_gains))};
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">% Strut Displacement (encoder)</span>
2021-06-08 22:39:35 +02:00
2021-06-09 18:14:45 +02:00
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(iff_gains)</span>
Kiff = iff_gains(<span class="org-constant">i</span>)<span class="org-type">*</span>Kiff_g1<span class="org-type">*</span>eye(6); <span class="org-comment">% IFF Controller</span>
Gd_iff(<span class="org-constant">i</span>) = {exp(<span class="org-type">-</span>s<span class="org-type">*</span>Ts)<span class="org-type">*</span>linearize(mdl, io, 0.0, options)};
isstable(Gd_iff{<span class="org-constant">i</span>})
<span class="org-keyword">end</span>
</pre>
</div>
<div id="orgb361d62" class="figure">
2021-06-09 18:14:45 +02:00
<p><img src="figs/enc_struts_iff_gains_effect_dvf_plant.png" alt="enc_struts_iff_gains_effect_dvf_plant.png" />
2021-06-08 22:39:35 +02:00
</p>
2021-06-09 18:14:45 +02:00
<p><span class="figure-number">Figure 14: </span>Effect of the IFF gain \(g\) on the transfer function from \(\bm{\tau}\) to \(d\bm{\mathcal{L}}_m\)</p>
</div>
2021-06-08 22:39:35 +02:00
</div>
2021-06-08 22:15:02 +02:00
</div>
2021-06-09 18:14:45 +02:00
<div id="outline-container-orga581915" class="outline-4">
<h4 id="orga581915"><span class="section-number-4">1.4.3</span> Experimental Results - Gains</h4>
<div class="outline-text-4" id="text-1-4-3">
<p>
Let&rsquo;s look at the damping introduced by IFF as a function of the IFF gain and compare that with the results obtained using the Simscape model.
</p>
</div>
<div id="outline-container-org7089ea1" class="outline-5">
<h5 id="org7089ea1"><span class="section-number-5">1.4.3.1</span> Load Data</h5>
<div class="outline-text-5" id="text-1-4-3-1">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Load Identification Data</span></span>
meas_iff_gains = {};
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(iff_gains)</span>
meas_iff_gains(<span class="org-constant">i</span>) = {load(sprintf(<span class="org-string">'mat/iff_strut_1_noise_g_%i.mat'</span>, iff_gains(<span class="org-constant">i</span>)), <span class="org-string">'t'</span>, <span class="org-string">'Vexc'</span>, <span class="org-string">'Vs'</span>, <span class="org-string">'de'</span>, <span class="org-string">'u'</span>)};
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org54efadb" class="outline-5">
<h5 id="org54efadb"><span class="section-number-5">1.4.3.2</span> Spectral Analysis - Setup</h5>
<div class="outline-text-5" id="text-1-4-3-2">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Setup useful variables</span></span>
<span class="org-comment">% Sampling Time [s]</span>
Ts = (meas_iff_gains{1}.t(end) <span class="org-type">-</span> (meas_iff_gains{1}.t(1)))<span class="org-type">/</span>(length(meas_iff_gains{1}.t)<span class="org-type">-</span>1);
<span class="org-comment">% Sampling Frequency [Hz]</span>
Fs = 1<span class="org-type">/</span>Ts;
<span class="org-comment">% Hannning Windows</span>
win = hanning(ceil(1<span class="org-type">*</span>Fs));
<span class="org-comment">% And we get the frequency vector</span>
[<span class="org-type">~</span>, f] = tfestimate(meas_iff_gains{1}.Vexc, meas_iff_gains{1}.de, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
</div>
</div>
<div id="outline-container-org5262511" class="outline-5">
<h5 id="org5262511"><span class="section-number-5">1.4.3.3</span> DVF Plant</h5>
<div class="outline-text-5" id="text-1-4-3-3">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% DVF Plant (transfer function from u to dLm)</span></span>
G_iff_gains = {};
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(iff_gains)</span>
G_iff_gains{<span class="org-constant">i</span>} = tfestimate(meas_iff_gains{<span class="org-constant">i</span>}.Vexc, meas_iff_gains{<span class="org-constant">i</span>}.de(<span class="org-type">:</span>,1), win, [], [], 1<span class="org-type">/</span>Ts);
<span class="org-keyword">end</span>
</pre>
</div>
<div id="orgecf391c" class="figure">
<p><img src="figs/comp_iff_gains_dvf_plant.png" alt="comp_iff_gains_dvf_plant.png" />
</p>
<p><span class="figure-number">Figure 15: </span>Transfer function from \(u\) to \(d\mathcal{L}_m\) for multiple values of the IFF gain</p>
</div>
<div id="orgf79da15" class="figure">
<p><img src="figs/comp_iff_gains_dvf_plant_zoom.png" alt="comp_iff_gains_dvf_plant_zoom.png" />
</p>
<p><span class="figure-number">Figure 16: </span>Transfer function from \(u\) to \(d\mathcal{L}_m\) for multiple values of the IFF gain (Zoom)</p>
</div>
<div class="important" id="orgbb44640">
<p>
The IFF control strategy is very effective for the damping of the suspension modes.
It however does not damp the modes at 200Hz, 300Hz and 400Hz (flexible modes of the APA).
This is very logical.
</p>
<p>
Also, the experimental results and the models obtained from the Simscape model are in agreement.
</p>
</div>
</div>
</div>
<div id="outline-container-org47db15b" class="outline-5">
<h5 id="org47db15b"><span class="section-number-5">1.4.3.4</span> Experimental Results - Comparison of the un-damped and fully damped system</h5>
<div class="outline-text-5" id="text-1-4-3-4">
<div id="org4f580a8" class="figure">
<p><img src="figs/comp_undamped_opt_iff_gain_diagonal.png" alt="comp_undamped_opt_iff_gain_diagonal.png" />
</p>
<p><span class="figure-number">Figure 17: </span>Comparison of the diagonal elements of the tranfer function from \(\bm{u}\) to \(d\bm{\mathcal{L}}_m\) without active damping and with optimal IFF gain</p>
</div>
</div>
</div>
</div>
<div id="outline-container-orgd48530e" class="outline-4">
<h4 id="orgd48530e"><span class="section-number-4">1.4.4</span> Experimental Results - Damped Plant with Optimal gain</h4>
<div class="outline-text-4" id="text-1-4-4">
<p>
Let&rsquo;s now look at the \(6 \times 6\) damped plant with the optimal gain \(g = 400\).
</p>
</div>
<div id="outline-container-orgf0af7da" class="outline-5">
<h5 id="orgf0af7da"><span class="section-number-5">1.4.4.1</span> Load Data</h5>
<div class="outline-text-5" id="text-1-4-4-1">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Load Identification Data</span></span>
meas_iff_struts = {};
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
meas_iff_struts(<span class="org-constant">i</span>) = {load(sprintf(<span class="org-string">'mat/iff_strut_%i_noise_g_400.mat'</span>, <span class="org-constant">i</span>), <span class="org-string">'t'</span>, <span class="org-string">'Vexc'</span>, <span class="org-string">'Vs'</span>, <span class="org-string">'de'</span>, <span class="org-string">'u'</span>)};
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org1ce1b15" class="outline-5">
<h5 id="org1ce1b15"><span class="section-number-5">1.4.4.2</span> Spectral Analysis - Setup</h5>
<div class="outline-text-5" id="text-1-4-4-2">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Setup useful variables</span></span>
<span class="org-comment">% Sampling Time [s]</span>
Ts = (meas_iff_struts{1}.t(end) <span class="org-type">-</span> (meas_iff_struts{1}.t(1)))<span class="org-type">/</span>(length(meas_iff_struts{1}.t)<span class="org-type">-</span>1);
<span class="org-comment">% Sampling Frequency [Hz]</span>
Fs = 1<span class="org-type">/</span>Ts;
<span class="org-comment">% Hannning Windows</span>
win = hanning(ceil(1<span class="org-type">*</span>Fs));
<span class="org-comment">% And we get the frequency vector</span>
[<span class="org-type">~</span>, f] = tfestimate(meas_iff_struts{1}.Vexc, meas_iff_struts{1}.de, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
</div>
</div>
<div id="outline-container-orgac97ace" class="outline-5">
<h5 id="orgac97ace"><span class="section-number-5">1.4.4.3</span> DVF Plant</h5>
<div class="outline-text-5" id="text-1-4-4-3">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% DVF Plant (transfer function from u to dLm)</span></span>
G_iff_opt = {};
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
G_iff_opt{<span class="org-constant">i</span>} = tfestimate(meas_iff_struts{<span class="org-constant">i</span>}.Vexc, meas_iff_struts{<span class="org-constant">i</span>}.de, win, [], [], 1<span class="org-type">/</span>Ts);
<span class="org-keyword">end</span>
</pre>
</div>
<div id="org50d06b6" class="figure">
<p><img src="figs/damped_iff_plant_comp_diagonal.png" alt="damped_iff_plant_comp_diagonal.png" />
</p>
<p><span class="figure-number">Figure 18: </span>Comparison of the diagonal elements of the transfer functions from \(\bm{u}\) to \(d\bm{\mathcal{L}}_m\) with active damping (IFF) applied with an optimal gain \(g = 400\)</p>
</div>
<div id="orgc9f6f9f" class="figure">
<p><img src="figs/damped_iff_plant_comp_off_diagonal.png" alt="damped_iff_plant_comp_off_diagonal.png" />
</p>
<p><span class="figure-number">Figure 19: </span>Comparison of the off-diagonal elements of the transfer functions from \(\bm{u}\) to \(d\bm{\mathcal{L}}_m\) with active damping (IFF) applied with an optimal gain \(g = 400\)</p>
</div>
<div class="important" id="org067c4cc">
<p>
With the IFF control strategy applied and the optimal gain used, the suspension modes are very well dapmed.
Remains the undamped flexible modes of the APA, and the modes of the plates.
</p>
<p>
The Simscape model and the experimental results are in very good agreement.
</p>
</div>
</div>
</div>
2021-06-08 22:14:48 +02:00
</div>
2021-06-07 19:00:29 +02:00
</div>
</div>
2021-06-09 18:14:45 +02:00
<div id="outline-container-orgba38b08" class="outline-2">
<h2 id="orgba38b08"><span class="section-number-2">2</span> Encoders fixed to the plates</h2>
2021-06-09 18:14:45 +02:00
</div>
2021-06-07 19:00:29 +02:00
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-06-10 jeu. 17:52</p>
2021-06-07 19:00:29 +02:00
</div>
</body>
</html>