test-bench-apa/index.html

240 lines
7.5 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-07-20 11:27:55 +02:00
<!-- 2020-07-20 lun. 11:27 -->
2020-07-17 11:56:08 +02:00
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Test Bench APA</title>
<meta name="generator" content="Org mode" />
<meta name="author" content="Dehaeze Thomas" />
2020-07-20 11:27:55 +02:00
<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>
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">
<h1 class="title">Test Bench APA</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
2020-07-20 11:27:55 +02:00
<li><a href="#orgc824287">1. Setup</a>
<ul>
<li><a href="#orgd7519f6">1.1. Parameters</a></li>
<li><a href="#org6b6fba7">1.2. Filter White Noise</a></li>
</ul>
</li>
<li><a href="#orge67785b">2. Run Experiment and Save Data</a>
<ul>
<li><a href="#orgb713921">2.1. Load Data</a></li>
<li><a href="#org76c3b29">2.2. Save Data</a></li>
</ul>
</li>
<li><a href="#org9fd96de">3. Huddle Test</a>
<ul>
<li><a href="#orgd57e28b">3.1. Time Domain Data</a></li>
<li><a href="#org3bbc63e">3.2. PSD of Measurement Noise</a></li>
</ul>
</li>
<li><a href="#org998c1cd">4. Transfer Function Estimation with m=5kg</a>
<ul>
<li><a href="#org9ef342c">4.1. Time Domain Data</a></li>
<li><a href="#orgefdd95f">4.2. Comparison of the PSD with Huddle Test</a></li>
<li><a href="#orge9cdeb9">4.3. Compute TF estimate and Coherence</a></li>
</ul>
</li>
2020-07-17 11:56:08 +02:00
</ul>
</div>
</div>
2020-07-20 11:27:55 +02:00
<div id="outline-container-orgc824287" class="outline-2">
<h2 id="orgc824287"><span class="section-number-2">1</span> Setup</h2>
2020-07-17 11:56:08 +02:00
<div class="outline-text-2" id="text-1">
2020-07-20 11:27:55 +02:00
</div>
<div id="outline-container-orgd7519f6" class="outline-3">
<h3 id="orgd7519f6"><span class="section-number-3">1.1</span> Parameters</h3>
<div class="outline-text-3" id="text-1-1">
2020-07-17 11:56:08 +02:00
<div class="org-src-container">
<pre class="src src-matlab">Ts = 1e-4;
</pre>
</div>
</div>
</div>
2020-07-20 11:27:55 +02:00
<div id="outline-container-org6b6fba7" class="outline-3">
<h3 id="org6b6fba7"><span class="section-number-3">1.2</span> Filter White Noise</h3>
<div class="outline-text-3" id="text-1-2">
2020-07-17 11:56:08 +02:00
<div class="org-src-container">
<pre class="src src-matlab">Glpf = 1/(1 + s/2/pi/500);
Gz = c2d(Glpf, Ts, 'tustin');
</pre>
</div>
</div>
</div>
2020-07-20 11:27:55 +02:00
</div>
2020-07-17 11:56:08 +02:00
2020-07-20 11:27:55 +02:00
<div id="outline-container-orge67785b" class="outline-2">
<h2 id="orge67785b"><span class="section-number-2">2</span> Run Experiment and Save Data</h2>
<div class="outline-text-2" id="text-2">
</div>
<div id="outline-container-orgb713921" class="outline-3">
<h3 id="orgb713921"><span class="section-number-3">2.1</span> Load Data</h3>
<div class="outline-text-3" id="text-2-1">
2020-07-17 11:56:08 +02:00
<div class="org-src-container">
2020-07-20 11:27:55 +02:00
<pre class="src src-matlab">data = SimulinkRealTime.utils.getFileScopeData('data/apa95ml.dat').data;
2020-07-17 11:56:08 +02:00
</pre>
</div>
</div>
</div>
2020-07-20 11:27:55 +02:00
<div id="outline-container-org76c3b29" class="outline-3">
<h3 id="org76c3b29"><span class="section-number-3">2.2</span> Save Data</h3>
<div class="outline-text-3" id="text-2-2">
2020-07-17 11:56:08 +02:00
<div class="org-src-container">
2020-07-20 11:27:55 +02:00
<pre class="src src-matlab">u = data(:, 1); % Input Voltage [V]
y = data(:, 2); % Output Displacement [m]
t = data(:, 3); % Time [s]
</pre>
</div>
2020-07-17 11:56:08 +02:00
2020-07-20 11:27:55 +02:00
<div class="org-src-container">
<pre class="src src-matlab">save('./mat/huddle_test.mat', 't', 'u', 'y', 'Glpf');
</pre>
</div>
</div>
</div>
</div>
2020-07-17 11:56:08 +02:00
2020-07-20 11:27:55 +02:00
<div id="outline-container-org9fd96de" class="outline-2">
<h2 id="org9fd96de"><span class="section-number-2">3</span> Huddle Test</h2>
<div class="outline-text-2" id="text-3">
</div>
2020-07-17 11:56:08 +02:00
2020-07-20 11:27:55 +02:00
<div id="outline-container-orgd57e28b" class="outline-3">
<h3 id="orgd57e28b"><span class="section-number-3">3.1</span> Time Domain Data</h3>
<div class="outline-text-3" id="text-3-1">
<div id="org892424c" class="figure">
<p><img src="figs/huddle_test_time_domain.png" alt="huddle_test_time_domain.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Measurement of the Mass displacement during Huddle Test</p>
2020-07-17 11:56:08 +02:00
</div>
</div>
</div>
2020-07-20 11:27:55 +02:00
<div id="outline-container-org3bbc63e" class="outline-3">
<h3 id="org3bbc63e"><span class="section-number-3">3.2</span> PSD of Measurement Noise</h3>
<div class="outline-text-3" id="text-3-2">
2020-07-17 11:56:08 +02:00
<div class="org-src-container">
2020-07-20 11:27:55 +02:00
<pre class="src src-matlab">Ts = t(end)/(length(t)-1);
Fs = 1/Ts;
win = hanning(ceil(1*Fs));
</pre>
</div>
2020-07-17 11:56:08 +02:00
2020-07-20 11:27:55 +02:00
<div class="org-src-container">
<pre class="src src-matlab">[pxx, f] = pwelch(y, win, [], [], Fs);
2020-07-17 11:56:08 +02:00
</pre>
</div>
2020-07-20 11:27:55 +02:00
<div id="orgcf40479" class="figure">
<p><img src="figs/huddle_test_pdf.png" alt="huddle_test_pdf.png" />
</p>
<p><span class="figure-number">Figure 2: </span>Amplitude Spectral Density of the Displacement during Huddle Test</p>
</div>
</div>
</div>
</div>
<div id="outline-container-org998c1cd" class="outline-2">
<h2 id="org998c1cd"><span class="section-number-2">4</span> Transfer Function Estimation with m=5kg</h2>
<div class="outline-text-2" id="text-4">
</div>
<div id="outline-container-org9ef342c" class="outline-3">
<h3 id="org9ef342c"><span class="section-number-3">4.1</span> Time Domain Data</h3>
<div class="outline-text-3" id="text-4-1">
<div id="orgf113201" class="figure">
<p><img src="figs/apa95ml_5kg_10V_time_domain.png" alt="apa95ml_5kg_10V_time_domain.png" />
</p>
<p><span class="figure-number">Figure 3: </span>Time domain signals during the test</p>
</div>
2020-07-17 11:56:08 +02:00
</div>
</div>
2020-07-20 11:27:55 +02:00
<div id="outline-container-orgefdd95f" class="outline-3">
<h3 id="orgefdd95f"><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">
2020-07-17 11:56:08 +02:00
<div class="org-src-container">
2020-07-20 11:27:55 +02:00
<pre class="src src-matlab">Ts = t(end)/(length(t)-1);
Fs = 1/Ts;
2020-07-17 11:56:08 +02:00
2020-07-20 11:27:55 +02:00
win = hanning(ceil(1*Fs));
2020-07-17 11:56:08 +02:00
</pre>
</div>
2020-07-20 11:27:55 +02:00
<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="orgb2b9828" class="figure">
<p><img src="figs/apa95ml_5kg_10V_pdf_comp_huddle.png" alt="apa95ml_5kg_10V_pdf_comp_huddle.png" />
</p>
<p><span class="figure-number">Figure 4: </span>Comparison of the ASD for the identification test and the huddle test</p>
</div>
2020-07-17 11:56:08 +02:00
</div>
</div>
2020-07-20 11:27:55 +02:00
<div id="outline-container-orge9cdeb9" class="outline-3">
<h3 id="orge9cdeb9"><span class="section-number-3">4.3</span> Compute TF estimate and Coherence</h3>
<div class="outline-text-3" id="text-4-3">
2020-07-17 11:56:08 +02:00
<div class="org-src-container">
2020-07-20 11:27:55 +02:00
<pre class="src src-matlab">win = hann(ceil(1/Ts));
[tf_est, f] = tfestimate(u, -y, win, [], [], 1/Ts);
[co_est, ~] = mscohere( u, -y, win, [], [], 1/Ts);
2020-07-17 11:56:08 +02:00
</pre>
</div>
2020-07-20 11:27:55 +02:00
<div id="org11f3e44" class="figure">
<p><img src="figs/apa95ml_5kg_10V_coh.png" alt="apa95ml_5kg_10V_coh.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Coherence</p>
</div>
<div id="orge10c988" class="figure">
<p><img src="figs/apa95ml_5kg_10V_tf.png" alt="apa95ml_5kg_10V_tf.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Estimation of the transfer function from input voltage to displacement</p>
</div>
</div>
2020-07-17 11:56:08 +02:00
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
2020-07-20 11:27:55 +02:00
<p class="date">Created: 2020-07-20 lun. 11:27</p>
2020-07-17 11:56:08 +02:00
</div>
</body>
</html>