sensor-fusion-test-bench/index.html

1020 lines
33 KiB
HTML

<?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>
<!-- 2020-09-09 mer. 20:38 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Sensor Fusion - Test Bench</title>
<meta name="generator" content="Org mode" />
<meta name="author" content="Dehaeze Thomas" />
<link rel="stylesheet" type="text/css" href="./css/htmlize.css"/>
<link rel="stylesheet" type="text/css" href="./css/readtheorg.css"/>
<link rel="stylesheet" type="text/css" href="./css/zenburn.css"/>
<script type="text/javascript" src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
<script type="text/javascript" src="./js/jquery.stickytableheaders.min.js"></script>
<script type="text/javascript" src="./js/readtheorg.js"></script>
<script>MathJax = {
tex: {
tags: 'ams',
macros: {bm: ["\\boldsymbol{#1}",1],}
}
};
</script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
</head>
<body>
<div id="content">
<h1 class="title">Sensor Fusion - Test Bench</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org2a3a045">1. Experimental Setup</a></li>
<li><a href="#orgdfc8362">2. Huddle Test</a>
<ul>
<li><a href="#orgb1de447">2.1. Load Data</a></li>
<li><a href="#orgc9f65e6">2.2. Detrend Data</a></li>
<li><a href="#orgfae408b">2.3. Compute PSD</a></li>
<li><a href="#orgfb0a50d">2.4. Sensor Noise in Volts</a></li>
</ul>
</li>
<li><a href="#org835a98a">3. After identification</a>
<ul>
<li><a href="#org656f89a">3.1. Scale Data</a></li>
<li><a href="#org9468f55">3.2. sdlkfj</a></li>
<li><a href="#org0686d3d">3.3. Compare Time Domain Signals</a></li>
<li><a href="#orgb43afdf">3.4. Compute PSD</a></li>
<li><a href="#org02730d1">3.5. Dynamical Uncertainty</a></li>
<li><a href="#orga6b7413">3.6. ADC Noise</a></li>
<li><a href="#orge64b357">3.7. Sensor Noise</a></li>
</ul>
</li>
<li><a href="#orgec75d07">4. Sensor Dynamics</a>
<ul>
<li><a href="#org0fb20c4">4.1. Load Data</a></li>
<li><a href="#orgbeb67bf">4.2. Time Domain Signals</a></li>
<li><a href="#orge8d90a4">4.3. Identification of the IFF Plant</a>
<ul>
<li><a href="#orge57cb88">4.3.1. Experimental Data</a></li>
<li><a href="#orgaa77ceb">4.3.2. Model of the IFF Plant</a></li>
<li><a href="#org5109d47">4.3.3. Root Locus and optimal Controller</a></li>
</ul>
</li>
<li><a href="#orgdd6e477">4.4. Identification of Sensor Dynamics with IFF activated</a>
<ul>
<li><a href="#orgb129175">4.4.1. Signals</a></li>
<li><a href="#org16c5098">4.4.2. Verification of the achievable damping</a></li>
</ul>
</li>
<li><a href="#org7c6b6b8">4.5. Generate the excitation signal</a>
<ul>
<li><a href="#org0a29bfb">4.5.1. Requirements</a></li>
<li><a href="#org70f432a">4.5.2. Transfer function from excitation signal to displacement</a></li>
<li><a href="#orgb35f216">4.5.3. Motion measured during Huddle test</a></li>
</ul>
</li>
<li><a href="#org5b6add7">4.6. Identification of the Inertial Sensors Dynamics</a>
<ul>
<li><a href="#org00b0fdd">4.6.1. Load Data</a></li>
<li><a href="#org7eb216e">4.6.2. Compare PSD during Huddle and and during identification</a></li>
<li><a href="#org9e50b3e">4.6.3. Compute transfer functions</a></li>
</ul>
</li>
<li><a href="#org12ea408">4.7. Compare Time domain Estimation of the displacement</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-org2a3a045" class="outline-2">
<h2 id="org2a3a045"><span class="section-number-2">1</span> Experimental Setup</h2>
<div class="outline-text-2" id="text-1">
<p>
The goal of this experimental setup is to experimentally merge inertial sensors.
</p>
<p>
To merge the sensors, optimal and robust complementary filters are designed.
</p>
<p>
The inertial sensors used are shown in Table
</p>
<table id="orgf5d7fb1" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 1:</span> Inertial Sensors used</caption>
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left"><b>Type</b></th>
<th scope="col" class="org-left"><b>Model</b></th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">Accelerometer</td>
<td class="org-left">PCB 393B05 - Vertical (<a href="https://www.pcb.com/products?m=393B05">link</a>)</td>
</tr>
<tr>
<td class="org-left">Geophone</td>
<td class="org-left">Mark Product L-22 - Vertical</td>
</tr>
</tbody>
</table>
<table id="org9b7266a" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 2:</span> Accelerometer (393B05) Specifications</caption>
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left"><b>Specification</b></th>
<th scope="col" class="org-left"><b>Value</b></th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">Sensitivity</td>
<td class="org-left">1.02 [V/(m/s2)]</td>
</tr>
<tr>
<td class="org-left">Resonant Frequency</td>
<td class="org-left">&gt; 2.5 [kHz]</td>
</tr>
<tr>
<td class="org-left">Resolution (1 to 10kHz)</td>
<td class="org-left">0.00004 [m/s2 rms]</td>
</tr>
</tbody>
</table>
<table id="orgf054360" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 3:</span> Geophone (L22) Specifications</caption>
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left"><b>Specification</b></th>
<th scope="col" class="org-left"><b>Value</b></th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">Sensitivity</td>
<td class="org-left">To be measured [V/(m/s)]</td>
</tr>
<tr>
<td class="org-left">Resonant Frequency</td>
<td class="org-left">2 [Hz]</td>
</tr>
</tbody>
</table>
<p>
The ADC used are the IO131 Speedgoat module (<a href="https://www.speedgoat.com/products/io-connectivity-analog-io131">link</a>) with a 16bit resolution over +/- 10V.
</p>
<p>
The geophone signals are amplified using a DLPVA-100-B-D voltage amplified from Femto (<a href="https://www.femto.de/en/products/voltage-amplifiers/variable-gain-100-khz-dlpva.html">link</a>).
The force sensor signal is amplified using a Low Noise Voltage Preamplifier from Ametek (<a href="https://www.ameteksi.com/support-center/legacy-products/signal-recovery-legacy/5113-low-noise-preamplifier">link</a>).
</p>
<p>
Geophone electronics:
</p>
<ul class="org-ul">
<li>gain: 10 (20dB)</li>
<li>low pass filter: 1.5Hz</li>
<li>hifh pass filter: 100kHz (2nd order)</li>
</ul>
<p>
Force Sensor electronics:
</p>
<ul class="org-ul">
<li>gain: 10 (20dB)</li>
<li>low pass filter: 1st order at 3Hz</li>
<li>high pass filter: 1st order at 30kHz</li>
</ul>
</div>
</div>
<div id="outline-container-orgdfc8362" class="outline-2">
<h2 id="orgdfc8362"><span class="section-number-2">2</span> Huddle Test</h2>
<div class="outline-text-2" id="text-2">
<p>
The goal here is to measure the noise of the inertial sensors.
Is also permits to measure the motion level when nothing is actuated.
</p>
</div>
<div id="outline-container-orgb1de447" class="outline-3">
<h3 id="orgb1de447"><span class="section-number-3">2.1</span> Load Data</h3>
<div class="outline-text-3" id="text-2-1">
<div class="org-src-container">
<pre class="src src-matlab">ht = load('./mat/huddle_test.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
</pre>
</div>
</div>
</div>
<div id="outline-container-orgc9f65e6" class="outline-3">
<h3 id="orgc9f65e6"><span class="section-number-3">2.2</span> Detrend Data</h3>
<div class="outline-text-3" id="text-2-2">
<div class="org-src-container">
<pre class="src src-matlab">ht.d = detrend(ht.d, 0); % [m]
ht.acc_1 = detrend(ht.acc_1, 0); % [V]
ht.acc_2 = detrend(ht.acc_2, 0); % [V]
ht.geo_1 = detrend(ht.geo_1, 0); % [V]
ht.geo_2 = detrend(ht.geo_2, 0); % [V]
ht.f_meas = detrend(ht.f_meas, 0); % [V]
</pre>
</div>
</div>
</div>
<div id="outline-container-orgfae408b" class="outline-3">
<h3 id="orgfae408b"><span class="section-number-3">2.3</span> Compute PSD</h3>
<div class="outline-text-3" id="text-2-3">
<p>
We first define the parameters for the frequency domain analysis.
</p>
<div class="org-src-container">
<pre class="src src-matlab">Ts = t(2) - t(1); % [s]
Fs = 1/Ts; % [Hz]
win = hanning(ceil(1*Fs));
</pre>
</div>
<p>
Then we compute the Power Spectral Density using <code>pwelch</code> function.
</p>
<div class="org-src-container">
<pre class="src src-matlab">[p_d, f] = pwelch(ht.d, win, [], [], 1/Ts);
[p_acc1, ~] = pwelch(ht.acc_1, win, [], [], 1/Ts);
[p_acc2, ~] = pwelch(ht.acc_2, win, [], [], 1/Ts);
[p_geo1, ~] = pwelch(ht.geo_1, win, [], [], 1/Ts);
[p_geo2, ~] = pwelch(ht.geo_2, win, [], [], 1/Ts);
[p_fmeas, ~] = pwelch(ht.f_meas, win, [], [], 1/Ts);
</pre>
</div>
</div>
</div>
<div id="outline-container-orgfb0a50d" class="outline-3">
<h3 id="orgfb0a50d"><span class="section-number-3">2.4</span> Sensor Noise in Volts</h3>
<div class="outline-text-3" id="text-2-4">
<div class="org-src-container">
<pre class="src src-matlab">[coh_acc, ~] = mscohere(ht.acc_1, ht.acc_2, win, [], [], Fs);
[coh_geo, ~] = mscohere(ht.geo_1, ht.geo_2, win, [], [], Fs);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">pN_acc = p_acc1.*(1 - coh_acc);
pN_geo = p_geo1.*(1 - coh_geo);
</pre>
</div>
<p>
PSD of the ADC quantization noise.
</p>
<div class="org-src-container">
<pre class="src src-matlab">Sq = (20/2^16)^2/(12*Fs);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">figure;
hold on;
plot(f, sqrt(pN_acc), '-', 'DisplayName', 'Accelerometers');
plot(f, sqrt(pN_geo), '-', 'DisplayName', 'Geophones');
plot(f, ones(size(f))*sqrt(Sq), '-', 'DisplayName', 'ADC');
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD of the Measurement Noise $[V/\sqrt{Hz}]$');
xlim([1, 5000]);
legend('location', 'northeast');
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org835a98a" class="outline-2">
<h2 id="org835a98a"><span class="section-number-2">3</span> After identification</h2>
<div class="outline-text-2" id="text-3">
</div>
<div id="outline-container-org656f89a" class="outline-3">
<h3 id="org656f89a"><span class="section-number-3">3.1</span> Scale Data</h3>
<div class="outline-text-3" id="text-3-1">
<p>
Let&rsquo;s use a model of the accelerometer and geophone to compute the motion from the measured voltage.
</p>
<div class="org-src-container">
<pre class="src src-matlab">G_acc = 1/(1 + s/2/pi/2500); % [V/(m/s2)]
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">G_geo = 120*s^2/(s^2 + 2*0.7*2*pi*2*s + (2*pi*2)^2); % [V/(m/s)]
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">figure;
hold on;
set(gca, 'ColorOrderIndex', 1);
plot(f, sqrt(p_acc1)./abs(squeeze(freqresp(G_acc*s^2, f, 'Hz'))), ...
'DisplayName', 'Accelerometer');
set(gca, 'ColorOrderIndex', 1);
plot(f, sqrt(p_acc2)./abs(squeeze(freqresp(G_acc*s^2, f, 'Hz'))), ...
'HandleVisibility', 'off');
set(gca, 'ColorOrderIndex', 2);
plot(f, sqrt(p_geo1)./abs(squeeze(freqresp(G_geo*s, f, 'Hz'))), ...
'DisplayName', 'Geophone');
set(gca, 'ColorOrderIndex', 2);
plot(f, sqrt(p_geo2)./abs(squeeze(freqresp(G_geo*s, f, 'Hz'))), ...
'HandleVisibility', 'off');
set(gca, 'ColorOrderIndex', 3);
plot(f, sqrt(p_d), 'DisplayName', 'Interferometer');
hold off;
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
ylabel('ASD [$m/\sqrt{Hz}$]'); xlabel('Frequency [Hz]');
title('Huddle Test')
legend();
</pre>
</div>
</div>
</div>
<div id="outline-container-org9468f55" class="outline-3">
<h3 id="org9468f55"><span class="section-number-3">3.2</span> sdlkfj</h3>
<div class="outline-text-3" id="text-3-2">
<div class="org-src-container">
<pre class="src src-matlab">acc_1 = lsim(inv(G_acc), ht.acc_1, ht.t);
acc_2 = lsim(inv(G_acc), ht.acc_2, ht.t);
geo_1 = lsim(inv(G_geo), ht.geo_1, ht.t);
geo_2 = lsim(inv(G_geo), ht.geo_2, ht.t);
</pre>
</div>
</div>
</div>
<div id="outline-container-org0686d3d" class="outline-3">
<h3 id="org0686d3d"><span class="section-number-3">3.3</span> Compare Time Domain Signals</h3>
<div class="outline-text-3" id="text-3-3">
<div class="org-src-container">
<pre class="src src-matlab">figure;
hold on;
plot(t, acc_1);
plot(t, acc_2);
plot(t, geo_1);
plot(t, geo_2);
hold off;
</pre>
</div>
</div>
</div>
<div id="outline-container-orgb43afdf" class="outline-3">
<h3 id="orgb43afdf"><span class="section-number-3">3.4</span> Compute PSD</h3>
<div class="outline-text-3" id="text-3-4">
<p>
We first define the parameters for the frequency domain analysis.
</p>
<div class="org-src-container">
<pre class="src src-matlab">Fs = 1/dt; % [Hz]
win = hanning(ceil(1*Fs));
</pre>
</div>
<p>
Then we compute the Power Spectral Density using <code>pwelch</code> function.
</p>
<div class="org-src-container">
<pre class="src src-matlab">[p_acc_1, f] = pwelch(acc_1, win, [], [], Fs);
[p_acc_2, ~] = pwelch(acc_2, win, [], [], Fs);
[p_geo_1, ~] = pwelch(geo_1, win, [], [], Fs);
[p_geo_2, ~] = pwelch(geo_2, win, [], [], Fs);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">figure;
hold on;
plot(f, sqrt(p_acc_1));
plot(f, sqrt(p_acc_2));
hold off;
set(gca, 'xscale', 'log');
set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD Accelerometers $\left[\frac{m/s}{\sqrt{Hz}}\right]$')
xlim([1, 5000]);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">figure;
hold on;
plot(f, sqrt(p_geo_1));
plot(f, sqrt(p_geo_2));
hold off;
set(gca, 'xscale', 'log');
set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD Geophones $\left[\frac{m/s}{\sqrt{Hz}}\right]$')
xlim([1, 5000]);
</pre>
</div>
</div>
</div>
<div id="outline-container-org02730d1" class="outline-3">
<h3 id="org02730d1"><span class="section-number-3">3.5</span> Dynamical Uncertainty</h3>
<div class="outline-text-3" id="text-3-5">
<div class="org-src-container">
<pre class="src src-matlab">[T_acc, ~] = tfestimate(acc_1, acc_2, win, [], [], Fs);
[T_geo, ~] = tfestimate(geo_1, geo_2, win, [], [], Fs);
</pre>
</div>
</div>
</div>
<div id="outline-container-orga6b7413" class="outline-3">
<h3 id="orga6b7413"><span class="section-number-3">3.6</span> ADC Noise</h3>
<div class="outline-text-3" id="text-3-6">
<p>
Let&rsquo;s note:
</p>
<ul class="org-ul">
<li>\(\Delta V\) the ADC range in [V]</li>
<li>\(n\) the number of bits</li>
<li>\(q = \frac{\Delta V}{2^n}\) the quantization in [V]</li>
<li>\(f_N\) the sampling frequency in [Hz]</li>
</ul>
<p>
The Power Spectral Density of the quantization noise is then:
</p>
\begin{equation}
S_Q = \frac{q^2}{12 f_N} \quad [V^2/Hz]
\end{equation}
<div class="org-src-container">
<pre class="src src-matlab">Fs = 1/dt;
Sq = (20/2^16)^2/(12*Fs);
</pre>
</div>
</div>
</div>
<div id="outline-container-orge64b357" class="outline-3">
<h3 id="orge64b357"><span class="section-number-3">3.7</span> Sensor Noise</h3>
<div class="outline-text-3" id="text-3-7">
<div class="org-src-container">
<pre class="src src-matlab">[coh_acc, ~] = mscohere(acc_1, acc_2, win, [], [], Fs);
[coh_geo, ~] = mscohere(geo_1, geo_2, win, [], [], Fs);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">pN_acc = p_acc_1.*(1 - coh_acc);
pN_geo = p_geo_1.*(1 - coh_geo);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">figure;
hold on;
plot(f, pN_acc, '-', 'DisplayName', 'Accelerometers');
plot(f, pN_geo, '-', 'DisplayName', 'Geophones');
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD of the Measurement Noise $\left[\frac{m/s}{\sqrt{Hz}}\right]$');
xlim([1, 5000]);
legend('location', 'northeast');
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgec75d07" class="outline-2">
<h2 id="orgec75d07"><span class="section-number-2">4</span> Sensor Dynamics</h2>
<div class="outline-text-2" id="text-4">
<p>
Thanks to the interferometer, it is possible to compute the transfer function from the mass displacement to the voltage generated by the inertial sensors.
This permits to estimate the sensor dynamics and to calibrate the sensors.
</p>
</div>
<div id="outline-container-org0fb20c4" class="outline-3">
<h3 id="org0fb20c4"><span class="section-number-3">4.1</span> Load Data</h3>
<div class="outline-text-3" id="text-4-1">
<div class="org-src-container">
<pre class="src src-matlab">ht = load('./mat/huddle_test.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
id_ol = load('./mat/identification_noise_bis.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
</pre>
</div>
</div>
</div>
<div id="outline-container-orgbeb67bf" class="outline-3">
<h3 id="orgbeb67bf"><span class="section-number-3">4.2</span> Time Domain Signals</h3>
<div class="outline-text-3" id="text-4-2">
<p>
Excitation signal: noise.
</p>
<div id="org320dc7d" class="figure">
<p><img src="figs/first_exc_signal_time.png" alt="first_exc_signal_time.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Excitation signal used for the first identification</p>
</div>
</div>
</div>
<div id="outline-container-orge8d90a4" class="outline-3">
<h3 id="orge8d90a4"><span class="section-number-3">4.3</span> Identification of the IFF Plant</h3>
<div class="outline-text-3" id="text-4-3">
</div>
<div id="outline-container-orge57cb88" class="outline-4">
<h4 id="orge57cb88"><span class="section-number-4">4.3.1</span> Experimental Data</h4>
<div class="outline-text-4" id="text-4-3-1">
<div class="org-src-container">
<pre class="src src-matlab">Ts = ht.t(2) - ht.t(1);
win = hann(ceil(10/Ts));
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[tf_fmeas_est, f] = tfestimate(id_ol.u, id_ol.f_meas, win, [], [], 1/Ts); % [V/m]
[co_fmeas_est, ~] = mscohere( id_ol.u, id_ol.f_meas, win, [], [], 1/Ts);
</pre>
</div>
<div id="org16469a6" class="figure">
<p><img src="figs/iff_identification_coh.png" alt="iff_identification_coh.png" />
</p>
<p><span class="figure-number">Figure 2: </span>Coherence for the identification of the IFF plant</p>
</div>
<div id="orge81e76a" class="figure">
<p><img src="figs/iff_identification_bode_plot.png" alt="iff_identification_bode_plot.png" />
</p>
<p><span class="figure-number">Figure 3: </span>Bode plot of the identified IFF plant</p>
</div>
</div>
</div>
<div id="outline-container-orgaa77ceb" class="outline-4">
<h4 id="orgaa77ceb"><span class="section-number-4">4.3.2</span> Model of the IFF Plant</h4>
<div class="outline-text-4" id="text-4-3-2">
<div class="org-src-container">
<pre class="src src-matlab">wz = 2*pi*102;
xi_z = 0.01;
wp = 2*pi*239.4;
xi_p = 0.015;
Giff = 2.2*(s^2 + 2*xi_z*s*wz + wz^2)/(s^2 + 2*xi_p*s*wp + wp^2) * ... % Dynamics
10*(s/3/pi/(1 + s/3/pi)) * ... % Low pass filter and gain of the voltage amplifier
exp(-Ts*s); % Time delay induced by ADC/DAC
</pre>
</div>
<div id="org04c5d91" class="figure">
<p><img src="figs/iff_plant_model.png" alt="iff_plant_model.png" />
</p>
<p><span class="figure-number">Figure 4: </span>IFF Plant + Model</p>
</div>
</div>
</div>
<div id="outline-container-org5109d47" class="outline-4">
<h4 id="org5109d47"><span class="section-number-4">4.3.3</span> Root Locus and optimal Controller</h4>
<div class="outline-text-4" id="text-4-3-3">
<div id="org6f813e3" class="figure">
<p><img src="figs/iff_root_locus.png" alt="iff_root_locus.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Root Locus for the IFF control</p>
</div>
<p>
The controller that yield maximum damping is:
</p>
<div class="org-src-container">
<pre class="src src-matlab">Kiff_opt = 102/(s + 2*pi*2);
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgdd6e477" class="outline-3">
<h3 id="orgdd6e477"><span class="section-number-3">4.4</span> Identification of Sensor Dynamics with IFF activated</h3>
<div class="outline-text-3" id="text-4-4">
</div>
<div id="outline-container-orgb129175" class="outline-4">
<h4 id="orgb129175"><span class="section-number-4">4.4.1</span> Signals</h4>
<div class="outline-text-4" id="text-4-4-1">
<p>
A new identification is performed with the resonance damped.
It helps to not induce too much motion at the resonance and damage the actuator.
</p>
<div class="org-src-container">
<pre class="src src-matlab">id_cl = load('./mat/identification_noise_iff_bis.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
</pre>
</div>
</div>
</div>
<div id="outline-container-org16c5098" class="outline-4">
<h4 id="org16c5098"><span class="section-number-4">4.4.2</span> Verification of the achievable damping</h4>
<div class="outline-text-4" id="text-4-4-2">
<div class="org-src-container">
<pre class="src src-matlab">[tf_G_ol_est, f] = tfestimate(id_ol.u, id_ol.d, win, [], [], 1/Ts);
[co_G_ol_est, ~] = mscohere( id_ol.u, id_ol.d, win, [], [], 1/Ts);
[tf_G_cl_est, ~] = tfestimate(id_cl.u, id_cl.d, win, [], [], 1/Ts);
[co_G_cl_est, ~] = mscohere( id_cl.u, id_cl.d, win, [], [], 1/Ts);
</pre>
</div>
<div id="org9566953" class="figure">
<p><img src="figs/Gd_identification_iff_coherence.png" alt="Gd_identification_iff_coherence.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Coherence for the transfer function from F to d, with and without IFF</p>
</div>
<p>
Don&rsquo;t really understand the low frequency behavior.
</p>
<div id="org341e00c" class="figure">
<p><img src="figs/Gd_identification_iff_bode_plot.png" alt="Gd_identification_iff_bode_plot.png" />
</p>
<p><span class="figure-number">Figure 7: </span>Coherence for the transfer function from F to d, with and without IFF</p>
</div>
</div>
</div>
</div>
<div id="outline-container-org7c6b6b8" class="outline-3">
<h3 id="org7c6b6b8"><span class="section-number-3">4.5</span> Generate the excitation signal</h3>
<div class="outline-text-3" id="text-4-5">
</div>
<div id="outline-container-org0a29bfb" class="outline-4">
<h4 id="org0a29bfb"><span class="section-number-4">4.5.1</span> Requirements</h4>
<div class="outline-text-4" id="text-4-5-1">
<p>
The requirements on the excitation signal is:
</p>
<ul class="org-ul">
<li>General much larger motion that the measured motion during the huddle test</li>
<li>Don&rsquo;t damage the actuator</li>
</ul>
<p>
To determine the perfect voltage signal to be generated, we need two things:
</p>
<ul class="org-ul">
<li>the transfer function from voltage to mass displacement</li>
<li>the PSD of the measured motion by the inertial sensors</li>
<li>not saturate the sensor signals</li>
<li>provide enough signal/noise ratio (good coherence) in the frequency band of interest (~0.5Hz to 3kHz)</li>
</ul>
</div>
</div>
<div id="outline-container-org70f432a" class="outline-4">
<h4 id="org70f432a"><span class="section-number-4">4.5.2</span> Transfer function from excitation signal to displacement</h4>
<div class="outline-text-4" id="text-4-5-2">
<p>
Let&rsquo;s first estimate the transfer function from the excitation signal in [V] to the generated displacement in [m] as measured by the inteferometer.
</p>
<div class="org-src-container">
<pre class="src src-matlab">id_cl = load('./mat/identification_noise_iff_bis.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">win = hann(ceil(10/Ts));
[tf_G_cl_est, f] = tfestimate(id_cl.u, id_cl.d, win, [], [], 1/Ts);
[co_G_cl_est, ~] = mscohere( id_cl.u, id_cl.d, win, [], [], 1/Ts);
</pre>
</div>
<p>
Approximate transfer function from voltage output to generated displacement when IFF is used, in [m/V].
</p>
<div class="org-src-container">
<pre class="src src-matlab">G_d_est = -5e-6*(2*pi*230)^2/(s^2 + 2*0.3*2*pi*240*s + (2*pi*240)^2);
</pre>
</div>
<div id="org5d992d5" class="figure">
<p><img src="figs/Gd_plant_estimation.png" alt="Gd_plant_estimation.png" />
</p>
<p><span class="figure-number">Figure 8: </span>Estimation of the transfer function from the excitation signal to the generated displacement</p>
</div>
</div>
</div>
<div id="outline-container-orgb35f216" class="outline-4">
<h4 id="orgb35f216"><span class="section-number-4">4.5.3</span> Motion measured during Huddle test</h4>
<div class="outline-text-4" id="text-4-5-3">
<p>
We now compute the PSD of the measured motion by the inertial sensors during the huddle test.
</p>
<div class="org-src-container">
<pre class="src src-matlab">ht = load('./mat/huddle_test.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[p_d, f] = pwelch(ht.d, win, [], [], 1/Ts);
[p_acc1, ~] = pwelch(ht.acc_1, win, [], [], 1/Ts);
[p_acc2, ~] = pwelch(ht.acc_2, win, [], [], 1/Ts);
[p_geo1, ~] = pwelch(ht.geo_1, win, [], [], 1/Ts);
[p_geo2, ~] = pwelch(ht.geo_2, win, [], [], 1/Ts);
</pre>
</div>
<p>
Using an estimated model of the sensor dynamics from the documentation of the sensors, we can compute the ASD of the motion in \(m/\sqrt{Hz}\) measured by the sensors.
</p>
<div class="org-src-container">
<pre class="src src-matlab">G_acc = 1/(1 + s/2/pi/2500); % [V/(m/s2)]
G_geo = -120*s^2/(s^2 + 2*0.7*2*pi*2*s + (2*pi*2)^2); % [V/(m/s)]
</pre>
</div>
<div id="org8dac243" class="figure">
<p><img src="figs/huddle_test_psd_motion.png" alt="huddle_test_psd_motion.png" />
</p>
<p><span class="figure-number">Figure 9: </span>ASD of the motion measured by the sensors</p>
</div>
<p>
From the ASD of the motion measured by the sensors, we can create an excitation signal that will generate much motion motion that the motion under no excitation.
</p>
<p>
We create <code>G_exc</code> that corresponds to the wanted generated motion.
</p>
<div class="org-src-container">
<pre class="src src-matlab">G_exc = 0.2e-6/(1 + s/2/pi/2)/(1 + s/2/pi/50);
</pre>
</div>
<p>
And we create a time domain signal <code>y_d</code> that have the spectral density described by <code>G_exc</code>.
</p>
<div class="org-src-container">
<pre class="src src-matlab">Fs = 1/Ts;
t = 0:Ts:180; % Time Vector [s]
u = sqrt(Fs/2)*randn(length(t), 1); % Signal with an ASD equal to one
y_d = lsim(G_exc, u, t);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[pxx, ~] = pwelch(y_d, win, 0, [], Fs);
</pre>
</div>
<div id="orgc88e114" class="figure">
<p><img src="figs/comp_huddle_test_excited_motion_psd.png" alt="comp_huddle_test_excited_motion_psd.png" />
</p>
<p><span class="figure-number">Figure 10: </span>Comparison of the ASD of the motion during Huddle and the wanted generated motion</p>
</div>
<p>
We can now generate the voltage signal that will generate the wanted motion.
</p>
<div class="org-src-container">
<pre class="src src-matlab">y_v = lsim(G_exc * ... % from unit PSD to shaped PSD
(1 + s/2/pi/50) * ... % Inverse of pre-filter included in the Simulink file
1/G_d_est * ... % Wanted displacement =&gt; required voltage
1/(1 + s/2/pi/5e3), ... % Add some high frequency filtering
u, t);
</pre>
</div>
<div id="org6993d4b" class="figure">
<p><img src="figs/optimal_exc_signal_time.png" alt="optimal_exc_signal_time.png" />
</p>
<p><span class="figure-number">Figure 11: </span>Generated excitation signal</p>
</div>
</div>
</div>
</div>
<div id="outline-container-org5b6add7" class="outline-3">
<h3 id="org5b6add7"><span class="section-number-3">4.6</span> Identification of the Inertial Sensors Dynamics</h3>
<div class="outline-text-3" id="text-4-6">
</div>
<div id="outline-container-org00b0fdd" class="outline-4">
<h4 id="org00b0fdd"><span class="section-number-4">4.6.1</span> Load Data</h4>
<div class="outline-text-4" id="text-4-6-1">
<div class="org-src-container">
<pre class="src src-matlab">id = load('./mat/identification_noise_opt_iff.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
ht = load('./mat/huddle_test.mat', 'd', 'acc_1', 'acc_2', 'geo_1', 'geo_2', 'f_meas', 'u', 't');
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">ht.d = detrend(ht.d, 0);
ht.acc_1 = detrend(ht.acc_1, 0);
ht.acc_2 = detrend(ht.acc_2, 0);
ht.geo_1 = detrend(ht.geo_1, 0);
ht.geo_2 = detrend(ht.geo_2, 0);
ht.f_meas = detrend(ht.f_meas, 0);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">id.d = detrend(id.d, 0);
id.acc_1 = detrend(id.acc_1, 0);
id.acc_2 = detrend(id.acc_2, 0);
id.geo_1 = detrend(id.geo_1, 0);
id.geo_2 = detrend(id.geo_2, 0);
id.f_meas = detrend(id.f_meas, 0);
</pre>
</div>
</div>
</div>
<div id="outline-container-org7eb216e" class="outline-4">
<h4 id="org7eb216e"><span class="section-number-4">4.6.2</span> Compare PSD during Huddle and and during identification</h4>
<div class="outline-text-4" id="text-4-6-2">
<div class="org-src-container">
<pre class="src src-matlab">Ts = ht.t(2) - ht.t(1);
win = hann(ceil(10/Ts));
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[p_id_d, f] = pwelch(id.d, win, [], [], 1/Ts);
[p_id_acc1, ~] = pwelch(id.acc_1, win, [], [], 1/Ts);
[p_id_acc2, ~] = pwelch(id.acc_2, win, [], [], 1/Ts);
[p_id_geo1, ~] = pwelch(id.geo_1, win, [], [], 1/Ts);
[p_id_geo2, ~] = pwelch(id.geo_2, win, [], [], 1/Ts);
[p_id_fmeas, ~] = pwelch(id.f_meas, win, [], [], 1/Ts);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[p_ht_d, ~] = pwelch(ht.d, win, [], [], 1/Ts);
[p_ht_acc1, ~] = pwelch(ht.acc_1, win, [], [], 1/Ts);
[p_ht_acc2, ~] = pwelch(ht.acc_2, win, [], [], 1/Ts);
[p_ht_geo1, ~] = pwelch(ht.geo_1, win, [], [], 1/Ts);
[p_ht_geo2, ~] = pwelch(ht.geo_2, win, [], [], 1/Ts);
[p_ht_fmeas, ~] = pwelch(ht.f_meas, win, [], [], 1/Ts);
</pre>
</div>
<div id="orgc6b8899" class="figure">
<p><img src="figs/comp_psd_huddle_test_identification.png" alt="comp_psd_huddle_test_identification.png" />
</p>
<p><span class="figure-number">Figure 12: </span>Comparison of the PSD of the measured motion during the Huddle test and during the identification</p>
</div>
</div>
</div>
<div id="outline-container-org9e50b3e" class="outline-4">
<h4 id="org9e50b3e"><span class="section-number-4">4.6.3</span> Compute transfer functions</h4>
<div class="outline-text-4" id="text-4-6-3">
<div class="org-src-container">
<pre class="src src-matlab">[tf_acc1_est, f] = tfestimate(id.d, id.acc_1, win, [], [], 1/Ts);
[co_acc1_est, ~] = mscohere( id.d, id.acc_1, win, [], [], 1/Ts);
[tf_acc2_est, ~] = tfestimate(id.d, id.acc_2, win, [], [], 1/Ts);
[co_acc2_est, ~] = mscohere( id.d, id.acc_2, win, [], [], 1/Ts);
[tf_geo1_est, ~] = tfestimate(id.d, id.geo_1, win, [], [], 1/Ts);
[co_geo1_est, ~] = mscohere( id.d, id.geo_1, win, [], [], 1/Ts);
[tf_geo2_est, ~] = tfestimate(id.d, id.geo_2, win, [], [], 1/Ts);
[co_geo2_est, ~] = mscohere( id.d, id.geo_2, win, [], [], 1/Ts);
</pre>
</div>
<div id="org717ec64" class="figure">
<p><img src="figs/id_sensor_dynamics_coherence.png" alt="id_sensor_dynamics_coherence.png" />
</p>
<p><span class="figure-number">Figure 13: </span>Coherence for the estimation of the sensor dynamics</p>
</div>
<p>
Model of the inertial sensors:
</p>
<div class="org-src-container">
<pre class="src src-matlab">G_acc = 1/(1 + s/2/pi/2500); % [V/(m/s2)]
G_geo = -1200*s^2/(s^2 + 2*0.7*2*pi*2*s + (2*pi*2)^2); % [[V/(m/s)]
</pre>
</div>
<div id="org1eddb61" class="figure">
<p><img src="figs/id_sensor_dynamics_accelerometers.png" alt="id_sensor_dynamics_accelerometers.png" />
</p>
<p><span class="figure-number">Figure 14: </span>Identified dynamics of the accelerometers</p>
</div>
<div id="org5b7e09e" class="figure">
<p><img src="figs/id_sensor_dynamics_geophones.png" alt="id_sensor_dynamics_geophones.png" />
</p>
<p><span class="figure-number">Figure 15: </span>Identified dynamics of the geophones</p>
</div>
</div>
</div>
</div>
<div id="outline-container-org12ea408" class="outline-3">
<h3 id="org12ea408"><span class="section-number-3">4.7</span> Compare Time domain Estimation of the displacement</h3>
<div class="outline-text-3" id="text-4-7">
<p>
Let&rsquo;s compare the measured accelerations instead of displacement (no integration).
</p>
<div class="org-src-container">
<pre class="src src-matlab">G_lpf = 1/(1 + s/2/pi/5e3);
acc1_a = lsim(1/G_acc*G_lpf, id.acc_1, id.t);
acc2_a = lsim(1/G_acc*G_lpf, id.acc_2, id.t);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">geo1_a = lsim(1/G_geo*s*G_lpf, id.geo_1, id.t);
geo2_a = lsim(1/G_geo*s*G_lpf, id.geo_2, id.t);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">int_a = lsim(s^2*G_lpf*G_lpf, id.d, id.t);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">figure;
hold on;
plot(id.t, int_a);
plot(id.t, acc1_a);
plot(id.t, acc2_a);
plot(id.t, geo1_a);
plot(id.t, geo2_a);
hold off;
xlabel('Time [s]'); ylabel('Acceleration [m]');
</pre>
</div>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2020-09-09 mer. 20:38</p>
</div>
</body>
</html>