test-bench-apa300ml/test-bench-apa300ml.html

3429 lines
146 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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-02 mer. 23:58 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Amplifier Piezoelectric Actuator APA300ML - 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>
<script>
MathJax = {
svg: {
scale: 1,
fontCache: "global"
},
tex: {
tags: "ams",
multlineWidth: "%MULTLINEWIDTH",
tagSide: "right",
macros: {bm: ["\\boldsymbol{#1}",1],},
tagIndent: ".8em"
}
};
</script>
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
</head>
<body>
<div id="org-div-home-and-up">
<a accesskey="h" href="../index.html"> UP </a>
|
<a accesskey="H" href="../index.html"> HOME </a>
</div><div id="content">
<h1 class="title">Amplifier Piezoelectric Actuator APA300ML - Test Bench</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgef75780">1. Model of an Amplified Piezoelectric Actuator and Sensor</a></li>
<li><a href="#orgb4bf7c5">2. Geometrical Measurements</a>
<ul>
<li><a href="#org770490b">2.1. Measurement Setup</a></li>
<li><a href="#orgeafa400">2.2. Measurement Results</a></li>
</ul>
</li>
<li><a href="#orgf76f0e1">3. Electrical Measurements</a></li>
<li><a href="#org7b41644">4. Stroke measurement</a>
<ul>
<li><a href="#orgd69bd4b">4.1. Voltage applied on one stack</a></li>
<li><a href="#orgeb83517">4.2. Voltage applied on two stacks</a></li>
<li><a href="#org29794e3">4.3. Voltage applied on all three stacks</a></li>
</ul>
</li>
<li><a href="#orgb02ce00">5. Stiffness measurement</a>
<ul>
<li><a href="#org71b045e">5.1. APA test</a></li>
</ul>
</li>
<li><a href="#org3289d75">6. Test-Bench Description</a></li>
<li><a href="#org8f87ac7">7. Measurement Procedure</a>
<ul>
<li><a href="#org8a84353">7.1. Stroke Measurement</a></li>
<li><a href="#org841d42e">7.2. Stiffness Measurement</a></li>
<li><a href="#org46015b7">7.3. Hysteresis measurement</a></li>
<li><a href="#org97c9a5e">7.4. Piezoelectric Actuator Constant</a></li>
<li><a href="#org47afc13">7.5. Piezoelectric Sensor Constant</a></li>
<li><a href="#org5e0e686">7.6. Capacitance Measurement</a></li>
<li><a href="#orgd622ed7">7.7. Dynamical Behavior</a></li>
<li><a href="#org3cbd796">7.8. Compare the results obtained for all 7 APA300ML</a></li>
</ul>
</li>
<li><a href="#org18da5b7">8. FRF measurement</a>
<ul>
<li><a href="#orgbfb3452">8.1. <code>frf_setup.m</code> - Measurement Setup</a></li>
<li><a href="#org574e535">8.2. <code>frf_save.m</code> - Save Data</a></li>
<li><a href="#org731f95d">8.3. Measurements on APA 1</a>
<ul>
<li><a href="#org67034dd">8.3.1. Huddle Test</a></li>
<li><a href="#org688f71e">8.3.2. First identification with Noise</a></li>
<li><a href="#org59d7bdf">8.3.3. Second identification with Sweep and high frequency noise</a></li>
<li><a href="#orga8c96c8">8.3.4. Extract Parameters (Actuator/Sensor constants)</a></li>
</ul>
</li>
<li><a href="#orge536a20">8.4. Comparison of all the APA</a>
<ul>
<li><a href="#org3f63be0">8.4.1. Stiffness - Comparison of the APA</a></li>
<li><a href="#org28bc287">8.4.2. Stiffness - Effect of connecting the actuator stack to the amplifier and the sensor stack to the ADC</a></li>
<li><a href="#org7bbfc1c">8.4.3. Hysteresis</a></li>
<li><a href="#orge0dea88">8.4.4. FRF Identification - Setup</a></li>
<li><a href="#org575ff14">8.4.5. FRF Identification - DVF</a></li>
<li><a href="#orgbe445f3">8.4.6. FRF Identification - IFF</a></li>
<li><a href="#org0460555">8.4.7. Effect of the resistor on the IFF Plant</a></li>
</ul>
</li>
<li><a href="#org79e199c">8.5. Measurement on Strut 1</a>
<ul>
<li><a href="#org2a6ce8a">8.5.1. Without Encoder</a>
<ul>
<li><a href="#org1819920">8.5.1.1. FRF Identification - Setup</a></li>
<li><a href="#orgc9d282a">8.5.1.2. FRF Identification - DVF</a></li>
<li><a href="#org23ab32f">8.5.1.3. FRF Identification - IFF</a></li>
</ul>
</li>
<li><a href="#org19a0d15">8.5.2. With Encoder</a>
<ul>
<li><a href="#orgb394a68">8.5.2.1. FRF Identification - Setup</a></li>
<li><a href="#orgd286205">8.5.2.2. FRF Identification - DVF</a></li>
<li><a href="#org63489d5">8.5.2.3. Comparison with Interferometer</a></li>
<li><a href="#org54cb510">8.5.2.4. APA Resonances Frequency</a></li>
<li><a href="#orgaef63eb">8.5.2.5. FRF Identification - IFF</a></li>
<li><a href="#org965d282">8.5.2.6. Comparison to when the encoder is not fixed</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="#org247faf2">9. Measurement Results</a></li>
<li><a href="#org4c18086">10. Test Bench APA300ML - Simscape Model</a>
<ul>
<li><a href="#org246e6c3">10.1. Introduction</a></li>
<li><a href="#orgb566a55">10.2. Nano Hexapod object</a>
<ul>
<li><a href="#org62f5cea">10.2.1. APA - 2 DoF</a></li>
<li><a href="#org9b1f8b4">10.2.2. APA - Flexible Frame</a></li>
<li><a href="#org1956620">10.2.3. APA - Fully Flexible</a></li>
</ul>
</li>
<li><a href="#org73596ef">10.3. Identification</a></li>
<li><a href="#orgac32f3d">10.4. Compare 2-DoF with flexible</a>
<ul>
<li><a href="#org9fb131c">10.4.1. APA - 2 DoF</a></li>
<li><a href="#orga685f57">10.4.2. APA - Fully Flexible</a></li>
<li><a href="#org892ea1d">10.4.3. Comparison</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org094714d">11. Test Bench Struts - Simscape Model</a>
<ul>
<li><a href="#orgb3568b9">11.1. Introduction</a></li>
<li><a href="#org903fd9d">11.2. Nano Hexapod object</a>
<ul>
<li><a href="#orgeb7676e">11.2.1. Flexible Joint - Bot</a></li>
<li><a href="#org2d3b9a7">11.2.2. Flexible Joint - Top</a></li>
<li><a href="#org5599b52">11.2.3. APA - 2 DoF</a></li>
<li><a href="#org685e2e7">11.2.4. APA - Flexible Frame</a></li>
<li><a href="#org3d065de">11.2.5. APA - Fully Flexible</a></li>
</ul>
</li>
<li><a href="#orgfbc019e">11.3. Identification</a></li>
<li><a href="#org169fc79">11.4. Compare flexible joints</a>
<ul>
<li><a href="#org39795a1">11.4.1. Perfect</a></li>
<li><a href="#orgd21ebf7">11.4.2. Top Flexible</a></li>
<li><a href="#orgc5dcbe5">11.4.3. Bottom Flexible</a></li>
<li><a href="#org5e5908b">11.4.4. Both Flexible</a></li>
<li><a href="#orgd47e8ac">11.4.5. Comparison</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#orgac74dce">12. Resonance frequencies - APA300ML</a>
<ul>
<li><a href="#orga16644c">12.1. Introduction</a></li>
<li><a href="#org779bccf">12.2. Setup</a></li>
<li><a href="#orgbaaf284">12.3. Bending - X</a></li>
<li><a href="#orgafef1f9">12.4. Bending - Y</a></li>
<li><a href="#org9c4ee27">12.5. Torsion - Z</a></li>
<li><a href="#orgf47dd25">12.6. Compare</a></li>
<li><a href="#org21610d4">12.7. Conclusion</a></li>
</ul>
</li>
<li><a href="#orgc347924">13. Function</a>
<ul>
<li><a href="#org808ebd8">13.1. <code>generateSweepExc</code>: Generate sweep sinus excitation</a>
<ul>
<li><a href="#org34d68d5">Function description</a></li>
<li><a href="#org5ebeee5">Optional Parameters</a></li>
<li><a href="#org20366dd">Sweep Sine part</a></li>
<li><a href="#org244c525">Smooth Ends</a></li>
<li><a href="#orgba46570">Combine Excitation signals</a></li>
</ul>
</li>
<li><a href="#org31382ab">13.2. <code>generateShapedNoise</code>: Generate Shaped Noise excitation</a>
<ul>
<li><a href="#org26af1eb">Function description</a></li>
<li><a href="#org48337a3">Optional Parameters</a></li>
<li><a href="#orgc2a4a8b">Shaped Noise</a></li>
<li><a href="#org1ea5e8a">Smooth Ends</a></li>
<li><a href="#orgbdaa6b8">Combine Excitation signals</a></li>
</ul>
</li>
<li><a href="#orgbfa6126">13.3. <code>generateSinIncreasingAmpl</code>: Generate Sinus with increasing amplitude</a>
<ul>
<li><a href="#orge7731e3">Function description</a></li>
<li><a href="#org028fa94">Optional Parameters</a></li>
<li><a href="#org6395291">Sinus excitation</a></li>
<li><a href="#org379f0ba">Smooth Ends</a></li>
<li><a href="#org2238add">Combine Excitation signals</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<hr>
<p>This report is also available as a <a href="./test-bench-apa300ml.pdf">pdf</a>.</p>
<hr>
<p>
The goal of this test bench is to extract all the important parameters of the Amplified Piezoelectric Actuator APA300ML.
</p>
<p>
This include:
</p>
<ul class="org-ul">
<li>Stroke</li>
<li>Stiffness</li>
<li>Hysteresis</li>
<li>Gain from the applied voltage \(V_a\) to the generated Force \(F_a\)</li>
<li>Gain from the sensor stack strain \(\delta L\) to the generated voltage \(V_s\)</li>
<li>Dynamical behavior</li>
</ul>
<div id="org9c8b0f9" class="figure">
<p><img src="figs/apa300ML.png" alt="apa300ML.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Picture of the APA300ML</p>
</div>
<div id="outline-container-orgef75780" class="outline-2">
<h2 id="orgef75780"><span class="section-number-2">1</span> Model of an Amplified Piezoelectric Actuator and Sensor</h2>
<div class="outline-text-2" id="text-1">
<p>
Consider a schematic of the Amplified Piezoelectric Actuator in Figure <a href="#orgefe2602">2</a>.
</p>
<div id="orgefe2602" class="figure">
<p><img src="figs/apa_model_schematic.png" alt="apa_model_schematic.png" />
</p>
<p><span class="figure-number">Figure 2: </span>Amplified Piezoelectric Actuator Schematic</p>
</div>
<p>
A voltage \(V_a\) applied to the actuator stacks will induce an actuator force \(F_a\):
</p>
\begin{equation}
F_a = g_a \cdot V_a
\end{equation}
<p>
A change of length \(dl\) of the sensor stack will induce a voltage \(V_s\):
</p>
\begin{equation}
V_s = g_s \cdot dl
\end{equation}
<p>
We wish here to experimental measure \(g_a\) and \(g_s\).
</p>
<p>
The block-diagram model of the piezoelectric actuator is then as shown in Figure <a href="#org3bb02eb">3</a>.
</p>
<div id="org3bb02eb" class="figure">
<p><img src="figs/apa-model-simscape-schematic.png" alt="apa-model-simscape-schematic.png" />
</p>
<p><span class="figure-number">Figure 3: </span>Model of the APA with Simscape/Simulink</p>
</div>
</div>
</div>
<div id="outline-container-orgb4bf7c5" class="outline-2">
<h2 id="orgb4bf7c5"><span class="section-number-2">2</span> Geometrical Measurements</h2>
<div class="outline-text-2" id="text-2">
<p>
The received APA are shown in Figure <a href="#org2ddae26">4</a>.
</p>
<div id="org2ddae26" class="figure">
<p><img src="figs/IMG_20210224_143500.jpg" alt="IMG_20210224_143500.jpg" />
</p>
<p><span class="figure-number">Figure 4: </span>Received APA</p>
</div>
</div>
<div id="outline-container-org770490b" class="outline-3">
<h3 id="org770490b"><span class="section-number-3">2.1</span> Measurement Setup</h3>
<div class="outline-text-3" id="text-2-1">
<p>
The flatness corresponding to the two interface planes are measured as shown in Figure <a href="#org3496c7b">5</a>.
</p>
<div id="org3496c7b" class="figure">
<p><img src="figs/IMG_20210224_143809.jpg" alt="IMG_20210224_143809.jpg" />
</p>
<p><span class="figure-number">Figure 5: </span>Measurement Setup</p>
</div>
</div>
</div>
<div id="outline-container-orgeafa400" class="outline-3">
<h3 id="orgeafa400"><span class="section-number-3">2.2</span> Measurement Results</h3>
<div class="outline-text-3" id="text-2-2">
<p>
The height (Z) measurements at the 8 locations (4 points by plane) are defined below.
</p>
<div class="org-src-container">
<pre class="src src-matlab">apa1 = 1e<span class="org-type">-</span>6<span class="org-type">*</span>[0, <span class="org-type">-</span>0.5 , 3.5 , 3.5 , 42 , 45.5, 52.5 , 46];
apa2 = 1e<span class="org-type">-</span>6<span class="org-type">*</span>[0, <span class="org-type">-</span>2.5 , <span class="org-type">-</span>3 , 0 , <span class="org-type">-</span>1.5 , 1 , <span class="org-type">-</span>2 , <span class="org-type">-</span>4];
apa3 = 1e<span class="org-type">-</span>6<span class="org-type">*</span>[0, <span class="org-type">-</span>1.5 , 15 , 17.5 , 6.5 , 6.5 , 21 , 23];
apa4 = 1e<span class="org-type">-</span>6<span class="org-type">*</span>[0, 6.5 , 14.5 , 9 , 16 , 22 , 29.5 , 21];
apa5 = 1e<span class="org-type">-</span>6<span class="org-type">*</span>[0, <span class="org-type">-</span>12.5, 16.5 , 28.5 , <span class="org-type">-</span>43 , <span class="org-type">-</span>52 , <span class="org-type">-</span>22.5, <span class="org-type">-</span>13.5];
apa6 = 1e<span class="org-type">-</span>6<span class="org-type">*</span>[0, <span class="org-type">-</span>8 , <span class="org-type">-</span>2 , 5 , <span class="org-type">-</span>57.5, <span class="org-type">-</span>62 , <span class="org-type">-</span>55.5, <span class="org-type">-</span>52.5];
apa7 = 1e<span class="org-type">-</span>6<span class="org-type">*</span>[0, 19.5 , <span class="org-type">-</span>8 , <span class="org-type">-</span>29.5, 75 , 97.5, 70 , 48];
apa7b = 1e<span class="org-type">-</span>6<span class="org-type">*</span>[0, 9 , <span class="org-type">-</span>18.5, <span class="org-type">-</span>30 , 31 , 46.5, 16.5 , 7.5];
apa = {apa1, apa2, apa3, apa4, apa5, apa6, apa7b};
</pre>
</div>
<p>
The X/Y Positions of the 8 measurement points are defined below.
</p>
<div class="org-src-container">
<pre class="src src-matlab">W = 20e<span class="org-type">-</span>3; <span class="org-comment">% Width [m]</span>
L = 61e<span class="org-type">-</span>3; <span class="org-comment">% Length [m]</span>
d = 1e<span class="org-type">-</span>3; <span class="org-comment">% Distance from border [m]</span>
l = 15.5e<span class="org-type">-</span>3; <span class="org-comment">% [m]</span>
pos = [[<span class="org-type">-</span>L<span class="org-type">/</span>2 <span class="org-type">+</span> d; W<span class="org-type">/</span>2 <span class="org-type">-</span> d], [<span class="org-type">-</span>L<span class="org-type">/</span>2 <span class="org-type">+</span> l <span class="org-type">-</span> d; W<span class="org-type">/</span>2 <span class="org-type">-</span> d], [<span class="org-type">-</span>L<span class="org-type">/</span>2 <span class="org-type">+</span> l <span class="org-type">-</span> d; <span class="org-type">-</span>W<span class="org-type">/</span>2 <span class="org-type">+</span> d], [<span class="org-type">-</span>L<span class="org-type">/</span>2 <span class="org-type">+</span> d; <span class="org-type">-</span>W<span class="org-type">/</span>2 <span class="org-type">+</span> d], [L<span class="org-type">/</span>2 <span class="org-type">-</span> l <span class="org-type">+</span> d; W<span class="org-type">/</span>2 <span class="org-type">-</span> d], [L<span class="org-type">/</span>2 <span class="org-type">-</span> d; W<span class="org-type">/</span>2 <span class="org-type">-</span> d], [L<span class="org-type">/</span>2 <span class="org-type">-</span> d; <span class="org-type">-</span>W<span class="org-type">/</span>2 <span class="org-type">+</span> d], [L<span class="org-type">/</span>2 <span class="org-type">-</span> l <span class="org-type">+</span> d; <span class="org-type">-</span>W<span class="org-type">/</span>2 <span class="org-type">+</span> d]];
</pre>
</div>
<p>
Finally, the flatness is estimated by fitting a plane through the 8 points using the <code>fminsearch</code> command.
</p>
<div class="org-src-container">
<pre class="src src-matlab">apa_d = zeros(1, 7);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:7</span>
fun = @(x)max(abs(([pos; apa{<span class="org-constant">i</span>}]<span class="org-type">-</span>[0;0;x(1)])<span class="org-type">'*</span>([x(2<span class="org-type">:</span>3);1]<span class="org-type">/</span>norm([x(2<span class="org-type">:</span>3);1]))));
x0 = [0;0;0];
[x, min_d] = fminsearch(fun,x0);
apa_d(<span class="org-constant">i</span>) = min_d;
<span class="org-keyword">end</span>
</pre>
</div>
<p>
The obtained flatness are shown in Table <a href="#org64b8efb">1</a>.
</p>
<table id="org64b8efb" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 1:</span> Estimated flatness</caption>
<colgroup>
<col class="org-left" />
<col class="org-right" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">&#xa0;</th>
<th scope="col" class="org-right"><b>Flatness</b> \([\mu m]\)</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">APA 1</td>
<td class="org-right">8.9</td>
</tr>
<tr>
<td class="org-left">APA 2</td>
<td class="org-right">3.1</td>
</tr>
<tr>
<td class="org-left">APA 3</td>
<td class="org-right">9.1</td>
</tr>
<tr>
<td class="org-left">APA 4</td>
<td class="org-right">3.0</td>
</tr>
<tr>
<td class="org-left">APA 5</td>
<td class="org-right">1.9</td>
</tr>
<tr>
<td class="org-left">APA 6</td>
<td class="org-right">7.1</td>
</tr>
<tr>
<td class="org-left">APA 7</td>
<td class="org-right">18.7</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="outline-container-orgf76f0e1" class="outline-2">
<h2 id="orgf76f0e1"><span class="section-number-2">3</span> Electrical Measurements</h2>
<div class="outline-text-2" id="text-3">
<div class="note" id="org7f17ade">
<p>
The capacitance of the stacks is measure with the <a href="https://www.gwinstek.com/en-global/products/detail/LCR-800">LCR-800 Meter</a> (<a href="doc/DS_LCR-800_Series_V2_E.pdf">doc</a>)
</p>
</div>
<div id="org12b17b0" class="figure">
<p><img src="figs/IMG_20210312_120337.jpg" alt="IMG_20210312_120337.jpg" />
</p>
<p><span class="figure-number">Figure 6: </span>LCR Meter used for the measurements</p>
</div>
<p>
The excitation frequency is set to be 1kHz.
</p>
<table id="org6bb9ac5" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 2:</span> Capacitance measured with the LCR meter. The excitation signal is a sinus at 1kHz</caption>
<colgroup>
<col class="org-left" />
<col class="org-right" />
<col class="org-right" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">&#xa0;</th>
<th scope="col" class="org-right"><b>Sensor Stack</b></th>
<th scope="col" class="org-right"><b>Actuator Stacks</b></th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">APA 1</td>
<td class="org-right">5.10</td>
<td class="org-right">10.03</td>
</tr>
<tr>
<td class="org-left">APA 2</td>
<td class="org-right">4.99</td>
<td class="org-right">9.85</td>
</tr>
<tr>
<td class="org-left">APA 3</td>
<td class="org-right">1.72</td>
<td class="org-right">5.18</td>
</tr>
<tr>
<td class="org-left">APA 4</td>
<td class="org-right">4.94</td>
<td class="org-right">9.82</td>
</tr>
<tr>
<td class="org-left">APA 5</td>
<td class="org-right">4.90</td>
<td class="org-right">9.66</td>
</tr>
<tr>
<td class="org-left">APA 6</td>
<td class="org-right">4.99</td>
<td class="org-right">9.91</td>
</tr>
<tr>
<td class="org-left">APA 7</td>
<td class="org-right">4.85</td>
<td class="org-right">9.85</td>
</tr>
</tbody>
</table>
<div class="warning" id="org9974414">
<p>
There is clearly a problem with APA300ML number 3
</p>
</div>
</div>
</div>
<div id="outline-container-org7b41644" class="outline-2">
<h2 id="org7b41644"><span class="section-number-2">4</span> Stroke measurement</h2>
<div class="outline-text-2" id="text-4">
<p>
We here wish to estimate the stroke of the APA.
</p>
<p>
To do so, one side of the APA is fixed, and a displacement probe is located on the other side as shown in Figure <a href="#orgce74d6d">7</a>.
</p>
<p>
Then, a voltage is applied on either one or two stacks using a DAC and a voltage amplifier.
</p>
<div class="note" id="org2e7ef49">
<p>
Here are the documentation of the equipment used for this test bench:
</p>
<ul class="org-ul">
<li><b>Voltage Amplifier</b>: <a href="doc/PD200-V7-R1.pdf">PD200</a> with a gain of 20</li>
<li><b>16bits DAC</b>: <a href="doc/IO131-OEM-Datasheet.pdf">IO313 Speedgoat card</a></li>
<li><b>Displacement Probe</b>: <a href="doc/Millimar--3723046--BA--C1208-C1216-C1240--FR--2016-11-08.pdf">Millimar C1216 electronics</a> and <a href="doc/tmp3m0cvmue_7888038c-cdc8-48d8-a837-35de02760685.pdf">Millimar 1318 probe</a></li>
</ul>
</div>
<div id="orgce74d6d" class="figure">
<p><img src="figs/CE0EF55E-07B7-461B-8CDB-98590F68D15B.jpeg" alt="CE0EF55E-07B7-461B-8CDB-98590F68D15B.jpeg" />
</p>
<p><span class="figure-number">Figure 7: </span>Bench to measured the APA stroke</p>
</div>
</div>
<div id="outline-container-orgd69bd4b" class="outline-3">
<h3 id="orgd69bd4b"><span class="section-number-3">4.1</span> Voltage applied on one stack</h3>
<div class="outline-text-3" id="text-4-1">
<p>
Let&rsquo;s first look at the relation between the voltage applied to <b>one</b> stack to the displacement of the APA as measured by the displacement probe.
</p>
<p>
The applied voltage is shown in Figure <a href="#org6dd5266">8</a>.
</p>
<div id="org6dd5266" class="figure">
<p><img src="figs/apa_stroke_voltage_time.png" alt="apa_stroke_voltage_time.png" />
</p>
<p><span class="figure-number">Figure 8: </span>Applied voltage as a function of time</p>
</div>
<p>
The obtained displacement is shown in Figure <a href="#orge4154d1">9</a>.
The displacement is set to zero at initial time when the voltage applied is -20V.
</p>
<div id="orge4154d1" class="figure">
<p><img src="figs/apa_stroke_time_1s.png" alt="apa_stroke_time_1s.png" />
</p>
<p><span class="figure-number">Figure 9: </span>Displacement as a function of time for all the APA300ML</p>
</div>
<p>
Finally, the displacement is shown as a function of the applied voltage in Figure <a href="#orgccbdf6b">10</a>.
We can clearly see that there is a problem with the APA 3.
Also, there is a large hysteresis.
</p>
<div id="orgccbdf6b" class="figure">
<p><img src="figs/apa_d_vs_V_1s.png" alt="apa_d_vs_V_1s.png" />
</p>
<p><span class="figure-number">Figure 10: </span>Displacement as a function of the applied voltage</p>
</div>
<div class="important" id="org315ba21">
<p>
We can clearly see from Figure <a href="#orgccbdf6b">10</a> that there is a problem with the APA number 3.
</p>
</div>
</div>
</div>
<div id="outline-container-orgeb83517" class="outline-3">
<h3 id="orgeb83517"><span class="section-number-3">4.2</span> Voltage applied on two stacks</h3>
<div class="outline-text-3" id="text-4-2">
<p>
Now look at the relation between the voltage applied to the <b>two</b> other stacks to the displacement of the APA as measured by the displacement probe.
</p>
<p>
The obtained displacement is shown in Figure <a href="#org9664be8">11</a>.
The displacement is set to zero at initial time when the voltage applied is -20V.
</p>
<div id="org9664be8" class="figure">
<p><img src="figs/apa_stroke_time_2s.png" alt="apa_stroke_time_2s.png" />
</p>
<p><span class="figure-number">Figure 11: </span>Displacement as a function of time for all the APA300ML</p>
</div>
<p>
Finally, the displacement is shown as a function of the applied voltage in Figure <a href="#org3d7a2f2">12</a>.
We can clearly see that there is a problem with the APA 3.
Also, there is a large hysteresis.
</p>
<div id="org3d7a2f2" class="figure">
<p><img src="figs/apa_d_vs_V_2s.png" alt="apa_d_vs_V_2s.png" />
</p>
<p><span class="figure-number">Figure 12: </span>Displacement as a function of the applied voltage</p>
</div>
</div>
</div>
<div id="outline-container-org29794e3" class="outline-3">
<h3 id="org29794e3"><span class="section-number-3">4.3</span> Voltage applied on all three stacks</h3>
<div class="outline-text-3" id="text-4-3">
<p>
Finally, we can combine the two measurements to estimate the relation between the displacement and the voltage applied to the <b>three</b> stacks (Figure <a href="#org2f9d4a0">13</a>).
</p>
<div id="org2f9d4a0" class="figure">
<p><img src="figs/apa_d_vs_V_3s.png" alt="apa_d_vs_V_3s.png" />
</p>
<p><span class="figure-number">Figure 13: </span>Displacement as a function of the applied voltage</p>
</div>
<p>
The obtained maximum stroke for all the APA are summarized in Table <a href="#org07564a3">3</a>.
</p>
<table id="org07564a3" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 3:</span> Measured maximum stroke</caption>
<colgroup>
<col class="org-left" />
<col class="org-right" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">&#xa0;</th>
<th scope="col" class="org-right"><b>Stroke</b> \([\mu m]\)</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">APA 1</td>
<td class="org-right">373.2</td>
</tr>
<tr>
<td class="org-left">APA 2</td>
<td class="org-right">365.5</td>
</tr>
<tr>
<td class="org-left">APA 3</td>
<td class="org-right">181.7</td>
</tr>
<tr>
<td class="org-left">APA 4</td>
<td class="org-right">359.7</td>
</tr>
<tr>
<td class="org-left">APA 5</td>
<td class="org-right">361.5</td>
</tr>
<tr>
<td class="org-left">APA 6</td>
<td class="org-right">363.9</td>
</tr>
<tr>
<td class="org-left">APA 7</td>
<td class="org-right">358.4</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="outline-container-orgb02ce00" class="outline-2">
<h2 id="orgb02ce00"><span class="section-number-2">5</span> Stiffness measurement</h2>
<div class="outline-text-2" id="text-5">
</div>
<div id="outline-container-org71b045e" class="outline-3">
<h3 id="org71b045e"><span class="section-number-3">5.1</span> APA test</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">'meas_stiff_apa_1_x.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'F'</span>, <span class="org-string">'d'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">figure</span>;
plot(t, F)
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Automatic Zero of the force</span></span>
F = F <span class="org-type">-</span> mean(F(t <span class="org-type">&gt;</span> 0.1 <span class="org-type">&amp;</span> t <span class="org-type">&lt;</span> 0.3));
<span class="org-matlab-cellbreak"><span class="org-comment">%% Start measurement at t = 0.2 s</span></span>
d = d(t <span class="org-type">&gt;</span> 0.2);
F = F(t <span class="org-type">&gt;</span> 0.2);
t = t(t <span class="org-type">&gt;</span> 0.2); t = t <span class="org-type">-</span> t(1);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">i_l_start = find(F <span class="org-type">&gt;</span> 0.3, 1, <span class="org-string">'first'</span>);
[<span class="org-type">~</span>, i_l_stop] = max(F);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">F_l = F(i_l_start<span class="org-type">:</span>i_l_stop);
d_l = d(i_l_start<span class="org-type">:</span>i_l_stop);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">fit_l = polyfit(F_l, d_l, 1);
<span class="org-comment">% %% Reset displacement based on fit</span>
<span class="org-comment">% d = d - fit_l(2);</span>
<span class="org-comment">% fit_s(2) = fit_s(2) - fit_l(2);</span>
<span class="org-comment">% fit_l(2) = 0;</span>
<span class="org-comment">% %% Estimated Stroke</span>
<span class="org-comment">% F_max = fit_s(2)/(fit_l(1) - fit_s(1));</span>
<span class="org-comment">% d_max = fit_l(1)*F_max;</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">h<span class="org-type">^</span>2<span class="org-type">/</span>fit_l(1)
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">figure</span>;
hold on;
plot(F,d,<span class="org-string">'k'</span>)
plot(F_l, d_l)
plot(F_l, F_l<span class="org-type">*</span>fit_l(1) <span class="org-type">+</span> fit_l(2), <span class="org-string">'--'</span>)
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org3289d75" class="outline-2">
<h2 id="org3289d75"><span class="section-number-2">6</span> Test-Bench Description</h2>
<div class="outline-text-2" id="text-6">
<div class="note" id="org2c94d4b">
<p>
Here are the documentation of the equipment used for this test bench:
</p>
<ul class="org-ul">
<li>Voltage Amplifier: <a href="doc/PD200-V7-R1.pdf">PD200</a></li>
<li>Amplified Piezoelectric Actuator: <a href="doc/APA300ML.pdf">APA300ML</a></li>
<li>DAC/ADC: Speedgoat <a href="doc/IO131-OEM-Datasheet.pdf">IO313</a></li>
<li>Encoder: <a href="doc/L-9517-9678-05-A_Data_sheet_VIONiC_series_en.pdf">Renishaw Vionic</a> and used <a href="doc/L-9517-9862-01-C_Data_sheet_RKLC_EN.pdf">Ruler</a></li>
<li>Interferometer: <a href="https://www.attocube.com/en/products/laser-displacement-sensor/displacement-measuring-interferometer">Attocube IDS3010</a></li>
</ul>
</div>
<div id="org5f29196" class="figure">
<p><img src="figs/test_bench_apa_alone.png" alt="test_bench_apa_alone.png" />
</p>
<p><span class="figure-number">Figure 14: </span>Schematic of the Test Bench</p>
</div>
</div>
</div>
<div id="outline-container-org8f87ac7" class="outline-2">
<h2 id="org8f87ac7"><span class="section-number-2">7</span> Measurement Procedure</h2>
<div class="outline-text-2" id="text-7">
<p>
<a id="orgf633e8e"></a>
</p>
</div>
<div id="outline-container-org8a84353" class="outline-3">
<h3 id="org8a84353"><span class="section-number-3">7.1</span> Stroke Measurement</h3>
<div class="outline-text-3" id="text-7-1">
<p>
Using the PD200 amplifier, output a voltage:
\[ V_a = 65 + 85 \sin(2\pi \cdot t) \]
To have a quasi-static excitation between -20 and 150V.
</p>
<p>
As the gain of the PD200 amplifier is 20, the DAC output voltage should be:
\[ V_{dac}(t) = 3.25 + 4.25\sin(2\pi \cdot t) \]
</p>
<p>
Verify that the voltage offset of the PD200 is zero!
</p>
<p>
Measure the output vertical displacement \(d\) using the interferometer.
</p>
<p>
Then, plot \(d\) as a function of \(V_a\), and perform a linear regression.
Conclude on the obtained stroke.
</p>
</div>
</div>
<div id="outline-container-org841d42e" class="outline-3">
<h3 id="org841d42e"><span class="section-number-3">7.2</span> Stiffness Measurement</h3>
<div class="outline-text-3" id="text-7-2">
<p>
Add some (known) weight \(\delta m g\) on the suspended mass and measure the deflection \(\delta d\).
This can be tested when the piezoelectric stacks are open-circuit.
</p>
<p>
As the stiffness will be around \(k \approx 10^6 N/m\), an added mass of \(m \approx 100g\) will induce a static deflection of \(\approx 1\mu m\) which should be large enough for a precise measurement using the interferometer.
</p>
<p>
Then the obtained stiffness is:
</p>
\begin{equation}
k = \frac{\delta m g}{\delta d}
\end{equation}
</div>
</div>
<div id="outline-container-org46015b7" class="outline-3">
<h3 id="org46015b7"><span class="section-number-3">7.3</span> Hysteresis measurement</h3>
<div class="outline-text-3" id="text-7-3">
<p>
Supply a quasi static sinusoidal excitation \(V_a\) at different voltages.
</p>
<p>
The offset should be 65V, and the sin amplitude can range from 1V up to 85V.
</p>
<p>
For each excitation amplitude, the vertical displacement \(d\) of the mass is measured.
</p>
<p>
Then, \(d\) is plotted as a function of \(V_a\) for all the amplitudes.
</p>
<div id="orge544df2" class="figure">
<p><img src="figs/expected_hysteresis.png" alt="expected_hysteresis.png" />
</p>
<p><span class="figure-number">Figure 15: </span>Expected Hysteresis <a class='org-ref-reference' href="#poel10_explor_activ_hard_mount_vibrat">poel10_explor_activ_hard_mount_vibrat</a></p>
</div>
</div>
</div>
<div id="outline-container-org97c9a5e" class="outline-3">
<h3 id="org97c9a5e"><span class="section-number-3">7.4</span> Piezoelectric Actuator Constant</h3>
<div class="outline-text-3" id="text-7-4">
<p>
Using the measurement test-bench, it is rather easy the determine the static gain between the applied voltage \(V_a\) to the induced displacement \(d\).
Use a quasi static (1Hz) excitation signal \(V_a\) on the piezoelectric stack and measure the vertical displacement \(d\).
Perform a linear regression to obtain:
</p>
\begin{equation}
d = g_{d/V_a} \cdot V_a
\end{equation}
<p>
Using the Simscape model of the APA, it is possible to determine the static gain between the actuator force \(F_a\) to the induced displacement \(d\):
</p>
\begin{equation}
d = g_{d/F_a} \cdot F_a
\end{equation}
<p>
From the two gains, it is then easy to determine \(g_a\):
</p>
\begin{equation}
g_a = \frac{F_a}{V_a} = \frac{F_a}{d} \cdot \frac{d}{V_a} = \frac{g_{d/V_a}}{g_{d/F_a}}
\end{equation}
</div>
</div>
<div id="outline-container-org47afc13" class="outline-3">
<h3 id="org47afc13"><span class="section-number-3">7.5</span> Piezoelectric Sensor Constant</h3>
<div class="outline-text-3" id="text-7-5">
<p>
From a quasi static excitation of the piezoelectric stack, measure the gain from \(V_a\) to \(V_s\):
</p>
\begin{equation}
V_s = g_{V_s/V_a} V_a
\end{equation}
<p>
Note here that there is an high pass filter formed by the piezo capacitor and parallel resistor.
The excitation frequency should then be in between the cut-off frequency of this high pass filter and the first resonance.
</p>
<p>
Alternatively, the gain can be computed from the dynamical identification and taking the gain at the wanted frequency.
</p>
<p>
Using the simscape model, compute the static gain from the actuator force \(F_a\) to the strain of the sensor stack \(dl\):
</p>
\begin{equation}
dl = g_{dl/F_a} F_a
\end{equation}
<p>
Then, the static gain from the sensor stack strain \(dl\) to the general voltage \(V_s\) is:
</p>
\begin{equation}
g_s = \frac{V_s}{dl} = \frac{V_s}{V_a} \cdot \frac{V_a}{F_a} \cdot \frac{F_a}{dl} = \frac{g_{V_s/V_a}}{g_a \cdot g_{dl/F_a}}
\end{equation}
<p>
Alternatively, we could impose an external force to add strain in the APA that should be equally present in all the 3 stacks and equal to 1/5 of the vertical strain.
This external force can be some weight added, or a piezo in parallel.
</p>
</div>
</div>
<div id="outline-container-org5e0e686" class="outline-3">
<h3 id="org5e0e686"><span class="section-number-3">7.6</span> Capacitance Measurement</h3>
<div class="outline-text-3" id="text-7-6">
<p>
Measure the capacitance of the 3 stacks individually using a precise multi-meter.
</p>
</div>
</div>
<div id="outline-container-orgd622ed7" class="outline-3">
<h3 id="orgd622ed7"><span class="section-number-3">7.7</span> Dynamical Behavior</h3>
<div class="outline-text-3" id="text-7-7">
<p>
Perform a system identification from \(V_a\) to the measured displacement \(d\) by the interferometer and by the encoder, and to the generated voltage \(V_s\).
</p>
<p>
This can be performed using different excitation signals.
</p>
<p>
This can also be performed with and without the encoder fixed to the APA.
</p>
</div>
</div>
<div id="outline-container-org3cbd796" class="outline-3">
<h3 id="org3cbd796"><span class="section-number-3">7.8</span> Compare the results obtained for all 7 APA300ML</h3>
<div class="outline-text-3" id="text-7-8">
<p>
Compare all the obtained parameters for all the test APA.
</p>
</div>
</div>
</div>
<div id="outline-container-org18da5b7" class="outline-2">
<h2 id="org18da5b7"><span class="section-number-2">8</span> FRF measurement</h2>
<div class="outline-text-2" id="text-8">
<ul class="org-ul">
<li class="off"><code>[&#xa0;]</code> Schematic of the measurement</li>
</ul>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<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">Variable</th>
<th scope="col" class="org-left">&#xa0;</th>
<th scope="col" class="org-left">Unit</th>
<th scope="col" class="org-left">Hardware</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left"><code>Va</code></td>
<td class="org-left">Output DAC voltage</td>
<td class="org-left">[V]</td>
<td class="org-left">DAC - Ch. 1 =&gt; PD200 =&gt; APA</td>
</tr>
<tr>
<td class="org-left"><code>Vs</code></td>
<td class="org-left">Measured stack voltage (ADC)</td>
<td class="org-left">[V]</td>
<td class="org-left">APA =&gt; ADC - Ch. 1</td>
</tr>
<tr>
<td class="org-left"><code>de</code></td>
<td class="org-left">Encoder Measurement</td>
<td class="org-left">[m]</td>
<td class="org-left">PEPU Ch. 1 - IO318(1) - Ch. 1</td>
</tr>
<tr>
<td class="org-left"><code>da</code></td>
<td class="org-left">Attocube Measurement</td>
<td class="org-left">[m]</td>
<td class="org-left">PEPU Ch. 2 - IO318(1) - Ch. 2</td>
</tr>
<tr>
<td class="org-left"><code>t</code></td>
<td class="org-left">Time</td>
<td class="org-left">[s]</td>
<td class="org-left">&#xa0;</td>
</tr>
</tbody>
</table>
</div>
<div id="outline-container-orgbfb3452" class="outline-3">
<h3 id="orgbfb3452"><span class="section-number-3">8.1</span> <code>frf_setup.m</code> - Measurement Setup</h3>
<div class="outline-text-3" id="text-8-1">
<p>
First is defined the sampling frequency:
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Simulation configuration</span></span>
Fs = 10e3; <span class="org-comment">% Sampling Frequency [Hz]</span>
Ts = 1<span class="org-type">/</span>Fs; <span class="org-comment">% Sampling Time [s]</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Data record configuration</span></span>
Trec_start = 5; <span class="org-comment">% Start time for Recording [s]</span>
Trec_dur = 100; <span class="org-comment">% Recording Duration [s]</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">Tsim = 2<span class="org-type">*</span>Trec_start <span class="org-type">+</span> Trec_dur; <span class="org-comment">% Simulation Time [s]</span>
</pre>
</div>
<p>
The maximum excitation voltage at resonance is 9Vrms, therefore corresponding to 0.6V of output DAC voltage.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Sweep Sine</span></span>
gc = 0.1;
xi = 0.5;
wn = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>94.3;
<span class="org-comment">% Notch filter at the resonance of the APA</span>
G_sweep = 0.2<span class="org-type">*</span>(s<span class="org-type">^</span>2 <span class="org-type">+</span> 2<span class="org-type">*</span>gc<span class="org-type">*</span>xi<span class="org-type">*</span>wn<span class="org-type">*</span>s <span class="org-type">+</span> wn<span class="org-type">^</span>2)<span class="org-type">/</span>(s<span class="org-type">^</span>2 <span class="org-type">+</span> 2<span class="org-type">*</span>xi<span class="org-type">*</span>wn<span class="org-type">*</span>s <span class="org-type">+</span> wn<span class="org-type">^</span>2);
V_sweep = generateSweepExc(<span class="org-string">'Ts'</span>, Ts, ...
<span class="org-string">'f_start'</span>, 10, ...
<span class="org-string">'f_end'</span>, 1e3, ...
<span class="org-string">'V_mean'</span>, 3.25, ...
<span class="org-string">'t_start'</span>, Trec_start, ...
<span class="org-string">'exc_duration'</span>, Trec_dur, ...
<span class="org-string">'sweep_type'</span>, <span class="org-string">'log'</span>, ...
<span class="org-string">'V_exc'</span>, G_sweep<span class="org-type">*</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));
</pre>
</div>
<div id="org17c90fc" class="figure">
<p><img src="figs/frf_meas_sweep_excitation.png" alt="frf_meas_sweep_excitation.png" />
</p>
<p><span class="figure-number">Figure 16: </span>Example of Sweep Sin excitation signal</p>
</div>
<p>
A white noise excitation signal can be very useful in order to obtain a first idea of the plant FRF.
The gain can be gradually increased until satisfactory output is obtained.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Shaped Noise</span></span>
V_noise = generateShapedNoise(<span class="org-string">'Ts'</span>, 1<span class="org-type">/</span>Fs, ...
<span class="org-string">'V_mean'</span>, 3.25, ...
<span class="org-string">'t_start'</span>, Trec_start, ...
<span class="org-string">'exc_duration'</span>, Trec_dur, ...
<span class="org-string">'smooth_ends'</span>, <span class="org-constant">true</span>, ...
<span class="org-string">'V_exc'</span>, 0.05<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>10));
</pre>
</div>
<div id="org4181132" class="figure">
<p><img src="figs/frf_meas_noise_excitation.png" alt="frf_meas_noise_excitation.png" />
</p>
<p><span class="figure-number">Figure 17: </span>Example of Shaped noise excitation signal</p>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Sinus excitation with increasing amplitude</span></span>
V_sin = generateSinIncreasingAmpl(<span class="org-string">'Ts'</span>, 1<span class="org-type">/</span>Fs, ...
<span class="org-string">'V_mean'</span>, 3.25, ...
<span class="org-string">'sin_ampls'</span>, [0.1, 0.2, 0.4, 1, 2, 4], ...
<span class="org-string">'sin_period'</span>, 1, ...
<span class="org-string">'sin_num'</span>, 5, ...
<span class="org-string">'t_start'</span>, 10, ...
<span class="org-string">'smooth_ends'</span>, <span class="org-constant">true</span>);
</pre>
</div>
<div id="org3eaa988" class="figure">
<p><img src="figs/frf_meas_sin_excitation.png" alt="frf_meas_sin_excitation.png" />
</p>
<p><span class="figure-number">Figure 18: </span>Example of Shaped noise excitation signal</p>
</div>
<p>
Then, we select the wanted excitation signal.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Select the excitation signal</span></span>
V_exc = timeseries(V_noise(2,<span class="org-type">:</span>), V_noise(1,<span class="org-type">:</span>));
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Save data that will be loaded in the Simulink file</span></span>
save(<span class="org-string">'./frf_data.mat'</span>, <span class="org-string">'Fs'</span>, <span class="org-string">'Ts'</span>, <span class="org-string">'Tsim'</span>, <span class="org-string">'Trec_start'</span>, <span class="org-string">'Trec_dur'</span>, <span class="org-string">'V_exc'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-org574e535" class="outline-3">
<h3 id="org574e535"><span class="section-number-3">8.2</span> <code>frf_save.m</code> - Save Data</h3>
<div class="outline-text-3" id="text-8-2">
<p>
First, we get data from the Speedgoat:
</p>
<div class="org-src-container">
<pre class="src src-matlab">tg = slrt;
f = SimulinkRealTime.openFTP(tg);
mget(f, <span class="org-string">'data/data.dat'</span>);
close(f);
</pre>
</div>
<p>
And we load the data on the Workspace:
</p>
<div class="org-src-container">
<pre class="src src-matlab">data = SimulinkRealTime.utils.getFileScopeData(<span class="org-string">'data/data.dat'</span>).data;
da = data(<span class="org-type">:</span>, 1); <span class="org-comment">% Excitation Voltage (input of PD200) [V]</span>
de = data(<span class="org-type">:</span>, 2); <span class="org-comment">% Measured voltage (force sensor) [V]</span>
Vs = data(<span class="org-type">:</span>, 3); <span class="org-comment">% Measurment displacement (encoder) [m]</span>
Va = data(<span class="org-type">:</span>, 4); <span class="org-comment">% Measurement displacement (attocube) [m]</span>
t = data(<span class="org-type">:</span>, end); <span class="org-comment">% Time [s]</span>
</pre>
</div>
<p>
And we save this to a <code>mat</code> file:
</p>
<div class="org-src-container">
<pre class="src src-matlab">apa_number = 1;
save(sprintf(<span class="org-string">'mat/frf_data_%i_huddle.mat'</span>, apa_number), <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-string">'da'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-org731f95d" class="outline-3">
<h3 id="org731f95d"><span class="section-number-3">8.3</span> Measurements on APA 1</h3>
<div class="outline-text-3" id="text-8-3">
<p>
Measurements are first performed on the APA number 1.
</p>
</div>
<div id="outline-container-org67034dd" class="outline-4">
<h4 id="org67034dd"><span class="section-number-4">8.3.1</span> Huddle Test</h4>
<div class="outline-text-4" id="text-8-3-1">
<div class="org-src-container">
<pre class="src src-matlab">load(sprintf(<span class="org-string">'frf_data_%i_huddle.mat'</span>, 1), <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-string">'da'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Parameter for Spectral analysis</span></span>
Ts = (t(end) <span class="org-type">-</span> t(1))<span class="org-type">/</span>(length(t)<span class="org-type">-</span>1);
Fs = 1<span class="org-type">/</span>Ts;
win = hanning(ceil(10<span class="org-type">*</span>Fs)); <span class="org-comment">% Hannning Windows</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[phh_da, f] = pwelch(da <span class="org-type">-</span> mean(da), win, [], [], 1<span class="org-type">/</span>Ts);
[phh_de, <span class="org-type">~</span>] = pwelch(de <span class="org-type">-</span> mean(de), win, [], [], 1<span class="org-type">/</span>Ts);
[phh_Vs, <span class="org-type">~</span>] = pwelch(Vs <span class="org-type">-</span> mean(Vs), win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
</div>
</div>
<div id="outline-container-org688f71e" class="outline-4">
<h4 id="org688f71e"><span class="section-number-4">8.3.2</span> First identification with Noise</h4>
<div class="outline-text-4" id="text-8-3-2">
<div class="org-src-container">
<pre class="src src-matlab">load(sprintf(<span class="org-string">'mat/frf_data_%i_noise.mat'</span>, 1), <span class="org-string">'t'</span>, <span class="org-string">'Va'</span>, <span class="org-string">'Vs'</span>, <span class="org-string">'da'</span>, <span class="org-string">'de'</span>)
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[pxx_da, f] = pwelch(da, win, [], [], 1<span class="org-type">/</span>Ts);
[pxx_de, <span class="org-type">~</span>] = pwelch(de, win, [], [], 1<span class="org-type">/</span>Ts);
[pxx_Vs, <span class="org-type">~</span>] = pwelch(Vs, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[G_dvf, f] = tfestimate(Va, de, win, [], [], 1<span class="org-type">/</span>Ts);
[G_d, <span class="org-type">~</span>] = tfestimate(Va, da, win, [], [], 1<span class="org-type">/</span>Ts);
[G_iff, <span class="org-type">~</span>] = tfestimate(Va, Vs, win, [], [], 1<span class="org-type">/</span>Ts);
[coh_dvf, <span class="org-type">~</span>] = mscohere(Va, de, win, [], [], 1<span class="org-type">/</span>Ts);
[coh_d, <span class="org-type">~</span>] = mscohere(Va, da, win, [], [], 1<span class="org-type">/</span>Ts);
[coh_iff, <span class="org-type">~</span>] = mscohere(Va, Vs, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
</div>
</div>
<div id="outline-container-org59d7bdf" class="outline-4">
<h4 id="org59d7bdf"><span class="section-number-4">8.3.3</span> Second identification with Sweep and high frequency noise</h4>
<div class="outline-text-4" id="text-8-3-3">
<div class="org-src-container">
<pre class="src src-matlab">load(sprintf(<span class="org-string">'mat/frf_data_%i_sweep.mat'</span>, 1), <span class="org-string">'t'</span>, <span class="org-string">'Va'</span>, <span class="org-string">'Vs'</span>, <span class="org-string">'da'</span>, <span class="org-string">'de'</span>)
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[pxx_da, f] = pwelch(da, win, [], [], 1<span class="org-type">/</span>Ts);
[pxx_de, <span class="org-type">~</span>] = pwelch(de, win, [], [], 1<span class="org-type">/</span>Ts);
[pxx_Vs, <span class="org-type">~</span>] = pwelch(Vs, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[G_dvf, f] = tfestimate(Va, de, win, [], [], 1<span class="org-type">/</span>Ts);
[G_d, <span class="org-type">~</span>] = tfestimate(Va, da, win, [], [], 1<span class="org-type">/</span>Ts);
[G_iff, <span class="org-type">~</span>] = tfestimate(Va, Vs, win, [], [], 1<span class="org-type">/</span>Ts);
[coh_dvf, <span class="org-type">~</span>] = mscohere(Va, de, win, [], [], 1<span class="org-type">/</span>Ts);
[coh_d, <span class="org-type">~</span>] = mscohere(Va, da, win, [], [], 1<span class="org-type">/</span>Ts);
[coh_iff, <span class="org-type">~</span>] = mscohere(Va, Vs, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">load(sprintf(<span class="org-string">'mat/frf_data_%i_noise_high_freq.mat'</span>, 1), <span class="org-string">'t'</span>, <span class="org-string">'Va'</span>, <span class="org-string">'Vs'</span>, <span class="org-string">'da'</span>, <span class="org-string">'de'</span>)
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[phf_da, f] = pwelch(da, win, [], [], 1<span class="org-type">/</span>Ts);
[phf_de, <span class="org-type">~</span>] = pwelch(de, win, [], [], 1<span class="org-type">/</span>Ts);
[phf_Vs, <span class="org-type">~</span>] = pwelch(Vs, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[cohhf_dvf, <span class="org-type">~</span>] = mscohere(Va, de, win, [], [], 1<span class="org-type">/</span>Ts);
[cohhf_d, <span class="org-type">~</span>] = mscohere(Va, da, win, [], [], 1<span class="org-type">/</span>Ts);
[cohhf_iff, <span class="org-type">~</span>] = mscohere(Va, Vs, win, [], [], 1<span class="org-type">/</span>Ts);
[Ghf_dvf, f] = tfestimate(Va, de, win, [], [], 1<span class="org-type">/</span>Ts);
[Ghf_d, <span class="org-type">~</span>] = tfestimate(Va, da, win, [], [], 1<span class="org-type">/</span>Ts);
[Ghf_iff, <span class="org-type">~</span>] = tfestimate(Va, Vs, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
</div>
</div>
<div id="outline-container-orga8c96c8" class="outline-4">
<h4 id="orga8c96c8"><span class="section-number-4">8.3.4</span> Extract Parameters (Actuator/Sensor constants)</h4>
<div class="outline-text-4" id="text-8-3-4">
<p>
Quasi static gain between \(d\) and \(V_a\):
</p>
<div class="org-src-container">
<pre class="src src-matlab">g_d_Va = mean(abs(G_dvf(f <span class="org-type">&gt;</span> 10 <span class="org-type">&amp;</span> f <span class="org-type">&lt;</span> 15)));
</pre>
</div>
<pre class="example">
g_d_Va = 1.7e-05 [m/V]
</pre>
<p>
Quasi static gain between \(V_s\) and \(V_a\):
</p>
<div class="org-src-container">
<pre class="src src-matlab">g_Vs_Va = mean(abs(G_iff(f <span class="org-type">&gt;</span> 10 <span class="org-type">&amp;</span> f <span class="org-type">&lt;</span> 15)));
</pre>
</div>
<pre class="example">
g_Vs_Va = 5.7e-01 [V/V]
</pre>
</div>
</div>
</div>
<div id="outline-container-orge536a20" class="outline-3">
<h3 id="orge536a20"><span class="section-number-3">8.4</span> Comparison of all the APA</h3>
<div class="outline-text-3" id="text-8-4">
</div>
<div id="outline-container-org3f63be0" class="outline-4">
<h4 id="org3f63be0"><span class="section-number-4">8.4.1</span> Stiffness - Comparison of the APA</h4>
<div class="outline-text-4" id="text-8-4-1">
<p>
In order to estimate the stiffness of the APA, a weight with known mass \(m_a\) is added on top of the suspended granite and the deflection \(d_e\) is measured using an encoder.
The APA stiffness is then:
</p>
\begin{equation}
k_{\text{apa}} = \frac{m_a g}{d}
\end{equation}
<p>
Here are the number of the APA that have been measured:
</p>
<div class="org-src-container">
<pre class="src src-matlab">apa_nums = [1 2 4 5 6 7 8];
</pre>
</div>
<p>
The data are loaded.
</p>
<div class="org-src-container">
<pre class="src src-matlab">apa_mass = {};
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(apa_nums)</span>
apa_mass(<span class="org-constant">i</span>) = {load(sprintf(<span class="org-string">'frf_data_%i_add_mass_closed_circuit.mat'</span>, apa_nums(<span class="org-constant">i</span>)), <span class="org-string">'t'</span>, <span class="org-string">'de'</span>)};
<span class="org-comment">% The initial displacement is set to zero</span>
apa_mass{<span class="org-constant">i</span>}.de = apa_mass{<span class="org-constant">i</span>}.de <span class="org-type">-</span> mean(apa_mass{<span class="org-constant">i</span>}.de(apa_mass{<span class="org-constant">i</span>}.t<span class="org-type">&lt;</span>11));
<span class="org-keyword">end</span>
</pre>
</div>
<p>
The raw measurements are shown in Figure <a href="#org104d216">19</a>.
All the APA seems to have similar stiffness except the APA 7 which should have an higher stiffness.
</p>
<div class="question" id="orgf66ecbf">
<p>
It is however strange that the displacement \(d_e\) when the mass is removed is higher for the APA 7 than for the other APA.
What could cause that?
</p>
</div>
<div id="org104d216" class="figure">
<p><img src="figs/apa_meas_k_time.png" alt="apa_meas_k_time.png" />
</p>
<p><span class="figure-number">Figure 19: </span>Raw measurements for all the APA. A mass of 6.4kg is added at arround 15s and removed at arround 22s</p>
</div>
<div class="org-src-container">
<pre class="src src-matlab">added_mass = 6.4; <span class="org-comment">% Added mass [kg]</span>
</pre>
</div>
<p>
The stiffnesses are computed for all the APA and are summarized in Table <a href="#orgab1652e">4</a>.
</p>
<table id="orgab1652e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 4:</span> Measured stiffnesses</caption>
<colgroup>
<col class="org-right" />
<col class="org-right" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-right">APA Num</th>
<th scope="col" class="org-right">\(k [N/\mu m]\)</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-right">1</td>
<td class="org-right">1.68</td>
</tr>
<tr>
<td class="org-right">2</td>
<td class="org-right">1.69</td>
</tr>
<tr>
<td class="org-right">4</td>
<td class="org-right">1.7</td>
</tr>
<tr>
<td class="org-right">5</td>
<td class="org-right">1.7</td>
</tr>
<tr>
<td class="org-right">6</td>
<td class="org-right">1.7</td>
</tr>
<tr>
<td class="org-right">7</td>
<td class="org-right">1.93</td>
</tr>
<tr>
<td class="org-right">8</td>
<td class="org-right">1.73</td>
</tr>
</tbody>
</table>
<div class="important" id="orgb350120">
<p>
The APA300ML manual specifies the nominal stiffness to be \(1.8\,[N/\mu m]\) which is very close to what have been measured.
Only the APA number 7 is a little bit off.
</p>
</div>
</div>
</div>
<div id="outline-container-org28bc287" class="outline-4">
<h4 id="org28bc287"><span class="section-number-4">8.4.2</span> Stiffness - Effect of connecting the actuator stack to the amplifier and the sensor stack to the ADC</h4>
<div class="outline-text-4" id="text-8-4-2">
<p>
We wish here to see if the stiffness changes when the actuator stacks are not connected to the amplifier and the sensor stacks are not connected to the ADC.
</p>
<p>
Note here that the resistor in parallel to the sensor stack is present in both cases.
</p>
<p>
First, the data are loaded.
</p>
<div class="org-src-container">
<pre class="src src-matlab">add_mass_oc = load(sprintf(<span class="org-string">'frf_data_%i_add_mass_open_circuit.mat'</span>, 1), <span class="org-string">'t'</span>, <span class="org-string">'de'</span>);
add_mass_cc = load(sprintf(<span class="org-string">'frf_data_%i_add_mass_closed_circuit.mat'</span>, 1), <span class="org-string">'t'</span>, <span class="org-string">'de'</span>);
</pre>
</div>
<p>
And the initial displacement is set to zero.
</p>
<div class="org-src-container">
<pre class="src src-matlab">add_mass_oc.de = add_mass_oc.de <span class="org-type">-</span> mean(add_mass_oc.de(add_mass_oc.t<span class="org-type">&lt;</span>11));
add_mass_cc.de = add_mass_cc.de <span class="org-type">-</span> mean(add_mass_cc.de(add_mass_cc.t<span class="org-type">&lt;</span>11));
</pre>
</div>
<div id="org33bd039" class="figure">
<p><img src="figs/apa_meas_k_time_oc_cc.png" alt="apa_meas_k_time_oc_cc.png" />
</p>
<p><span class="figure-number">Figure 20: </span>Measured displacement</p>
</div>
<p>
And the stiffness is estimated in both case.
The results are shown in Table <a href="#orgba2f5ae">5</a>.
</p>
<div class="org-src-container">
<pre class="src src-matlab">apa_k_oc = 9.8 <span class="org-type">*</span> added_mass <span class="org-type">/</span> (mean(add_mass_oc.de(add_mass_oc.t <span class="org-type">&gt;</span> 12 <span class="org-type">&amp;</span> add_mass_oc.t <span class="org-type">&lt;</span> 12.5)) <span class="org-type">-</span> mean(add_mass_oc.de(add_mass_oc.t <span class="org-type">&gt;</span> 20 <span class="org-type">&amp;</span> add_mass_oc.t <span class="org-type">&lt;</span> 20.5)));
apa_k_cc = 9.8 <span class="org-type">*</span> added_mass <span class="org-type">/</span> (mean(add_mass_cc.de(add_mass_cc.t <span class="org-type">&gt;</span> 12 <span class="org-type">&amp;</span> add_mass_cc.t <span class="org-type">&lt;</span> 12.5)) <span class="org-type">-</span> mean(add_mass_cc.de(add_mass_cc.t <span class="org-type">&gt;</span> 20 <span class="org-type">&amp;</span> add_mass_cc.t <span class="org-type">&lt;</span> 20.5)));
</pre>
</div>
<table id="orgba2f5ae" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 5:</span> Measured stiffnesses on &ldquo;open&rdquo; and &ldquo;closed&rdquo; circuits</caption>
<colgroup>
<col class="org-left" />
<col class="org-right" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">&#xa0;</th>
<th scope="col" class="org-right">\(k [N/\mu m]\)</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">Not connected</td>
<td class="org-right">2.3</td>
</tr>
<tr>
<td class="org-left">Connected</td>
<td class="org-right">1.7</td>
</tr>
</tbody>
</table>
<div class="important" id="org42c2492">
<p>
Clearly, connecting the actuator stacks to the amplified (basically equivalent as to short circuiting them) lowers the stiffness.
</p>
</div>
</div>
</div>
<div id="outline-container-org7bbfc1c" class="outline-4">
<h4 id="org7bbfc1c"><span class="section-number-4">8.4.3</span> Hysteresis</h4>
<div class="outline-text-4" id="text-8-4-3">
<p>
We here wish to visually see the amount of hysteresis present in the APA.
</p>
<p>
The data is loaded.
</p>
<div class="org-src-container">
<pre class="src src-matlab">apa_hyst = load(<span class="org-string">'frf_data_1_hysteresis.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'Va'</span>, <span class="org-string">'de'</span>);
<span class="org-comment">% Initial time set to zero</span>
apa_hyst.t = apa_hyst.t <span class="org-type">-</span> apa_hyst.t(1);
</pre>
</div>
<p>
The excitation voltage amplitudes are:
</p>
<div class="org-src-container">
<pre class="src src-matlab">ampls = [0.1, 0.2, 0.4, 1, 2, 4]; <span class="org-comment">% Excitation voltage amplitudes</span>
</pre>
</div>
<p>
The excitation voltage and the measured displacement are shown in Figure <a href="#org1593bab">21</a>.
</p>
<div id="org1593bab" class="figure">
<p><img src="figs/hyst_exc_signal_time.png" alt="hyst_exc_signal_time.png" />
</p>
<p><span class="figure-number">Figure 21: </span>Excitation voltage and measured displacement</p>
</div>
<p>
For each amplitude, we only take the last sinus in order to reduce possible transients.
Also, it is centered on zero.
</p>
<p>
The measured displacement at a function of the output voltage are shown in Figure <a href="#org359d2af">22</a>.
</p>
<div id="org359d2af" class="figure">
<p><img src="figs/hyst_results_multi_ampl.png" alt="hyst_results_multi_ampl.png" />
</p>
<p><span class="figure-number">Figure 22: </span>Obtained hysteresis for multiple excitation amplitudes</p>
</div>
<div class="important" id="org3d84a0d">
<p>
It is quite clear that hysteresis is increasing with the excitation amplitude.
</p>
<p>
Also, no hysteresis is found on the sensor stack voltage.
</p>
</div>
</div>
</div>
<div id="outline-container-orge0dea88" class="outline-4">
<h4 id="orge0dea88"><span class="section-number-4">8.4.4</span> FRF Identification - Setup</h4>
<div class="outline-text-4" id="text-8-4-4">
<p>
The identification is performed in three steps:
</p>
<ol class="org-ol">
<li>White noise excitation with small amplitude.
This is used to determine the main resonance of the system.</li>
<li>Sweep sine excitation with the amplitude lowered around the resonance.
The sweep sine is from 10Hz to 400Hz.</li>
<li>High frequency noise.
The noise is band-passed between 300Hz and 2kHz.</li>
</ol>
<p>
Then, the result of the second identification is used between 10Hz and 350Hz and the result of the third identification if used between 350Hz and 2kHz.
</p>
<p>
Here are the APA numbers that have been measured.
</p>
<div class="org-src-container">
<pre class="src src-matlab">apa_nums = [1 2 4 5 6 7 8];
</pre>
</div>
<p>
The data are loaded for both the second and third identification:
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Second identification</span></span>
apa_sweep = {};
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(apa_nums)</span>
apa_sweep(<span class="org-constant">i</span>) = {load(sprintf(<span class="org-string">'frf_data_%i_sweep.mat'</span>, apa_nums(<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-string">'da'</span>)};
<span class="org-keyword">end</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Third identification</span></span>
apa_noise_hf = {};
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(apa_nums)</span>
apa_noise_hf(<span class="org-constant">i</span>) = {load(sprintf(<span class="org-string">'frf_data_%i_noise_hf.mat'</span>, apa_nums(<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-string">'da'</span>)};
<span class="org-keyword">end</span>
</pre>
</div>
<p>
The time is the same for all measurements.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Time vector</span></span>
t = apa_sweep{1}.t <span class="org-type">-</span> apa_sweep{1}.t(1) ; <span class="org-comment">% Time vector [s]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Sampling</span></span>
Ts = (t(end) <span class="org-type">-</span> t(1))<span class="org-type">/</span>(length(t)<span class="org-type">-</span>1); <span class="org-comment">% Sampling Time [s]</span>
Fs = 1<span class="org-type">/</span>Ts; <span class="org-comment">% Sampling Frequency [Hz]</span>
</pre>
</div>
<p>
Then we defined a &ldquo;Hanning&rdquo; windows that will be used for the spectral analysis:
</p>
<div class="org-src-container">
<pre class="src src-matlab">win = hanning(ceil(0.5<span class="org-type">*</span>Fs)); <span class="org-comment">% Hannning Windows</span>
</pre>
</div>
<p>
We get the frequency vector that will be the same for all the frequency domain analysis.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-comment">% Only used to have the frequency vector "f"</span>
[<span class="org-type">~</span>, f] = tfestimate(apa_sweep{1}.Va, apa_sweep{1}.de, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
</div>
</div>
<div id="outline-container-org575ff14" class="outline-4">
<h4 id="org575ff14"><span class="section-number-4">8.4.5</span> FRF Identification - DVF</h4>
<div class="outline-text-4" id="text-8-4-5">
<p>
In this section, the dynamics from \(V_a\) to \(d_e\) is identified.
</p>
<p>
We compute the coherence for 2nd and 3rd identification:
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Coherence computation</span></span>
coh_sweep = zeros(length(f), length(apa_nums));
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(apa_nums)</span>
[coh, <span class="org-type">~</span>] = mscohere(apa_sweep{<span class="org-constant">i</span>}.Va, apa_sweep{<span class="org-constant">i</span>}.de, win, [], [], 1<span class="org-type">/</span>Ts);
coh_sweep(<span class="org-type">:</span>, <span class="org-constant">i</span>) = coh;
<span class="org-keyword">end</span>
coh_noise_hf = zeros(length(f), length(apa_nums));
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(apa_nums)</span>
[coh, <span class="org-type">~</span>] = mscohere(apa_noise_hf{<span class="org-constant">i</span>}.Va, apa_noise_hf{<span class="org-constant">i</span>}.de, win, [], [], 1<span class="org-type">/</span>Ts);
coh_noise_hf(<span class="org-type">:</span>, <span class="org-constant">i</span>) = coh;
<span class="org-keyword">end</span>
</pre>
</div>
<p>
The coherence is shown in Figure <a href="#org3c29806">23</a>.
It is clear that the Sweep sine gives good coherence up to 400Hz and that the high frequency noise excitation signal helps increasing a little bit the coherence at high frequency.
</p>
<div id="org3c29806" class="figure">
<p><img src="figs/frf_dvf_plant_coh.png" alt="frf_dvf_plant_coh.png" />
</p>
<p><span class="figure-number">Figure 23: </span>Obtained coherence for the plant from \(V_a\) to \(d_e\)</p>
</div>
<p>
Then, the transfer function from the DAC output voltage \(V_a\) to the measured displacement by the encoders is computed:
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Transfer function estimation</span></span>
dvf_sweep = zeros(length(f), length(apa_nums));
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(apa_nums)</span>
[frf, <span class="org-type">~</span>] = tfestimate(apa_sweep{<span class="org-constant">i</span>}.Va, apa_sweep{<span class="org-constant">i</span>}.de, win, [], [], 1<span class="org-type">/</span>Ts);
dvf_sweep(<span class="org-type">:</span>, <span class="org-constant">i</span>) = frf;
<span class="org-keyword">end</span>
dvf_noise_hf = zeros(length(f), length(apa_nums));
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(apa_nums)</span>
[frf, <span class="org-type">~</span>] = tfestimate(apa_noise_hf{<span class="org-constant">i</span>}.Va, apa_noise_hf{<span class="org-constant">i</span>}.de, win, [], [], 1<span class="org-type">/</span>Ts);
dvf_noise_hf(<span class="org-type">:</span>, <span class="org-constant">i</span>) = frf;
<span class="org-keyword">end</span>
</pre>
</div>
<p>
The obtained transfer functions are shown in Figure <a href="#org8ded86a">24</a>.
</p>
<p>
They are all superimposed except for the APA7.
</p>
<div class="question" id="org490ec10">
<p>
Why is the APA7 off?
We could think that the APA7 is stiffer, but also the mass line is off.
</p>
<p>
It seems that there is a &ldquo;gain&rdquo; problem.
The encoder seems fine (it measured the same as the Interferometer).
Maybe it could be due to the amplifier?
</p>
</div>
<div class="question" id="org92bd990">
<p>
Why is there a double resonance at around 94Hz?
</p>
</div>
<div id="org8ded86a" class="figure">
<p><img src="figs/frf_dvf_plant_tf.png" alt="frf_dvf_plant_tf.png" />
</p>
<p><span class="figure-number">Figure 24: </span>Estimated FRF for the DVF plant (transfer function from \(V_a\) to the encoder \(d_e\))</p>
</div>
</div>
</div>
<div id="outline-container-orgbe445f3" class="outline-4">
<h4 id="orgbe445f3"><span class="section-number-4">8.4.6</span> FRF Identification - IFF</h4>
<div class="outline-text-4" id="text-8-4-6">
<p>
In this section, the dynamics from \(V_a\) to \(V_s\) is identified.
</p>
<p>
First the coherence is computed and shown in Figure <a href="#orge2dbfd2">25</a>.
The coherence is very nice from 10Hz to 2kHz.
It is only dropping near a zeros at 40Hz, and near the resonance at 95Hz (the excitation amplitude being lowered).
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Coherence</span></span>
coh_sweep = zeros(length(f), length(apa_nums));
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(apa_nums)</span>
[coh, <span class="org-type">~</span>] = mscohere(apa_sweep{<span class="org-constant">i</span>}.Va, apa_sweep{<span class="org-constant">i</span>}.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
coh_sweep(<span class="org-type">:</span>, <span class="org-constant">i</span>) = coh;
<span class="org-keyword">end</span>
coh_noise_hf = zeros(length(f), length(apa_nums));
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(apa_nums)</span>
[coh, <span class="org-type">~</span>] = mscohere(apa_noise_hf{<span class="org-constant">i</span>}.Va, apa_noise_hf{<span class="org-constant">i</span>}.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
coh_noise_hf(<span class="org-type">:</span>, <span class="org-constant">i</span>) = coh;
<span class="org-keyword">end</span>
</pre>
</div>
<div id="orge2dbfd2" class="figure">
<p><img src="figs/frf_iff_plant_coh.png" alt="frf_iff_plant_coh.png" />
</p>
<p><span class="figure-number">Figure 25: </span>Obtained coherence for the IFF plant</p>
</div>
<p>
Then the FRF are estimated and shown in Figure <a href="#orgab416f1">26</a>
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% FRF estimation of the transfer function from Va to Vs</span></span>
iff_sweep = zeros(length(f), length(apa_nums));
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(apa_nums)</span>
[frf, <span class="org-type">~</span>] = tfestimate(apa_sweep{<span class="org-constant">i</span>}.Va, apa_sweep{<span class="org-constant">i</span>}.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
iff_sweep(<span class="org-type">:</span>, <span class="org-constant">i</span>) = frf;
<span class="org-keyword">end</span>
iff_noise_hf = zeros(length(f), length(apa_nums));
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(apa_nums)</span>
[frf, <span class="org-type">~</span>] = tfestimate(apa_noise_hf{<span class="org-constant">i</span>}.Va, apa_noise_hf{<span class="org-constant">i</span>}.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
iff_noise_hf(<span class="org-type">:</span>, <span class="org-constant">i</span>) = frf;
<span class="org-keyword">end</span>
</pre>
</div>
<div id="orgab416f1" class="figure">
<p><img src="figs/frf_iff_plant_tf.png" alt="frf_iff_plant_tf.png" />
</p>
<p><span class="figure-number">Figure 26: </span>Identified IFF Plant</p>
</div>
</div>
</div>
<div id="outline-container-org0460555" class="outline-4">
<h4 id="org0460555"><span class="section-number-4">8.4.7</span> Effect of the resistor on the IFF Plant</h4>
<div class="outline-text-4" id="text-8-4-7">
<p>
A resistor is added in parallel with the sensor stack.
This has the effect to form a high pass filter with the capacitance of the stack.
</p>
<p>
We here measured the low frequency transfer function from \(V_a\) to \(V_s\) with and without this resistor.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-comment">% With the resistor</span>
wi_k = load(<span class="org-string">'frf_data_2_sweep_lf_with_R.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'Vs'</span>, <span class="org-string">'Va'</span>);
<span class="org-comment">% Without the resistor</span>
wo_k = load(<span class="org-string">'frf_data_2_sweep_lf.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'Vs'</span>, <span class="org-string">'Va'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">t = wo_k.t; <span class="org-comment">% Time vector [s]</span>
Ts = (t(end) <span class="org-type">-</span> t(1))<span class="org-type">/</span>(length(t)<span class="org-type">-</span>1); <span class="org-comment">% Sampling Time [s]</span>
Fs = 1<span class="org-type">/</span>Ts; <span class="org-comment">% Sampling Frequency [Hz]</span>
</pre>
</div>
<p>
We use a very long &ldquo;Hanning&rdquo; window for the spectral analysis in order to estimate the low frequency behavior.
</p>
<div class="org-src-container">
<pre class="src src-matlab">win = hanning(ceil(50<span class="org-type">*</span>Fs)); <span class="org-comment">% Hannning Windows</span>
</pre>
</div>
<p>
And we estimate the transfer function from \(V_a\) to \(V_s\) in both cases:
</p>
<div class="org-src-container">
<pre class="src src-matlab">[frf_wo_k, f] = tfestimate(wo_k.Va, wo_k.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
[frf_wi_k, <span class="org-type">~</span>] = tfestimate(wi_k.Va, wi_k.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">f0 = 0.35;
G_hpf = 0.6<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>f0)<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>f0);
</pre>
</div>
<div id="org9e34910" class="figure">
<p><img src="figs/frf_iff_effect_R.png" alt="frf_iff_effect_R.png" />
</p>
<p><span class="figure-number">Figure 27: </span>Transfer function from \(V_a\) to \(V_s\) with and without the resistor \(k\)</p>
</div>
</div>
</div>
</div>
<div id="outline-container-org79e199c" class="outline-3">
<h3 id="org79e199c"><span class="section-number-3">8.5</span> Measurement on Strut 1</h3>
<div class="outline-text-3" id="text-8-5">
<p>
Measurements are first performed on the strut number 1 with:
</p>
<ul class="org-ul">
<li>APA 1</li>
<li>flex 1 and flex 2</li>
</ul>
</div>
<div id="outline-container-org2a6ce8a" class="outline-4">
<h4 id="org2a6ce8a"><span class="section-number-4">8.5.1</span> Without Encoder</h4>
<div class="outline-text-4" id="text-8-5-1">
</div>
<div id="outline-container-org1819920" class="outline-5">
<h5 id="org1819920"><span class="section-number-5">8.5.1.1</span> FRF Identification - Setup</h5>
<div class="outline-text-5" id="text-8-5-1-1">
<p>
The identification is performed in three steps:
</p>
<ol class="org-ol">
<li>White noise excitation with small amplitude.
This is used to determine the main resonance of the system.</li>
<li>Sweep sine excitation with the amplitude lowered around the resonance.
The sweep sine is from 10Hz to 400Hz.</li>
<li>High frequency noise.
The noise is band-passed between 300Hz and 2kHz.</li>
</ol>
<p>
Then, the result of the second identification is used between 10Hz and 350Hz and the result of the third identification if used between 350Hz and 2kHz.
</p>
<div class="org-src-container">
<pre class="src src-matlab">leg_sweep = load(sprintf(<span class="org-string">'frf_data_leg_%i_sweep.mat'</span>, 1), <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-string">'da'</span>);
leg_noise_hf = load(sprintf(<span class="org-string">'frf_data_leg_%i_noise_hf.mat'</span>, 1), <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-string">'da'</span>);
</pre>
</div>
<p>
The time is the same for all measurements.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Time vector</span></span>
t = leg_sweep.t <span class="org-type">-</span> leg_sweep.t(1) ; <span class="org-comment">% Time vector [s]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Sampling</span></span>
Ts = (t(end) <span class="org-type">-</span> t(1))<span class="org-type">/</span>(length(t)<span class="org-type">-</span>1); <span class="org-comment">% Sampling Time [s]</span>
Fs = 1<span class="org-type">/</span>Ts; <span class="org-comment">% Sampling Frequency [Hz]</span>
</pre>
</div>
<p>
Then we defined a &ldquo;Hanning&rdquo; windows that will be used for the spectral analysis:
</p>
<div class="org-src-container">
<pre class="src src-matlab">win = hanning(ceil(0.5<span class="org-type">*</span>Fs)); <span class="org-comment">% Hannning Windows</span>
</pre>
</div>
<p>
We get the frequency vector that will be the same for all the frequency domain analysis.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-comment">% Only used to have the frequency vector "f"</span>
[<span class="org-type">~</span>, f] = tfestimate(leg_sweep.Va, leg_sweep.de, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
</div>
</div>
<div id="outline-container-orgc9d282a" class="outline-5">
<h5 id="orgc9d282a"><span class="section-number-5">8.5.1.2</span> FRF Identification - DVF</h5>
<div class="outline-text-5" id="text-8-5-1-2">
<p>
In this section, the dynamics from \(V_a\) to \(d_e\) is identified.
</p>
<p>
We compute the coherence for 2nd and 3rd identification:
</p>
<div class="org-src-container">
<pre class="src src-matlab">[coh_sweep, <span class="org-type">~</span>] = mscohere(leg_sweep.Va, leg_sweep.da, win, [], [], 1<span class="org-type">/</span>Ts);
[coh_noise_hf, <span class="org-type">~</span>] = mscohere(leg_noise_hf.Va, leg_noise_hf.da, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div id="org0e580e4" class="figure">
<p><img src="figs/frf_dvf_plant_coh.png" alt="frf_dvf_plant_coh.png" />
</p>
<p><span class="figure-number">Figure 28: </span>Obtained coherence for the plant from \(V_a\) to \(d_e\)</p>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[dvf_sweep, <span class="org-type">~</span>] = tfestimate(leg_sweep.Va, leg_sweep.da, win, [], [], 1<span class="org-type">/</span>Ts);
[dvf_noise_hf, <span class="org-type">~</span>] = tfestimate(leg_noise_hf.Va, leg_noise_hf.da, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<p>
The obtained transfer functions are shown in Figure <a href="#org8ded86a">24</a>.
</p>
<p>
They are all superimposed except for the APA7.
</p>
<div class="question" id="org2b7f6e1">
<p>
Why is the APA7 off?
We could think that the APA7 is stiffer, but also the mass line is off.
</p>
<p>
It seems that there is a &ldquo;gain&rdquo; problem.
The encoder seems fine (it measured the same as the Interferometer).
Maybe it could be due to the amplifier?
</p>
</div>
<div class="question" id="orgb844198">
<p>
Why is there a double resonance at around 94Hz?
</p>
</div>
<div id="org1eeef5c" class="figure">
<p><img src="figs/frf_dvf_plant_tf.png" alt="frf_dvf_plant_tf.png" />
</p>
<p><span class="figure-number">Figure 29: </span>Estimated FRF for the DVF plant (transfer function from \(V_a\) to the encoder \(d_e\))</p>
</div>
</div>
</div>
<div id="outline-container-org23ab32f" class="outline-5">
<h5 id="org23ab32f"><span class="section-number-5">8.5.1.3</span> FRF Identification - IFF</h5>
<div class="outline-text-5" id="text-8-5-1-3">
<p>
In this section, the dynamics from \(V_a\) to \(V_s\) is identified.
</p>
<p>
First the coherence is computed and shown in Figure <a href="#orge2dbfd2">25</a>.
The coherence is very nice from 10Hz to 2kHz.
It is only dropping near a zeros at 40Hz, and near the resonance at 95Hz (the excitation amplitude being lowered).
</p>
<div class="org-src-container">
<pre class="src src-matlab">[coh_sweep, <span class="org-type">~</span>] = mscohere(leg_sweep.Va, leg_sweep.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
[coh_noise_hf, <span class="org-type">~</span>] = mscohere(leg_noise_hf.Va, leg_noise_hf.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div id="orgd05e79f" class="figure">
<p><img src="figs/frf_iff_plant_coh.png" alt="frf_iff_plant_coh.png" />
</p>
<p><span class="figure-number">Figure 30: </span>Obtained coherence for the IFF plant</p>
</div>
<p>
Then the FRF are estimated and shown in Figure <a href="#orgab416f1">26</a>
</p>
<div class="org-src-container">
<pre class="src src-matlab">[iff_sweep, <span class="org-type">~</span>] = tfestimate(leg_sweep.Va, leg_sweep.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
[iff_noise_hf, <span class="org-type">~</span>] = tfestimate(leg_noise_hf.Va, leg_noise_hf.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div id="org4218e77" class="figure">
<p><img src="figs/frf_iff_plant_tf.png" alt="frf_iff_plant_tf.png" />
</p>
<p><span class="figure-number">Figure 31: </span>Identified IFF Plant</p>
</div>
</div>
</div>
</div>
<div id="outline-container-org19a0d15" class="outline-4">
<h4 id="org19a0d15"><span class="section-number-4">8.5.2</span> With Encoder</h4>
<div class="outline-text-4" id="text-8-5-2">
</div>
<div id="outline-container-orgb394a68" class="outline-5">
<h5 id="orgb394a68"><span class="section-number-5">8.5.2.1</span> FRF Identification - Setup</h5>
<div class="outline-text-5" id="text-8-5-2-1">
<p>
The identification is performed in three steps:
</p>
<ol class="org-ol">
<li>White noise excitation with small amplitude.
This is used to determine the main resonance of the system.</li>
<li>Sweep sine excitation with the amplitude lowered around the resonance.
The sweep sine is from 10Hz to 400Hz.</li>
<li>High frequency noise.
The noise is band-passed between 300Hz and 2kHz.</li>
</ol>
<p>
Then, the result of the second identification is used between 10Hz and 350Hz and the result of the third identification if used between 350Hz and 2kHz.
</p>
<div class="org-src-container">
<pre class="src src-matlab">leg_enc_sweep = load(sprintf(<span class="org-string">'frf_data_leg_coder_%i_noise.mat'</span>, 1), <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-string">'da'</span>);
leg_enc_noise_hf = load(sprintf(<span class="org-string">'frf_data_leg_coder_%i_noise_hf.mat'</span>, 1), <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-string">'da'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-orgd286205" class="outline-5">
<h5 id="orgd286205"><span class="section-number-5">8.5.2.2</span> FRF Identification - DVF</h5>
<div class="outline-text-5" id="text-8-5-2-2">
<p>
In this section, the dynamics from \(V_a\) to \(d_e\) is identified.
</p>
<p>
We compute the coherence for 2nd and 3rd identification:
</p>
<div class="org-src-container">
<pre class="src src-matlab">[coh_enc_sweep, <span class="org-type">~</span>] = mscohere(leg_enc_sweep.Va, leg_enc_sweep.de, win, [], [], 1<span class="org-type">/</span>Ts);
[coh_enc_noise_hf, <span class="org-type">~</span>] = mscohere(leg_enc_noise_hf.Va, leg_enc_noise_hf.de, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div id="org16313a7" class="figure">
<p><img src="figs/frf_dvf_plant_coh.png" alt="frf_dvf_plant_coh.png" />
</p>
<p><span class="figure-number">Figure 32: </span>Obtained coherence for the plant from \(V_a\) to \(d_e\)</p>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[dvf_enc_sweep, <span class="org-type">~</span>] = tfestimate(leg_enc_sweep.Va, leg_enc_sweep.de, win, [], [], 1<span class="org-type">/</span>Ts);
[dvf_enc_noise_hf, <span class="org-type">~</span>] = tfestimate(leg_enc_noise_hf.Va, leg_enc_noise_hf.de, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<p>
The obtained transfer functions are shown in Figure <a href="#org8ded86a">24</a>.
</p>
<p>
They are all superimposed except for the APA7.
</p>
<div class="question" id="org4649506">
<p>
Why is the APA7 off?
We could think that the APA7 is stiffer, but also the mass line is off.
</p>
<p>
It seems that there is a &ldquo;gain&rdquo; problem.
The encoder seems fine (it measured the same as the Interferometer).
Maybe it could be due to the amplifier?
</p>
</div>
<div class="question" id="orge17790b">
<p>
Why is there a double resonance at around 94Hz?
</p>
</div>
<div id="org7e22305" class="figure">
<p><img src="figs/frf_dvf_plant_tf.png" alt="frf_dvf_plant_tf.png" />
</p>
<p><span class="figure-number">Figure 33: </span>Estimated FRF for the DVF plant (transfer function from \(V_a\) to the encoder \(d_e\))</p>
</div>
</div>
</div>
<div id="outline-container-org63489d5" class="outline-5">
<h5 id="org63489d5"><span class="section-number-5">8.5.2.3</span> Comparison with Interferometer</h5>
<div class="outline-text-5" id="text-8-5-2-3">
<div class="org-src-container">
<pre class="src src-matlab">[dvf_int_sweep, <span class="org-type">~</span>] = tfestimate(leg_enc_sweep.Va, leg_enc_sweep.da, win, [], [], 1<span class="org-type">/</span>Ts);
[dvf_int_noise_hf, <span class="org-type">~</span>] = tfestimate(leg_enc_noise_hf.Va, leg_enc_noise_hf.da, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div class="important" id="orgb3a87d8">
<p>
Clearly using the encoder like this will not be useful.
</p>
<p>
Probably, the encoders will have to be fixed on the plates so that the resonances of the APA are not a problem anymore.
</p>
</div>
</div>
</div>
<div id="outline-container-org54cb510" class="outline-5">
<h5 id="org54cb510"><span class="section-number-5">8.5.2.4</span> APA Resonances Frequency</h5>
<div class="outline-text-5" id="text-8-5-2-4">
<p>
This is very close to what was estimated using the FEM.
</p>
<div id="orgacfb7cb" class="figure">
<p><img src="figs/mode_bending_x.gif" alt="mode_bending_x.gif" />
</p>
<p><span class="figure-number">Figure 34: </span>X-bending mode (189Hz)</p>
</div>
<div id="org8f34f1f" class="figure">
<p><img src="figs/mode_bending_y.gif" alt="mode_bending_y.gif" />
</p>
<p><span class="figure-number">Figure 35: </span>Y-bending mode (285Hz)</p>
</div>
<div id="org3a4e1e4" class="figure">
<p><img src="figs/mode_torsion_z.gif" alt="mode_torsion_z.gif" />
</p>
<p><span class="figure-number">Figure 36: </span>Z-torsion mode (400Hz)</p>
</div>
<div class="important" id="org1cc3dfa">
<p>
The resonances are indeed due to limited stiffness of the APA.
</p>
</div>
</div>
</div>
<div id="outline-container-orgaef63eb" class="outline-5">
<h5 id="orgaef63eb"><span class="section-number-5">8.5.2.5</span> FRF Identification - IFF</h5>
<div class="outline-text-5" id="text-8-5-2-5">
<p>
In this section, the dynamics from \(V_a\) to \(V_s\) is identified.
</p>
<p>
First the coherence is computed and shown in Figure <a href="#orge2dbfd2">25</a>.
The coherence is very nice from 10Hz to 2kHz.
It is only dropping near a zeros at 40Hz, and near the resonance at 95Hz (the excitation amplitude being lowered).
</p>
<div class="org-src-container">
<pre class="src src-matlab">[coh_enc_sweep, <span class="org-type">~</span>] = mscohere(leg_enc_sweep.Va, leg_enc_sweep.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
[coh_enc_noise_hf, <span class="org-type">~</span>] = mscohere(leg_enc_noise_hf.Va, leg_enc_noise_hf.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div id="orgc82ff21" class="figure">
<p><img src="figs/frf_iff_plant_coh.png" alt="frf_iff_plant_coh.png" />
</p>
<p><span class="figure-number">Figure 37: </span>Obtained coherence for the IFF plant</p>
</div>
<p>
Then the FRF are estimated and shown in Figure <a href="#orgab416f1">26</a>
</p>
<div class="org-src-container">
<pre class="src src-matlab">[iff_enc_sweep, <span class="org-type">~</span>] = tfestimate(leg_enc_sweep.Va, leg_enc_sweep.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
[iff_enc_noise_hf, <span class="org-type">~</span>] = tfestimate(leg_enc_noise_hf.Va, leg_enc_noise_hf.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div id="org4176000" class="figure">
<p><img src="figs/frf_iff_plant_tf.png" alt="frf_iff_plant_tf.png" />
</p>
<p><span class="figure-number">Figure 38: </span>Identified IFF Plant</p>
</div>
</div>
</div>
<div id="outline-container-org965d282" class="outline-5">
<h5 id="org965d282"><span class="section-number-5">8.5.2.6</span> Comparison to when the encoder is not fixed</h5>
<div class="outline-text-5" id="text-8-5-2-6">
<div class="org-src-container">
<pre class="src src-matlab">[iff_sweep, <span class="org-type">~</span>] = tfestimate(leg_sweep.Va, leg_sweep.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
[iff_noise_hf, <span class="org-type">~</span>] = tfestimate(leg_noise_hf.Va, leg_noise_hf.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div class="important" id="orgf17f5a4">
<p>
We can see that the IFF does not change whether of not the encoder are fixed to the struts.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="outline-container-org247faf2" class="outline-2">
<h2 id="org247faf2"><span class="section-number-2">9</span> Measurement Results</h2>
</div>
<div id="outline-container-org4c18086" class="outline-2">
<h2 id="org4c18086"><span class="section-number-2">10</span> Test Bench APA300ML - Simscape Model</h2>
<div class="outline-text-2" id="text-10">
</div>
<div id="outline-container-org246e6c3" class="outline-3">
<h3 id="org246e6c3"><span class="section-number-3">10.1</span> Introduction</h3>
</div>
<div id="outline-container-orgb566a55" class="outline-3">
<h3 id="orgb566a55"><span class="section-number-3">10.2</span> Nano Hexapod object</h3>
<div class="outline-text-3" id="text-10-2">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = struct();
</pre>
</div>
</div>
<div id="outline-container-org62f5cea" class="outline-4">
<h4 id="org62f5cea"><span class="section-number-4">10.2.1</span> APA - 2 DoF</h4>
<div class="outline-text-4" id="text-10-2-1">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod.actuator = struct();
n_hexapod.actuator.type = 1;
n_hexapod.actuator.k = ones(6,1)<span class="org-type">*</span>0.35e6; <span class="org-comment">% [N/m]</span>
n_hexapod.actuator.ke = ones(6,1)<span class="org-type">*</span>1.5e6; <span class="org-comment">% [N/m]</span>
n_hexapod.actuator.ka = ones(6,1)<span class="org-type">*</span>43e6; <span class="org-comment">% [N/m]</span>
n_hexapod.actuator.c = ones(6,1)<span class="org-type">*</span>3e1; <span class="org-comment">% [N/(m/s)]</span>
n_hexapod.actuator.ce = ones(6,1)<span class="org-type">*</span>1e1; <span class="org-comment">% [N/(m/s)]</span>
n_hexapod.actuator.ca = ones(6,1)<span class="org-type">*</span>1e1; <span class="org-comment">% [N/(m/s)]</span>
n_hexapod.actuator.Leq = ones(6,1)<span class="org-type">*</span>0.056; <span class="org-comment">% [m]</span>
n_hexapod.actuator.Ga = ones(6,1)<span class="org-type">*</span>1; <span class="org-comment">% Actuator gain [N/V]</span>
n_hexapod.actuator.Gs = ones(6,1)<span class="org-type">*</span>1; <span class="org-comment">% Sensor gain [V/m]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org9b1f8b4" class="outline-4">
<h4 id="org9b1f8b4"><span class="section-number-4">10.2.2</span> APA - Flexible Frame</h4>
<div class="outline-text-4" id="text-10-2-2">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod.actuator.type = 2;
n_hexapod.actuator.K = readmatrix(<span class="org-string">'APA300ML_b_mat_K.CSV'</span>); <span class="org-comment">% Stiffness Matrix</span>
n_hexapod.actuator.M = readmatrix(<span class="org-string">'APA300ML_b_mat_M.CSV'</span>); <span class="org-comment">% Mass Matrix</span>
n_hexapod.actuator.xi = 0.01; <span class="org-comment">% Damping ratio</span>
n_hexapod.actuator.P = extractNodes(<span class="org-string">'APA300ML_b_out_nodes_3D.txt'</span>); <span class="org-comment">% Node coordinates [m]</span>
n_hexapod.actuator.ks = 235e6; <span class="org-comment">% Stiffness of one stack [N/m]</span>
n_hexapod.actuator.cs = 1e1; <span class="org-comment">% Stiffness of one stack [N/m]</span>
n_hexapod.actuator.Ga = ones(6,1)<span class="org-type">*</span>1; <span class="org-comment">% Actuator gain [N/V]</span>
n_hexapod.actuator.Gs = ones(6,1)<span class="org-type">*</span>1; <span class="org-comment">% Sensor gain [V/m]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org1956620" class="outline-4">
<h4 id="org1956620"><span class="section-number-4">10.2.3</span> APA - Fully Flexible</h4>
<div class="outline-text-4" id="text-10-2-3">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod.actuator.type = 3;
n_hexapod.actuator.K = readmatrix(<span class="org-string">'APA300ML_full_mat_K.CSV'</span>); <span class="org-comment">% Stiffness Matrix</span>
n_hexapod.actuator.M = readmatrix(<span class="org-string">'APA300ML_full_mat_M.CSV'</span>); <span class="org-comment">% Mass Matrix</span>
n_hexapod.actuator.xi = 0.01; <span class="org-comment">% Damping ratio</span>
n_hexapod.actuator.P = extractNodes(<span class="org-string">'APA300ML_full_out_nodes_3D.txt'</span>); <span class="org-comment">% Node coordiantes [m]</span>
n_hexapod.actuator.Ga = ones(6,1)<span class="org-type">*</span>1; <span class="org-comment">% Actuator gain [N/V]</span>
n_hexapod.actuator.Gs = ones(6,1)<span class="org-type">*</span>1; <span class="org-comment">% Sensor gain [V/m]</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org73596ef" class="outline-3">
<h3 id="org73596ef"><span class="section-number-3">10.3</span> Identification</h3>
<div class="outline-text-3" id="text-10-3">
<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">'test_bench_apa300ml'</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">'/Va'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Voltage</span>
io(io_i) = linio([mdl, <span class="org-string">'/Vs'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Sensor Voltage</span>
io(io_i) = linio([mdl, <span class="org-string">'/dL'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Motion Outputs</span>
io(io_i) = linio([mdl, <span class="org-string">'/z'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Vertical Motion</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
Ga = linearize(mdl, io, 0.0, options);
Ga.InputName = {<span class="org-string">'Va'</span>};
Ga.OutputName = {<span class="org-string">'Vs'</span>, <span class="org-string">'dL'</span>, <span class="org-string">'z'</span>};
</pre>
</div>
</div>
</div>
<div id="outline-container-orgac32f3d" class="outline-3">
<h3 id="orgac32f3d"><span class="section-number-3">10.4</span> Compare 2-DoF with flexible</h3>
<div class="outline-text-3" id="text-10-4">
</div>
<div id="outline-container-org9fb131c" class="outline-4">
<h4 id="org9fb131c"><span class="section-number-4">10.4.1</span> APA - 2 DoF</h4>
<div class="outline-text-4" id="text-10-4-1">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = struct();
n_hexapod.actuator = struct();
n_hexapod.actuator.type = 1;
n_hexapod.actuator.k = ones(6,1)<span class="org-type">*</span>0.35e6; <span class="org-comment">% [N/m]</span>
n_hexapod.actuator.ke = ones(6,1)<span class="org-type">*</span>1.5e6; <span class="org-comment">% [N/m]</span>
n_hexapod.actuator.ka = ones(6,1)<span class="org-type">*</span>43e6; <span class="org-comment">% [N/m]</span>
n_hexapod.actuator.c = ones(6,1)<span class="org-type">*</span>3e1; <span class="org-comment">% [N/(m/s)]</span>
n_hexapod.actuator.ce = ones(6,1)<span class="org-type">*</span>1e1; <span class="org-comment">% [N/(m/s)]</span>
n_hexapod.actuator.ca = ones(6,1)<span class="org-type">*</span>1e1; <span class="org-comment">% [N/(m/s)]</span>
n_hexapod.actuator.Leq = ones(6,1)<span class="org-type">*</span>0.056; <span class="org-comment">% [m]</span>
n_hexapod.actuator.Ga = ones(6,1)<span class="org-type">*-</span>2.15; <span class="org-comment">% Actuator gain [N/V]</span>
n_hexapod.actuator.Gs = ones(6,1)<span class="org-type">*</span>2.305e<span class="org-type">-</span>08; <span class="org-comment">% Sensor gain [V/m]</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">G_2dof = linearize(mdl, io, 0.0, options);
G_2dof.InputName = {<span class="org-string">'Va'</span>};
G_2dof.OutputName = {<span class="org-string">'Vs'</span>, <span class="org-string">'dL'</span>, <span class="org-string">'z'</span>};
</pre>
</div>
</div>
</div>
<div id="outline-container-orga685f57" class="outline-4">
<h4 id="orga685f57"><span class="section-number-4">10.4.2</span> APA - Fully Flexible</h4>
<div class="outline-text-4" id="text-10-4-2">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = struct();
n_hexapod.actuator.type = 3;
n_hexapod.actuator.K = readmatrix(<span class="org-string">'APA300ML_full_mat_K.CSV'</span>); <span class="org-comment">% Stiffness Matrix</span>
n_hexapod.actuator.M = readmatrix(<span class="org-string">'APA300ML_full_mat_M.CSV'</span>); <span class="org-comment">% Mass Matrix</span>
n_hexapod.actuator.xi = 0.01; <span class="org-comment">% Damping ratio</span>
n_hexapod.actuator.P = extractNodes(<span class="org-string">'APA300ML_full_out_nodes_3D.txt'</span>); <span class="org-comment">% Node coordiantes [m]</span>
n_hexapod.actuator.Ga = ones(6,1)<span class="org-type">*</span>1; <span class="org-comment">% Actuator gain [N/V]</span>
n_hexapod.actuator.Gs = ones(6,1)<span class="org-type">*</span>1; <span class="org-comment">% Sensor gain [V/m]</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">G_flex = linearize(mdl, io, 0.0, options);
G_flex.InputName = {<span class="org-string">'Va'</span>};
G_flex.OutputName = {<span class="org-string">'Vs'</span>, <span class="org-string">'dL'</span>, <span class="org-string">'z'</span>};
</pre>
</div>
</div>
</div>
<div id="outline-container-org892ea1d" class="outline-4">
<h4 id="org892ea1d"><span class="section-number-4">10.4.3</span> Comparison</h4>
</div>
</div>
</div>
<div id="outline-container-org094714d" class="outline-2">
<h2 id="org094714d"><span class="section-number-2">11</span> Test Bench Struts - Simscape Model</h2>
<div class="outline-text-2" id="text-11">
</div>
<div id="outline-container-orgb3568b9" class="outline-3">
<h3 id="orgb3568b9"><span class="section-number-3">11.1</span> Introduction</h3>
</div>
<div id="outline-container-org903fd9d" class="outline-3">
<h3 id="org903fd9d"><span class="section-number-3">11.2</span> Nano Hexapod object</h3>
<div class="outline-text-3" id="text-11-2">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod = struct();
</pre>
</div>
</div>
<div id="outline-container-orgeb7676e" class="outline-4">
<h4 id="orgeb7676e"><span class="section-number-4">11.2.1</span> Flexible Joint - Bot</h4>
<div class="outline-text-4" id="text-11-2-1">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod.flex_bot = struct();
n_hexapod.flex_bot.type = 1; <span class="org-comment">% 1: 2dof / 2: 3dof / 3: 4dof</span>
n_hexapod.flex_bot.kRx = ones(6,1)<span class="org-type">*</span>5; <span class="org-comment">% X bending stiffness [Nm/rad]</span>
n_hexapod.flex_bot.kRy = ones(6,1)<span class="org-type">*</span>5; <span class="org-comment">% Y bending stiffness [Nm/rad]</span>
n_hexapod.flex_bot.kRz = ones(6,1)<span class="org-type">*</span>260; <span class="org-comment">% Torsionnal stiffness [Nm/rad]</span>
n_hexapod.flex_bot.kz = ones(6,1)<span class="org-type">*</span>1e8; <span class="org-comment">% Axial stiffness [N/m]</span>
n_hexapod.flex_bot.cRx = ones(6,1)<span class="org-type">*</span>0.1; <span class="org-comment">% [Nm/(rad/s)]</span>
n_hexapod.flex_bot.cRy = ones(6,1)<span class="org-type">*</span>0.1; <span class="org-comment">% [Nm/(rad/s)]</span>
n_hexapod.flex_bot.cRz = ones(6,1)<span class="org-type">*</span>0.1; <span class="org-comment">% [Nm/(rad/s)]</span>
n_hexapod.flex_bot.cz = ones(6,1)<span class="org-type">*</span>1e2; <span class="org-comment">%[N/(m/s)]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org2d3b9a7" class="outline-4">
<h4 id="org2d3b9a7"><span class="section-number-4">11.2.2</span> Flexible Joint - Top</h4>
<div class="outline-text-4" id="text-11-2-2">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod.flex_top = struct();
n_hexapod.flex_top.type = 2; <span class="org-comment">% 1: 2dof / 2: 3dof / 3: 4dof</span>
n_hexapod.flex_top.kRx = ones(6,1)<span class="org-type">*</span>5; <span class="org-comment">% X bending stiffness [Nm/rad]</span>
n_hexapod.flex_top.kRy = ones(6,1)<span class="org-type">*</span>5; <span class="org-comment">% Y bending stiffness [Nm/rad]</span>
n_hexapod.flex_top.kRz = ones(6,1)<span class="org-type">*</span>260; <span class="org-comment">% Torsionnal stiffness [Nm/rad]</span>
n_hexapod.flex_top.kz = ones(6,1)<span class="org-type">*</span>1e8; <span class="org-comment">% Axial stiffness [N/m]</span>
n_hexapod.flex_top.cRx = ones(6,1)<span class="org-type">*</span>0.1; <span class="org-comment">% [Nm/(rad/s)]</span>
n_hexapod.flex_top.cRy = ones(6,1)<span class="org-type">*</span>0.1; <span class="org-comment">% [Nm/(rad/s)]</span>
n_hexapod.flex_top.cRz = ones(6,1)<span class="org-type">*</span>0.1; <span class="org-comment">% [Nm/(rad/s)]</span>
n_hexapod.flex_top.cz = ones(6,1)<span class="org-type">*</span>1e2; <span class="org-comment">%[N/(m/s)]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org5599b52" class="outline-4">
<h4 id="org5599b52"><span class="section-number-4">11.2.3</span> APA - 2 DoF</h4>
<div class="outline-text-4" id="text-11-2-3">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod.actuator = struct();
n_hexapod.actuator.type = 1;
n_hexapod.actuator.k = ones(6,1)<span class="org-type">*</span>0.35e6; <span class="org-comment">% [N/m]</span>
n_hexapod.actuator.ke = ones(6,1)<span class="org-type">*</span>1.5e6; <span class="org-comment">% [N/m]</span>
n_hexapod.actuator.ka = ones(6,1)<span class="org-type">*</span>43e6; <span class="org-comment">% [N/m]</span>
n_hexapod.actuator.c = ones(6,1)<span class="org-type">*</span>3e1; <span class="org-comment">% [N/(m/s)]</span>
n_hexapod.actuator.ce = ones(6,1)<span class="org-type">*</span>1e1; <span class="org-comment">% [N/(m/s)]</span>
n_hexapod.actuator.ca = ones(6,1)<span class="org-type">*</span>1e1; <span class="org-comment">% [N/(m/s)]</span>
n_hexapod.actuator.Leq = ones(6,1)<span class="org-type">*</span>0.056; <span class="org-comment">% [m]</span>
n_hexapod.actuator.Ga = ones(6,1)<span class="org-type">*</span>1; <span class="org-comment">% Actuator gain [N/V]</span>
n_hexapod.actuator.Gs = ones(6,1)<span class="org-type">*</span>1; <span class="org-comment">% Sensor gain [V/m]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org685e2e7" class="outline-4">
<h4 id="org685e2e7"><span class="section-number-4">11.2.4</span> APA - Flexible Frame</h4>
<div class="outline-text-4" id="text-11-2-4">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod.actuator.type = 2;
n_hexapod.actuator.K = readmatrix(<span class="org-string">'APA300ML_b_mat_K.CSV'</span>); <span class="org-comment">% Stiffness Matrix</span>
n_hexapod.actuator.M = readmatrix(<span class="org-string">'APA300ML_b_mat_M.CSV'</span>); <span class="org-comment">% Mass Matrix</span>
n_hexapod.actuator.xi = 0.01; <span class="org-comment">% Damping ratio</span>
n_hexapod.actuator.P = extractNodes(<span class="org-string">'APA300ML_b_out_nodes_3D.txt'</span>); <span class="org-comment">% Node coordinates [m]</span>
n_hexapod.actuator.ks = 235e6; <span class="org-comment">% Stiffness of one stack [N/m]</span>
n_hexapod.actuator.cs = 1e1; <span class="org-comment">% Stiffness of one stack [N/m]</span>
n_hexapod.actuator.Ga = ones(6,1)<span class="org-type">*</span>1; <span class="org-comment">% Actuator gain [N/V]</span>
n_hexapod.actuator.Gs = ones(6,1)<span class="org-type">*</span>1; <span class="org-comment">% Sensor gain [V/m]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org3d065de" class="outline-4">
<h4 id="org3d065de"><span class="section-number-4">11.2.5</span> APA - Fully Flexible</h4>
<div class="outline-text-4" id="text-11-2-5">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod.actuator.type = 3;
n_hexapod.actuator.K = readmatrix(<span class="org-string">'APA300ML_full_mat_K.CSV'</span>); <span class="org-comment">% Stiffness Matrix</span>
n_hexapod.actuator.M = readmatrix(<span class="org-string">'APA300ML_full_mat_M.CSV'</span>); <span class="org-comment">% Mass Matrix</span>
n_hexapod.actuator.xi = 0.01; <span class="org-comment">% Damping ratio</span>
n_hexapod.actuator.P = extractNodes(<span class="org-string">'APA300ML_full_out_nodes_3D.txt'</span>); <span class="org-comment">% Node coordiantes [m]</span>
n_hexapod.actuator.Ga = ones(6,1)<span class="org-type">*</span>1; <span class="org-comment">% Actuator gain [N/V]</span>
n_hexapod.actuator.Gs = ones(6,1)<span class="org-type">*</span>1; <span class="org-comment">% Sensor gain [V/m]</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgfbc019e" class="outline-3">
<h3 id="orgfbc019e"><span class="section-number-3">11.3</span> Identification</h3>
<div class="outline-text-3" id="text-11-3">
<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">'test_bench_struts'</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">'/Va'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Voltage</span>
io(io_i) = linio([mdl, <span class="org-string">'/Vs'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Sensor Voltage</span>
io(io_i) = linio([mdl, <span class="org-string">'/dL'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Motion Outputs</span>
io(io_i) = linio([mdl, <span class="org-string">'/z'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Vertical Motion</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
Gs = linearize(mdl, io, 0.0, options);
Gs.InputName = {<span class="org-string">'Va'</span>};
Gs.OutputName = {<span class="org-string">'Vs'</span>, <span class="org-string">'dL'</span>, <span class="org-string">'z'</span>};
</pre>
</div>
</div>
</div>
<div id="outline-container-org169fc79" class="outline-3">
<h3 id="org169fc79"><span class="section-number-3">11.4</span> Compare flexible joints</h3>
<div class="outline-text-3" id="text-11-4">
</div>
<div id="outline-container-org39795a1" class="outline-4">
<h4 id="org39795a1"><span class="section-number-4">11.4.1</span> Perfect</h4>
<div class="outline-text-4" id="text-11-4-1">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod.flex_bot.type = 1; <span class="org-comment">% 1: 2dof / 2: 3dof / 3: 4dof</span>
n_hexapod.flex_top.type = 2; <span class="org-comment">% 1: 2dof / 2: 3dof / 3: 4dof</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">Gp = linearize(mdl, io, 0.0, options);
Gp.InputName = {<span class="org-string">'Va'</span>};
Gp.OutputName = {<span class="org-string">'Vs'</span>, <span class="org-string">'dL'</span>, <span class="org-string">'z'</span>};
</pre>
</div>
</div>
</div>
<div id="outline-container-orgd21ebf7" class="outline-4">
<h4 id="orgd21ebf7"><span class="section-number-4">11.4.2</span> Top Flexible</h4>
<div class="outline-text-4" id="text-11-4-2">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod.flex_bot.type = 1; <span class="org-comment">% 1: 2dof / 2: 3dof / 3: 4dof</span>
n_hexapod.flex_top.type = 3; <span class="org-comment">% 1: 2dof / 2: 3dof / 3: 4dof</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">Gt = linearize(mdl, io, 0.0, options);
Gt.InputName = {<span class="org-string">'Va'</span>};
Gt.OutputName = {<span class="org-string">'Vs'</span>, <span class="org-string">'dL'</span>, <span class="org-string">'z'</span>};
</pre>
</div>
</div>
</div>
<div id="outline-container-orgc5dcbe5" class="outline-4">
<h4 id="orgc5dcbe5"><span class="section-number-4">11.4.3</span> Bottom Flexible</h4>
<div class="outline-text-4" id="text-11-4-3">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod.flex_bot.type = 3; <span class="org-comment">% 1: 2dof / 2: 3dof / 3: 4dof</span>
n_hexapod.flex_top.type = 2; <span class="org-comment">% 1: 2dof / 2: 3dof / 3: 4dof</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">Gb = linearize(mdl, io, 0.0, options);
Gb.InputName = {<span class="org-string">'Va'</span>};
Gb.OutputName = {<span class="org-string">'Vs'</span>, <span class="org-string">'dL'</span>, <span class="org-string">'z'</span>};
</pre>
</div>
</div>
</div>
<div id="outline-container-org5e5908b" class="outline-4">
<h4 id="org5e5908b"><span class="section-number-4">11.4.4</span> Both Flexible</h4>
<div class="outline-text-4" id="text-11-4-4">
<div class="org-src-container">
<pre class="src src-matlab">n_hexapod.flex_bot.type = 3; <span class="org-comment">% 1: 2dof / 2: 3dof / 3: 4dof</span>
n_hexapod.flex_top.type = 3; <span class="org-comment">% 1: 2dof / 2: 3dof / 3: 4dof</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">Gf = linearize(mdl, io, 0.0, options);
Gf.InputName = {<span class="org-string">'Va'</span>};
Gf.OutputName = {<span class="org-string">'Vs'</span>, <span class="org-string">'dL'</span>, <span class="org-string">'z'</span>};
</pre>
</div>
</div>
</div>
<div id="outline-container-orgd47e8ac" class="outline-4">
<h4 id="orgd47e8ac"><span class="section-number-4">11.4.5</span> Comparison</h4>
</div>
</div>
</div>
<div id="outline-container-orgac74dce" class="outline-2">
<h2 id="orgac74dce"><span class="section-number-2">12</span> Resonance frequencies - APA300ML</h2>
<div class="outline-text-2" id="text-12">
</div>
<div id="outline-container-orga16644c" class="outline-3">
<h3 id="orga16644c"><span class="section-number-3">12.1</span> Introduction</h3>
<div class="outline-text-3" id="text-12-1">
<p>
Three main resonances are foreseen to be problematic for the control of the APA300ML:
</p>
<ul class="org-ul">
<li>Mode in X-bending at 189Hz (Figure <a href="#orgacfb7cb">34</a>)</li>
<li>Mode in Y-bending at 285Hz (Figure <a href="#org8f34f1f">35</a>)</li>
<li>Mode in Z-torsion at 400Hz (Figure <a href="#org3a4e1e4">36</a>)</li>
</ul>
<div id="org0a50cf3" class="figure">
<p><img src="figs/mode_bending_x.gif" alt="mode_bending_x.gif" />
</p>
<p><span class="figure-number">Figure 39: </span>X-bending mode (189Hz)</p>
</div>
<div id="org95642f3" class="figure">
<p><img src="figs/mode_bending_y.gif" alt="mode_bending_y.gif" />
</p>
<p><span class="figure-number">Figure 40: </span>Y-bending mode (285Hz)</p>
</div>
<div id="org2b879ae" class="figure">
<p><img src="figs/mode_torsion_z.gif" alt="mode_torsion_z.gif" />
</p>
<p><span class="figure-number">Figure 41: </span>Z-torsion mode (400Hz)</p>
</div>
<p>
These modes are present when flexible joints are fixed to the ends of the APA300ML.
</p>
<p>
In this section, we try to find the resonance frequency of these modes when one end of the APA is fixed and the other is free.
</p>
</div>
</div>
<div id="outline-container-org779bccf" class="outline-3">
<h3 id="org779bccf"><span class="section-number-3">12.2</span> Setup</h3>
<div class="outline-text-3" id="text-12-2">
<p>
The measurement setup is shown in Figure <a href="#org864a26a">42</a>.
A Laser vibrometer is measuring the difference of motion of two points.
The APA is excited with an instrumented hammer and the transfer function from the hammer to the measured rotation is computed.
</p>
<div class="note" id="orgfea8301">
<ul class="org-ul">
<li>Laser Doppler Vibrometer Polytec OFV512</li>
<li>Instrumented hammer</li>
</ul>
</div>
<div id="org864a26a" class="figure">
<p><img src="figs/measurement_setup_torsion.jpg" alt="measurement_setup_torsion.jpg" />
</p>
<p><span class="figure-number">Figure 42: </span>Measurement setup with a Laser Doppler Vibrometer and one instrumental hammer</p>
</div>
</div>
</div>
<div id="outline-container-orgbaaf284" class="outline-3">
<h3 id="orgbaaf284"><span class="section-number-3">12.3</span> Bending - X</h3>
<div class="outline-text-3" id="text-12-3">
<p>
The setup to measure the X-bending motion is shown in Figure <a href="#org2ae8360">43</a>.
The APA is excited with an instrumented hammer having a solid metallic tip.
The impact point is on the back-side of the APA aligned with the top measurement point.
</p>
<div id="org2ae8360" class="figure">
<p><img src="figs/measurement_setup_X_bending.jpg" alt="measurement_setup_X_bending.jpg" />
</p>
<p><span class="figure-number">Figure 43: </span>X-Bending measurement setup</p>
</div>
<p>
The data is loaded.
</p>
<div class="org-src-container">
<pre class="src src-matlab">bending_X = load(<span class="org-string">'apa300ml_bending_X_top.mat'</span>);
</pre>
</div>
<p>
The config for <code>tfestimate</code> is performed:
</p>
<div class="org-src-container">
<pre class="src src-matlab">Ts = bending_X.Track1_X_Resolution; <span class="org-comment">% Sampling frequency [Hz]</span>
win = hann(ceil(1<span class="org-type">/</span>Ts));
</pre>
</div>
<p>
The transfer function from the input force to the output &ldquo;rotation&rdquo; (difference between the two measured distances).
</p>
<div class="org-src-container">
<pre class="src src-matlab">[G_bending_X, f] = tfestimate(bending_X.Track1, bending_X.Track2, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<p>
The result is shown in Figure <a href="#orgbf712db">44</a>.
</p>
<p>
The can clearly observe a nice peak at 280Hz, and then peaks at the odd &ldquo;harmonics&rdquo; (third &ldquo;harmonic&rdquo; at 840Hz, and fifth &ldquo;harmonic&rdquo; at 1400Hz).
</p>
<div id="orgbf712db" class="figure">
<p><img src="figs/apa300ml_meas_freq_bending_x.png" alt="apa300ml_meas_freq_bending_x.png" />
</p>
<p><span class="figure-number">Figure 44: </span>Obtained FRF for the X-bending</p>
</div>
</div>
</div>
<div id="outline-container-orgafef1f9" class="outline-3">
<h3 id="orgafef1f9"><span class="section-number-3">12.4</span> Bending - Y</h3>
<div class="outline-text-3" id="text-12-4">
<p>
The setup to measure the Y-bending is shown in Figure <a href="#orgdb25803">45</a>.
</p>
<p>
The impact point of the instrumented hammer is located on the back surface of the top interface (on the back of the 2 measurements points).
</p>
<div id="orgdb25803" class="figure">
<p><img src="figs/measurement_setup_Y_bending.jpg" alt="measurement_setup_Y_bending.jpg" />
</p>
<p><span class="figure-number">Figure 45: </span>Y-Bending measurement setup</p>
</div>
<p>
The data is loaded, and the transfer function from the force to the measured rotation is computed.
</p>
<div class="org-src-container">
<pre class="src src-matlab">bending_Y = load(<span class="org-string">'apa300ml_bending_Y_top.mat'</span>);
[G_bending_Y, <span class="org-type">~</span>] = tfestimate(bending_Y.Track1, bending_Y.Track2, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<p>
The results are shown in Figure <a href="#org360d624">46</a>.
The main resonance is at 412Hz, and we also see the third &ldquo;harmonic&rdquo; at 1220Hz.
</p>
<div id="org360d624" class="figure">
<p><img src="figs/apa300ml_meas_freq_bending_y.png" alt="apa300ml_meas_freq_bending_y.png" />
</p>
<p><span class="figure-number">Figure 46: </span>Obtained FRF for the Y-bending</p>
</div>
</div>
</div>
<div id="outline-container-org9c4ee27" class="outline-3">
<h3 id="org9c4ee27"><span class="section-number-3">12.5</span> Torsion - Z</h3>
<div class="outline-text-3" id="text-12-5">
<p>
Finally, we measure the Z-torsion resonance as shown in Figure <a href="#orgc036105">47</a>.
</p>
<p>
The excitation is shown on the other side of the APA, on the side to excite the torsion motion.
</p>
<div id="orgc036105" class="figure">
<p><img src="figs/measurement_setup_torsion_bis.jpg" alt="measurement_setup_torsion_bis.jpg" />
</p>
<p><span class="figure-number">Figure 47: </span>Z-Torsion measurement setup</p>
</div>
<p>
The data is loaded, and the transfer function computed.
</p>
<div class="org-src-container">
<pre class="src src-matlab">torsion = load(<span class="org-string">'apa300ml_torsion_left.mat'</span>);
[G_torsion, <span class="org-type">~</span>] = tfestimate(torsion.Track1, torsion.Track2, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<p>
The results are shown in Figure <a href="#org61d7c3a">48</a>.
We observe a first peak at 267Hz, which corresponds to the X-bending mode that was measured at 280Hz.
And then a second peak at 415Hz, which corresponds to the X-bending mode that was measured at 412Hz.
The mode in pure torsion is probably at higher frequency (peak around 1kHz?).
</p>
<div id="org61d7c3a" class="figure">
<p><img src="figs/apa300ml_meas_freq_torsion_z.png" alt="apa300ml_meas_freq_torsion_z.png" />
</p>
<p><span class="figure-number">Figure 48: </span>Obtained FRF for the Z-torsion</p>
</div>
<p>
In order to verify that, the APA is excited on the top part such that the torsion mode should not be excited.
</p>
<div class="org-src-container">
<pre class="src src-matlab">torsion = load(<span class="org-string">'apa300ml_torsion_top.mat'</span>);
[G_torsion_top, <span class="org-type">~</span>] = tfestimate(torsion.Track1, torsion.Track2, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<p>
The two FRF are compared in Figure <a href="#orgf38d861">49</a>.
It is clear that the first two modes does not correspond to the torsional mode.
Maybe the resonance at 800Hz, or even higher resonances. It is difficult to conclude here.
</p>
<div id="orgf38d861" class="figure">
<p><img src="figs/apa300ml_meas_freq_torsion_z_comp.png" alt="apa300ml_meas_freq_torsion_z_comp.png" />
</p>
<p><span class="figure-number">Figure 49: </span>Obtained FRF for the Z-torsion</p>
</div>
</div>
</div>
<div id="outline-container-orgf47dd25" class="outline-3">
<h3 id="orgf47dd25"><span class="section-number-3">12.6</span> Compare</h3>
<div class="outline-text-3" id="text-12-6">
<p>
The three measurements are shown in Figure <a href="#org9e07ab3">50</a>.
</p>
<div id="org9e07ab3" class="figure">
<p><img src="figs/apa300ml_meas_freq_compare.png" alt="apa300ml_meas_freq_compare.png" />
</p>
<p><span class="figure-number">Figure 50: </span>Obtained FRF - Comparison</p>
</div>
</div>
</div>
<div id="outline-container-org21610d4" class="outline-3">
<h3 id="org21610d4"><span class="section-number-3">12.7</span> Conclusion</h3>
<div class="outline-text-3" id="text-12-7">
<p>
When two flexible joints are fixed at each ends of the APA, the APA is mostly in a free/free condition in terms of bending/torsion (the bending/torsional stiffness of the joints being very small).
</p>
<p>
In the current tests, the APA are in a fixed/free condition.
Therefore, it is quite obvious that we measured higher resonance frequencies than what is foreseen for the struts.
It is however quite interesting that there is a factor \(\approx \sqrt{2}\) between the two (increased of the stiffness by a factor 2?).
</p>
<table id="org8b41659" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 6:</span> Measured frequency of the modes</caption>
<colgroup>
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">Mode</th>
<th scope="col" class="org-left">Strut Mode</th>
<th scope="col" class="org-left">Measured Frequency</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">X-Bending</td>
<td class="org-left">189Hz</td>
<td class="org-left">280Hz</td>
</tr>
<tr>
<td class="org-left">Y-Bending</td>
<td class="org-left">285Hz</td>
<td class="org-left">410Hz</td>
</tr>
<tr>
<td class="org-left">Z-Torsion</td>
<td class="org-left">400Hz</td>
<td class="org-left">?</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="outline-container-orgc347924" class="outline-2">
<h2 id="orgc347924"><span class="section-number-2">13</span> Function</h2>
<div class="outline-text-2" id="text-13">
</div>
<div id="outline-container-org808ebd8" class="outline-3">
<h3 id="org808ebd8"><span class="section-number-3">13.1</span> <code>generateSweepExc</code>: Generate sweep sinus excitation</h3>
<div class="outline-text-3" id="text-13-1">
<p>
<a id="org879bf4f"></a>
</p>
</div>
<div id="outline-container-org34d68d5" class="outline-4">
<h4 id="org34d68d5">Function description</h4>
<div class="outline-text-4" id="text-org34d68d5">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[U_exc]</span> = <span class="org-function-name">generateSweepExc</span>(<span class="org-variable-name">args</span>)
<span class="org-comment">% generateSweepExc - Generate a Sweep Sine excitation signal</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [U_exc] = generateSweepExc(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - args - Optinal arguments:</span>
<span class="org-comment">% - Ts - Sampling Time - [s]</span>
<span class="org-comment">% - f_start - Start frequency of the sweep - [Hz]</span>
<span class="org-comment">% - f_end - End frequency of the sweep - [Hz]</span>
<span class="org-comment">% - V_mean - Mean value of the excitation voltage - [V]</span>
<span class="org-comment">% - V_exc - Excitation Amplitude for the Sweep, could be numeric or TF - [V]</span>
<span class="org-comment">% - t_start - Time at which the sweep begins - [s]</span>
<span class="org-comment">% - exc_duration - Duration of the sweep - [s]</span>
<span class="org-comment">% - sweep_type - 'logarithmic' or 'linear' - [-]</span>
<span class="org-comment">% - smooth_ends - 'true' or 'false': smooth transition between 0 and V_mean - [-]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org5ebeee5" class="outline-4">
<h4 id="org5ebeee5">Optional Parameters</h4>
<div class="outline-text-4" id="text-org5ebeee5">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">args</span>.Ts (1,1) double {mustBeNumeric, mustBePositive} = 1e<span class="org-type">-</span>4
<span class="org-variable-name">args</span>.f_start (1,1) double {mustBeNumeric, mustBePositive} = 1
<span class="org-variable-name">args</span>.f_end (1,1) double {mustBeNumeric, mustBePositive} = 1e3
<span class="org-variable-name">args</span>.V_mean (1,1) double {mustBeNumeric} = 0
<span class="org-variable-name">args</span>.V_exc = 1
<span class="org-variable-name">args</span>.t_start (1,1) double {mustBeNumeric, mustBeNonnegative} = 5
<span class="org-variable-name">args</span>.exc_duration (1,1) double {mustBeNumeric, mustBePositive} = 10
<span class="org-variable-name">args</span>.sweep_type char {mustBeMember(args.sweep_type,{<span class="org-string">'log'</span>, <span class="org-string">'lin'</span>})} = <span class="org-string">'lin'</span>
<span class="org-variable-name">args</span>.smooth_ends logical {mustBeNumericOrLogical} = <span class="org-constant">true</span>
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org20366dd" class="outline-4">
<h4 id="org20366dd">Sweep Sine part</h4>
<div class="outline-text-4" id="text-org20366dd">
<div class="org-src-container">
<pre class="src src-matlab">t_sweep = 0<span class="org-type">:</span>args.Ts<span class="org-type">:</span>args.exc_duration;
<span class="org-keyword">if</span> strcmp(args.sweep_type, <span class="org-string">'log'</span>)
V_exc = sin(2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>args.f_start <span class="org-type">*</span> args.exc_duration<span class="org-type">/</span>log(args.f_end<span class="org-type">/</span>args.f_start) <span class="org-type">*</span> (exp(log(args.f_end<span class="org-type">/</span>args.f_start)<span class="org-type">*</span>t_sweep<span class="org-type">/</span>args.exc_duration) <span class="org-type">-</span> 1));
<span class="org-keyword">elseif</span> strcmp(args.sweep_type, <span class="org-string">'lin'</span>)
V_exc = sin(2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>(args.f_start <span class="org-type">+</span> (args.f_end <span class="org-type">-</span> args.f_start)<span class="org-type">/</span>2<span class="org-type">/</span>args.exc_duration<span class="org-type">*</span>t_sweep)<span class="org-type">.*</span>t_sweep);
<span class="org-keyword">else</span>
error(<span class="org-string">'sweep_type should either be equal to "log" or to "lin"'</span>);
<span class="org-keyword">end</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">if</span> isnumeric(args.V_exc)
V_sweep = args.V_mean <span class="org-type">+</span> args.V_exc<span class="org-type">*</span>V_exc;
<span class="org-keyword">elseif</span> isct(args.V_exc)
<span class="org-keyword">if</span> strcmp(args.sweep_type, <span class="org-string">'log'</span>)
V_sweep = args.V_mean <span class="org-type">+</span> abs(squeeze(freqresp(args.V_exc, args.f_start<span class="org-type">*</span>(args.f_end<span class="org-type">/</span>args.f_start)<span class="org-type">.^</span>(t_sweep<span class="org-type">/</span>args.exc_duration), <span class="org-string">'Hz'</span>)))<span class="org-type">'.*</span>V_exc;
<span class="org-keyword">elseif</span> strcmp(args.sweep_type, <span class="org-string">'lin'</span>)
V_sweep = args.V_mean <span class="org-type">+</span> abs(squeeze(freqresp(args.V_exc, args.f_start<span class="org-type">+</span>(args.f_end<span class="org-type">-</span>args.f_start)<span class="org-type">/</span>args.exc_duration<span class="org-type">*</span>t_sweep, <span class="org-string">'Hz'</span>)))<span class="org-type">'.*</span>V_exc;
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org244c525" class="outline-4">
<h4 id="org244c525">Smooth Ends</h4>
<div class="outline-text-4" id="text-org244c525">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">if</span> args.t_start <span class="org-type">&gt;</span> 0
t_smooth_start = args.Ts<span class="org-type">:</span>args.Ts<span class="org-type">:</span>args.t_start;
V_smooth_start = zeros(size(t_smooth_start));
V_smooth_end = zeros(size(t_smooth_start));
<span class="org-keyword">if</span> args.smooth_ends
Vd_max = args.V_mean<span class="org-type">/</span>(0.7<span class="org-type">*</span>args.t_start);
V_d = zeros(size(t_smooth_start));
V_d(t_smooth_start <span class="org-type">&lt;</span> 0.2<span class="org-type">*</span>args.t_start) = t_smooth_start(t_smooth_start <span class="org-type">&lt;</span> 0.2<span class="org-type">*</span>args.t_start)<span class="org-type">*</span>Vd_max<span class="org-type">/</span>(0.2<span class="org-type">*</span>args.t_start);
V_d(t_smooth_start <span class="org-type">&gt;</span> 0.2<span class="org-type">*</span>args.t_start <span class="org-type">&amp;</span> t_smooth_start <span class="org-type">&lt;</span> 0.7<span class="org-type">*</span>args.t_start) = Vd_max;
V_d(t_smooth_start <span class="org-type">&gt;</span> 0.7<span class="org-type">*</span>args.t_start <span class="org-type">&amp;</span> t_smooth_start <span class="org-type">&lt;</span> 0.9<span class="org-type">*</span>args.t_start) = Vd_max <span class="org-type">-</span> (t_smooth_start(t_smooth_start <span class="org-type">&gt;</span> 0.7<span class="org-type">*</span>args.t_start <span class="org-type">&amp;</span> t_smooth_start <span class="org-type">&lt;</span> 0.9<span class="org-type">*</span>args.t_start) <span class="org-type">-</span> 0.7<span class="org-type">*</span>args.t_start)<span class="org-type">*</span>Vd_max<span class="org-type">/</span>(0.2<span class="org-type">*</span>args.t_start);
V_smooth_start = cumtrapz(V_d)<span class="org-type">*</span>args.Ts;
V_smooth_end = args.V_mean <span class="org-type">-</span> V_smooth_start;
<span class="org-keyword">end</span>
<span class="org-keyword">else</span>
V_smooth_start = [];
V_smooth_end = [];
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgba46570" class="outline-4">
<h4 id="orgba46570">Combine Excitation signals</h4>
<div class="outline-text-4" id="text-orgba46570">
<div class="org-src-container">
<pre class="src src-matlab">V_exc = [V_smooth_start, V_sweep, V_smooth_end];
t_exc = args.Ts<span class="org-type">*</span>[0<span class="org-type">:</span>1<span class="org-type">:</span>length(V_exc)<span class="org-type">-</span>1];
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">U_exc = [t_exc; V_exc];
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org31382ab" class="outline-3">
<h3 id="org31382ab"><span class="section-number-3">13.2</span> <code>generateShapedNoise</code>: Generate Shaped Noise excitation</h3>
<div class="outline-text-3" id="text-13-2">
<p>
<a id="org6f8283d"></a>
</p>
</div>
<div id="outline-container-org26af1eb" class="outline-4">
<h4 id="org26af1eb">Function description</h4>
<div class="outline-text-4" id="text-org26af1eb">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[U_exc]</span> = <span class="org-function-name">generateShapedNoise</span>(<span class="org-variable-name">args</span>)
<span class="org-comment">% generateShapedNoise - Generate a Shaped Noise excitation signal</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [U_exc] = generateShapedNoise(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - args - Optinal arguments:</span>
<span class="org-comment">% - Ts - Sampling Time - [s]</span>
<span class="org-comment">% - V_mean - Mean value of the excitation voltage - [V]</span>
<span class="org-comment">% - V_exc - Excitation Amplitude, could be numeric or TF - [V rms]</span>
<span class="org-comment">% - t_start - Time at which the noise begins - [s]</span>
<span class="org-comment">% - exc_duration - Duration of the noise - [s]</span>
<span class="org-comment">% - smooth_ends - 'true' or 'false': smooth transition between 0 and V_mean - [-]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org48337a3" class="outline-4">
<h4 id="org48337a3">Optional Parameters</h4>
<div class="outline-text-4" id="text-org48337a3">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">args</span>.Ts (1,1) double {mustBeNumeric, mustBePositive} = 1e<span class="org-type">-</span>4
<span class="org-variable-name">args</span>.V_mean (1,1) double {mustBeNumeric} = 0
<span class="org-variable-name">args</span>.V_exc = 1
<span class="org-variable-name">args</span>.t_start (1,1) double {mustBeNumeric, mustBePositive} = 5
<span class="org-variable-name">args</span>.exc_duration (1,1) double {mustBeNumeric, mustBePositive} = 10
<span class="org-variable-name">args</span>.smooth_ends logical {mustBeNumericOrLogical} = <span class="org-constant">true</span>
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgc2a4a8b" class="outline-4">
<h4 id="orgc2a4a8b">Shaped Noise</h4>
<div class="outline-text-4" id="text-orgc2a4a8b">
<div class="org-src-container">
<pre class="src src-matlab">t_noise = 0<span class="org-type">:</span>args.Ts<span class="org-type">:</span>args.exc_duration;
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">if</span> isnumeric(args.V_exc)
V_noise = args.V_mean <span class="org-type">+</span> args.V_exc<span class="org-type">*</span>sqrt(1<span class="org-type">/</span>args.Ts<span class="org-type">/</span>2)<span class="org-type">*</span>randn(length(t_noise), 1)<span class="org-type">'</span>;
<span class="org-keyword">elseif</span> isct(args.V_exc)
V_noise = args.V_mean <span class="org-type">+</span> lsim(args.V_exc, sqrt(1<span class="org-type">/</span>args.Ts<span class="org-type">/</span>2)<span class="org-type">*</span>randn(length(t_noise), 1), t_noise)<span class="org-type">'</span>;
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org1ea5e8a" class="outline-4">
<h4 id="org1ea5e8a">Smooth Ends</h4>
<div class="outline-text-4" id="text-org1ea5e8a">
<div class="org-src-container">
<pre class="src src-matlab">t_smooth_start = args.Ts<span class="org-type">:</span>args.Ts<span class="org-type">:</span>args.t_start;
V_smooth_start = zeros(size(t_smooth_start));
V_smooth_end = zeros(size(t_smooth_start));
<span class="org-keyword">if</span> args.smooth_ends
Vd_max = args.V_mean<span class="org-type">/</span>(0.7<span class="org-type">*</span>args.t_start);
V_d = zeros(size(t_smooth_start));
V_d(t_smooth_start <span class="org-type">&lt;</span> 0.2<span class="org-type">*</span>args.t_start) = t_smooth_start(t_smooth_start <span class="org-type">&lt;</span> 0.2<span class="org-type">*</span>args.t_start)<span class="org-type">*</span>Vd_max<span class="org-type">/</span>(0.2<span class="org-type">*</span>args.t_start);
V_d(t_smooth_start <span class="org-type">&gt;</span> 0.2<span class="org-type">*</span>args.t_start <span class="org-type">&amp;</span> t_smooth_start <span class="org-type">&lt;</span> 0.7<span class="org-type">*</span>args.t_start) = Vd_max;
V_d(t_smooth_start <span class="org-type">&gt;</span> 0.7<span class="org-type">*</span>args.t_start <span class="org-type">&amp;</span> t_smooth_start <span class="org-type">&lt;</span> 0.9<span class="org-type">*</span>args.t_start) = Vd_max <span class="org-type">-</span> (t_smooth_start(t_smooth_start <span class="org-type">&gt;</span> 0.7<span class="org-type">*</span>args.t_start <span class="org-type">&amp;</span> t_smooth_start <span class="org-type">&lt;</span> 0.9<span class="org-type">*</span>args.t_start) <span class="org-type">-</span> 0.7<span class="org-type">*</span>args.t_start)<span class="org-type">*</span>Vd_max<span class="org-type">/</span>(0.2<span class="org-type">*</span>args.t_start);
V_smooth_start = cumtrapz(V_d)<span class="org-type">*</span>args.Ts;
V_smooth_end = args.V_mean <span class="org-type">-</span> V_smooth_start;
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgbdaa6b8" class="outline-4">
<h4 id="orgbdaa6b8">Combine Excitation signals</h4>
<div class="outline-text-4" id="text-orgbdaa6b8">
<div class="org-src-container">
<pre class="src src-matlab">V_exc = [V_smooth_start, V_noise, V_smooth_end];
t_exc = args.Ts<span class="org-type">*</span>[0<span class="org-type">:</span>1<span class="org-type">:</span>length(V_exc)<span class="org-type">-</span>1];
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">U_exc = [t_exc; V_exc];
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgbfa6126" class="outline-3">
<h3 id="orgbfa6126"><span class="section-number-3">13.3</span> <code>generateSinIncreasingAmpl</code>: Generate Sinus with increasing amplitude</h3>
<div class="outline-text-3" id="text-13-3">
<p>
<a id="orgb3d5a4c"></a>
</p>
</div>
<div id="outline-container-orge7731e3" class="outline-4">
<h4 id="orge7731e3">Function description</h4>
<div class="outline-text-4" id="text-orge7731e3">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[U_exc]</span> = <span class="org-function-name">generateSinIncreasingAmpl</span>(<span class="org-variable-name">args</span>)
<span class="org-comment">% generateSinIncreasingAmpl - Generate Sinus with increasing amplitude</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [U_exc] = generateSinIncreasingAmpl(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - args - Optinal arguments:</span>
<span class="org-comment">% - Ts - Sampling Time - [s]</span>
<span class="org-comment">% - V_mean - Mean value of the excitation voltage - [V]</span>
<span class="org-comment">% - sin_ampls - Excitation Amplitudes - [V]</span>
<span class="org-comment">% - sin_freq - Excitation Frequency - [Hz]</span>
<span class="org-comment">% - sin_num - Number of period for each amplitude - [-]</span>
<span class="org-comment">% - t_start - Time at which the excitation begins - [s]</span>
<span class="org-comment">% - smooth_ends - 'true' or 'false': smooth transition between 0 and V_mean - [-]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org028fa94" class="outline-4">
<h4 id="org028fa94">Optional Parameters</h4>
<div class="outline-text-4" id="text-org028fa94">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">args</span>.Ts (1,1) double {mustBeNumeric, mustBePositive} = 1e<span class="org-type">-</span>4
<span class="org-variable-name">args</span>.V_mean (1,1) double {mustBeNumeric} = 0
<span class="org-variable-name">args</span>.sin_ampls double {mustBeNumeric, mustBePositive} = [0.1, 0.2, 0.3]
<span class="org-variable-name">args</span>.sin_period (1,1) double {mustBeNumeric, mustBePositive} = 1
<span class="org-variable-name">args</span>.sin_num (1,1) double {mustBeNumeric, mustBePositive, mustBeInteger} = 3
<span class="org-variable-name">args</span>.t_start (1,1) double {mustBeNumeric, mustBePositive} = 5
<span class="org-variable-name">args</span>.smooth_ends logical {mustBeNumericOrLogical} = <span class="org-constant">true</span>
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org6395291" class="outline-4">
<h4 id="org6395291">Sinus excitation</h4>
<div class="outline-text-4" id="text-org6395291">
<div class="org-src-container">
<pre class="src src-matlab">t_noise = 0<span class="org-type">:</span>args.Ts<span class="org-type">:</span>args.sin_period<span class="org-type">*</span>args.sin_num;
sin_exc = [];
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">for</span> <span class="org-variable-name">sin_ampl</span> = <span class="org-constant">args.sin_ampls</span>
sin_exc = [sin_exc, args.V_mean <span class="org-type">+</span> sin_ampl<span class="org-type">*</span>sin(2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">/</span>args.sin_period<span class="org-type">*</span>t_noise)];
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org379f0ba" class="outline-4">
<h4 id="org379f0ba">Smooth Ends</h4>
<div class="outline-text-4" id="text-org379f0ba">
<div class="org-src-container">
<pre class="src src-matlab">t_smooth_start = args.Ts<span class="org-type">:</span>args.Ts<span class="org-type">:</span>args.t_start;
V_smooth_start = zeros(size(t_smooth_start));
V_smooth_end = zeros(size(t_smooth_start));
<span class="org-keyword">if</span> args.smooth_ends
Vd_max = args.V_mean<span class="org-type">/</span>(0.7<span class="org-type">*</span>args.t_start);
V_d = zeros(size(t_smooth_start));
V_d(t_smooth_start <span class="org-type">&lt;</span> 0.2<span class="org-type">*</span>args.t_start) = t_smooth_start(t_smooth_start <span class="org-type">&lt;</span> 0.2<span class="org-type">*</span>args.t_start)<span class="org-type">*</span>Vd_max<span class="org-type">/</span>(0.2<span class="org-type">*</span>args.t_start);
V_d(t_smooth_start <span class="org-type">&gt;</span> 0.2<span class="org-type">*</span>args.t_start <span class="org-type">&amp;</span> t_smooth_start <span class="org-type">&lt;</span> 0.7<span class="org-type">*</span>args.t_start) = Vd_max;
V_d(t_smooth_start <span class="org-type">&gt;</span> 0.7<span class="org-type">*</span>args.t_start <span class="org-type">&amp;</span> t_smooth_start <span class="org-type">&lt;</span> 0.9<span class="org-type">*</span>args.t_start) = Vd_max <span class="org-type">-</span> (t_smooth_start(t_smooth_start <span class="org-type">&gt;</span> 0.7<span class="org-type">*</span>args.t_start <span class="org-type">&amp;</span> t_smooth_start <span class="org-type">&lt;</span> 0.9<span class="org-type">*</span>args.t_start) <span class="org-type">-</span> 0.7<span class="org-type">*</span>args.t_start)<span class="org-type">*</span>Vd_max<span class="org-type">/</span>(0.2<span class="org-type">*</span>args.t_start);
V_smooth_start = cumtrapz(V_d)<span class="org-type">*</span>args.Ts;
V_smooth_end = args.V_mean <span class="org-type">-</span> V_smooth_start;
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org2238add" class="outline-4">
<h4 id="org2238add">Combine Excitation signals</h4>
<div class="outline-text-4" id="text-org2238add">
<div class="org-src-container">
<pre class="src src-matlab">V_exc = [V_smooth_start, sin_exc, V_smooth_end];
t_exc = args.Ts<span class="org-type">*</span>[0<span class="org-type">:</span>1<span class="org-type">:</span>length(V_exc)<span class="org-type">-</span>1];
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">U_exc = [t_exc; V_exc];
</pre>
</div>
</div>
</div>
</div>
</div>
<style>.csl-entry{text-indent: -1.5em; margin-left: 1.5em;}</style><h2 class='citeproc-org-bib-h2'>Bibliography</h2>
<div class="csl-bib-body">
<div class="csl-entry"><a name="citeproc_bib_item_1"></a>Souleille, Adrien, Thibault Lampert, V Lafarga, Sylvain Hellegouarch, Alan Rondineau, Gonçalo Rodrigues, and Christophe Collette. 2018. “A Concept of Active Mount for Space Applications.” <i>CEAS Space Journal</i> 10 (2). Springer:15765.</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-06-02 mer. 23:58</p>
</div>
</body>
</html>