Analysis of FRF data (DVF + IFF)

This commit is contained in:
Thomas Dehaeze 2021-06-08 22:14:48 +02:00
parent 36a2ab8f9a
commit 433dc17d1c
15 changed files with 653 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 KiB

BIN
figs/enc_struts_dvf_coh.pdf Normal file

Binary file not shown.

BIN
figs/enc_struts_dvf_coh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

BIN
figs/enc_struts_dvf_frf.pdf Normal file

Binary file not shown.

BIN
figs/enc_struts_dvf_frf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

BIN
figs/enc_struts_iff_coh.pdf Normal file

Binary file not shown.

BIN
figs/enc_struts_iff_coh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
figs/enc_struts_iff_frf.pdf Normal file

Binary file not shown.

BIN
figs/enc_struts_iff_frf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

BIN
matlab/mat/jacobian.mat Normal file

Binary file not shown.

24
ref.bib Normal file
View File

@ -0,0 +1,24 @@
@article{souleille18_concep_activ_mount_space_applic,
author = {Souleille, Adrien and Lampert, Thibault and Lafarga, V and
Hellegouarch, Sylvain and Rondineau, Alan and Rodrigues,
Gon{\c{c}}alo and Collette, Christophe},
title = {A Concept of Active Mount for Space Applications},
journal = {CEAS Space Journal},
volume = 10,
number = 2,
pages = {157--165},
year = 2018,
publisher = {Springer},
}
@phdthesis{poel10_explor_activ_hard_mount_vibrat,
author = {van der Poel, Gerrit Wijnand},
doi = {10.3990/1.9789036530163},
isbn = {978-90-365-3016-3},
keywords = {parallel robot},
school = {University of Twente},
title = {An Exploration of Active Hard Mount Vibration Isolation for
Precision Equipment},
url = {https://doi.org/10.3990/1.9789036530163},
year = 2010,
}

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2021-06-07 lun. 19:00 -->
<!-- 2021-06-08 mar. 21:51 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Nano-Hexapod - Test Bench</title>
<meta name="author" content="Dehaeze Thomas" />
@ -22,7 +22,17 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgc63308d">1. Test-Bench Description</a></li>
<li><a href="#org401a850">1. Test-Bench Description</a></li>
<li><a href="#org32d67fc">2. Encoders fixed to the Struts</a>
<ul>
<li><a href="#org332ecf2">2.1. Introduction</a></li>
<li><a href="#orgf904215">2.2. Load Data</a></li>
<li><a href="#org3689d6b">2.3. Spectral Analysis - Setup</a></li>
<li><a href="#org9ac5c69">2.4. DVF Plant</a></li>
<li><a href="#org4f1737c">2.5. IFF Plant</a></li>
<li><a href="#org4238e67">2.6. Jacobian</a></li>
</ul>
</li>
</ul>
</div>
</div>
@ -30,10 +40,10 @@
<p>This report is also available as a <a href="./test-bench-nano-hexapod.pdf">pdf</a>.</p>
<hr>
<div id="outline-container-orgc63308d" class="outline-2">
<h2 id="orgc63308d"><span class="section-number-2">1</span> Test-Bench Description</h2>
<div id="outline-container-org401a850" class="outline-2">
<h2 id="org401a850"><span class="section-number-2">1</span> Test-Bench Description</h2>
<div class="outline-text-2" id="text-1">
<div class="note" id="org060848e">
<div class="note" id="orgdb43d80">
<p>
Here are the documentation of the equipment used for this test bench:
</p>
@ -46,12 +56,202 @@ Here are the documentation of the equipment used for this test bench:
</ul>
</div>
<div id="org00dd2c1" class="figure">
<p><img src="figs/IMG_20210608_152917.jpg" alt="IMG_20210608_152917.jpg" />
</p>
<p><span class="figure-number">Figure 1: </span>Nano-Hexapod</p>
</div>
<div id="org0f5d79a" class="figure">
<p><img src="figs/IMG_20210608_154722.jpg" alt="IMG_20210608_154722.jpg" />
</p>
<p><span class="figure-number">Figure 2: </span>Nano-Hexapod and the control electronics</p>
</div>
</div>
</div>
<div id="outline-container-org32d67fc" class="outline-2">
<h2 id="org32d67fc"><span class="section-number-2">2</span> Encoders fixed to the Struts</h2>
<div class="outline-text-2" id="text-2">
</div>
<div id="outline-container-org332ecf2" class="outline-3">
<h3 id="org332ecf2"><span class="section-number-3">2.1</span> Introduction</h3>
</div>
<div id="outline-container-orgf904215" class="outline-3">
<h3 id="orgf904215"><span class="section-number-3">2.2</span> Load Data</h3>
<div class="outline-text-3" id="text-2-2">
<div class="org-src-container">
<pre class="src src-matlab">meas_data_lf = {};
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
meas_data_lf(<span class="org-constant">i</span>) = {load(sprintf(<span class="org-string">'mat/frf_data_exc_strut_%i_noise_lf.mat'</span>, <span class="org-constant">i</span>), <span class="org-string">'t'</span>, <span class="org-string">'Va'</span>, <span class="org-string">'Vs'</span>, <span class="org-string">'de'</span>)};
meas_data_hf(<span class="org-constant">i</span>) = {load(sprintf(<span class="org-string">'mat/frf_data_exc_strut_%i_noise_hf.mat'</span>, <span class="org-constant">i</span>), <span class="org-string">'t'</span>, <span class="org-string">'Va'</span>, <span class="org-string">'Vs'</span>, <span class="org-string">'de'</span>)};
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org3689d6b" class="outline-3">
<h3 id="org3689d6b"><span class="section-number-3">2.3</span> Spectral Analysis - Setup</h3>
<div class="outline-text-3" id="text-2-3">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-comment">% Sampling Time [s]</span>
Ts = (meas_data_lf{1}.t(end) <span class="org-type">-</span> (meas_data_lf{1}.t(1)))<span class="org-type">/</span>(length(meas_data_lf{1}.t)<span class="org-type">-</span>1);
<span class="org-comment">% Sampling Frequency [Hz]</span>
Fs = 1<span class="org-type">/</span>Ts;
<span class="org-comment">% Hannning Windows</span>
win = hanning(ceil(1<span class="org-type">*</span>Fs));
</pre>
</div>
<p>
And we get the frequency vector.
</p>
<div class="org-src-container">
<pre class="src src-matlab">[<span class="org-type">~</span>, f] = tfestimate(meas_data_lf{1}.Va, meas_data_lf{1}.de, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">i_lf = f <span class="org-type">&lt;</span> 250; <span class="org-comment">% Points for low frequency excitation</span>
i_hf = f <span class="org-type">&gt;</span> 250; <span class="org-comment">% Points for high frequency excitation</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org9ac5c69" class="outline-3">
<h3 id="org9ac5c69"><span class="section-number-3">2.4</span> DVF Plant</h3>
<div class="outline-text-3" id="text-2-4">
<p>
First, let&rsquo;s compute the coherence from the excitation voltage and the displacement as measured by the encoders (Figure <a href="#orga941078">3</a>).
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Coherence</span></span>
coh_dvf_lf = zeros(length(f), 6, 6);
coh_dvf_hf = zeros(length(f), 6, 6);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
coh_dvf_lf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = mscohere(meas_data_lf{<span class="org-constant">i</span>}.Va, meas_data_lf{<span class="org-constant">i</span>}.de, win, [], [], 1<span class="org-type">/</span>Ts);
coh_dvf_hf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = mscohere(meas_data_hf{<span class="org-constant">i</span>}.Va, meas_data_hf{<span class="org-constant">i</span>}.de, win, [], [], 1<span class="org-type">/</span>Ts);
<span class="org-keyword">end</span>
</pre>
</div>
<div id="orga941078" class="figure">
<p><img src="figs/enc_struts_dvf_coh.png" alt="enc_struts_dvf_coh.png" />
</p>
<p><span class="figure-number">Figure 3: </span>Obtained coherence for the DVF plant</p>
</div>
<p>
Then the 6x6 transfer function matrix is estimated (Figure <a href="#org9c350f6">4</a>).
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% DVF Plant</span></span>
G_dvf_lf = zeros(length(f), 6, 6);
G_dvf_hf = zeros(length(f), 6, 6);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
G_dvf_lf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = tfestimate(meas_data_lf{<span class="org-constant">i</span>}.Va, meas_data_lf{<span class="org-constant">i</span>}.de, win, [], [], 1<span class="org-type">/</span>Ts);
G_dvf_hf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = tfestimate(meas_data_hf{<span class="org-constant">i</span>}.Va, meas_data_hf{<span class="org-constant">i</span>}.de, win, [], [], 1<span class="org-type">/</span>Ts);
<span class="org-keyword">end</span>
</pre>
</div>
<div id="org9c350f6" class="figure">
<p><img src="figs/enc_struts_dvf_frf.png" alt="enc_struts_dvf_frf.png" />
</p>
<p><span class="figure-number">Figure 4: </span>Measured FRF for the DVF plant</p>
</div>
</div>
</div>
<div id="outline-container-org4f1737c" class="outline-3">
<h3 id="org4f1737c"><span class="section-number-3">2.5</span> IFF Plant</h3>
<div class="outline-text-3" id="text-2-5">
<p>
First, let&rsquo;s compute the coherence from the excitation voltage and the displacement as measured by the encoders (Figure <a href="#org2a3d572">5</a>).
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Coherence</span></span>
coh_iff_lf = zeros(length(f), 6, 6);
coh_iff_hf = zeros(length(f), 6, 6);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
coh_iff_lf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = mscohere(meas_data_lf{<span class="org-constant">i</span>}.Va, meas_data_lf{<span class="org-constant">i</span>}.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
coh_iff_hf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = mscohere(meas_data_hf{<span class="org-constant">i</span>}.Va, meas_data_hf{<span class="org-constant">i</span>}.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
<span class="org-keyword">end</span>
</pre>
</div>
<div id="org2a3d572" class="figure">
<p><img src="figs/enc_struts_iff_coh.png" alt="enc_struts_iff_coh.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Obtained coherence for the IFF plant</p>
</div>
<p>
Then the 6x6 transfer function matrix is estimated (Figure <a href="#orgaacf7b8">6</a>).
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% IFF Plant</span></span>
G_iff_lf = zeros(length(f), 6, 6);
G_iff_hf = zeros(length(f), 6, 6);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
G_iff_lf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = tfestimate(meas_data_lf{<span class="org-constant">i</span>}.Va, meas_data_lf{<span class="org-constant">i</span>}.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
G_iff_hf(<span class="org-type">:</span>, <span class="org-type">:</span>, <span class="org-constant">i</span>) = tfestimate(meas_data_hf{<span class="org-constant">i</span>}.Va, meas_data_hf{<span class="org-constant">i</span>}.Vs, win, [], [], 1<span class="org-type">/</span>Ts);
<span class="org-keyword">end</span>
</pre>
</div>
<div id="orgaacf7b8" class="figure">
<p><img src="figs/enc_struts_iff_frf.png" alt="enc_struts_iff_frf.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Measured FRF for the IFF plant</p>
</div>
</div>
</div>
<div id="outline-container-org4238e67" class="outline-3">
<h3 id="org4238e67"><span class="section-number-3">2.6</span> Jacobian</h3>
<div class="outline-text-3" id="text-2-6">
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'jacobian.mat'</span>, <span class="org-string">'J'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">G_dvf_J_lf = G_dvf_lf(i_lf, <span class="org-constant">i</span>, <span class="org-constant">j</span>)
</pre>
</div>
<p>
#+end_src</p>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-06-07 lun. 19:00</p>
<p class="date">Created: 2021-06-08 mar. 21:51</p>
</div>
</body>
</html>

View File

@ -46,6 +46,7 @@
<hr>
#+end_export
* Introduction :ignore:
* Test-Bench Description
#+begin_note
@ -56,3 +57,425 @@ Here are the documentation of the equipment used for this test bench:
- Encoder: Renishaw [[file:doc/L-9517-9678-05-A_Data_sheet_VIONiC_series_en.pdf][Vionic]] and used [[file:doc/L-9517-9862-01-C_Data_sheet_RKLC_EN.pdf][Ruler]]
- Interferometers: Attocube
#+end_note
#+name: fig:picture_bench_granite_nano_hexapod
#+caption: Nano-Hexapod
[[file:figs/IMG_20210608_152917.jpg]]
#+name: fig:picture_bench_granite_overview
#+caption: Nano-Hexapod and the control electronics
[[file:figs/IMG_20210608_154722.jpg]]
* Encoders fixed to the Struts
** Introduction
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src
#+begin_src matlab :tangle no
addpath('./matlab/mat/');
addpath('./matlab/src/');
addpath('./matlab/');
#+end_src
#+begin_src matlab :eval no
addpath('./mat/');
addpath('./src/');
#+end_src
** Load Data
#+begin_src matlab
meas_data_lf = {};
for i = 1:6
meas_data_lf(i) = {load(sprintf('mat/frf_data_exc_strut_%i_noise_lf.mat', i), 't', 'Va', 'Vs', 'de')};
meas_data_hf(i) = {load(sprintf('mat/frf_data_exc_strut_%i_noise_hf.mat', i), 't', 'Va', 'Vs', 'de')};
end
#+end_src
** Spectral Analysis - Setup
#+begin_src matlab
% Sampling Time [s]
Ts = (meas_data_lf{1}.t(end) - (meas_data_lf{1}.t(1)))/(length(meas_data_lf{1}.t)-1);
% Sampling Frequency [Hz]
Fs = 1/Ts;
% Hannning Windows
win = hanning(ceil(1*Fs));
#+end_src
And we get the frequency vector.
#+begin_src matlab
[~, f] = tfestimate(meas_data_lf{1}.Va, meas_data_lf{1}.de, win, [], [], 1/Ts);
#+end_src
#+begin_src matlab
i_lf = f < 250; % Points for low frequency excitation
i_hf = f > 250; % Points for high frequency excitation
#+end_src
** DVF Plant
First, let's compute the coherence from the excitation voltage and the displacement as measured by the encoders (Figure [[fig:enc_struts_dvf_coh]]).
#+begin_src matlab
%% Coherence
coh_dvf_lf = zeros(length(f), 6, 6);
coh_dvf_hf = zeros(length(f), 6, 6);
for i = 1:6
coh_dvf_lf(:, :, i) = mscohere(meas_data_lf{i}.Va, meas_data_lf{i}.de, win, [], [], 1/Ts);
coh_dvf_hf(:, :, i) = mscohere(meas_data_hf{i}.Va, meas_data_hf{i}.de, win, [], [], 1/Ts);
end
#+end_src
#+begin_src matlab :exports none
figure;
hold on;
for i = 1:5
for j = i+1:6
plot(f(i_lf), coh_dvf_lf(i_lf, i, j), 'color', [0, 0, 0, 0.2], ...
'HandleVisibility', 'off');
plot(f(i_hf), coh_dvf_hf(i_hf, i, j), 'color', [0, 0, 0, 0.2], ...
'HandleVisibility', 'off');
end
end
for i =1:6
set(gca,'ColorOrderIndex',i)
plot(f(i_lf), coh_dvf_lf(i_lf,i, i), ...
'DisplayName', sprintf('$G_{dvf}(%i,%i)$', i, i));
set(gca,'ColorOrderIndex',i)
plot(f(i_hf), coh_dvf_hf(i_hf,i, i), ...
'HandleVisibility', 'off');
end
plot(f(i_lf), coh_dvf_lf(i_lf, 1, 2), 'color', [0, 0, 0, 0.2], ...
'DisplayName', '$G_{dvf}(i,j)$');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
xlabel('Frequency [Hz]'); ylabel('Coherence [-]');
xlim([20, 2e3]); ylim([0, 1]);
legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 3);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/enc_struts_dvf_coh.pdf', 'width', 'wide', 'height', 'normal');
#+end_src
#+name: fig:enc_struts_dvf_coh
#+caption: Obtained coherence for the DVF plant
#+RESULTS:
[[file:figs/enc_struts_dvf_coh.png]]
Then the 6x6 transfer function matrix is estimated (Figure [[fig:enc_struts_dvf_frf]]).
#+begin_src matlab
%% DVF Plant
G_dvf_lf = zeros(length(f), 6, 6);
G_dvf_hf = zeros(length(f), 6, 6);
for i = 1:6
G_dvf_lf(:, :, i) = tfestimate(meas_data_lf{i}.Va, meas_data_lf{i}.de, win, [], [], 1/Ts);
G_dvf_hf(:, :, i) = tfestimate(meas_data_hf{i}.Va, meas_data_hf{i}.de, win, [], [], 1/Ts);
end
#+end_src
#+begin_src matlab :exports none
figure;
tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None');
ax1 = nexttile([2,1]);
hold on;
for i = 1:5
for j = i+1:6
plot(f(i_lf), abs(G_dvf_lf(i_lf, i, j)), 'color', [0, 0, 0, 0.2], ...
'HandleVisibility', 'off');
plot(f(i_hf), abs(G_dvf_hf(i_hf, i, j)), 'color', [0, 0, 0, 0.2], ...
'HandleVisibility', 'off');
end
end
for i =1:6
set(gca,'ColorOrderIndex',i)
plot(f(i_lf), abs(G_dvf_lf(i_lf,i, i)), ...
'DisplayName', sprintf('$G_{dvf}(%i,%i)$', i, i));
set(gca,'ColorOrderIndex',i)
plot(f(i_hf), abs(G_dvf_hf(i_hf,i, i)), ...
'HandleVisibility', 'off');
end
plot(f(i_lf), abs(G_dvf_lf(i_lf, 1, 2)), 'color', [0, 0, 0, 0.2], ...
'DisplayName', '$G_{dvf}(i,j)$');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude $d_e/V_a$ [m/V]'); set(gca, 'XTickLabel',[]);
ylim([1e-9, 1e-3]);
legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 3);
ax2 = nexttile;
hold on;
for i =1:6
set(gca,'ColorOrderIndex',i)
plot(f(i_lf), 180/pi*angle(G_dvf_lf(i_lf,i, i)));
set(gca,'ColorOrderIndex',i)
plot(f(i_hf), 180/pi*angle(G_dvf_hf(i_hf,i, i)));
end
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
hold off;
yticks(-360:90:360);
linkaxes([ax1,ax2],'x');
xlim([20, 2e3]);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/enc_struts_dvf_frf.pdf', 'width', 'wide', 'height', 'tall');
#+end_src
#+name: fig:enc_struts_dvf_frf
#+caption: Measured FRF for the DVF plant
#+RESULTS:
[[file:figs/enc_struts_dvf_frf.png]]
** IFF Plant
First, let's compute the coherence from the excitation voltage and the displacement as measured by the encoders (Figure [[fig:enc_struts_iff_coh]]).
#+begin_src matlab
%% Coherence
coh_iff_lf = zeros(length(f), 6, 6);
coh_iff_hf = zeros(length(f), 6, 6);
for i = 1:6
coh_iff_lf(:, :, i) = mscohere(meas_data_lf{i}.Va, meas_data_lf{i}.Vs, win, [], [], 1/Ts);
coh_iff_hf(:, :, i) = mscohere(meas_data_hf{i}.Va, meas_data_hf{i}.Vs, win, [], [], 1/Ts);
end
#+end_src
#+begin_src matlab :exports none
figure;
hold on;
for i = 1:5
for j = i+1:6
plot(f(i_lf), coh_iff_lf(i_lf, i, j), 'color', [0, 0, 0, 0.2], ...
'HandleVisibility', 'off');
plot(f(i_hf), coh_iff_hf(i_hf, i, j), 'color', [0, 0, 0, 0.2], ...
'HandleVisibility', 'off');
end
end
for i =1:6
set(gca,'ColorOrderIndex',i)
plot(f(i_lf), coh_iff_lf(i_lf,i, i), ...
'DisplayName', sprintf('$G_{iff}(%i,%i)$', i, i));
set(gca,'ColorOrderIndex',i)
plot(f(i_hf), coh_iff_hf(i_hf,i, i), ...
'HandleVisibility', 'off');
end
plot(f(i_lf), coh_iff_lf(i_lf, 1, 2), 'color', [0, 0, 0, 0.2], ...
'DisplayName', '$G_{iff}(i,j)$');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
xlabel('Frequency [Hz]'); ylabel('Coherence [-]');
xlim([20, 2e3]); ylim([0, 1]);
legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 3);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/enc_struts_iff_coh.pdf', 'width', 'wide', 'height', 'normal');
#+end_src
#+name: fig:enc_struts_iff_coh
#+caption: Obtained coherence for the IFF plant
#+RESULTS:
[[file:figs/enc_struts_iff_coh.png]]
Then the 6x6 transfer function matrix is estimated (Figure [[fig:enc_struts_iff_frf]]).
#+begin_src matlab
%% IFF Plant
G_iff_lf = zeros(length(f), 6, 6);
G_iff_hf = zeros(length(f), 6, 6);
for i = 1:6
G_iff_lf(:, :, i) = tfestimate(meas_data_lf{i}.Va, meas_data_lf{i}.Vs, win, [], [], 1/Ts);
G_iff_hf(:, :, i) = tfestimate(meas_data_hf{i}.Va, meas_data_hf{i}.Vs, win, [], [], 1/Ts);
end
#+end_src
#+begin_src matlab :exports none
figure;
tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None');
ax1 = nexttile([2,1]);
hold on;
for i = 1:5
for j = i+1:6
plot(f(i_lf), abs(G_iff_lf(i_lf, i, j)), 'color', [0, 0, 0, 0.2], ...
'HandleVisibility', 'off');
plot(f(i_hf), abs(G_iff_hf(i_hf, i, j)), 'color', [0, 0, 0, 0.2], ...
'HandleVisibility', 'off');
end
end
for i =1:6
set(gca,'ColorOrderIndex',i)
plot(f(i_lf), abs(G_iff_lf(i_lf,i, i)), ...
'DisplayName', sprintf('$G_{iff}(%i,%i)$', i, i));
set(gca,'ColorOrderIndex',i)
plot(f(i_hf), abs(G_iff_hf(i_hf,i, i)), ...
'HandleVisibility', 'off');
end
plot(f(i_lf), abs(G_iff_lf(i_lf, 1, 2)), 'color', [0, 0, 0, 0.2], ...
'DisplayName', '$G_{iff}(i,j)$');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude $V_s/V_a$ [V/V]'); set(gca, 'XTickLabel',[]);
legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 3);
ylim([1e-3, 1e2]);
ax2 = nexttile;
hold on;
for i =1:6
set(gca,'ColorOrderIndex',i)
plot(f(i_lf), 180/pi*angle(G_iff_lf(i_lf,i, i)));
set(gca,'ColorOrderIndex',i)
plot(f(i_hf), 180/pi*angle(G_iff_hf(i_hf,i, i)));
end
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
hold off;
yticks(-360:90:360);
linkaxes([ax1,ax2],'x');
xlim([20, 2e3]);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/enc_struts_iff_frf.pdf', 'width', 'wide', 'height', 'tall');
#+end_src
#+name: fig:enc_struts_iff_frf
#+caption: Measured FRF for the IFF plant
#+RESULTS:
[[file:figs/enc_struts_iff_frf.png]]
** Jacobian
#+begin_src matlab
load('jacobian.mat', 'J');
#+end_src
*** DVF Plant
#+begin_src matlab
G_dvf_J_lf = permute(pagemtimes(inv(J), pagemtimes(permute(G_dvf_lf, [2 3 1]), inv(J'))), [3 1 2]);
G_dvf_J_hf = permute(pagemtimes(inv(J), pagemtimes(permute(G_dvf_hf, [2 3 1]), inv(J'))), [3 1 2]);
#+end_src
#+begin_src matlab :exports none
labels = {'$D_x/F_{x}$', '$D_y/F_{y}$', '$D_z/F_{z}$', '$R_{x}/M_{x}$', '$R_{y}/M_{y}$', '$R_{R}/M_{z}$'};
figure;
tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None');
ax1 = nexttile([2,1]);
hold on;
for i = 1:5
for j = i+1:6
plot(f(i_lf), abs(G_dvf_J_lf(i_lf, i, j)), 'color', [0, 0, 0, 0.2], ...
'HandleVisibility', 'off');
plot(f(i_hf), abs(G_dvf_J_hf(i_hf, i, j)), 'color', [0, 0, 0, 0.2], ...
'HandleVisibility', 'off');
end
end
for i =1:6
set(gca,'ColorOrderIndex',i)
plot(f(i_lf), abs(G_dvf_J_lf(i_lf,i, i)), ...
'DisplayName', labels{i});
set(gca,'ColorOrderIndex',i)
plot(f(i_hf), abs(G_dvf_J_hf(i_hf,i, i)), ...
'HandleVisibility', 'off');
end
plot(f(i_lf), abs(G_dvf_J_lf(i_lf, 1, 2)), 'color', [0, 0, 0, 0.2], ...
'DisplayName', '$D_i/F_j$');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude $d_e/V_a$ [m/V]'); set(gca, 'XTickLabel',[]);
ylim([1e-7, 1e-1]);
legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 3);
ax2 = nexttile;
hold on;
for i =1:6
set(gca,'ColorOrderIndex',i)
plot(f(i_lf), 180/pi*angle(G_dvf_J_lf(i_lf,i, i)));
set(gca,'ColorOrderIndex',i)
plot(f(i_hf), 180/pi*angle(G_dvf_J_hf(i_hf,i, i)));
end
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
hold off;
yticks(-360:90:360);
linkaxes([ax1,ax2],'x');
xlim([20, 2e3]);
#+end_src
*** IFF Plant
#+begin_src matlab
G_iff_J_lf = permute(pagemtimes(inv(J), pagemtimes(permute(G_iff_lf, [2 3 1]), inv(J'))), [3 1 2]);
G_iff_J_hf = permute(pagemtimes(inv(J), pagemtimes(permute(G_iff_hf, [2 3 1]), inv(J'))), [3 1 2]);
#+end_src
#+begin_src matlab :exports none
labels = {'$F_{m,x}/F_{x}$', '$F_{m,y}/F_{y}$', '$F_{m,z}/F_{z}$', '$M_{m,x}/M_{x}$', '$M_{m,y}/M_{y}$', '$M_{m,z}/M_{z}$'};
figure;
tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None');
ax1 = nexttile([2,1]);
hold on;
for i = 1:5
for j = i+1:6
plot(f(i_lf), abs(G_iff_J_lf(i_lf, i, j)), 'color', [0, 0, 0, 0.2], ...
'HandleVisibility', 'off');
plot(f(i_hf), abs(G_iff_J_hf(i_hf, i, j)), 'color', [0, 0, 0, 0.2], ...
'HandleVisibility', 'off');
end
end
for i =1:6
set(gca,'ColorOrderIndex',i)
plot(f(i_lf), abs(G_iff_J_lf(i_lf,i, i)), ...
'DisplayName', labels{i});
set(gca,'ColorOrderIndex',i)
plot(f(i_hf), abs(G_iff_J_hf(i_hf,i, i)), ...
'HandleVisibility', 'off');
end
plot(f(i_lf), abs(G_iff_J_lf(i_lf, 1, 2)), 'color', [0, 0, 0, 0.2], ...
'DisplayName', '$D_i/F_j$');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude $d_e/V_a$ [m/V]'); set(gca, 'XTickLabel',[]);
ylim([1e-7, 1e-1]);
legend('location', 'southeast', 'FontSize', 8, 'NumColumns', 3);
ax2 = nexttile;
hold on;
for i =1:6
set(gca,'ColorOrderIndex',i)
plot(f(i_lf), 180/pi*angle(G_iff_J_lf(i_lf,i, i)));
set(gca,'ColorOrderIndex',i)
plot(f(i_hf), 180/pi*angle(G_iff_J_hf(i_hf,i, i)));
end
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
hold off;
yticks(-360:90:360);
linkaxes([ax1,ax2],'x');
xlim([20, 2e3]);
#+end_src

BIN
test-bench-nano-hexapod.pdf Normal file

Binary file not shown.