test-bench-apa/index.html

452 lines
20 KiB
HTML
Raw Normal View History

2020-07-17 11:56:08 +02:00
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
2020-11-12 10:36:40 +01:00
<!-- 2020-11-12 jeu. 09:50 -->
2020-07-17 11:56:08 +02:00
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
2020-07-20 12:55:13 +02:00
<title>Test Bench APA95ML</title>
2020-07-17 11:56:08 +02:00
<meta name="generator" content="Org mode" />
<meta name="author" content="Dehaeze Thomas" />
2020-11-12 10:36:40 +01:00
<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>
2020-07-17 11:56:08 +02:00
</head>
<body>
<div id="org-div-home-and-up">
<a accesskey="h" href="../index.html"> UP </a>
|
<a accesskey="H" href="../index.html"> HOME </a>
</div><div id="content">
2020-07-20 12:55:13 +02:00
<h1 class="title">Test Bench APA95ML</h1>
2020-07-17 11:56:08 +02:00
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
2020-11-12 10:36:40 +01:00
<li><a href="#orgad16569">1. Huddle Test</a>
2020-07-20 11:27:55 +02:00
<ul>
2020-11-12 10:36:40 +01:00
<li><a href="#orgb19f340">1.1. Time Domain Data</a></li>
<li><a href="#org2899ef6">1.2. PSD of Measurement Noise</a></li>
2020-07-20 11:27:55 +02:00
</ul>
</li>
2020-11-12 10:36:40 +01:00
<li><a href="#org3e5f64b">2. Identification of the dynamics from actuator to displacement</a>
2020-07-20 11:27:55 +02:00
<ul>
2020-11-12 10:36:40 +01:00
<li><a href="#org31a2faa">2.1. Load Data</a></li>
<li><a href="#org11eaa6a">2.2. Comparison of the PSD with Huddle Test</a></li>
<li><a href="#org341d0d1">2.3. Compute TF estimate and Coherence</a></li>
<li><a href="#org74d8741">2.4. Comparison with the FEM model</a></li>
2020-07-20 11:27:55 +02:00
</ul>
</li>
2020-11-12 10:36:40 +01:00
<li><a href="#orgd1c03bf">3. Identification of the dynamics from actuator to force sensor</a>
2020-07-20 11:27:55 +02:00
<ul>
2020-11-12 10:36:40 +01:00
<li><a href="#org7a3c2eb">3.1. System Identification</a></li>
<li><a href="#org9b871e7">3.2. Integral Force Feedback</a></li>
2020-07-20 11:27:55 +02:00
</ul>
</li>
2020-11-12 10:36:40 +01:00
<li><a href="#orgfc2a4ed">4. Integral Force Feedback</a>
2020-07-20 11:27:55 +02:00
<ul>
2020-11-12 10:36:40 +01:00
<li><a href="#orgd017d15">4.1. First tests with few gains</a></li>
<li><a href="#org863493b">4.2. Second test with many Gains</a></li>
2020-07-20 11:27:55 +02:00
</ul>
</li>
2020-07-17 11:56:08 +02:00
</ul>
</div>
</div>
2020-07-20 13:17:34 +02:00
2020-11-12 10:36:40 +01:00
<div id="orgc83aff0" class="figure">
2020-07-20 13:17:34 +02:00
<p><img src="figs/setup_picture.png" alt="setup_picture.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Picture of the Setup</p>
</div>
2020-11-12 10:36:40 +01:00
<div id="orgc088b40" class="figure">
2020-07-20 13:17:34 +02:00
<p><img src="figs/setup_zoom.png" alt="setup_zoom.png" />
</p>
<p><span class="figure-number">Figure 2: </span>Zoom on the APA</p>
</div>
2020-11-12 10:36:40 +01:00
<div id="outline-container-orgad16569" class="outline-2">
<h2 id="orgad16569"><span class="section-number-2">1</span> Huddle Test</h2>
2020-07-17 11:56:08 +02:00
<div class="outline-text-2" id="text-1">
<p>
2020-11-12 10:36:40 +01:00
<a id="org323bc97"></a>
</p>
2020-07-20 11:27:55 +02:00
</div>
2020-11-12 10:36:40 +01:00
<div id="outline-container-orgb19f340" class="outline-3">
<h3 id="orgb19f340"><span class="section-number-3">1.1</span> Time Domain Data</h3>
2020-07-20 11:27:55 +02:00
<div class="outline-text-3" id="text-1-1">
2020-07-17 11:56:08 +02:00
2020-11-12 10:36:40 +01:00
<div id="orgb70cce7" class="figure">
2020-07-20 11:27:55 +02:00
<p><img src="figs/huddle_test_time_domain.png" alt="huddle_test_time_domain.png" />
</p>
2020-07-20 13:17:34 +02:00
<p><span class="figure-number">Figure 3: </span>Measurement of the Mass displacement during Huddle Test</p>
2020-07-17 11:56:08 +02:00
</div>
</div>
</div>
2020-11-12 10:36:40 +01:00
<div id="outline-container-org2899ef6" class="outline-3">
<h3 id="org2899ef6"><span class="section-number-3">1.2</span> PSD of Measurement Noise</h3>
<div class="outline-text-3" id="text-1-2">
2020-07-17 11:56:08 +02:00
<div class="org-src-container">
2020-11-03 10:11:21 +01:00
<pre class="src src-matlab">Ts = t(end)<span class="org-type">/</span>(length(t)<span class="org-type">-</span>1);
Fs = 1<span class="org-type">/</span>Ts;
2020-07-20 11:27:55 +02:00
2020-11-03 10:11:21 +01:00
win = hanning(ceil(1<span class="org-type">*</span>Fs));
2020-07-20 11:27:55 +02:00
</pre>
</div>
2020-07-17 11:56:08 +02:00
2020-07-20 11:27:55 +02:00
<div class="org-src-container">
2020-11-03 10:11:21 +01:00
<pre class="src src-matlab">[pxx, f] = pwelch(y(1000<span class="org-type">:</span>end), win, [], [], Fs);
2020-07-17 11:56:08 +02:00
</pre>
</div>
2020-07-20 11:27:55 +02:00
2020-11-12 10:36:40 +01:00
<div id="orgf47fe49" class="figure">
2020-07-20 11:27:55 +02:00
<p><img src="figs/huddle_test_pdf.png" alt="huddle_test_pdf.png" />
</p>
2020-07-20 13:17:34 +02:00
<p><span class="figure-number">Figure 4: </span>Amplitude Spectral Density of the Displacement during Huddle Test</p>
2020-07-20 11:27:55 +02:00
</div>
</div>
</div>
</div>
2020-11-12 10:36:40 +01:00
<div id="outline-container-org3e5f64b" class="outline-2">
<h2 id="org3e5f64b"><span class="section-number-2">2</span> Identification of the dynamics from actuator to displacement</h2>
<div class="outline-text-2" id="text-2">
<p>
2020-11-12 10:36:40 +01:00
<a id="org71bfc39"></a>
</p>
2020-08-20 23:08:38 +02:00
</div>
2020-11-12 10:36:40 +01:00
<div id="outline-container-org31a2faa" class="outline-3">
<h3 id="org31a2faa"><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(<span class="org-string">'huddle_test.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'u'</span>, <span class="org-string">'y'</span>);
load(<span class="org-string">'apa95ml_5kg_Amp_E505.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'u'</span>, <span class="org-string">'um'</span>, <span class="org-string">'y'</span>);
2020-08-20 23:08:38 +02:00
</pre>
</div>
<div class="org-src-container">
2020-11-03 10:11:21 +01:00
<pre class="src src-matlab">u = 10<span class="org-type">*</span>(u <span class="org-type">-</span> mean(u)); <span class="org-comment">% Input Voltage of Piezo [V]</span>
um = 10<span class="org-type">*</span>(um <span class="org-type">-</span> mean(um)); <span class="org-comment">% Monitor [V]</span>
y = y <span class="org-type">-</span> mean(y); <span class="org-comment">% Mass displacement [m]</span>
2020-08-20 23:08:38 +02:00
2020-11-03 10:11:21 +01:00
ht.u = 10<span class="org-type">*</span>(ht.u <span class="org-type">-</span> mean(ht.u));
ht.y = ht.y <span class="org-type">-</span> mean(ht.y);
2020-08-20 23:08:38 +02:00
</pre>
</div>
</div>
</div>
2020-11-12 10:36:40 +01:00
<div id="outline-container-org11eaa6a" class="outline-3">
<h3 id="org11eaa6a"><span class="section-number-3">2.2</span> Comparison of the PSD with Huddle Test</h3>
<div class="outline-text-3" id="text-2-2">
2020-08-20 23:08:38 +02:00
<div class="org-src-container">
2020-11-03 10:11:21 +01:00
<pre class="src src-matlab">Ts = t(end)<span class="org-type">/</span>(length(t)<span class="org-type">-</span>1);
Fs = 1<span class="org-type">/</span>Ts;
2020-11-03 10:11:21 +01:00
win = hanning(ceil(1<span class="org-type">*</span>Fs));
2020-07-24 11:34:18 +02:00
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">[pxx, f] = pwelch(y, win, [], [], Fs);
2020-11-03 10:11:21 +01:00
[pht, <span class="org-type">~</span>] = pwelch(ht.y, win, [], [], Fs);
</pre>
</div>
2020-07-24 11:34:18 +02:00
2020-11-12 10:36:40 +01:00
<div id="org5cce219" class="figure">
<p><img src="figs/apa95ml_5kg_PI_pdf_comp_huddle.png" alt="apa95ml_5kg_PI_pdf_comp_huddle.png" />
2020-07-24 11:34:18 +02:00
</p>
2020-11-12 09:18:40 +01:00
<p><span class="figure-number">Figure 5: </span>Comparison of the ASD for the identification test and the huddle test</p>
</div>
</div>
</div>
2020-07-24 11:34:18 +02:00
2020-11-12 10:36:40 +01:00
<div id="outline-container-org341d0d1" class="outline-3">
<h3 id="org341d0d1"><span class="section-number-3">2.3</span> Compute TF estimate and Coherence</h3>
<div class="outline-text-3" id="text-2-3">
2020-07-24 11:34:18 +02:00
<div class="org-src-container">
2020-11-03 10:11:21 +01:00
<pre class="src src-matlab">Ts = t(end)<span class="org-type">/</span>(length(t)<span class="org-type">-</span>1);
Fs = 1<span class="org-type">/</span>Ts;
</pre>
</div>
2020-07-24 11:34:18 +02:00
<div class="org-src-container">
2020-11-03 10:11:21 +01:00
<pre class="src src-matlab">win = hann(ceil(1<span class="org-type">/</span>Ts));
2020-11-03 10:11:21 +01:00
[tf_est, f] = tfestimate(u, <span class="org-type">-</span>y, win, [], [], 1<span class="org-type">/</span>Ts);
[tf_um , <span class="org-type">~</span>] = tfestimate(um, <span class="org-type">-</span>y, win, [], [], 1<span class="org-type">/</span>Ts);
[co_est, <span class="org-type">~</span>] = mscohere( um, <span class="org-type">-</span>y, win, [], [], 1<span class="org-type">/</span>Ts);
2020-07-24 11:34:18 +02:00
</pre>
</div>
2020-11-12 10:36:40 +01:00
<div id="orgdf9fef1" class="figure">
<p><img src="figs/apa95ml_5kg_PI_coh.png" alt="apa95ml_5kg_PI_coh.png" />
2020-07-24 11:34:18 +02:00
</p>
2020-11-12 09:18:40 +01:00
<p><span class="figure-number">Figure 6: </span>Coherence</p>
2020-07-24 11:34:18 +02:00
</div>
2020-11-12 10:36:40 +01:00
<div id="org683c6bc" class="figure">
<p><img src="figs/apa95ml_5kg_PI_tf.png" alt="apa95ml_5kg_PI_tf.png" />
2020-07-24 11:34:18 +02:00
</p>
2020-11-12 09:18:40 +01:00
<p><span class="figure-number">Figure 7: </span>Estimation of the transfer function from input voltage to displacement</p>
</div>
</div>
2020-07-24 11:34:18 +02:00
</div>
2020-07-24 13:06:02 +02:00
2020-11-12 10:36:40 +01:00
<div id="outline-container-org74d8741" class="outline-3">
<h3 id="org74d8741"><span class="section-number-3">2.4</span> Comparison with the FEM model</h3>
<div class="outline-text-3" id="text-2-4">
2020-07-24 13:06:02 +02:00
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'fem_model_5kg.mat'</span>, <span class="org-string">'G'</span>);
2020-07-24 13:06:02 +02:00
</pre>
</div>
2020-11-12 10:36:40 +01:00
<div id="org11f0001" class="figure">
<p><img src="figs/apa95ml_5kg_pi_comp_fem.png" alt="apa95ml_5kg_pi_comp_fem.png" />
</p>
2020-11-12 09:18:40 +01:00
<p><span class="figure-number">Figure 8: </span>Comparison of the identified transfer function and the one estimated from the FE model</p>
2020-07-24 11:34:18 +02:00
</div>
</div>
</div>
</div>
2020-08-20 23:08:38 +02:00
2020-11-12 10:36:40 +01:00
<div id="outline-container-orgd1c03bf" class="outline-2">
<h2 id="orgd1c03bf"><span class="section-number-2">3</span> Identification of the dynamics from actuator to force sensor</h2>
<div class="outline-text-2" id="text-3">
<p>
2020-11-12 10:36:40 +01:00
<a id="orge7252db"></a>
</p>
2020-08-20 23:08:38 +02:00
<p>
Two measurements are performed:
</p>
<ul class="org-ul">
<li>Speedgoat DAC =&gt; Voltage Amplifier (x20) =&gt; 1 Piezo Stack =&gt; &#x2026; =&gt; 2 Stacks as Force Sensor (parallel) =&gt; Speedgoat ADC</li>
<li>Speedgoat DAC =&gt; Voltage Amplifier (x20) =&gt; 2 Piezo Stacks (parallel) =&gt; &#x2026; =&gt; 1 Stack as Force Sensor =&gt; Speedgoat ADC</li>
</ul>
<p>
The obtained dynamics from force actuator to force sensor are compare with the FEM model.
</p>
<p>
The data are loaded:
</p>
2020-07-24 11:34:18 +02:00
<div class="org-src-container">
<pre class="src src-matlab">a_ss = load(<span class="org-string">'apa95ml_5kg_1a_2s.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'u'</span>, <span class="org-string">'y'</span>, <span class="org-string">'v'</span>);
aa_s = load(<span class="org-string">'apa95ml_5kg_2a_1s.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'u'</span>, <span class="org-string">'y'</span>, <span class="org-string">'v'</span>);
load(<span class="org-string">'G_force_sensor_5kg.mat'</span>, <span class="org-string">'G'</span>);
</pre>
</div>
<p>
2020-08-20 23:08:38 +02:00
Let&rsquo;s use the amplifier gain to obtain the true voltage applied to the actuator stack(s)
</p>
<p>
2020-08-20 23:08:38 +02:00
The parameters of the piezoelectric stacks are defined below:
</p>
2020-08-20 23:08:38 +02:00
<div class="org-src-container">
2020-11-03 10:11:21 +01:00
<pre class="src src-matlab">d33 = 3e<span class="org-type">-</span>10; <span class="org-comment">% Strain constant [m/V]</span>
n = 80; <span class="org-comment">% Number of layers per stack</span>
eT = 1.6e<span class="org-type">-</span>8; <span class="org-comment">% Permittivity under constant stress [F/m]</span>
sD = 2e<span class="org-type">-</span>11; <span class="org-comment">% Elastic compliance under constant electric displacement [m2/N]</span>
ka = 235e6; <span class="org-comment">% Stack stiffness [N/m]</span>
2020-08-20 23:08:38 +02:00
</pre>
</div>
<p>
2020-08-20 23:08:38 +02:00
From the FEM, we construct the transfer function from DAC voltage to ADC voltage.
</p>
<div class="org-src-container">
2020-11-03 10:11:21 +01:00
<pre class="src src-matlab">Gfem_aa_s = exp(<span class="org-type">-</span>s<span class="org-type">/</span>1e4)<span class="org-type">*</span>20<span class="org-type">*</span>(2<span class="org-type">*</span>d33<span class="org-type">*</span>n<span class="org-type">*</span>ka)<span class="org-type">*</span>(G(3,1)<span class="org-type">+</span>G(3,2))<span class="org-type">*</span>d33<span class="org-type">/</span>(eT<span class="org-type">*</span>sD<span class="org-type">*</span>n);
Gfem_a_ss = exp(<span class="org-type">-</span>s<span class="org-type">/</span>1e4)<span class="org-type">*</span>20<span class="org-type">*</span>( d33<span class="org-type">*</span>n<span class="org-type">*</span>ka)<span class="org-type">*</span>(G(3,1)<span class="org-type">+</span>G(2,1))<span class="org-type">*</span>d33<span class="org-type">/</span>(eT<span class="org-type">*</span>sD<span class="org-type">*</span>n);
2020-08-20 23:08:38 +02:00
</pre>
</div>
<p>
2020-11-12 10:36:40 +01:00
The transfer function from input voltage to output voltage are computed and shown in Figure <a href="#org044fb48">9</a>.
2020-08-20 23:08:38 +02:00
</p>
<div class="org-src-container">
2020-11-03 10:11:21 +01:00
<pre class="src src-matlab">Ts = a_ss.t(end)<span class="org-type">/</span>(length(a_ss.t)<span class="org-type">-</span>1);
Fs = 1<span class="org-type">/</span>Ts;
2020-11-03 10:11:21 +01:00
win = hann(ceil(10<span class="org-type">/</span>Ts));
2020-08-20 23:08:38 +02:00
2020-11-03 10:11:21 +01:00
[tf_a_ss, f] = tfestimate(a_ss.u, a_ss.v, win, [], [], 1<span class="org-type">/</span>Ts);
[coh_a_ss, <span class="org-type">~</span>] = mscohere( a_ss.u, a_ss.v, win, [], [], 1<span class="org-type">/</span>Ts);
2020-08-20 23:08:38 +02:00
2020-11-03 10:11:21 +01:00
[tf_aa_s, f] = tfestimate(aa_s.u, aa_s.v, win, [], [], 1<span class="org-type">/</span>Ts);
[coh_aa_s, <span class="org-type">~</span>] = mscohere( aa_s.u, aa_s.v, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
</div>
2020-11-12 10:36:40 +01:00
<div id="org044fb48" class="figure">
2020-08-20 23:08:38 +02:00
<p><img src="figs/bode_plot_force_sensor_voltage_comp_fem.png" alt="bode_plot_force_sensor_voltage_comp_fem.png" />
</p>
2020-11-12 09:18:40 +01:00
<p><span class="figure-number">Figure 9: </span>Comparison of the identified dynamics from voltage output to voltage input and the FEM</p>
2020-08-20 23:08:38 +02:00
</div>
</div>
2020-11-12 10:36:40 +01:00
<div id="outline-container-org7a3c2eb" class="outline-3">
<h3 id="org7a3c2eb"><span class="section-number-3">3.1</span> System Identification</h3>
<div class="outline-text-3" id="text-3-1">
2020-08-20 23:08:38 +02:00
<div class="org-src-container">
2020-11-03 10:11:21 +01:00
<pre class="src src-matlab">w_z = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>111; <span class="org-comment">% Zeros frequency [rad/s]</span>
w_p = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>255; <span class="org-comment">% Pole frequency [rad/s]</span>
2020-08-20 23:08:38 +02:00
xi_z = 0.05;
xi_p = 0.015;
G_inf = 2;
2020-11-03 10:11:21 +01:00
Gi = G_inf<span class="org-type">*</span>(s<span class="org-type">^</span>2 <span class="org-type">-</span> 2<span class="org-type">*</span>xi_z<span class="org-type">*</span>w_z<span class="org-type">*</span>s <span class="org-type">+</span> w_z<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_p<span class="org-type">*</span>w_p<span class="org-type">*</span>s <span class="org-type">+</span> w_p<span class="org-type">^</span>2);
2020-08-20 23:08:38 +02:00
</pre>
</div>
2020-11-12 10:36:40 +01:00
<div id="org2c26a21" class="figure">
2020-08-20 23:08:38 +02:00
<p><img src="figs/iff_plant_identification_apa95ml.png" alt="iff_plant_identification_apa95ml.png" />
</p>
2020-11-12 09:18:40 +01:00
<p><span class="figure-number">Figure 10: </span>Identification of the IFF plant</p>
2020-08-20 23:08:38 +02:00
</div>
</div>
</div>
2020-08-20 23:08:38 +02:00
2020-11-12 10:36:40 +01:00
<div id="outline-container-org9b871e7" class="outline-3">
<h3 id="org9b871e7"><span class="section-number-3">3.2</span> Integral Force Feedback</h3>
<div class="outline-text-3" id="text-3-2">
2020-08-20 23:08:38 +02:00
2020-11-12 10:36:40 +01:00
<div id="orgf1840c0" class="figure">
2020-08-20 23:08:38 +02:00
<p><img src="figs/root_locus_iff_apa95ml_identification.png" alt="root_locus_iff_apa95ml_identification.png" />
</p>
2020-11-12 09:18:40 +01:00
<p><span class="figure-number">Figure 11: </span>Root Locus for IFF</p>
2020-08-20 23:08:38 +02:00
</div>
</div>
</div>
</div>
2020-11-12 10:36:40 +01:00
<div id="outline-container-orgfc2a4ed" class="outline-2">
<h2 id="orgfc2a4ed"><span class="section-number-2">4</span> Integral Force Feedback</h2>
<div class="outline-text-2" id="text-4">
<p>
2020-11-12 10:36:40 +01:00
<a id="org4a62205"></a>
</p>
2020-08-20 23:08:38 +02:00
</div>
2020-11-12 10:36:40 +01:00
<div id="outline-container-orgd017d15" class="outline-3">
<h3 id="orgd017d15"><span class="section-number-3">4.1</span> First tests with few gains</h3>
<div class="outline-text-3" id="text-4-1">
<div class="org-src-container">
<pre class="src src-matlab">iff_g10 = load(<span class="org-string">'apa95ml_iff_g10_res.mat'</span>, <span class="org-string">'u'</span>, <span class="org-string">'t'</span>, <span class="org-string">'y'</span>, <span class="org-string">'v'</span>);
iff_g100 = load(<span class="org-string">'apa95ml_iff_g100_res.mat'</span>, <span class="org-string">'u'</span>, <span class="org-string">'t'</span>, <span class="org-string">'y'</span>, <span class="org-string">'v'</span>);
iff_of = load(<span class="org-string">'apa95ml_iff_off_res.mat'</span>, <span class="org-string">'u'</span>, <span class="org-string">'t'</span>, <span class="org-string">'y'</span>, <span class="org-string">'v'</span>);
</pre>
</div>
2020-08-20 23:08:38 +02:00
<div class="org-src-container">
2020-11-03 10:11:21 +01:00
<pre class="src src-matlab">Ts = 1e<span class="org-type">-</span>4;
win = hann(ceil(10<span class="org-type">/</span>Ts));
2020-08-20 23:08:38 +02:00
2020-11-03 10:11:21 +01:00
[tf_iff_g10, f] = tfestimate(iff_g10.u, iff_g10.y, win, [], [], 1<span class="org-type">/</span>Ts);
[co_iff_g10, <span class="org-type">~</span>] = mscohere(iff_g10.u, iff_g10.y, win, [], [], 1<span class="org-type">/</span>Ts);
2020-08-20 23:08:38 +02:00
2020-11-03 10:11:21 +01:00
[tf_iff_g100, f] = tfestimate(iff_g100.u, iff_g100.y, win, [], [], 1<span class="org-type">/</span>Ts);
[co_iff_g100, <span class="org-type">~</span>] = mscohere(iff_g100.u, iff_g100.y, win, [], [], 1<span class="org-type">/</span>Ts);
2020-08-20 23:08:38 +02:00
2020-11-03 10:11:21 +01:00
[tf_iff_of, <span class="org-type">~</span>] = tfestimate(iff_of.u, iff_of.y, win, [], [], 1<span class="org-type">/</span>Ts);
[co_iff_of, <span class="org-type">~</span>] = mscohere(iff_of.u, iff_of.y, win, [], [], 1<span class="org-type">/</span>Ts);
</pre>
2020-08-20 23:08:38 +02:00
</div>
2020-07-24 15:48:22 +02:00
2020-08-21 15:26:45 +02:00
2020-11-12 10:36:40 +01:00
<div id="orge3b0697" class="figure">
2020-08-21 15:26:45 +02:00
<p><img src="figs/iff_first_test_coherence.png" alt="iff_first_test_coherence.png" />
</p>
2020-11-12 09:18:40 +01:00
<p><span class="figure-number">Figure 12: </span>Coherence</p>
2020-08-21 15:26:45 +02:00
</div>
2020-11-12 10:36:40 +01:00
<div id="orgd0ae2ae" class="figure">
2020-08-21 15:26:45 +02:00
<p><img src="figs/iff_first_test_bode_plot.png" alt="iff_first_test_bode_plot.png" />
</p>
2020-11-12 09:18:40 +01:00
<p><span class="figure-number">Figure 13: </span>Bode plot for different values of IFF gain</p>
2020-08-21 15:26:45 +02:00
</div>
</div>
</div>
2020-11-12 10:36:40 +01:00
<div id="outline-container-org863493b" class="outline-3">
<h3 id="org863493b"><span class="section-number-3">4.2</span> Second test with many Gains</h3>
<div class="outline-text-3" id="text-4-2">
2020-08-20 23:08:38 +02:00
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'apa95ml_iff_test.mat'</span>, <span class="org-string">'results'</span>);
2020-08-20 23:08:38 +02:00
</pre>
</div>
2020-07-24 15:48:22 +02:00
2020-08-21 15:26:45 +02:00
<div class="org-src-container">
2020-11-03 10:11:21 +01:00
<pre class="src src-matlab">Ts = 1e<span class="org-type">-</span>4;
win = hann(ceil(10<span class="org-type">/</span>Ts));
2020-08-21 15:26:45 +02:00
</pre>
</div>
2020-08-20 23:08:38 +02:00
2020-08-21 15:26:45 +02:00
<div class="org-src-container">
<pre class="src src-matlab">tf_iff = {zeros(1, length(results))};
co_iff = {zeros(1, length(results))};
g_iff = [0, 1, 5, 10, 50, 100];
2020-11-03 10:11:21 +01:00
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span>=<span class="org-constant">1:length(results)</span>
[tf_est, f] = tfestimate(results{<span class="org-constant">i</span>}.u, results{<span class="org-constant">i</span>}.y, win, [], [], 1<span class="org-type">/</span>Ts);
[co_est, <span class="org-type">~</span>] = mscohere(results{<span class="org-constant">i</span>}.u, results{<span class="org-constant">i</span>}.y, win, [], [], 1<span class="org-type">/</span>Ts);
2020-08-21 15:26:45 +02:00
2020-11-03 10:11:21 +01:00
tf_iff(<span class="org-constant">i</span>) = {tf_est};
co_iff(<span class="org-constant">i</span>) = {co_est};
<span class="org-keyword">end</span>
2020-08-21 15:26:45 +02:00
</pre>
2020-08-20 23:08:38 +02:00
</div>
2020-11-12 10:36:40 +01:00
<div id="org3935454" class="figure">
2020-08-21 15:26:45 +02:00
<p><img src="figs/iff_results_bode_plots.png" alt="iff_results_bode_plots.png" />
</p>
</div>
2020-08-20 23:08:38 +02:00
<div class="org-src-container">
2020-08-21 15:26:45 +02:00
<pre class="src src-matlab">G_id = {zeros(1,length(results))};
2020-11-03 10:11:21 +01:00
f_start = 70; <span class="org-comment">% [Hz]</span>
f_end = 500; <span class="org-comment">% [Hz]</span>
2020-08-21 15:26:45 +02:00
2020-11-03 10:11:21 +01:00
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(results)</span>
tf_id = tf_iff{<span class="org-constant">i</span>}(sum(f<span class="org-type">&lt;</span>f_start)<span class="org-type">:</span>length(f)<span class="org-type">-</span>sum(f<span class="org-type">&gt;</span>f_end));
f_id = f(sum(f<span class="org-type">&lt;</span>f_start)<span class="org-type">:</span>length(f)<span class="org-type">-</span>sum(f<span class="org-type">&gt;</span>f_end));
2020-08-21 15:26:45 +02:00
2020-11-03 10:11:21 +01:00
gfr = idfrd(tf_id, 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>f_id, Ts);
G_id(<span class="org-constant">i</span>) = {procest(gfr,<span class="org-string">'P2UDZ'</span>)};
<span class="org-keyword">end</span>
2020-08-20 23:08:38 +02:00
</pre>
</div>
2020-11-12 10:36:40 +01:00
<div id="org549cbcc" class="figure">
2020-08-21 15:26:45 +02:00
<p><img src="figs/iff_results_bode_plots_identification.png" alt="iff_results_bode_plots_identification.png" />
</p>
</div>
2020-11-12 10:36:40 +01:00
<div id="orga00988a" class="figure">
2020-08-21 15:26:45 +02:00
<p><img src="figs/iff_results_root_locus.png" alt="iff_results_root_locus.png" />
2020-08-20 23:08:38 +02:00
</p>
</div>
</div>
</div>
</div>
2020-07-17 11:56:08 +02:00
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
2020-11-12 10:36:40 +01:00
<p class="date">Created: 2020-11-12 jeu. 09:50</p>
2020-07-17 11:56:08 +02:00
</div>
</body>
</html>