Update figure adding the voltage monitor
This commit is contained in:
parent
a4046ed618
commit
b6ad126460
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 40 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 116 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 106 KiB |
308
index.html
308
index.html
@ -3,7 +3,7 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- 2020-07-24 ven. 13:06 -->
|
<!-- 2020-07-24 ven. 13:16 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<title>Test Bench APA95ML</title>
|
<title>Test Bench APA95ML</title>
|
||||||
<meta name="generator" content="Org mode" />
|
<meta name="generator" content="Org mode" />
|
||||||
@ -15,14 +15,6 @@
|
|||||||
<script type="text/javascript" src="./js/bootstrap.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/jquery.stickytableheaders.min.js"></script>
|
||||||
<script type="text/javascript" src="./js/readtheorg.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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="org-div-home-and-up">
|
<div id="org-div-home-and-up">
|
||||||
@ -35,42 +27,42 @@
|
|||||||
<h2>Table of Contents</h2>
|
<h2>Table of Contents</h2>
|
||||||
<div id="text-table-of-contents">
|
<div id="text-table-of-contents">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org2723d81">1. Setup</a>
|
<li><a href="#org9f7598b">1. Setup</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#orgfd55c36">1.1. Parameters</a></li>
|
<li><a href="#org7edfb65">1.1. Parameters</a></li>
|
||||||
<li><a href="#org292fe55">1.2. Filter White Noise</a></li>
|
<li><a href="#orgdac636f">1.2. Filter White Noise</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#orge27b441">2. Run Experiment and Save Data</a>
|
<li><a href="#org756b658">2. Run Experiment and Save Data</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#orgba39bc1">2.1. Load Data</a></li>
|
<li><a href="#org14764c7">2.1. Load Data</a></li>
|
||||||
<li><a href="#orga7db326">2.2. Save Data</a></li>
|
<li><a href="#org1b77b38">2.2. Save Data</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#orgca23311">3. Huddle Test</a>
|
<li><a href="#org28cccdb">3. Huddle Test</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org28c4ff9">3.1. Time Domain Data</a></li>
|
<li><a href="#org305cdf5">3.1. Time Domain Data</a></li>
|
||||||
<li><a href="#org61d66e9">3.2. PSD of Measurement Noise</a></li>
|
<li><a href="#orga153e30">3.2. PSD of Measurement Noise</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#orgd62d5d5">4. Transfer Function Estimation with \(m=5kg\)</a>
|
<li><a href="#orgfa9bec6">4. Transfer Function Estimation using the DAC as the driver</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#orgd195c16">4.1. Time Domain Data</a></li>
|
<li><a href="#org99e40a8">4.1. Time Domain Data</a></li>
|
||||||
<li><a href="#org008a2d9">4.2. Comparison of the PSD with Huddle Test</a></li>
|
<li><a href="#org45d7543">4.2. Comparison of the PSD with Huddle Test</a></li>
|
||||||
<li><a href="#orgb223df5">4.3. Compute TF estimate and Coherence</a></li>
|
<li><a href="#org5dbdfb4">4.3. Compute TF estimate and Coherence</a></li>
|
||||||
<li><a href="#orgf0b54fc">4.4. Comparison with the FEM model</a></li>
|
<li><a href="#org3e7c447">4.4. Comparison with the FEM model</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#org189b278">5. Transfer function of the PI Amplifier</a>
|
<li><a href="#org000ddf1">5. Transfer Function Estimation using the PI Amplifier</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org970db83">5.1. Compute TF estimate and Coherence</a></li>
|
<li><a href="#org110d884">5.1. Comparison of the PSD with Huddle Test</a></li>
|
||||||
|
<li><a href="#org0df7f2a">5.2. Compute TF estimate and Coherence</a></li>
|
||||||
|
<li><a href="#org0580b12">5.3. Comparison with the FEM model</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#orgea1748b">6. PI Amplifier</a>
|
<li><a href="#orgeedd2b2">6. Transfer function of the PI Amplifier</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org53f7284">6.1. Comparison of the PSD with Huddle Test</a></li>
|
<li><a href="#org337f0dd">6.1. Compute TF estimate and Coherence</a></li>
|
||||||
<li><a href="#org9081582">6.2. Compute TF estimate and Coherence</a></li>
|
|
||||||
<li><a href="#org52ebb83">6.3. Comparison with the FEM model</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -78,26 +70,26 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="org059b319" class="figure">
|
<div id="orge2005b9" class="figure">
|
||||||
<p><img src="figs/setup_picture.png" alt="setup_picture.png" />
|
<p><img src="figs/setup_picture.png" alt="setup_picture.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 1: </span>Picture of the Setup</p>
|
<p><span class="figure-number">Figure 1: </span>Picture of the Setup</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="org64743ab" class="figure">
|
<div id="org6bde75b" class="figure">
|
||||||
<p><img src="figs/setup_zoom.png" alt="setup_zoom.png" />
|
<p><img src="figs/setup_zoom.png" alt="setup_zoom.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 2: </span>Zoom on the APA</p>
|
<p><span class="figure-number">Figure 2: </span>Zoom on the APA</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org2723d81" class="outline-2">
|
<div id="outline-container-org9f7598b" class="outline-2">
|
||||||
<h2 id="org2723d81"><span class="section-number-2">1</span> Setup</h2>
|
<h2 id="org9f7598b"><span class="section-number-2">1</span> Setup</h2>
|
||||||
<div class="outline-text-2" id="text-1">
|
<div class="outline-text-2" id="text-1">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgfd55c36" class="outline-3">
|
<div id="outline-container-org7edfb65" class="outline-3">
|
||||||
<h3 id="orgfd55c36"><span class="section-number-3">1.1</span> Parameters</h3>
|
<h3 id="org7edfb65"><span class="section-number-3">1.1</span> Parameters</h3>
|
||||||
<div class="outline-text-3" id="text-1-1">
|
<div class="outline-text-3" id="text-1-1">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-matlab">Ts = 1e-4;
|
<pre class="src src-matlab">Ts = 1e-4;
|
||||||
@ -106,8 +98,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org292fe55" class="outline-3">
|
<div id="outline-container-orgdac636f" class="outline-3">
|
||||||
<h3 id="org292fe55"><span class="section-number-3">1.2</span> Filter White Noise</h3>
|
<h3 id="orgdac636f"><span class="section-number-3">1.2</span> Filter White Noise</h3>
|
||||||
<div class="outline-text-3" id="text-1-2">
|
<div class="outline-text-3" id="text-1-2">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-matlab">Glpf = 1/(1 + s/2/pi/500);
|
<pre class="src src-matlab">Glpf = 1/(1 + s/2/pi/500);
|
||||||
@ -119,13 +111,13 @@ Gz = c2d(Glpf, Ts, 'tustin');
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orge27b441" class="outline-2">
|
<div id="outline-container-org756b658" class="outline-2">
|
||||||
<h2 id="orge27b441"><span class="section-number-2">2</span> Run Experiment and Save Data</h2>
|
<h2 id="org756b658"><span class="section-number-2">2</span> Run Experiment and Save Data</h2>
|
||||||
<div class="outline-text-2" id="text-2">
|
<div class="outline-text-2" id="text-2">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgba39bc1" class="outline-3">
|
<div id="outline-container-org14764c7" class="outline-3">
|
||||||
<h3 id="orgba39bc1"><span class="section-number-3">2.1</span> Load Data</h3>
|
<h3 id="org14764c7"><span class="section-number-3">2.1</span> Load Data</h3>
|
||||||
<div class="outline-text-3" id="text-2-1">
|
<div class="outline-text-3" id="text-2-1">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-matlab">data = SimulinkRealTime.utils.getFileScopeData('data/apa95ml.dat').data;
|
<pre class="src src-matlab">data = SimulinkRealTime.utils.getFileScopeData('data/apa95ml.dat').data;
|
||||||
@ -134,8 +126,8 @@ Gz = c2d(Glpf, Ts, 'tustin');
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orga7db326" class="outline-3">
|
<div id="outline-container-org1b77b38" class="outline-3">
|
||||||
<h3 id="orga7db326"><span class="section-number-3">2.2</span> Save Data</h3>
|
<h3 id="org1b77b38"><span class="section-number-3">2.2</span> Save Data</h3>
|
||||||
<div class="outline-text-3" id="text-2-2">
|
<div class="outline-text-3" id="text-2-2">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-matlab">u = data(:, 1); % Input Voltage [V]
|
<pre class="src src-matlab">u = data(:, 1); % Input Voltage [V]
|
||||||
@ -152,16 +144,16 @@ t = data(:, 3); % Time [s]
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgca23311" class="outline-2">
|
<div id="outline-container-org28cccdb" class="outline-2">
|
||||||
<h2 id="orgca23311"><span class="section-number-2">3</span> Huddle Test</h2>
|
<h2 id="org28cccdb"><span class="section-number-2">3</span> Huddle Test</h2>
|
||||||
<div class="outline-text-2" id="text-3">
|
<div class="outline-text-2" id="text-3">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org28c4ff9" class="outline-3">
|
<div id="outline-container-org305cdf5" class="outline-3">
|
||||||
<h3 id="org28c4ff9"><span class="section-number-3">3.1</span> Time Domain Data</h3>
|
<h3 id="org305cdf5"><span class="section-number-3">3.1</span> Time Domain Data</h3>
|
||||||
<div class="outline-text-3" id="text-3-1">
|
<div class="outline-text-3" id="text-3-1">
|
||||||
|
|
||||||
<div id="org8b0837a" class="figure">
|
<div id="org36d78b8" class="figure">
|
||||||
<p><img src="figs/huddle_test_time_domain.png" alt="huddle_test_time_domain.png" />
|
<p><img src="figs/huddle_test_time_domain.png" alt="huddle_test_time_domain.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 3: </span>Measurement of the Mass displacement during Huddle Test</p>
|
<p><span class="figure-number">Figure 3: </span>Measurement of the Mass displacement during Huddle Test</p>
|
||||||
@ -169,8 +161,8 @@ t = data(:, 3); % Time [s]
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org61d66e9" class="outline-3">
|
<div id="outline-container-orga153e30" class="outline-3">
|
||||||
<h3 id="org61d66e9"><span class="section-number-3">3.2</span> PSD of Measurement Noise</h3>
|
<h3 id="orga153e30"><span class="section-number-3">3.2</span> PSD of Measurement Noise</h3>
|
||||||
<div class="outline-text-3" id="text-3-2">
|
<div class="outline-text-3" id="text-3-2">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-matlab">Ts = t(end)/(length(t)-1);
|
<pre class="src src-matlab">Ts = t(end)/(length(t)-1);
|
||||||
@ -186,7 +178,7 @@ win = hanning(ceil(1*Fs));
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="orge35cf94" class="figure">
|
<div id="org7a9dd6a" class="figure">
|
||||||
<p><img src="figs/huddle_test_pdf.png" alt="huddle_test_pdf.png" />
|
<p><img src="figs/huddle_test_pdf.png" alt="huddle_test_pdf.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 4: </span>Amplitude Spectral Density of the Displacement during Huddle Test</p>
|
<p><span class="figure-number">Figure 4: </span>Amplitude Spectral Density of the Displacement during Huddle Test</p>
|
||||||
@ -195,16 +187,16 @@ win = hanning(ceil(1*Fs));
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgd62d5d5" class="outline-2">
|
<div id="outline-container-orgfa9bec6" class="outline-2">
|
||||||
<h2 id="orgd62d5d5"><span class="section-number-2">4</span> Transfer Function Estimation with \(m=5kg\)</h2>
|
<h2 id="orgfa9bec6"><span class="section-number-2">4</span> Transfer Function Estimation using the DAC as the driver</h2>
|
||||||
<div class="outline-text-2" id="text-4">
|
<div class="outline-text-2" id="text-4">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgd195c16" class="outline-3">
|
<div id="outline-container-org99e40a8" class="outline-3">
|
||||||
<h3 id="orgd195c16"><span class="section-number-3">4.1</span> Time Domain Data</h3>
|
<h3 id="org99e40a8"><span class="section-number-3">4.1</span> Time Domain Data</h3>
|
||||||
<div class="outline-text-3" id="text-4-1">
|
<div class="outline-text-3" id="text-4-1">
|
||||||
|
|
||||||
<div id="orgb8b0684" class="figure">
|
<div id="org3c8d797" class="figure">
|
||||||
<p><img src="figs/apa95ml_5kg_10V_time_domain.png" alt="apa95ml_5kg_10V_time_domain.png" />
|
<p><img src="figs/apa95ml_5kg_10V_time_domain.png" alt="apa95ml_5kg_10V_time_domain.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 5: </span>Time domain signals during the test</p>
|
<p><span class="figure-number">Figure 5: </span>Time domain signals during the test</p>
|
||||||
@ -212,8 +204,8 @@ win = hanning(ceil(1*Fs));
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org008a2d9" class="outline-3">
|
<div id="outline-container-org45d7543" class="outline-3">
|
||||||
<h3 id="org008a2d9"><span class="section-number-3">4.2</span> Comparison of the PSD with Huddle Test</h3>
|
<h3 id="org45d7543"><span class="section-number-3">4.2</span> Comparison of the PSD with Huddle Test</h3>
|
||||||
<div class="outline-text-3" id="text-4-2">
|
<div class="outline-text-3" id="text-4-2">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-matlab">Ts = t(end)/(length(t)-1);
|
<pre class="src src-matlab">Ts = t(end)/(length(t)-1);
|
||||||
@ -230,7 +222,7 @@ win = hanning(ceil(1*Fs));
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="org3189602" class="figure">
|
<div id="org15f2486" class="figure">
|
||||||
<p><img src="figs/apa95ml_5kg_10V_pdf_comp_huddle.png" alt="apa95ml_5kg_10V_pdf_comp_huddle.png" />
|
<p><img src="figs/apa95ml_5kg_10V_pdf_comp_huddle.png" alt="apa95ml_5kg_10V_pdf_comp_huddle.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 6: </span>Comparison of the ASD for the identification test and the huddle test</p>
|
<p><span class="figure-number">Figure 6: </span>Comparison of the ASD for the identification test and the huddle test</p>
|
||||||
@ -238,8 +230,8 @@ win = hanning(ceil(1*Fs));
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgb223df5" class="outline-3">
|
<div id="outline-container-org5dbdfb4" class="outline-3">
|
||||||
<h3 id="orgb223df5"><span class="section-number-3">4.3</span> Compute TF estimate and Coherence</h3>
|
<h3 id="org5dbdfb4"><span class="section-number-3">4.3</span> Compute TF estimate and Coherence</h3>
|
||||||
<div class="outline-text-3" id="text-4-3">
|
<div class="outline-text-3" id="text-4-3">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-matlab">Ts = t(end)/(length(t)-1);
|
<pre class="src src-matlab">Ts = t(end)/(length(t)-1);
|
||||||
@ -256,14 +248,14 @@ Fs = 1/Ts;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="orgc74f977" class="figure">
|
<div id="org22a86fd" class="figure">
|
||||||
<p><img src="figs/apa95ml_5kg_10V_coh.png" alt="apa95ml_5kg_10V_coh.png" />
|
<p><img src="figs/apa95ml_5kg_10V_coh.png" alt="apa95ml_5kg_10V_coh.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 7: </span>Coherence</p>
|
<p><span class="figure-number">Figure 7: </span>Coherence</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="orgc54bab7" class="figure">
|
<div id="org70b1269" class="figure">
|
||||||
<p><img src="figs/apa95ml_5kg_10V_tf.png" alt="apa95ml_5kg_10V_tf.png" />
|
<p><img src="figs/apa95ml_5kg_10V_tf.png" alt="apa95ml_5kg_10V_tf.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 8: </span>Estimation of the transfer function from input voltage to displacement</p>
|
<p><span class="figure-number">Figure 8: </span>Estimation of the transfer function from input voltage to displacement</p>
|
||||||
@ -271,8 +263,8 @@ Fs = 1/Ts;
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgf0b54fc" class="outline-3">
|
<div id="outline-container-org3e7c447" class="outline-3">
|
||||||
<h3 id="orgf0b54fc"><span class="section-number-3">4.4</span> Comparison with the FEM model</h3>
|
<h3 id="org3e7c447"><span class="section-number-3">4.4</span> Comparison with the FEM model</h3>
|
||||||
<div class="outline-text-3" id="text-4-4">
|
<div class="outline-text-3" id="text-4-4">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-matlab">load('mat/fem_model_5kg.mat', 'Ghm');
|
<pre class="src src-matlab">load('mat/fem_model_5kg.mat', 'Ghm');
|
||||||
@ -280,7 +272,7 @@ Fs = 1/Ts;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="orge0b2a40" class="figure">
|
<div id="org1d338bc" class="figure">
|
||||||
<p><img src="figs/apa95ml_5kg_comp_fem.png" alt="apa95ml_5kg_comp_fem.png" />
|
<p><img src="figs/apa95ml_5kg_comp_fem.png" alt="apa95ml_5kg_comp_fem.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 9: </span>Comparison of the identified transfer function and the one estimated from the FE model</p>
|
<p><span class="figure-number">Figure 9: </span>Comparison of the identified transfer function and the one estimated from the FE model</p>
|
||||||
@ -299,16 +291,97 @@ In the next section, a current amplifier is used.
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org189b278" class="outline-2">
|
<div id="outline-container-org000ddf1" class="outline-2">
|
||||||
<h2 id="org189b278"><span class="section-number-2">5</span> Transfer function of the PI Amplifier</h2>
|
<h2 id="org000ddf1"><span class="section-number-2">5</span> Transfer Function Estimation using the PI Amplifier</h2>
|
||||||
<div class="outline-text-2" id="text-5">
|
<div class="outline-text-2" id="text-5">
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-org970db83" class="outline-3">
|
<div id="outline-container-org110d884" class="outline-3">
|
||||||
<h3 id="org970db83"><span class="section-number-3">5.1</span> Compute TF estimate and Coherence</h3>
|
<h3 id="org110d884"><span class="section-number-3">5.1</span> Comparison of the PSD with Huddle Test</h3>
|
||||||
<div class="outline-text-3" id="text-5-1">
|
<div class="outline-text-3" id="text-5-1">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-matlab">Ts = t(end)/(length(t)-1);
|
<pre class="src src-matlab">Ts = t(end)/(length(t)-1);
|
||||||
Fs = 1/Ts;
|
Fs = 1/Ts;
|
||||||
|
|
||||||
|
win = hanning(ceil(1*Fs));
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="org-src-container">
|
||||||
|
<pre class="src src-matlab">[pxx, f] = pwelch(y, win, [], [], Fs);
|
||||||
|
[pht, ~] = pwelch(ht.y, win, [], [], Fs);
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="org4f7b784" class="figure">
|
||||||
|
<p><img src="figs/apa95ml_5kg_PI_pdf_comp_huddle.png" alt="apa95ml_5kg_PI_pdf_comp_huddle.png" />
|
||||||
|
</p>
|
||||||
|
<p><span class="figure-number">Figure 10: </span>Comparison of the ASD for the identification test and the huddle test</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="outline-container-org0df7f2a" class="outline-3">
|
||||||
|
<h3 id="org0df7f2a"><span class="section-number-3">5.2</span> Compute TF estimate and Coherence</h3>
|
||||||
|
<div class="outline-text-3" id="text-5-2">
|
||||||
|
<div class="org-src-container">
|
||||||
|
<pre class="src src-matlab">Ts = t(end)/(length(t)-1);
|
||||||
|
Fs = 1/Ts;
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="org-src-container">
|
||||||
|
<pre class="src src-matlab">win = hann(ceil(1/Ts));
|
||||||
|
|
||||||
|
[tf_est, f] = tfestimate(u, -y, win, [], [], 1/Ts);
|
||||||
|
[tf_um , ~] = tfestimate(um, -y, win, [], [], 1/Ts);
|
||||||
|
[co_est, ~] = mscohere( um, -y, win, [], [], 1/Ts);
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="org99498ae" class="figure">
|
||||||
|
<p><img src="figs/apa95ml_5kg_PI_coh.png" alt="apa95ml_5kg_PI_coh.png" />
|
||||||
|
</p>
|
||||||
|
<p><span class="figure-number">Figure 11: </span>Coherence</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="org554203c" class="figure">
|
||||||
|
<p><img src="figs/apa95ml_5kg_PI_tf.png" alt="apa95ml_5kg_PI_tf.png" />
|
||||||
|
</p>
|
||||||
|
<p><span class="figure-number">Figure 12: </span>Estimation of the transfer function from input voltage to displacement</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="outline-container-org0580b12" class="outline-3">
|
||||||
|
<h3 id="org0580b12"><span class="section-number-3">5.3</span> Comparison with the FEM model</h3>
|
||||||
|
<div class="outline-text-3" id="text-5-3">
|
||||||
|
<div class="org-src-container">
|
||||||
|
<pre class="src src-matlab">load('mat/fem_model_5kg.mat', 'Ghm');
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="org001e611" class="figure">
|
||||||
|
<p><img src="figs/apa95ml_5kg_pi_comp_fem.png" alt="apa95ml_5kg_pi_comp_fem.png" />
|
||||||
|
</p>
|
||||||
|
<p><span class="figure-number">Figure 13: </span>Comparison of the identified transfer function and the one estimated from the FE model</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="outline-container-orgeedd2b2" class="outline-2">
|
||||||
|
<h2 id="orgeedd2b2"><span class="section-number-2">6</span> Transfer function of the PI Amplifier</h2>
|
||||||
|
<div class="outline-text-2" id="text-6">
|
||||||
|
</div>
|
||||||
|
<div id="outline-container-org337f0dd" class="outline-3">
|
||||||
|
<h3 id="org337f0dd"><span class="section-number-3">6.1</span> Compute TF estimate and Coherence</h3>
|
||||||
|
<div class="outline-text-3" id="text-6-1">
|
||||||
|
<div class="org-src-container">
|
||||||
|
<pre class="src src-matlab">Ts = t(end)/(length(t)-1);
|
||||||
|
Fs = 1/Ts;
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -317,11 +390,11 @@ The coherence and the transfer function are estimate from the voltage input of t
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The coherence is very good as expected (Figure <a href="#org1877c12">10</a>).
|
The coherence is very good as expected (Figure <a href="#orgd06642a">14</a>).
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The transfer function show a low pass filter behavior with a lot of phase drop (Figure <a href="#org76c3cb3">11</a>).
|
The transfer function show a low pass filter behavior with a lot of phase drop (Figure <a href="#orgcc39578">15</a>).
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
@ -333,17 +406,17 @@ The transfer function show a low pass filter behavior with a lot of phase drop (
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="org1877c12" class="figure">
|
<div id="orgd06642a" class="figure">
|
||||||
<p><img src="figs/PI_E505_coh.png" alt="PI_E505_coh.png" />
|
<p><img src="figs/PI_E505_coh.png" alt="PI_E505_coh.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 10: </span>Coherence</p>
|
<p><span class="figure-number">Figure 14: </span>Coherence</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="org76c3cb3" class="figure">
|
<div id="orgcc39578" class="figure">
|
||||||
<p><img src="figs/PI_E505_tf.png" alt="PI_E505_tf.png" />
|
<p><img src="figs/PI_E505_tf.png" alt="PI_E505_tf.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 11: </span>Estimation of the transfer function from input voltage to displacement</p>
|
<p><span class="figure-number">Figure 15: </span>Estimation of the transfer function from input voltage to displacement</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -360,91 +433,10 @@ The delay can be estimated as follow:
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgea1748b" class="outline-2">
|
|
||||||
<h2 id="orgea1748b"><span class="section-number-2">6</span> PI Amplifier</h2>
|
|
||||||
<div class="outline-text-2" id="text-6">
|
|
||||||
</div>
|
|
||||||
<div id="outline-container-org53f7284" class="outline-3">
|
|
||||||
<h3 id="org53f7284"><span class="section-number-3">6.1</span> Comparison of the PSD with Huddle Test</h3>
|
|
||||||
<div class="outline-text-3" id="text-6-1">
|
|
||||||
<div class="org-src-container">
|
|
||||||
<pre class="src src-matlab">Ts = t(end)/(length(t)-1);
|
|
||||||
Fs = 1/Ts;
|
|
||||||
|
|
||||||
win = hanning(ceil(1*Fs));
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="org-src-container">
|
|
||||||
<pre class="src src-matlab">[pxx, f] = pwelch(y, win, [], [], Fs);
|
|
||||||
[pht, ~] = pwelch(ht.y, win, [], [], Fs);
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div id="org1d7bc05" class="figure">
|
|
||||||
<p><img src="figs/apa95ml_5kg_PI_pdf_comp_huddle.png" alt="apa95ml_5kg_PI_pdf_comp_huddle.png" />
|
|
||||||
</p>
|
|
||||||
<p><span class="figure-number">Figure 12: </span>Comparison of the ASD for the identification test and the huddle test</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="outline-container-org9081582" class="outline-3">
|
|
||||||
<h3 id="org9081582"><span class="section-number-3">6.2</span> Compute TF estimate and Coherence</h3>
|
|
||||||
<div class="outline-text-3" id="text-6-2">
|
|
||||||
<div class="org-src-container">
|
|
||||||
<pre class="src src-matlab">Ts = t(end)/(length(t)-1);
|
|
||||||
Fs = 1/Ts;
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="org-src-container">
|
|
||||||
<pre class="src src-matlab">win = hann(ceil(10/Ts));
|
|
||||||
|
|
||||||
[tf_est, f] = tfestimate(u, -y, win, [], [], 1/Ts);
|
|
||||||
[co_est, ~] = mscohere( u, -y, win, [], [], 1/Ts);
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div id="orge505858" class="figure">
|
|
||||||
<p><img src="figs/apa95ml_5kg_PI_coh.png" alt="apa95ml_5kg_PI_coh.png" />
|
|
||||||
</p>
|
|
||||||
<p><span class="figure-number">Figure 13: </span>Coherence</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div id="org5754167" class="figure">
|
|
||||||
<p><img src="figs/apa95ml_5kg_PI_tf.png" alt="apa95ml_5kg_PI_tf.png" />
|
|
||||||
</p>
|
|
||||||
<p><span class="figure-number">Figure 14: </span>Estimation of the transfer function from input voltage to displacement</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="outline-container-org52ebb83" class="outline-3">
|
|
||||||
<h3 id="org52ebb83"><span class="section-number-3">6.3</span> Comparison with the FEM model</h3>
|
|
||||||
<div class="outline-text-3" id="text-6-3">
|
|
||||||
<div class="org-src-container">
|
|
||||||
<pre class="src src-matlab">load('mat/fem_model_5kg.mat', 'Ghm');
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div id="orge0e655f" class="figure">
|
|
||||||
<p><img src="figs/apa95ml_5kg_pi_comp_fem.png" alt="apa95ml_5kg_pi_comp_fem.png" />
|
|
||||||
</p>
|
|
||||||
<p><span class="figure-number">Figure 15: </span>Comparison of the identified transfer function and the one estimated from the FE model</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="postamble" class="status">
|
<div id="postamble" class="status">
|
||||||
<p class="author">Author: Dehaeze Thomas</p>
|
<p class="author">Author: Dehaeze Thomas</p>
|
||||||
<p class="date">Created: 2020-07-24 ven. 13:06</p>
|
<p class="date">Created: 2020-07-24 ven. 13:16</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
318
index.org
318
index.org
@ -156,7 +156,7 @@
|
|||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
[[file:figs/huddle_test_pdf.png]]
|
[[file:figs/huddle_test_pdf.png]]
|
||||||
|
|
||||||
* Transfer Function Estimation with $m=5kg$
|
* Transfer Function Estimation using the DAC as the driver
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args:matlab+: :tangle matlab/tf_estimation.m
|
:header-args:matlab+: :tangle matlab/tf_estimation.m
|
||||||
:header-args:matlab+: :comments org :mkdirp yes
|
:header-args:matlab+: :comments org :mkdirp yes
|
||||||
@ -339,6 +339,172 @@ The problem comes from the fact that the piezo is driven directly by the DAC tha
|
|||||||
In the next section, a current amplifier is used.
|
In the next section, a current amplifier is used.
|
||||||
#+end_important
|
#+end_important
|
||||||
|
|
||||||
|
* Transfer Function Estimation using the PI Amplifier
|
||||||
|
** 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
|
||||||
|
|
||||||
|
** Load Data :noexport:
|
||||||
|
#+begin_src matlab
|
||||||
|
ht = load('./mat/huddle_test.mat', 't', 'u', 'y');
|
||||||
|
load('./mat/apa95ml_5kg_Amp_E505.mat', 't', 'u', 'um', 'y');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
u = u - mean(u);
|
||||||
|
um = um - mean(um);
|
||||||
|
y = y - mean(y);
|
||||||
|
|
||||||
|
ht.u = ht.u - mean(ht.u);
|
||||||
|
ht.y = ht.y - mean(ht.y);
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Comparison of the PSD with Huddle Test
|
||||||
|
#+begin_src matlab
|
||||||
|
Ts = t(end)/(length(t)-1);
|
||||||
|
Fs = 1/Ts;
|
||||||
|
|
||||||
|
win = hanning(ceil(1*Fs));
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
[pxx, f] = pwelch(y, win, [], [], Fs);
|
||||||
|
[pht, ~] = pwelch(ht.y, win, [], [], Fs);
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :exports none
|
||||||
|
figure;
|
||||||
|
hold on;
|
||||||
|
plot(f, sqrt(pxx), 'DisplayName', '5kg');
|
||||||
|
plot(f, sqrt(pht), 'DisplayName', 'Huddle Test');
|
||||||
|
hold off;
|
||||||
|
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||||
|
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');
|
||||||
|
legend('location', 'northeast');
|
||||||
|
xlim([1, Fs/2]);
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :tangle no :exports results :results file replace
|
||||||
|
exportFig('figs/apa95ml_5kg_PI_pdf_comp_huddle.pdf', 'width', 'wide', 'height', 'tall');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+name: fig:apa95ml_5kg_PI_pdf_comp_huddle
|
||||||
|
#+caption: Comparison of the ASD for the identification test and the huddle test
|
||||||
|
#+RESULTS:
|
||||||
|
[[file:figs/apa95ml_5kg_PI_pdf_comp_huddle.png]]
|
||||||
|
|
||||||
|
** Compute TF estimate and Coherence
|
||||||
|
#+begin_src matlab
|
||||||
|
Ts = t(end)/(length(t)-1);
|
||||||
|
Fs = 1/Ts;
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
win = hann(ceil(1/Ts));
|
||||||
|
|
||||||
|
[tf_est, f] = tfestimate(u, -y, win, [], [], 1/Ts);
|
||||||
|
[tf_um , ~] = tfestimate(um, -y, win, [], [], 1/Ts);
|
||||||
|
[co_est, ~] = mscohere( um, -y, win, [], [], 1/Ts);
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :exports none
|
||||||
|
figure;
|
||||||
|
|
||||||
|
hold on;
|
||||||
|
plot(f, co_est, 'k-')
|
||||||
|
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
||||||
|
ylabel('Coherence'); xlabel('Frequency [Hz]');
|
||||||
|
hold off;
|
||||||
|
xlim([10, 5e3]);
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :tangle no :exports results :results file replace
|
||||||
|
exportFig('figs/apa95ml_5kg_PI_coh.pdf', 'width', 'wide', 'height', 'normal');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+name: fig:apa95ml_5kg_PI_coh
|
||||||
|
#+caption: Coherence
|
||||||
|
#+RESULTS:
|
||||||
|
[[file:figs/apa95ml_5kg_PI_coh.png]]
|
||||||
|
|
||||||
|
#+begin_src matlab :exports none
|
||||||
|
figure;
|
||||||
|
ax1 = subplot(2, 1, 1);
|
||||||
|
hold on;
|
||||||
|
plot(f, abs(tf_est), 'DisplayName', 'Input Voltage')
|
||||||
|
plot(f, abs(tf_um), 'DisplayName', 'Monitor Voltage')
|
||||||
|
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
||||||
|
ylabel('Amplitude'); xlabel('Frequency [Hz]');
|
||||||
|
hold off;
|
||||||
|
legend('location', 'southwest')
|
||||||
|
|
||||||
|
ax2 = subplot(2, 1, 2);
|
||||||
|
hold on;
|
||||||
|
plot(f, 180/pi*unwrap(angle(tf_est)))
|
||||||
|
plot(f, 180/pi*unwrap(angle(tf_um)))
|
||||||
|
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
||||||
|
ylabel('Phase'); xlabel('Frequency [Hz]');
|
||||||
|
hold off;
|
||||||
|
ylim([-540, 0]);
|
||||||
|
yticks(-540:90:0);
|
||||||
|
|
||||||
|
linkaxes([ax1,ax2], 'x');
|
||||||
|
xlim([10, 5e3]);
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :tangle no :exports results :results file replace
|
||||||
|
exportFig('figs/apa95ml_5kg_PI_tf.pdf', 'width', 'full', 'height', 'full');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+name: fig:apa95ml_5kg_PI_tf
|
||||||
|
#+caption: Estimation of the transfer function from input voltage to displacement
|
||||||
|
#+RESULTS:
|
||||||
|
[[file:figs/apa95ml_5kg_PI_tf.png]]
|
||||||
|
|
||||||
|
** Comparison with the FEM model
|
||||||
|
#+begin_src matlab
|
||||||
|
load('mat/fem_model_5kg.mat', 'Ghm');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :exports none
|
||||||
|
freqs = logspace(0, 4, 1000);
|
||||||
|
figure;
|
||||||
|
ax1 = subplot(2, 1, 1);
|
||||||
|
hold on;
|
||||||
|
plot(f, 1/10*170/1400*abs(tf_um), 'DisplayName', 'Identification')
|
||||||
|
plot(freqs, abs(squeeze(freqresp(Ghm, freqs, 'Hz'))), 'DisplayName', 'FEM')
|
||||||
|
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
||||||
|
ylabel('Amplitude'); xlabel('Frequency [Hz]');
|
||||||
|
legend('location', 'northeast')
|
||||||
|
hold off;
|
||||||
|
|
||||||
|
ax2 = subplot(2, 1, 2);
|
||||||
|
hold on;
|
||||||
|
plot(f, 180/pi*unwrap(angle(tf_um)))
|
||||||
|
plot(freqs, 180/pi*unwrap(angle(squeeze(freqresp(Ghm, freqs, 'Hz')))))
|
||||||
|
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
||||||
|
ylabel('Phase'); xlabel('Frequency [Hz]');
|
||||||
|
hold off;
|
||||||
|
ylim([-540, 0]);
|
||||||
|
yticks(-540:90:0);
|
||||||
|
|
||||||
|
linkaxes([ax1,ax2], 'x');
|
||||||
|
xlim([10, 5e3]);
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :tangle no :exports results :results file replace
|
||||||
|
exportFig('figs/apa95ml_5kg_pi_comp_fem.pdf', 'width', 'full', 'height', 'full');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+name: fig:apa95ml_5kg_pi_comp_fem
|
||||||
|
#+caption: Comparison of the identified transfer function and the one estimated from the FE model
|
||||||
|
#+RESULTS:
|
||||||
|
[[file:figs/apa95ml_5kg_pi_comp_fem.png]]
|
||||||
* Transfer function of the PI Amplifier
|
* Transfer function of the PI Amplifier
|
||||||
** Matlab Init :noexport:ignore:
|
** Matlab Init :noexport:ignore:
|
||||||
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||||
@ -432,153 +598,3 @@ The delay can be estimated as follow:
|
|||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
: 0.0004
|
: 0.0004
|
||||||
|
|
||||||
* PI Amplifier
|
|
||||||
** 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
|
|
||||||
|
|
||||||
** Load Data :noexport:
|
|
||||||
#+begin_src matlab
|
|
||||||
ht = load('./mat/huddle_test.mat', 't', 'u', 'y');
|
|
||||||
load('./mat/apa95ml_5kg_Amp_E505.mat', 't', 'u', 'y');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Comparison of the PSD with Huddle Test
|
|
||||||
#+begin_src matlab
|
|
||||||
Ts = t(end)/(length(t)-1);
|
|
||||||
Fs = 1/Ts;
|
|
||||||
|
|
||||||
win = hanning(ceil(1*Fs));
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab
|
|
||||||
[pxx, f] = pwelch(y, win, [], [], Fs);
|
|
||||||
[pht, ~] = pwelch(ht.y, win, [], [], Fs);
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :exports none
|
|
||||||
figure;
|
|
||||||
hold on;
|
|
||||||
plot(f, sqrt(pxx), 'DisplayName', '5kg');
|
|
||||||
plot(f, sqrt(pht), 'DisplayName', 'Huddle Test');
|
|
||||||
hold off;
|
|
||||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
|
||||||
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');
|
|
||||||
legend('location', 'northeast');
|
|
||||||
xlim([1, Fs/2]);
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :tangle no :exports results :results file replace
|
|
||||||
exportFig('figs/apa95ml_5kg_PI_pdf_comp_huddle.pdf', 'width', 'wide', 'height', 'tall');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+name: fig:apa95ml_5kg_PI_pdf_comp_huddle
|
|
||||||
#+caption: Comparison of the ASD for the identification test and the huddle test
|
|
||||||
#+RESULTS:
|
|
||||||
[[file:figs/apa95ml_5kg_PI_pdf_comp_huddle.png]]
|
|
||||||
|
|
||||||
** Compute TF estimate and Coherence
|
|
||||||
#+begin_src matlab
|
|
||||||
Ts = t(end)/(length(t)-1);
|
|
||||||
Fs = 1/Ts;
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab
|
|
||||||
win = hann(ceil(10/Ts));
|
|
||||||
|
|
||||||
[tf_est, f] = tfestimate(u, -y, win, [], [], 1/Ts);
|
|
||||||
[co_est, ~] = mscohere( u, -y, win, [], [], 1/Ts);
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :exports none
|
|
||||||
figure;
|
|
||||||
|
|
||||||
hold on;
|
|
||||||
plot(f, co_est, 'k-')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
|
||||||
ylabel('Coherence'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
xlim([10, 5e3]);
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :tangle no :exports results :results file replace
|
|
||||||
exportFig('figs/apa95ml_5kg_PI_coh.pdf', 'width', 'wide', 'height', 'normal');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+name: fig:apa95ml_5kg_PI_coh
|
|
||||||
#+caption: Coherence
|
|
||||||
#+RESULTS:
|
|
||||||
[[file:figs/apa95ml_5kg_PI_coh.png]]
|
|
||||||
|
|
||||||
#+begin_src matlab :exports none
|
|
||||||
figure;
|
|
||||||
ax1 = subplot(2, 1, 1);
|
|
||||||
hold on;
|
|
||||||
plot(f, abs(tf_est), 'k-')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
|
||||||
ylabel('Amplitude'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
ax2 = subplot(2, 1, 2);
|
|
||||||
hold on;
|
|
||||||
plot(f, 180/pi*angle(tf_est), 'k-')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
|
||||||
ylabel('Phase'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
linkaxes([ax1,ax2], 'x');
|
|
||||||
xlim([10, 5e3]);
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :tangle no :exports results :results file replace
|
|
||||||
exportFig('figs/apa95ml_5kg_PI_tf.pdf', 'width', 'full', 'height', 'full');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+name: fig:apa95ml_5kg_PI_tf
|
|
||||||
#+caption: Estimation of the transfer function from input voltage to displacement
|
|
||||||
#+RESULTS:
|
|
||||||
[[file:figs/apa95ml_5kg_PI_tf.png]]
|
|
||||||
|
|
||||||
** Comparison with the FEM model
|
|
||||||
#+begin_src matlab
|
|
||||||
load('mat/fem_model_5kg.mat', 'Ghm');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :exports none
|
|
||||||
freqs = logspace(0, 4, 1000);
|
|
||||||
figure;
|
|
||||||
ax1 = subplot(2, 1, 1);
|
|
||||||
hold on;
|
|
||||||
plot(f, 1/10*170/1400*abs(tf_est), 'DisplayName', 'Identification')
|
|
||||||
plot(freqs, abs(squeeze(freqresp(Ghm, freqs, 'Hz'))), 'DisplayName', 'FEM')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
|
||||||
ylabel('Amplitude'); xlabel('Frequency [Hz]');
|
|
||||||
legend('location', 'northeast')
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
ax2 = subplot(2, 1, 2);
|
|
||||||
hold on;
|
|
||||||
plot(f, 180/pi*angle(tf_est))
|
|
||||||
plot(freqs, 180/pi*angle(squeeze(freqresp(Ghm, freqs, 'Hz'))))
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
|
||||||
ylabel('Phase'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
ylim([-180, 180]);
|
|
||||||
|
|
||||||
linkaxes([ax1,ax2], 'x');
|
|
||||||
xlim([10, 5e3]);
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :tangle no :exports results :results file replace
|
|
||||||
exportFig('figs/apa95ml_5kg_pi_comp_fem.pdf', 'width', 'full', 'height', 'full');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+name: fig:apa95ml_5kg_pi_comp_fem
|
|
||||||
#+caption: Comparison of the identified transfer function and the one estimated from the FE model
|
|
||||||
#+RESULTS:
|
|
||||||
[[file:figs/apa95ml_5kg_pi_comp_fem.png]]
|
|
||||||
|
Loading…
Reference in New Issue
Block a user