Update old analysis: add zip and matlab file.

This commit is contained in:
Thomas Dehaeze 2019-07-05 11:35:40 +02:00
parent 7b5c8455a2
commit 336d5880cc
4 changed files with 986 additions and 124 deletions

Binary file not shown.

View File

@ -3,12 +3,12 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2019-04-02 mar. 10:39 -->
<!-- 2019-07-05 ven. 11:35 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Measurement Analysis</title>
<meta name="generator" content="Org mode" />
<meta name="author" content="Thomas Dehaeze" />
<meta name="author" content="Dehaeze Thomas" />
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
.title { text-align: center;
@ -195,10 +195,11 @@
</style>
<link rel="stylesheet" type="text/css" href="../css/htmlize.css"/>
<link rel="stylesheet" type="text/css" href="../css/readtheorg.css"/>
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/jquery.stickytableheaders.min.js"></script>
<script src="../js/readtheorg.js"></script>
<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 type="text/javascript">
/*
@licstart The following is the entire license notice for the
@ -247,37 +248,44 @@ for the JavaScript code in this tag.
</script>
</head>
<body>
<div id="content">
<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">Measurement Analysis</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orga57c824">1. Measurement Description</a></li>
<li><a href="#orgac83bb1">2. Importation of the data</a></li>
<li><a href="#orge44c773">3. Variables for analysis</a></li>
<li><a href="#orgcb0a2db">4. Coherence between the two vertical geophones on the Tilt Stage</a></li>
<li><a href="#orgc619b39">5. Data Post Processing</a></li>
<li><a href="#org03ef418">6. Normalization</a></li>
<li><a href="#org8583637">7. Measurement 1 - Effect of Ty stage</a></li>
<li><a href="#org47192a7">8. Measurement 2 - Effect of Ry stage</a></li>
<li><a href="#org0c3a1d4">9. Measurement 3 - Effect of the Hexapod</a></li>
<li><a href="#org1529580">10. Measurement 4 - Effect of the Splip-Ring and Spindle</a></li>
<li><a href="#orga767d61">11. Measurement 5 - Transmission from ground to marble</a></li>
<li><a href="#org3a9a926">1. Measurement Description</a></li>
<li><a href="#orga751c46">2. Importation of the data</a></li>
<li><a href="#orgbb22f41">3. Variables for analysis</a></li>
<li><a href="#orgfad99e2">4. Coherence between the two vertical geophones on the Tilt Stage</a></li>
<li><a href="#org95ba164">5. Data Post Processing</a></li>
<li><a href="#org7ad093b">6. Normalization</a></li>
<li><a href="#org2a0c6af">7. Measurement 1 - Effect of Ty stage</a></li>
<li><a href="#orgc84b427">8. Measurement 2 - Effect of Ry stage</a></li>
<li><a href="#org735052a">9. Measurement 3 - Effect of the Hexapod</a></li>
<li><a href="#org567caf5">10. Measurement 4 - Effect of the Splip-Ring and Spindle</a></li>
<li><a href="#orgbd1a834">11. Measurement 5 - Transmission from ground to marble</a></li>
</ul>
</div>
</div>
<div class="note">
<p>
<a href="../index.html">Back to main page</a>.
All the files (data and Matlab scripts) are accessible <a href="data/meas_analysis_geophones.zip">here</a>.
</p>
<div id="outline-container-orga57c824" class="outline-2">
<h2 id="orga57c824"><span class="section-number-2">1</span> Measurement Description</h2>
</div>
<div id="outline-container-org3a9a926" class="outline-2">
<h2 id="org3a9a926"><span class="section-number-2">1</span> Measurement Description</h2>
<div class="outline-text-2" id="text-1">
<div id="orgc56bc67" class="figure">
<p><img src="./figs/setup_picture.png" alt="setup_picture.png" />
<div id="org842eee7" class="figure">
<p><img src="./figs/setup_picture.png" alt="setup_picture.png" width="500px" />
</p>
<p><span class="figure-number">Figure 1: </span>Picture of the setup for the measurement</p>
</div>
@ -296,8 +304,8 @@ The goal is to see what noise is injected in the system due to the regulation lo
</div>
</div>
<div id="outline-container-orgac83bb1" class="outline-2">
<h2 id="orgac83bb1"><span class="section-number-2">2</span> Importation of the data</h2>
<div id="outline-container-orga751c46" class="outline-2">
<h2 id="orga751c46"><span class="section-number-2">2</span> Importation of the data</h2>
<div class="outline-text-2" id="text-2">
<p>
First, load all the measurement files:
@ -322,10 +330,10 @@ meas<span class="org-rainbow-delimiters-depth-1">{</span><span class="org-highli
</div>
<p>
For the measurements 1 to 4, the measurement channels are shown table <a href="#org7e4418b">1</a>.
For the measurements 1 to 4, the measurement channels are shown table <a href="#orgf8d6e45">1</a>.
</p>
<table id="org7e4418b" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgf8d6e45" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 1:</span> Channels for measurements 1 to 4</caption>
<colgroup>
@ -378,9 +386,9 @@ For the measurements 1 to 4, the measurement channels are shown table <a href="#
<p>
For the measurement 5, the channels are shown table <a href="#org00892de">2</a>.
For the measurement 5, the channels are shown table <a href="#org5907f53">2</a>.
</p>
<table id="org00892de" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org5907f53" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 2:</span> Channels for measurement 5</caption>
<colgroup>
@ -416,8 +424,8 @@ For the measurement 5, the channels are shown table <a href="#org00892de">2</a>.
</div>
</div>
<div id="outline-container-orge44c773" class="outline-2">
<h2 id="orge44c773"><span class="section-number-2">3</span> Variables for analysis</h2>
<div id="outline-container-orgbb22f41" class="outline-2">
<h2 id="orgbb22f41"><span class="section-number-2">3</span> Variables for analysis</h2>
<div class="outline-text-2" id="text-3">
<p>
We define the sampling frequency and the time vectors for the plots.
@ -426,11 +434,11 @@ We define the sampling frequency and the time vectors for the plots.
<div class="org-src-container">
<pre class="src src-matlab">Fs = <span class="org-highlight-numbers-number">256</span>; <span class="org-comment">% [Hz]</span>
dt = <span class="org-highlight-numbers-number">1</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-1">(</span>Fs<span class="org-rainbow-delimiters-depth-1">)</span>;
t1 = dt<span class="org-type">*</span><span class="org-rainbow-delimiters-depth-1">[</span><span class="org-highlight-numbers-number">0</span><span class="org-type">:</span>length<span class="org-rainbow-delimiters-depth-2">(</span>meas<span class="org-rainbow-delimiters-depth-3">{</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-3">}</span>.Track1<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">]</span>;
t2 = dt<span class="org-type">*</span><span class="org-rainbow-delimiters-depth-1">[</span><span class="org-highlight-numbers-number">0</span><span class="org-type">:</span>length<span class="org-rainbow-delimiters-depth-2">(</span>meas<span class="org-rainbow-delimiters-depth-3">{</span><span class="org-highlight-numbers-number">2</span><span class="org-rainbow-delimiters-depth-3">}</span>.Track1<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">]</span>;
t3 = dt<span class="org-type">*</span><span class="org-rainbow-delimiters-depth-1">[</span><span class="org-highlight-numbers-number">0</span><span class="org-type">:</span>length<span class="org-rainbow-delimiters-depth-2">(</span>meas<span class="org-rainbow-delimiters-depth-3">{</span><span class="org-highlight-numbers-number">3</span><span class="org-rainbow-delimiters-depth-3">}</span>.Track1<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">]</span>;
t4 = dt<span class="org-type">*</span><span class="org-rainbow-delimiters-depth-1">[</span><span class="org-highlight-numbers-number">0</span><span class="org-type">:</span>length<span class="org-rainbow-delimiters-depth-2">(</span>meas<span class="org-rainbow-delimiters-depth-3">{</span><span class="org-highlight-numbers-number">4</span><span class="org-rainbow-delimiters-depth-3">}</span>.Track1<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">]</span>;
t5 = dt<span class="org-type">*</span><span class="org-rainbow-delimiters-depth-1">[</span><span class="org-highlight-numbers-number">0</span><span class="org-type">:</span>length<span class="org-rainbow-delimiters-depth-2">(</span>meas<span class="org-rainbow-delimiters-depth-3">{</span><span class="org-highlight-numbers-number">5</span><span class="org-rainbow-delimiters-depth-3">}</span>.Track1<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">]</span>;
t1 = dt<span class="org-type">*</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">0</span><span class="org-type">:</span>length<span class="org-rainbow-delimiters-depth-2">(</span>meas<span class="org-rainbow-delimiters-depth-3">{</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-3">}</span>.Track1<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">)</span>;
t2 = dt<span class="org-type">*</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">0</span><span class="org-type">:</span>length<span class="org-rainbow-delimiters-depth-2">(</span>meas<span class="org-rainbow-delimiters-depth-3">{</span><span class="org-highlight-numbers-number">2</span><span class="org-rainbow-delimiters-depth-3">}</span>.Track1<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">)</span>;
t3 = dt<span class="org-type">*</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">0</span><span class="org-type">:</span>length<span class="org-rainbow-delimiters-depth-2">(</span>meas<span class="org-rainbow-delimiters-depth-3">{</span><span class="org-highlight-numbers-number">3</span><span class="org-rainbow-delimiters-depth-3">}</span>.Track1<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">)</span>;
t4 = dt<span class="org-type">*</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">0</span><span class="org-type">:</span>length<span class="org-rainbow-delimiters-depth-2">(</span>meas<span class="org-rainbow-delimiters-depth-3">{</span><span class="org-highlight-numbers-number">4</span><span class="org-rainbow-delimiters-depth-3">}</span>.Track1<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">)</span>;
t5 = dt<span class="org-type">*</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">0</span><span class="org-type">:</span>length<span class="org-rainbow-delimiters-depth-2">(</span>meas<span class="org-rainbow-delimiters-depth-3">{</span><span class="org-highlight-numbers-number">5</span><span class="org-rainbow-delimiters-depth-3">}</span>.Track1<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">-</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">)</span>;
</pre>
</div>
@ -453,11 +461,11 @@ Then we define the windows that will be used to average the results.
</div>
</div>
<div id="outline-container-orgcb0a2db" class="outline-2">
<h2 id="orgcb0a2db"><span class="section-number-2">4</span> Coherence between the two vertical geophones on the Tilt Stage</h2>
<div id="outline-container-orgfad99e2" class="outline-2">
<h2 id="orgfad99e2"><span class="section-number-2">4</span> Coherence between the two vertical geophones on the Tilt Stage</h2>
<div class="outline-text-2" id="text-4">
<p>
We first compute the coherence between the two geophones located on the tilt stage. The result is shown on figure <a href="#org3d4d6fd">2</a>.
We first compute the coherence between the two geophones located on the tilt stage. The result is shown on figure <a href="#orgb80e1a5">2</a>.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-rainbow-delimiters-depth-1">[</span>coh, f<span class="org-rainbow-delimiters-depth-1">]</span> = mscohere<span class="org-rainbow-delimiters-depth-1">(</span>meas<span class="org-rainbow-delimiters-depth-2">{</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-2">}</span>.Track1<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-type">:</span><span class="org-rainbow-delimiters-depth-2">)</span>, meas<span class="org-rainbow-delimiters-depth-2">{</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-2">}</span>.Track2<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-type">:</span><span class="org-rainbow-delimiters-depth-2">)</span>, psd_window, <span class="org-rainbow-delimiters-depth-2">[]</span>, <span class="org-rainbow-delimiters-depth-2">[]</span>, Fs<span class="org-rainbow-delimiters-depth-1">)</span>;
@ -465,14 +473,14 @@ We first compute the coherence between the two geophones located on the tilt sta
</div>
<div id="org3d4d6fd" class="figure">
<div id="orgb80e1a5" class="figure">
<p><img src="figs/coherence_vertical_tilt_sensors.png" alt="coherence_vertical_tilt_sensors.png" />
</p>
<p><span class="figure-number">Figure 2: </span>Coherence between the two vertical sensors positionned on the Tilt Stage</p>
</div>
<p>
We then compute the transfer function from one sensor to the other (figure <a href="#org62100a4">3</a>).
We then compute the transfer function from one sensor to the other (figure <a href="#org9c39675">3</a>).
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-rainbow-delimiters-depth-1">[</span>tf23, f<span class="org-rainbow-delimiters-depth-1">]</span> = tfestimate<span class="org-rainbow-delimiters-depth-1">(</span>meas<span class="org-rainbow-delimiters-depth-2">{</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-2">}</span>.Track1<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-type">:</span><span class="org-rainbow-delimiters-depth-2">)</span>, meas<span class="org-rainbow-delimiters-depth-2">{</span><span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-2">}</span>.Track2<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-type">:</span><span class="org-rainbow-delimiters-depth-2">)</span>, psd_window, <span class="org-rainbow-delimiters-depth-2">[]</span>, <span class="org-rainbow-delimiters-depth-2">[]</span>, Fs<span class="org-rainbow-delimiters-depth-1">)</span>;
@ -480,7 +488,7 @@ We then compute the transfer function from one sensor to the other (figure <a hr
</div>
<div id="org62100a4" class="figure">
<div id="org9c39675" class="figure">
<p><img src="figs/tf_vertical_tilt_sensors.png" alt="tf_vertical_tilt_sensors.png" />
</p>
<p><span class="figure-number">Figure 3: </span>Transfer function from one vertical geophone on the tilt stage to the other vertical geophone on the tilt stage</p>
@ -492,8 +500,8 @@ Even though the coherence is not very good, we observe no resonance between the
</div>
</div>
<div id="outline-container-orgc619b39" class="outline-2">
<h2 id="orgc619b39"><span class="section-number-2">5</span> Data Post Processing</h2>
<div id="outline-container-org95ba164" class="outline-2">
<h2 id="org95ba164"><span class="section-number-2">5</span> Data Post Processing</h2>
<div class="outline-text-2" id="text-5">
<p>
When using two geophone sensors on the same tilt stage (measurements 1 and 2), we post-process the data to obtain the z displacement and the rotation of the tilt stage:
@ -523,12 +531,12 @@ meas<span class="org-rainbow-delimiters-depth-1">{</span><span class="org-highli
</div>
</div>
<div id="outline-container-org03ef418" class="outline-2">
<h2 id="org03ef418"><span class="section-number-2">6</span> Normalization</h2>
<div id="outline-container-org7ad093b" class="outline-2">
<h2 id="org7ad093b"><span class="section-number-2">6</span> Normalization</h2>
<div class="outline-text-2" id="text-6">
<p>
Parameters of the geophone are defined below.
The transfer function from geophone velocity to measured voltage is shown on figure <a href="#org47ba141">4</a>.
The transfer function from geophone velocity to measured voltage is shown on figure <a href="#org9f3edd8">4</a>.
</p>
<p>
@ -539,12 +547,12 @@ Measurements will be normalized by the inverse of this transfer function in orde
<pre class="src src-matlab">L4C_w0 = <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span><span class="org-constant">pi</span>; <span class="org-comment">% [rad/s]</span>
L4C_ksi = <span class="org-highlight-numbers-number">0</span>.<span class="org-highlight-numbers-number">28</span>;
L4C_G0 = <span class="org-highlight-numbers-number">276</span>.<span class="org-highlight-numbers-number">8</span>; <span class="org-comment">% [V/(m/s)]</span>
[Omitted long matching line]
L4C_G = L4C_G0<span class="org-type">*</span><span class="org-rainbow-delimiters-depth-1">(</span>s<span class="org-type">/</span>L4C_w0<span class="org-rainbow-delimiters-depth-1">)</span><span class="org-type">^</span><span class="org-highlight-numbers-number">2</span><span class="org-type">/</span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-rainbow-delimiters-depth-2">(</span>s<span class="org-type">/</span>L4C_w0<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-type">^</span><span class="org-highlight-numbers-number">2</span> <span class="org-type">+</span> <span class="org-highlight-numbers-number">2</span><span class="org-type">*</span>L4C_ksi<span class="org-type">*</span><span class="org-rainbow-delimiters-depth-2">(</span>s<span class="org-type">/</span>L4C_w0<span class="org-rainbow-delimiters-depth-2">)</span> <span class="org-type">+</span> <span class="org-highlight-numbers-number">1</span><span class="org-rainbow-delimiters-depth-1">)</span>;
</pre>
</div>
<div id="org47ba141" class="figure">
<div id="org9f3edd8" class="figure">
<p><img src="figs/L4C_bode_plot.png" alt="L4C_bode_plot.png" />
</p>
<p><span class="figure-number">Figure 4: </span>Bode plot of the L4C Geophone</p>
@ -600,14 +608,14 @@ meas<span class="org-rainbow-delimiters-depth-1">{</span><span class="org-highli
</div>
</div>
<div id="outline-container-org8583637" class="outline-2">
<h2 id="org8583637"><span class="section-number-2">7</span> Measurement 1 - Effect of Ty stage</h2>
<div id="outline-container-org2a0c6af" class="outline-2">
<h2 id="org2a0c6af"><span class="section-number-2">7</span> Measurement 1 - Effect of Ty stage</h2>
<div class="outline-text-2" id="text-7">
<p>
The configuration for this measurement is shown table <a href="#orgc1f3234">3</a>.
The configuration for this measurement is shown table <a href="#orgb2c9cfc">3</a>.
</p>
<table id="orgc1f3234" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgb2c9cfc" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 3:</span> Stages configuration - Measurement 1</caption>
<colgroup>
@ -658,7 +666,7 @@ The configuration for this measurement is shown table <a href="#orgc1f3234">3</a
</table>
<p>
We then plot the measurements in time domain (figure <a href="#orgf931943">5</a>).
We then plot the measurements in time domain (figure <a href="#orge80ff30">5</a>).
</p>
<div class="important">
@ -670,7 +678,7 @@ How can we explain that?
</div>
<div id="orgf931943" class="figure">
<div id="orge80ff30" class="figure">
<p><img src="figs/meas1.png" alt="meas1.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Time domain - measurement 1</p>
@ -681,10 +689,10 @@ To understand what is going on, instead of looking at the velocity, we can look
</p>
<p>
Then we plot the position with respect to time (figure <a href="#orgb6bceab">6</a>).
Then we plot the position with respect to time (figure <a href="#orga73c9be">6</a>).
</p>
<div id="orgb6bceab" class="figure">
<div id="orga73c9be" class="figure">
<p><img src="figs/meas1_disp.png" alt="meas1_disp.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Y displacement of the Ty stage</p>
@ -706,25 +714,25 @@ We when compute the power spectral density of each measurement before and after
</div>
<p>
We finally plot the power spectral density of each track (figures <a href="#org767e453">7</a>, <a href="#org8cd1899">8</a>, <a href="#org3030170">9</a>).
We finally plot the power spectral density of each track (figures <a href="#org612c087">7</a>, <a href="#org41d5f1b">8</a>, <a href="#orgc543ef7">9</a>).
</p>
<div id="org767e453" class="figure">
<div id="org612c087" class="figure">
<p><img src="figs/meas1_ry_z_psd.png" alt="meas1_ry_z_psd.png" />
</p>
<p><span class="figure-number">Figure 7: </span>PSD of the Z velocity of Ry stage - measurement 1</p>
</div>
<div id="org8cd1899" class="figure">
<div id="org41d5f1b" class="figure">
<p><img src="figs/meas1_ry_tilt_psd.png" alt="meas1_ry_tilt_psd.png" />
</p>
<p><span class="figure-number">Figure 8: </span>PSD of the Rotation of Ry Stage - measurement 1</p>
</div>
<div id="org3030170" class="figure">
<div id="orgc543ef7" class="figure">
<p><img src="figs/meas1_ty_y_psd.png" alt="meas1_ty_y_psd.png" />
</p>
<p><span class="figure-number">Figure 9: </span>PSD of the Ty velocity in the Y direction - measurement 1</p>
@ -748,14 +756,14 @@ It does not seems to have any effect on the Z motion of the tilt stage.
</div>
</div>
<div id="outline-container-org47192a7" class="outline-2">
<h2 id="org47192a7"><span class="section-number-2">8</span> Measurement 2 - Effect of Ry stage</h2>
<div id="outline-container-orgc84b427" class="outline-2">
<h2 id="orgc84b427"><span class="section-number-2">8</span> Measurement 2 - Effect of Ry stage</h2>
<div class="outline-text-2" id="text-8">
<p>
The tilt stage is turned ON at around 326 seconds (table <a href="#orgba0882e">4</a>).
The tilt stage is turned ON at around 326 seconds (table <a href="#orgb1e5f86">4</a>).
</p>
<table id="orgba0882e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="orgb1e5f86" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 4:</span> Stages configuration - Measurement 2</caption>
<colgroup>
@ -806,25 +814,25 @@ The tilt stage is turned ON at around 326 seconds (table <a href="#orgba0882e">4
</table>
<p>
We plot the time domain (figure <a href="#org9bf6e90">10</a>) and we don't observe anything special in the time domain.
We plot the time domain (figure <a href="#orgd48d30c">10</a>) and we don't observe anything special in the time domain.
</p>
<div id="org9bf6e90" class="figure">
<div id="orgd48d30c" class="figure">
<p><img src="figs/meas2.png" alt="meas2.png" />
</p>
<p><span class="figure-number">Figure 10: </span>Time domain - measurement 2</p>
</div>
<div id="org767f834" class="figure">
<div id="org603b8af" class="figure">
<p><img src="figs/meas2_disp.png" alt="meas2_disp.png" />
</p>
<p><span class="figure-number">Figure 11: </span>Time domain - measurement 2</p>
</div>
<p>
We compute the PSD of each track and we plot them (figures <a href="#org23fbfb4">12</a>, <a href="#org7a18c86">13</a> and <a href="#orgdcf33e8">14</a> ).
We compute the PSD of each track and we plot them (figures <a href="#orge84422e">12</a>, <a href="#orga5f41c7">13</a> and <a href="#org7c30a4f">14</a> ).
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-rainbow-delimiters-depth-1">[</span>pxx211, f21<span class="org-rainbow-delimiters-depth-1">]</span> = pwelch<span class="org-rainbow-delimiters-depth-1">(</span>meas<span class="org-rainbow-delimiters-depth-2">{</span><span class="org-highlight-numbers-number">2</span><span class="org-rainbow-delimiters-depth-2">}</span>.Track1<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span>ceil<span class="org-rainbow-delimiters-depth-3">(</span><span class="org-highlight-numbers-number">326</span><span class="org-type">/</span>dt<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-rainbow-delimiters-depth-2">)</span>, psd_window, <span class="org-rainbow-delimiters-depth-2">[]</span>, <span class="org-rainbow-delimiters-depth-2">[]</span>, Fs<span class="org-rainbow-delimiters-depth-1">)</span>;
@ -839,21 +847,21 @@ We compute the PSD of each track and we plot them (figures <a href="#org23fbfb4"
</div>
<div id="org23fbfb4" class="figure">
<div id="orge84422e" class="figure">
<p><img src="figs/meas2_ry_z_psd.png" alt="meas2_ry_z_psd.png" />
</p>
<p><span class="figure-number">Figure 12: </span>PSD of the Z velocity of Ry Stage - measurement 2</p>
</div>
<div id="org7a18c86" class="figure">
<div id="orga5f41c7" class="figure">
<p><img src="figs/meas2_ry_tilt_psd.png" alt="meas2_ry_tilt_psd.png" />
</p>
<p><span class="figure-number">Figure 13: </span>PSD of the Rotation motion of Ry Stage - measurement 2</p>
</div>
<div id="orgdcf33e8" class="figure">
<div id="org7c30a4f" class="figure">
<p><img src="figs/meas2_ty_y_psd.png" alt="meas2_ty_y_psd.png" />
</p>
<p><span class="figure-number">Figure 14: </span>PSD of the Ty velocity in the Y direction - measurement 2</p>
@ -868,14 +876,14 @@ We observe no noticeable difference when the Tilt-stage is turned ON expect a sm
</div>
</div>
<div id="outline-container-org0c3a1d4" class="outline-2">
<h2 id="org0c3a1d4"><span class="section-number-2">9</span> Measurement 3 - Effect of the Hexapod</h2>
<div id="outline-container-org735052a" class="outline-2">
<h2 id="org735052a"><span class="section-number-2">9</span> Measurement 3 - Effect of the Hexapod</h2>
<div class="outline-text-2" id="text-9">
<p>
The hexapod is turned off after 406 seconds (table <a href="#org8b4187d">5</a>).
The hexapod is turned off after 406 seconds (table <a href="#org173876d">5</a>).
</p>
<table id="org8b4187d" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org173876d" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 5:</span> Stages configuration - Measurement 3</caption>
<colgroup>
@ -926,25 +934,25 @@ The hexapod is turned off after 406 seconds (table <a href="#org8b4187d">5</a>).
</table>
<p>
The time domain result is shown figure <a href="#org08fc17d">15</a>.
The time domain result is shown figure <a href="#orgf7e79c3">15</a>.
</p>
<div id="org08fc17d" class="figure">
<div id="orgf7e79c3" class="figure">
<p><img src="figs/meas3.png" alt="meas3.png" />
</p>
<p><span class="figure-number">Figure 15: </span>Time domain - measurement 3</p>
</div>
<div id="org4ae7ca4" class="figure">
<div id="org5206570" class="figure">
<p><img src="figs/meas3_disp.png" alt="meas3_disp.png" />
</p>
<p><span class="figure-number">Figure 16: </span>Time domain - measurement 3</p>
</div>
<p>
We then compute the PSD of each track before and after turning off the hexapod and plot the results in the figures <a href="#org0c4287e">17</a>, <a href="#org899151a">18</a> and <a href="#org0fc8e31">19</a>.
We then compute the PSD of each track before and after turning off the hexapod and plot the results in the figures <a href="#orgb6df1c9">17</a>, <a href="#org0169c44">18</a> and <a href="#org02dedc8">19</a>.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-rainbow-delimiters-depth-1">[</span>pxx311, f31<span class="org-rainbow-delimiters-depth-1">]</span> = pwelch<span class="org-rainbow-delimiters-depth-1">(</span>meas<span class="org-rainbow-delimiters-depth-2">{</span><span class="org-highlight-numbers-number">3</span><span class="org-rainbow-delimiters-depth-2">}</span>.Track1<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">:</span>ceil<span class="org-rainbow-delimiters-depth-3">(</span><span class="org-highlight-numbers-number">400</span><span class="org-type">/</span>dt<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-rainbow-delimiters-depth-2">)</span>, psd_window, <span class="org-rainbow-delimiters-depth-2">[]</span>, <span class="org-rainbow-delimiters-depth-2">[]</span>, Fs<span class="org-rainbow-delimiters-depth-1">)</span>;
@ -959,21 +967,21 @@ We then compute the PSD of each track before and after turning off the hexapod a
</div>
<div id="org0c4287e" class="figure">
<div id="orgb6df1c9" class="figure">
<p><img src="figs/meas3_hexa_z_psd.png" alt="meas3_hexa_z_psd.png" />
</p>
<p><span class="figure-number">Figure 17: </span>PSD of the Z velocity of the Hexapod - measurement 3</p>
</div>
<div id="org899151a" class="figure">
<div id="org0169c44" class="figure">
<p><img src="figs/meas3_ry_z_psd.png" alt="meas3_ry_z_psd.png" />
</p>
<p><span class="figure-number">Figure 18: </span>PSD of the Z velocity of the Ry stage - measurement 3</p>
</div>
<div id="org0fc8e31" class="figure">
<div id="org02dedc8" class="figure">
<p><img src="figs/meas3_ty_y_psd.png" alt="meas3_ty_y_psd.png" />
</p>
<p><span class="figure-number">Figure 19: </span>PSD of the Ty velocity in the Y direction - measurement 3</p>
@ -981,7 +989,7 @@ We then compute the PSD of each track before and after turning off the hexapod a
<div class="important">
<p>
Turning ON induces some motion on the hexapod in the z direction (figure <a href="#org0c4287e">17</a>), on the tilt stage in the z direction (figure <a href="#org899151a">18</a>) and on the y motion of the Ty stage (figure <a href="#org0fc8e31">19</a>):
Turning ON induces some motion on the hexapod in the z direction (figure <a href="#orgb6df1c9">17</a>), on the tilt stage in the z direction (figure <a href="#org0169c44">18</a>) and on the y motion of the Ty stage (figure <a href="#org02dedc8">19</a>):
</p>
<ul class="org-ul">
<li>at 17Hz</li>
@ -992,14 +1000,14 @@ Turning ON induces some motion on the hexapod in the z direction (figure <a href
</div>
</div>
<div id="outline-container-org1529580" class="outline-2">
<h2 id="org1529580"><span class="section-number-2">10</span> Measurement 4 - Effect of the Splip-Ring and Spindle</h2>
<div id="outline-container-org567caf5" class="outline-2">
<h2 id="org567caf5"><span class="section-number-2">10</span> Measurement 4 - Effect of the Splip-Ring and Spindle</h2>
<div class="outline-text-2" id="text-10">
<p>
The slip ring is turned on at 300s, then the spindle is turned on at 620s (table <a href="#org274f078">6</a>). The time domain signals are shown figure <a href="#orgf0966f9">20</a>.
The slip ring is turned on at 300s, then the spindle is turned on at 620s (table <a href="#org3b56920">6</a>). The time domain signals are shown figure <a href="#org2d96c98">20</a>.
</p>
<table id="org274f078" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<table id="org3b56920" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 6:</span> Stages configuration - Measurement 4</caption>
<colgroup>
@ -1058,18 +1066,18 @@ The slip ring is turned on at 300s, then the spindle is turned on at 620s (table
</table>
<div id="orgf0966f9" class="figure">
<div id="org2d96c98" class="figure">
<p><img src="figs/meas4.png" alt="meas4.png" />
</p>
<p><span class="figure-number">Figure 20: </span>Time domain - measurement 4</p>
</div>
<p>
If we integrate this signal, we obtain Figure <a href="#org62b5bdf">21</a>.
If we integrate this signal, we obtain Figure <a href="#org3420b14">21</a>.
</p>
<div id="org62b5bdf" class="figure">
<div id="org3420b14" class="figure">
<p><img src="figs/meas4_int.png" alt="meas4_int.png" />
</p>
<p><span class="figure-number">Figure 21: </span>Time domain - measurement 4</p>
@ -1079,7 +1087,7 @@ If we integrate this signal, we obtain Figure <a href="#org62b5bdf">21</a>.
The PSD of each track are computed using the code below.
</p>
<div id="orgfd7f8ce" class="figure">
<div id="orgd9a5a57" class="figure">
<p><img src="figs/meas4_hexa_z_psd.png" alt="meas4_hexa_z_psd.png" />
</p>
<p><span class="figure-number">Figure 22: </span>PSD of the Z velocity of the Hexapod - measurement 4</p>
@ -1089,7 +1097,7 @@ The PSD of each track are computed using the code below.
We plot the PSD of the displacement.
</p>
<div id="org917dbdc" class="figure">
<div id="org13210e8" class="figure">
<p><img src="figs/meas4_hexa_z_psd_int.png" alt="meas4_hexa_z_psd_int.png" />
</p>
<p><span class="figure-number">Figure 23: </span>PSD<sub>INT</sub> of the Z velocity of the Hexapod - measurement 4</p>
@ -1099,7 +1107,7 @@ We plot the PSD of the displacement.
And we compute the Cumulative amplitude spectrum.
</p>
<div id="orge4b6d59" class="figure">
<div id="orga20c0b8" class="figure">
<p><img src="figs/meas4_ry_z_psd.png" alt="meas4_ry_z_psd.png" />
</p>
<p><span class="figure-number">Figure 24: </span>PSD of the Ry rotation in the Y direction - measurement 4</p>
@ -1107,7 +1115,7 @@ And we compute the Cumulative amplitude spectrum.
<div id="org08ad3dc" class="figure">
<div id="orgde0719f" class="figure">
<p><img src="figs/meas4_ty_y_psd.png" alt="meas4_ty_y_psd.png" />
</p>
<p><span class="figure-number">Figure 25: </span>PSD of the Ty velocity in the Y direction - measurement 4</p>
@ -1117,7 +1125,7 @@ And we compute the Cumulative amplitude spectrum.
<div class="important">
<p>
Turning ON the splipring seems to not add motions on the stages measured.
It even seems to lower the motion of the Ty stage (figure <a href="#org08ad3dc">25</a>): does that make any sense?
It even seems to lower the motion of the Ty stage (figure <a href="#orgde0719f">25</a>): does that make any sense?
</p>
<p>
@ -1133,26 +1141,26 @@ Turning ON the spindle induces motions:
</div>
</div>
<div id="outline-container-orga767d61" class="outline-2">
<h2 id="orga767d61"><span class="section-number-2">11</span> Measurement 5 - Transmission from ground to marble</h2>
<div id="outline-container-orgbd1a834" class="outline-2">
<h2 id="orgbd1a834"><span class="section-number-2">11</span> Measurement 5 - Transmission from ground to marble</h2>
<div class="outline-text-2" id="text-11">
<p>
This measurement just consists of measurement of Y-Z motion of the ground and the marble.
</p>
<p>
The time domain signals are shown on figure <a href="#orgc513617">26</a>.
The time domain signals are shown on figure <a href="#org3d00bca">26</a>.
</p>
<div id="orgc513617" class="figure">
<div id="org3d00bca" class="figure">
<p><img src="figs/meas5.png" alt="meas5.png" />
</p>
<p><span class="figure-number">Figure 26: </span>Time domain - measurement 5</p>
</div>
<p>
We compute the PSD of each track and we plot the PSD of the Z motion for the ground and marble on figure <a href="#org28b0b94">27</a> and for the Y motion on figure <a href="#orgf797eae">28</a>.
We compute the PSD of each track and we plot the PSD of the Z motion for the ground and marble on figure <a href="#orgc4070a5">27</a> and for the Y motion on figure <a href="#org9f35e98">28</a>.
</p>
<div class="org-src-container">
@ -1164,14 +1172,14 @@ We compute the PSD of each track and we plot the PSD of the Z motion for the gro
</div>
<div id="org28b0b94" class="figure">
<div id="orgc4070a5" class="figure">
<p><img src="figs/meas5_z_psd.png" alt="meas5_z_psd.png" />
</p>
<p><span class="figure-number">Figure 27: </span>PSD of the ground and marble in the Z direction</p>
</div>
<div id="orgf797eae" class="figure">
<div id="org9f35e98" class="figure">
<p><img src="figs/meas5_y_psd.png" alt="meas5_y_psd.png" />
</p>
<p><span class="figure-number">Figure 28: </span>PSD of the ground and marble in the Y direction</p>
@ -1179,7 +1187,7 @@ We compute the PSD of each track and we plot the PSD of the Z motion for the gro
<p>
Then, instead of looking at the Power Spectral Density, we can try to estimate the transfer function from a ground motion to the motion of the marble.
The transfer functions are shown on figure <a href="#orgbb283a9">29</a> and the coherence on figure <a href="#orga357e58">30</a>.
The transfer functions are shown on figure <a href="#org30b772d">29</a> and the coherence on figure <a href="#orgd6d1e80">30</a>.
</p>
<div class="org-src-container">
@ -1189,7 +1197,7 @@ The transfer functions are shown on figure <a href="#orgbb283a9">29</a> and the
</div>
<div id="orgbb283a9" class="figure">
<div id="org30b772d" class="figure">
<p><img src="figs/meas5_tf.png" alt="meas5_tf.png" />
</p>
<p><span class="figure-number">Figure 29: </span>Transfer function estimation - measurement 5</p>
@ -1202,7 +1210,7 @@ The transfer functions are shown on figure <a href="#orgbb283a9">29</a> and the
</div>
<div id="orga357e58" class="figure">
<div id="orgd6d1e80" class="figure">
<p><img src="figs/meas5_coh.png" alt="meas5_coh.png" />
</p>
<p><span class="figure-number">Figure 30: </span>Coherence - measurement 5</p>
@ -1219,8 +1227,8 @@ But the coherence is not good above 20Hz, so it is difficult to estimate resonan
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Thomas Dehaeze</p>
<p class="date">Created: 2019-04-02 mar. 10:39</p>
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2019-07-05 ven. 11:35</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>

View File

@ -25,10 +25,27 @@
#+PROPERTY: header-args:matlab+ :exports both
#+PROPERTY: header-args:matlab+ :eval no-export
#+PROPERTY: header-args:matlab+ :output-dir figs
#+PROPERTY: header-args:matlab+ :tangle matlab/meas_analysis_geophones.m
#+PROPERTY: header-args:matlab+ :mkdirp yes
#+PROPERTY: header-args:shell :eval no-export
:END:
* ZIP file containing the data and matlab files :ignore:
#+begin_src bash :exports none :results none
if [ matlab/meas_analysis_geophones.m -nt data/meas_analysis_geophones.zip ]; then
cp matlab/meas_analysis_geophones.m meas_analysis_geophones.m;
zip data/meas_analysis_geophones \
mat/Measurement*.mat \
meas_analysis_geophones.m
rm meas_analysis_geophones.m;
fi
#+end_src
#+begin_note
All the files (data and Matlab scripts) are accessible [[file:data/meas_analysis_geophones.zip][here]].
#+end_note
* 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>>
@ -69,7 +86,7 @@ Change the track name for measurements 3 and 4.
For the measurements 1 to 4, the measurement channels are shown table [[tab:meas_14]].
#+begin_src matlab :exports results :results table :post addhdr(*this*)
#+begin_src matlab :exports results :results table :tangle no :post addhdr(*this*)
table_string = sprintf(' | Channel 1 | Channel 2 | Channel 3 \n');
for i = 1:4
table_string = [table_string, sprintf('Meas. %i | %s | %s | %s \n', i, meas{i}.Track1_Name, meas{i}.Track2_Name, meas{i}.Track3_Name)];
@ -89,9 +106,9 @@ For the measurements 1 to 4, the measurement channels are shown table [[tab:meas
For the measurement 5, the channels are shown table [[tab:meas_5]].
#+begin_src matlab :exports results :results table :post addhdr(*this*)
#+begin_src matlab :exports results :results table :tangle no :post addhdr(*this*)
table_string = sprintf(' | Channel 1 | Channel 2 | Channel 3 | Channel 4 \n');
i = 5
i = 5;
table_string = [table_string, sprintf('Meas. %i | %s | %s | %s | %s \n', i, meas{i}.Track1_Name, meas{i}.Track2_Name, meas{i}.Track3_Name, meas{i}.Track4_Name)];
ans = table_string
#+end_src
@ -109,11 +126,11 @@ We define the sampling frequency and the time vectors for the plots.
#+begin_src matlab :exports code :results silent
Fs = 256; % [Hz]
dt = 1/(Fs);
t1 = dt*[0:length(meas{1}.Track1)-1];
t2 = dt*[0:length(meas{2}.Track1)-1];
t3 = dt*[0:length(meas{3}.Track1)-1];
t4 = dt*[0:length(meas{4}.Track1)-1];
t5 = dt*[0:length(meas{5}.Track1)-1];
t1 = dt*(0:length(meas{1}.Track1)-1);
t2 = dt*(0:length(meas{2}.Track1)-1);
t3 = dt*(0:length(meas{3}.Track1)-1);
t4 = dt*(0:length(meas{4}.Track1)-1);
t5 = dt*(0:length(meas{5}.Track1)-1);
#+end_src
For the frequency analysis, we define the frequency limits for the plot.
@ -159,13 +176,13 @@ We then compute the transfer function from one sensor to the other (figure [[fig
#+begin_src matlab :results none :exports none
figure;
ax1 = subaxis(2,1,1);
ax1 = subplot(2,1,1);
plot(f, abs(tf23));
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
set(gca, 'XTickLabel',[]);
ylabel('Magnitude [V/(m/s)]');
ax2 = subaxis(2,1,2);
ax2 = subplot(2,1,2);
plot(f, 180/pi*angle(tf23));
set(gca,'xscale','log');
yticks(-180:90:180);
@ -228,13 +245,13 @@ Measurements will be normalized by the inverse of this transfer function in orde
freqs = logspace(-2, 2, 1000);
figure;
ax1 = subaxis(2,1,1);
ax1 = subplot(2,1,1);
plot(freqs, abs(squeeze(freqresp(L4C_G, freqs, 'Hz'))));
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
set(gca, 'XTickLabel',[]);
ylabel('Magnitude [V/(m/s)]');
ax2 = subaxis(2,1,2);
ax2 = subplot(2,1,2);
plot(freqs, 180/pi*angle(squeeze(freqresp(L4C_G, freqs, 'Hz'))));
set(gca,'xscale','log');
yticks(-180:90:180);
@ -806,7 +823,7 @@ The slip ring is turned on at 300s, then the spindle is turned on at 620s (table
#+begin_src matlab :exports none :results silent
figure;
subaxis(1, 2, 1);
subplot(1, 2, 1);
hold on;
plot(t4, cumtrapz(t4, meas{4}.Track1));
plot(t4, cumtrapz(t4, meas{4}.Track2));
@ -816,7 +833,7 @@ The slip ring is turned on at 300s, then the spindle is turned on at 620s (table
xlabel('Time [s]'); ylabel('Displacement [m]');
legend({meas{4}.Track1_Name, meas{4}.Track2_Name, meas{4}.Track3_Name}, 'Location', 'northwest')
subaxis(1, 2, 2);
subplot(1, 2, 2);
hold on;
plot(t4, cumtrapz(t4, meas{4}.Track1));
plot(t4, cumtrapz(t4, meas{4}.Track2));
@ -1101,7 +1118,7 @@ The transfer functions are shown on figure [[fig:meas5_tf]] and the coherence on
#+begin_src matlab :exports none :results silent
figure;
ax1 = subaxis(2,1,1);
ax1 = subplot(2,1,1);
hold on;
plot(fz, abs(tfz));
plot(fy, abs(tfy));
@ -1109,7 +1126,7 @@ The transfer functions are shown on figure [[fig:meas5_tf]] and the coherence on
set(gca, 'XTickLabel',[]);
ylabel('Magnitude');
hold off;
ax2 = subaxis(2,1,2);
ax2 = subplot(2,1,2);
hold on;
plot(fz, 180/pi*angle(tfz));
plot(fy, 180/pi*angle(tfy));

View File

@ -0,0 +1,837 @@
%% Clear Workspace and Close figures
clear; close all; clc;
%% Intialize Laplace variable
s = zpk('s');
% Importation of the data
% First, load all the measurement files:
meas = {};
meas{1} = load('./mat/Measurement1.mat');
meas{2} = load('./mat/Measurement2.mat');
meas{3} = load('./mat/Measurement3.mat');
meas{4} = load('./mat/Measurement4.mat');
meas{5} = load('./mat/Measurement5.mat');
% Change the track name for measurements 3 and 4.
meas{3}.Track1_Name = 'Input 1: Hexa Z';
meas{4}.Track1_Name = 'Input 1: Hexa Z';
% Variables for analysis
% We define the sampling frequency and the time vectors for the plots.
Fs = 256; % [Hz]
dt = 1/(Fs);
t1 = dt*(0:length(meas{1}.Track1)-1);
t2 = dt*(0:length(meas{2}.Track1)-1);
t3 = dt*(0:length(meas{3}.Track1)-1);
t4 = dt*(0:length(meas{4}.Track1)-1);
t5 = dt*(0:length(meas{5}.Track1)-1);
% For the frequency analysis, we define the frequency limits for the plot.
fmin = 1; % [Hz]
fmax = 100; % [Hz]
% Then we define the windows that will be used to average the results.
psd_window = hanning(2*fmin/dt);
% Coherence between the two vertical geophones on the Tilt Stage
% We first compute the coherence between the two geophones located on the tilt stage. The result is shown on figure [[fig:coherence_vertical_tilt_sensors]].
[coh, f] = mscohere(meas{1}.Track1(:), meas{1}.Track2(:), psd_window, [], [], Fs);
figure;
plot(f, coh);
set(gca, 'xscale', 'log');
ylim([0, 1]);
xlabel('Frequency [Hz]'); ylabel('Coherence');
% #+NAME: fig:coherence_vertical_tilt_sensors
% #+CAPTION: Coherence between the two vertical sensors positionned on the Tilt Stage
% #+RESULTS: fig:coherence_vertical_tilt_sensors
% [[file:figs/coherence_vertical_tilt_sensors.png]]
% We then compute the transfer function from one sensor to the other (figure [[fig:tf_vertical_tilt_sensors]]).
[tf23, f] = tfestimate(meas{1}.Track1(:), meas{1}.Track2(:), psd_window, [], [], Fs);
figure;
ax1 = subplot(2,1,1);
plot(f, abs(tf23));
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
set(gca, 'XTickLabel',[]);
ylabel('Magnitude [V/(m/s)]');
ax2 = subplot(2,1,2);
plot(f, 180/pi*angle(tf23));
set(gca,'xscale','log');
yticks(-180:90:180);
ylim([-180 180]);
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
linkaxes([ax1,ax2],'x');
% Data Post Processing
% When using two geophone sensors on the same tilt stage (measurements 1 and 2), we post-process the data to obtain the z displacement and the rotation of the tilt stage:
meas1_z = (meas{1}.Track1+meas{1}.Track2)/2;
meas1_tilt = (meas{1}.Track1-meas{1}.Track2)/2;
meas{1}.Track1 = meas1_z;
meas{1}.Track1_Y_Magnitude = 'Meter / second';
meas{1}.Track1_Name = 'Ry Z';
meas{1}.Track2 = meas1_tilt;
meas{1}.Track2_Y_Magnitude = 'Rad / second';
meas{1}.Track2_Name = 'Ry Tilt';
meas2_z = (meas{2}.Track1+meas{2}.Track2)/2;
meas2_tilt = (meas{2}.Track1-meas{2}.Track2)/2;
meas{2}.Track1 = meas2_z;
meas{2}.Track1_Y_Magnitude = 'Meter / second';
meas{2}.Track1_Name = 'Ry Z';
meas{2}.Track2 = meas2_tilt;
meas{2}.Track2_Y_Magnitude = 'Rad / second';
meas{2}.Track2_Name = 'Ry Tilt';
% Normalization
% Parameters of the geophone are defined below.
% The transfer function from geophone velocity to measured voltage is shown on figure [[fig:L4C_bode_plot]].
% Measurements will be normalized by the inverse of this transfer function in order to go from voltage measurement to velocity measurement.
L4C_w0 = 2*pi; % [rad/s]
L4C_ksi = 0.28;
L4C_G0 = 276.8; % [V/(m/s)]
L4C_G = L4C_G0*(s/L4C_w0)^2/((s/L4C_w0)^2 + 2*L4C_ksi*(s/L4C_w0) + 1);
freqs = logspace(-2, 2, 1000);
figure;
ax1 = subplot(2,1,1);
plot(freqs, abs(squeeze(freqresp(L4C_G, freqs, 'Hz'))));
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
set(gca, 'XTickLabel',[]);
ylabel('Magnitude [V/(m/s)]');
ax2 = subplot(2,1,2);
plot(freqs, 180/pi*angle(squeeze(freqresp(L4C_G, freqs, 'Hz'))));
set(gca,'xscale','log');
yticks(-180:90:180);
ylim([-180 180]);
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
linkaxes([ax1,ax2],'x');
% #+NAME: fig:L4C_bode_plot
% #+CAPTION: Bode plot of the L4C Geophone
% #+RESULTS: fig:L4C_bode_plot
% [[file:figs/L4C_bode_plot.png]]
meas{1}.Track1 = (meas{1}.Track1)./276.8;
meas{1}.Track2 = (meas{1}.Track2)./276.8;
meas{1}.Track3 = (meas{1}.Track3)./276.8;
meas{2}.Track1 = (meas{2}.Track1)./276.8;
meas{2}.Track2 = (meas{2}.Track2)./276.8;
meas{2}.Track3 = (meas{2}.Track3)./276.8;
meas{3}.Track1 = (meas{3}.Track1)./276.8;
meas{3}.Track2 = (meas{3}.Track2)./276.8;
meas{3}.Track3 = (meas{3}.Track3)./276.8;
meas{4}.Track1 = (meas{4}.Track1)./276.8;
meas{4}.Track2 = (meas{4}.Track2)./276.8;
meas{4}.Track3 = (meas{4}.Track3)./276.8;
meas{5}.Track1 = (meas{5}.Track1)./276.8;
meas{5}.Track2 = (meas{5}.Track2)./276.8;
meas{5}.Track3 = (meas{5}.Track3)./276.8;
meas{5}.Track4 = (meas{5}.Track4)./276.8;
meas{1}.Track1_norm = lsim(inv(L4C_G), meas{1}.Track1, t1);
meas{1}.Track2_norm = lsim(inv(L4C_G), meas{1}.Track2, t1);
meas{1}.Track3_norm = lsim(inv(L4C_G), meas{1}.Track3, t1);
meas{2}.Track1_norm = lsim(inv(L4C_G), meas{2}.Track1, t2);
meas{2}.Track2_norm = lsim(inv(L4C_G), meas{2}.Track2, t2);
meas{2}.Track3_norm = lsim(inv(L4C_G), meas{2}.Track3, t2);
meas{3}.Track1_norm = lsim(inv(L4C_G), meas{3}.Track1, t3);
meas{3}.Track2_norm = lsim(inv(L4C_G), meas{3}.Track2, t3);
meas{3}.Track3_norm = lsim(inv(L4C_G), meas{3}.Track3, t3);
meas{4}.Track1_norm = lsim(inv(L4C_G), meas{4}.Track1, t4);
meas{4}.Track2_norm = lsim(inv(L4C_G), meas{4}.Track2, t4);
meas{4}.Track3_norm = lsim(inv(L4C_G), meas{4}.Track3, t4);
meas{5}.Track1_norm = lsim(inv(L4C_G), meas{5}.Track1, t5);
meas{5}.Track2_norm = lsim(inv(L4C_G), meas{5}.Track2, t5);
meas{5}.Track3_norm = lsim(inv(L4C_G), meas{5}.Track3, t5);
meas{5}.Track4_norm = lsim(inv(L4C_G), meas{5}.Track4, t5);
% Measurement 1 - Effect of Ty stage
% The configuration for this measurement is shown table [[tab:conf_meas1]].
% #+CAPTION: Stages configuration - Measurement 1
% #+NAME: tab:conf_meas1
% | Time | 0-309 | 309-end |
% |----------+-------+---------|
% | Ty | OFF | *ON* |
% | Ry | OFF | OFF |
% | SlipRing | OFF | OFF |
% | Spindle | OFF | OFF |
% | Hexa | OFF | OFF |
% We then plot the measurements in time domain (figure [[fig:meas1]]).
% #+begin_important
% We observe strange behavior when the Ty stage is turned on.
% How can we explain that?
% #+end_important
figure;
hold on;
plot(t1(ceil(300/dt):ceil(340/dt)), meas{1}.Track1(ceil(300/dt):ceil(340/dt)));
plot(t1(ceil(300/dt):ceil(340/dt)), meas{1}.Track2(ceil(300/dt):ceil(340/dt)));
plot(t1(ceil(300/dt):ceil(340/dt)), meas{1}.Track3(ceil(300/dt):ceil(340/dt)));
hold off;
xlabel('Time [s]'); ylabel('Velocity [m/s]');
legend({meas{1}.Track1_Name, meas{1}.Track2_Name, meas{1}.Track3_Name}, 'Location', 'northeast')
% #+LABEL: fig:meas1
% #+CAPTION: Time domain - measurement 1
% #+RESULTS: fig:meas1
% [[file:figs/meas1.png]]
% To understand what is going on, instead of looking at the velocity, we can look at the displacement by integrating the data. The displacement is computed by integrating the velocity using =cumtrapz= function.
% Then we plot the position with respect to time (figure [[fig:meas1_disp]]).
figure;
hold on;
plot(t1, cumtrapz(t1, meas{1}.Track3));
hold off;
xlim([300, 340]);
xlabel('Time [s]'); ylabel('Displacement [m]');
% #+LABEL: fig:meas1_disp
% #+CAPTION: Y displacement of the Ty stage
% #+RESULTS: fig:meas1_disp
% [[file:figs/meas1_disp.png]]
% We when compute the power spectral density of each measurement before and after turning on the stage.
[pxx111, f11] = pwelch(meas{1}.Track1(1:ceil(300/dt)), psd_window, [], [], Fs);
[pxx112, f12] = pwelch(meas{1}.Track1(ceil(350/dt):end), psd_window, [], [], Fs);
[pxx121, ~] = pwelch(meas{1}.Track2(1:ceil(300/dt)), psd_window, [], [], Fs);
[pxx122, ~] = pwelch(meas{1}.Track2(ceil(350/dt):end), psd_window, [], [], Fs);
[pxx131, ~] = pwelch(meas{1}.Track3(1:ceil(300/dt)), psd_window, [], [], Fs);
[pxx132, ~] = pwelch(meas{1}.Track3(ceil(350/dt):end), psd_window, [], [], Fs);
% We finally plot the power spectral density of each track (figures [[fig:meas1_ry_z_psd]], [[fig:meas1_ry_tilt_psd]], [[fig:meas1_ty_y_psd]]).
figure;
hold on;
plot(f11, sqrt(pxx111)./abs(squeeze(freqresp(L4C_G, f11, 'Hz'))));
plot(f12, sqrt(pxx112)./abs(squeeze(freqresp(L4C_G, f12, 'Hz'))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/s/\sqrt{Hz}$]');
title(sprintf('%s', meas{1}.Track1_Name));
legend({'0-300', '350-end'}, 'Location', 'southwest');
hold off;
% #+LABEL: fig:meas1_ry_z_psd
% #+CAPTION: PSD of the Z velocity of Ry stage - measurement 1
% #+RESULTS: fig:meas1_ry_z_psd
% [[file:figs/meas1_ry_z_psd.png]]
figure;
hold on;
plot(f11, sqrt(pxx121)./abs(squeeze(freqresp(L4C_G, f11, 'Hz'))));
plot(f12, sqrt(pxx122)./abs(squeeze(freqresp(L4C_G, f12, 'Hz'))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$rad/s/\sqrt{Hz}$]');
title(sprintf('%s', meas{1}.Track2_Name));
legend({'0-300', '350-end'}, 'Location', 'southwest');
hold off;
% #+LABEL: fig:meas1_ry_tilt_psd
% #+CAPTION: PSD of the Rotation of Ry Stage - measurement 1
% #+RESULTS: fig:meas1_ry_tilt_psd
% [[file:figs/meas1_ry_tilt_psd.png]]
figure;
hold on;
plot(f11, sqrt(pxx131)./abs(squeeze(freqresp(L4C_G, f11, 'Hz'))));
plot(f12, sqrt(pxx132)./abs(squeeze(freqresp(L4C_G, f12, 'Hz'))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/s/\sqrt{Hz}$]');
title(sprintf('%s', meas{1}.Track3_Name));
legend({'0-300', '350-end'}, 'Location', 'southwest');
hold off;
% Measurement 2 - Effect of Ry stage
% The tilt stage is turned ON at around 326 seconds (table [[tab:conf_meas2]]).
% #+CAPTION: Stages configuration - Measurement 2
% #+NAME: tab:conf_meas2
% | Time | 0-326 | 326-end |
% |----------+-------+---------|
% | Ty | OFF | OFF |
% | Ry | OFF | *ON* |
% | SlipRing | OFF | OFF |
% | Spindle | OFF | OFF |
% | Hexa | OFF | OFF |
% We plot the time domain (figure [[fig:meas2]]) and we don't observe anything special in the time domain.
figure;
hold on;
plot(t2(ceil(300/dt):ceil(350/dt)), meas{2}.Track1(ceil(300/dt):ceil(350/dt)));
plot(t2(ceil(300/dt):ceil(350/dt)), meas{2}.Track3(ceil(300/dt):ceil(350/dt)));
plot(t2(ceil(300/dt):ceil(350/dt)), meas{2}.Track2(ceil(300/dt):ceil(350/dt)));
hold off;
xlabel('Time [s]'); ylabel('Velocity [m/s]');
legend({meas{2}.Track1_Name, meas{2}.Track2_Name, meas{2}.Track3_Name}, 'Location', 'northeast')
xlim([300, 350]);
% #+LABEL: fig:meas2
% #+CAPTION: Time domain - measurement 2
% #+RESULTS: fig:meas2
% [[file:figs/meas2.png]]
figure;
hold on;
plot(t2, cumtrapz(t2, meas{2}.Track1));
plot(t2, cumtrapz(t2, meas{2}.Track2));
plot(t2, cumtrapz(t2, meas{2}.Track3));
hold off;
xlim([300, 350]);
xlabel('Time [s]'); ylabel('Displacement [m]');
legend({meas{2}.Track1_Name, meas{2}.Track2_Name, meas{2}.Track3_Name}, 'Location', 'northeast')
% #+LABEL: fig:meas2_disp
% #+CAPTION: Time domain - measurement 2
% #+RESULTS: fig:meas2_disp
% [[file:figs/meas2_disp.png]]
% We compute the PSD of each track and we plot them (figures [[fig:meas2_ry_z_psd]], [[fig:meas2_ry_tilt_psd]] and [[fig:meas2_ty_y_psd]] ).
[pxx211, f21] = pwelch(meas{2}.Track1(1:ceil(326/dt)), psd_window, [], [], Fs);
[pxx212, f22] = pwelch(meas{2}.Track1(ceil(326/dt):end), psd_window, [], [], Fs);
[pxx221, ~] = pwelch(meas{2}.Track2(1:ceil(326/dt)), psd_window, [], [], Fs);
[pxx222, ~] = pwelch(meas{2}.Track2(ceil(326/dt):end), psd_window, [], [], Fs);
[pxx231, ~] = pwelch(meas{2}.Track3(1:ceil(326/dt)), psd_window, [], [], Fs);
[pxx232, ~] = pwelch(meas{2}.Track3(ceil(326/dt):end), psd_window, [], [], Fs);
figure;
hold on;
plot(f21, sqrt(pxx211)./abs(squeeze(freqresp(L4C_G, f21, 'Hz'))));
plot(f22, sqrt(pxx212)./abs(squeeze(freqresp(L4C_G, f22, 'Hz'))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/s/\sqrt{Hz}$]');
title(sprintf('%s', meas{2}.Track1_Name));
legend({'0-326', '326-end'}, 'Location', 'southwest');
hold off;
% #+LABEL: fig:meas2_ry_z_psd
% #+CAPTION: PSD of the Z velocity of Ry Stage - measurement 2
% #+RESULTS: fig:meas2_ry_z_psd
% [[file:figs/meas2_ry_z_psd.png]]
figure;
hold on;
plot(f21, sqrt(pxx221)./abs(squeeze(freqresp(L4C_G, f21, 'Hz'))));
plot(f22, sqrt(pxx222)./abs(squeeze(freqresp(L4C_G, f22, 'Hz'))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$rad/s/\sqrt(Hz)$]');
title(sprintf('%s', meas{2}.Track2_Name));
legend({'0-326', '326-end'}, 'Location', 'southwest');
hold off;
% #+LABEL: fig:meas2_ry_tilt_psd
% #+CAPTION: PSD of the Rotation motion of Ry Stage - measurement 2
% #+RESULTS: fig:meas2_ry_tilt_psd
% [[file:figs/meas2_ry_tilt_psd.png]]
figure;
hold on;
plot(f21, sqrt(pxx231)./abs(squeeze(freqresp(L4C_G, f21, 'Hz'))));
plot(f22, sqrt(pxx232)./abs(squeeze(freqresp(L4C_G, f22, 'Hz'))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/s/\sqrt{Hz}$]');
title(sprintf('%s', meas{2}.Track3_Name));
legend({'0-326', '326-end'}, 'Location', 'southwest');
hold off;
% Measurement 3 - Effect of the Hexapod
% The hexapod is turned off after 406 seconds (table [[tab:conf_meas3]]).
% #+CAPTION: Stages configuration - Measurement 3
% #+NAME: tab:conf_meas3
% | Time | 0-406 | 406-end |
% |----------+-------+---------|
% | Ty | OFF | OFF |
% | Ry | *ON* | *ON* |
% | SlipRing | OFF | OFF |
% | Spindle | OFF | OFF |
% | Hexa | *ON* | OFF |
% The time domain result is shown figure [[fig:meas3]].
figure;
hold on;
plot(t3(ceil(380/dt):ceil(420/dt)), meas{3}.Track1(ceil(380/dt):ceil(420/dt)));
plot(t3(ceil(380/dt):ceil(420/dt)), meas{3}.Track2(ceil(380/dt):ceil(420/dt)));
plot(t3(ceil(380/dt):ceil(420/dt)), meas{3}.Track3(ceil(380/dt):ceil(420/dt)));
hold off;
xlabel('Time [s]'); ylabel('Velocity [m/s]');
legend({meas{3}.Track1_Name, meas{3}.Track2_Name, meas{3}.Track3_Name}, 'Location', 'northeast')
% #+LABEL: fig:meas3
% #+CAPTION: Time domain - measurement 3
% #+RESULTS: fig:meas3
% [[file:figs/meas3.png]]
figure;
hold on;
plot(t3, cumtrapz(t3, meas{3}.Track1));
plot(t3, cumtrapz(t3, meas{3}.Track2));
plot(t3, cumtrapz(t3, meas{3}.Track3));
hold off;
xlim([350, 450]);
xlabel('Time [s]'); ylabel('Displacement [m]');
legend({meas{3}.Track1_Name, meas{3}.Track2_Name, meas{3}.Track3_Name}, 'Location', 'northeast')
% #+LABEL: fig:meas3_disp
% #+CAPTION: Time domain - measurement 3
% #+RESULTS: fig:meas3_disp
% [[file:figs/meas3_disp.png]]
% We then compute the PSD of each track before and after turning off the hexapod and plot the results in the figures [[fig:meas3_hexa_z_psd]], [[fig:meas3_ry_z_psd]] and [[fig:meas3_ty_y_psd]].
[pxx311, f31] = pwelch(meas{3}.Track1(1:ceil(400/dt)), psd_window, [], [], Fs);
[pxx312, f32] = pwelch(meas{3}.Track1(ceil(420/dt):end), psd_window, [], [], Fs);
[pxx321, ~] = pwelch(meas{3}.Track2(1:ceil(400/dt)), psd_window, [], [], Fs);
[pxx322, ~] = pwelch(meas{3}.Track2(ceil(420/dt):end), psd_window, [], [], Fs);
[pxx331, ~] = pwelch(meas{3}.Track3(1:ceil(400/dt)), psd_window, [], [], Fs);
[pxx332, ~] = pwelch(meas{3}.Track3(ceil(420/dt):end), psd_window, [], [], Fs);
figure;
hold on;
plot(f31, sqrt(pxx311)./abs(squeeze(freqresp(L4C_G, f31, 'Hz'))));
plot(f32, sqrt(pxx312)./abs(squeeze(freqresp(L4C_G, f32, 'Hz'))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/s/\sqrt{Hz}$]');
title(sprintf('%s', meas{3}.Track1_Name));
legend({'0-400', '420-end'}, 'Location', 'southwest');
hold off;
% #+LABEL: fig:meas3_hexa_z_psd
% #+CAPTION: PSD of the Z velocity of the Hexapod - measurement 3
% #+RESULTS: fig:meas3_hexa_z_psd
% [[file:figs/meas3_hexa_z_psd.png]]
figure;
hold on;
plot(f31, sqrt(pxx321)./abs(squeeze(freqresp(L4C_G, f31, 'Hz'))));
plot(f32, sqrt(pxx322)./abs(squeeze(freqresp(L4C_G, f32, 'Hz'))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/s/\sqrt{Hz}$]');
title(sprintf('%s', meas{3}.Track2_Name));
legend({'0-400', '420-end'}, 'Location', 'southwest');
hold off;
% #+LABEL: fig:meas3_ry_z_psd
% #+CAPTION: PSD of the Z velocity of the Ry stage - measurement 3
% #+RESULTS: fig:meas3_ry_z_psd
% [[file:figs/meas3_ry_z_psd.png]]
figure;
hold on;
plot(f31, sqrt(pxx331)./abs(squeeze(freqresp(L4C_G, f31, 'Hz'))));
plot(f32, sqrt(pxx332)./abs(squeeze(freqresp(L4C_G, f32, 'Hz'))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/s/\sqrt{Hz}$]');
title(sprintf('%s', meas{3}.Track3_Name));
legend({'0-400', '420-end'}, 'Location', 'southwest');
hold off;
% Measurement 4 - Effect of the Splip-Ring and Spindle
% The slip ring is turned on at 300s, then the spindle is turned on at 620s (table [[tab:conf_meas4]]). The time domain signals are shown figure [[fig:meas4]].
% #+CAPTION: Stages configuration - Measurement 4
% #+NAME: tab:conf_meas4
% | Time | 0-300 | 300-620 | 620-end |
% |----------+-------+---------+---------|
% | Ty | OFF | OFF | OFF |
% | Ry | OFF | OFF | OFF |
% | SlipRing | OFF | *ON* | *ON* |
% | Spindle | OFF | OFF | *ON* |
% | Hexa | OFF | OFF | OFF |
figure;
hold on;
plot(t4, meas{4}.Track1);
plot(t4, meas{4}.Track2);
plot(t4, meas{4}.Track3);
hold off;
xlim([t4(1), t4(end)]);
xlabel('Time [s]'); ylabel('Velocity [m/s]');
legend({meas{4}.Track1_Name, meas{4}.Track2_Name, meas{4}.Track3_Name}, 'Location', 'southwest')
% #+LABEL: fig:meas4
% #+CAPTION: Time domain - measurement 4
% #+RESULTS: fig:meas4
% [[file:figs/meas4.png]]
figure;
subplot(1, 2, 1);
hold on;
plot(t4, cumtrapz(t4, meas{4}.Track1));
plot(t4, cumtrapz(t4, meas{4}.Track2));
plot(t4, cumtrapz(t4, meas{4}.Track3));
hold off;
xlim([250, 350]);
xlabel('Time [s]'); ylabel('Displacement [m]');
legend({meas{4}.Track1_Name, meas{4}.Track2_Name, meas{4}.Track3_Name}, 'Location', 'northwest')
subplot(1, 2, 2);
hold on;
plot(t4, cumtrapz(t4, meas{4}.Track1));
plot(t4, cumtrapz(t4, meas{4}.Track2));
plot(t4, cumtrapz(t4, meas{4}.Track3));
hold off;
xlim([600, 650]);
xlabel('Time [s]'); ylabel('Displacement [m]');
% #+LABEL: fig:meas4_int
% #+CAPTION: Time domain - measurement 4
% #+RESULTS: fig:meas4_int
% [[file:figs/meas4_int.png]]
% The PSD of each track are computed using the code below.
[pxx411, f41] = pwelch(meas{4}.Track1(1:ceil(280/dt)), psd_window, [], [], Fs);
[pxx412, f42] = pwelch(meas{4}.Track1(ceil(280/dt):ceil(600/dt)), psd_window, [], [], Fs);
[pxx413, f43] = pwelch(meas{4}.Track1(ceil(640/dt):end), psd_window, [], [], Fs);
[pxx421, ~] = pwelch(meas{4}.Track2(1:ceil(280/dt)), psd_window, [], [], Fs);
[pxx422, ~] = pwelch(meas{4}.Track2(ceil(280/dt):ceil(600/dt)), psd_window, [], [], Fs);
[pxx423, ~] = pwelch(meas{4}.Track2(ceil(640/dt):end), psd_window, [], [], Fs);
[pxx431, ~] = pwelch(meas{4}.Track3(1:ceil(280/dt)), psd_window, [], [], Fs);
[pxx432, ~] = pwelch(meas{4}.Track3(ceil(280/dt):ceil(600/dt)), psd_window, [], [], Fs);
[pxx433, ~] = pwelch(meas{4}.Track3(ceil(640/dt):end), psd_window, [], [], Fs);
f41 = f41(2:end);
f42 = f42(2:end);
f43 = f43(2:end);
pxx411 = pxx411(2:end);
pxx412 = pxx412(2:end);
pxx413 = pxx413(2:end);
pxx421 = pxx421(2:end);
pxx422 = pxx422(2:end);
pxx423 = pxx423(2:end);
pxx431 = pxx431(2:end);
pxx432 = pxx432(2:end);
pxx433 = pxx433(2:end);
figure;
hold on;
plot(f41, sqrt(pxx411)./abs(squeeze(freqresp(L4C_G, f41, 'Hz'))));
plot(f42, sqrt(pxx412)./abs(squeeze(freqresp(L4C_G, f42, 'Hz'))));
plot(f43, sqrt(pxx413)./abs(squeeze(freqresp(L4C_G, f43, 'Hz'))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/s/\sqrt{Hz}$]');
title(sprintf('%s', meas{4}.Track1_Name));
legend({'0-280', '320-600', '640-end'}, 'Location', 'southwest');
hold off;
% #+LABEL: fig:meas4_hexa_z_psd
% #+CAPTION: PSD of the Z velocity of the Hexapod - measurement 4
% #+RESULTS: fig:meas4_hexa_z_psd
% [[file:figs/meas4_hexa_z_psd.png]]
% We plot the PSD of the displacement.
figure;
hold on;
plot(f41, sqrt(pxx411)./abs(squeeze(freqresp(L4C_G, f41, 'Hz')))./(2*pi*f41));
plot(f42, sqrt(pxx412)./abs(squeeze(freqresp(L4C_G, f42, 'Hz')))./(2*pi*f42));
plot(f43, sqrt(pxx413)./abs(squeeze(freqresp(L4C_G, f43, 'Hz')))./(2*pi*f43));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/\sqrt{Hz}$]');
title(sprintf('%s', meas{4}.Track1_Name));
legend({'0-280', '320-600', '640-end'}, 'Location', 'southwest');
hold off;
% #+LABEL: fig:meas4_hexa_z_psd_int
% #+CAPTION: PSD_INT of the Z velocity of the Hexapod - measurement 4
% #+RESULTS: fig:meas4_hexa_z_psd_int
% [[file:figs/meas4_hexa_z_psd_int.png]]
% And we compute the Cumulative amplitude spectrum.
figure;
hold on;
plot(f41, sqrt(cumsum(pxx431./abs(squeeze(freqresp(L4C_G, f41, 'Hz'))).^2./(2*pi*f41).*(f41 - [0; f41(1:end-1)]))));
plot(f42, sqrt(cumsum(pxx432./abs(squeeze(freqresp(L4C_G, f42, 'Hz'))).^2./(2*pi*f42).*(f42 - [0; f42(1:end-1)]))));
plot(f43, sqrt(cumsum(pxx433./abs(squeeze(freqresp(L4C_G, f43, 'Hz'))).^2./(2*pi*f43).*(f43 - [0; f43(1:end-1)]))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('CAS [$m$ rms]');
title(sprintf('%s', meas{4}.Track1_Name));
legend({'0-280', '320-600', '640-end'}, 'Location', 'southwest');
hold off;
figure;
hold on;
plot(f41, sqrt(pxx421)./abs(squeeze(freqresp(L4C_G, f41, 'Hz'))));
plot(f42, sqrt(pxx422)./abs(squeeze(freqresp(L4C_G, f42, 'Hz'))));
plot(f43, sqrt(pxx423)./abs(squeeze(freqresp(L4C_G, f43, 'Hz'))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/s/\sqrt{Hz}$]');
title(sprintf('%s', meas{4}.Track2_Name));
legend({'0-280', '320-600', '640-end'}, 'Location', 'southwest');
hold off;
% #+LABEL: fig:meas4_ry_z_psd
% #+CAPTION: PSD of the Ry rotation in the Y direction - measurement 4
% #+RESULTS: fig:meas4_ry_z_psd
% [[file:figs/meas4_ry_z_psd.png]]
figure;
hold on;
plot(f41, sqrt(pxx431)./abs(squeeze(freqresp(L4C_G, f41, 'Hz'))));
plot(f42, sqrt(pxx432)./abs(squeeze(freqresp(L4C_G, f42, 'Hz'))));
plot(f43, sqrt(pxx433)./abs(squeeze(freqresp(L4C_G, f43, 'Hz'))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/s/\sqrt{Hz}$]');
title(sprintf('%s', meas{4}.Track3_Name));
legend({'0-280', '320-600', '640-end'}, 'Location', 'southwest');
hold off;
% Measurement 5 - Transmission from ground to marble
% This measurement just consists of measurement of Y-Z motion of the ground and the marble.
% The time domain signals are shown on figure [[fig:meas5]].
figure;
hold on;
plot(t5, meas{5}.Track1);
plot(t5, meas{5}.Track2);
plot(t5, meas{5}.Track3);
plot(t5, meas{5}.Track4);
hold off;
xlabel('Time [s]'); ylabel('Velocity [m/s]');
legend({meas{5}.Track1_Name, meas{5}.Track2_Name, meas{5}.Track3_Name, meas{5}.Track4_Name}, 'Location', 'northeast')
% #+LABEL: fig:meas5
% #+CAPTION: Time domain - measurement 5
% #+RESULTS: fig:meas5
% [[file:figs/meas5.png]]
% We compute the PSD of each track and we plot the PSD of the Z motion for the ground and marble on figure [[fig:meas5_z_psd]] and for the Y motion on figure [[fig:meas5_y_psd]].
[pxx51, f51] = pwelch(meas{5}.Track1(:), psd_window, [], [], Fs);
[pxx52, f52] = pwelch(meas{5}.Track2(:), psd_window, [], [], Fs);
[pxx53, f53] = pwelch(meas{5}.Track3(:), psd_window, [], [], Fs);
[pxx54, f54] = pwelch(meas{5}.Track4(:), psd_window, [], [], Fs);
figure;
hold on;
plot(f51, sqrt(pxx51)./abs(squeeze(freqresp(L4C_G, f51, 'Hz'))));
plot(f52, sqrt(pxx52)./abs(squeeze(freqresp(L4C_G, f52, 'Hz'))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/s/\sqrt{Hz}$]');
legend({meas{5}.Track1_Name, meas{5}.Track2_Name}, 'Location', 'northwest');
hold off;
% #+LABEL: fig:meas5_z_psd
% #+CAPTION: PSD of the ground and marble in the Z direction
% #+RESULTS: fig:meas5_z_psd
% [[file:figs/meas5_z_psd.png]]
figure;
hold on;
plot(f53, sqrt(pxx53)./abs(squeeze(freqresp(L4C_G, f53, 'Hz'))));
plot(f54, sqrt(pxx54)./abs(squeeze(freqresp(L4C_G, f54, 'Hz'))));
xlim([fmin, fmax]);
xticks([1, 10, 100]);
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/s/\sqrt{Hz}$]');
legend({meas{5}.Track3_Name, meas{5}.Track4_Name}, 'Location', 'northwest');
hold off;
% #+LABEL: fig:meas5_y_psd
% #+CAPTION: PSD of the ground and marble in the Y direction
% #+RESULTS: fig:meas5_y_psd
% [[file:figs/meas5_y_psd.png]]
% Then, instead of looking at the Power Spectral Density, we can try to estimate the transfer function from a ground motion to the motion of the marble.
% The transfer functions are shown on figure [[fig:meas5_tf]] and the coherence on figure [[fig:meas5_coh]].
[tfz, fz] = tfestimate(meas{5}.Track1(:), meas{5}.Track2(:), psd_window, [], [], Fs);
[tfy, fy] = tfestimate(meas{5}.Track3(:), meas{5}.Track4(:), psd_window, [], [], Fs);
figure;
ax1 = subplot(2,1,1);
hold on;
plot(fz, abs(tfz));
plot(fy, abs(tfy));
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
set(gca, 'XTickLabel',[]);
ylabel('Magnitude');
hold off;
ax2 = subplot(2,1,2);
hold on;
plot(fz, 180/pi*angle(tfz));
plot(fy, 180/pi*angle(tfy));
set(gca,'xscale','log');
yticks(-180:90:180);
ylim([-180 180]);
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
hold off;
linkaxes([ax1,ax2],'x');
xlim([fmin, fmax]);
legend({'Z direction', 'Y direction'}, 'Location', 'southwest')
% #+LABEL: fig:meas5_tf
% #+CAPTION: Transfer function estimation - measurement 5
% #+RESULTS: fig:meas5_tf
% [[file:figs/meas5_tf.png]]
[cohz, fz] = mscohere(meas{5}.Track1(:), meas{5}.Track2(:), psd_window, [], [], Fs);
[cohy, fy] = mscohere(meas{5}.Track3(:), meas{5}.Track4(:), psd_window, [], [], Fs);
figure;
hold on;
plot(fz, cohz);
plot(fy, cohy);
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Coherence');
xlabel('Frequency [Hz]');
xlim([fmin, fmax]);
legend({'Z direction', 'Y direction'}, 'Location', 'southwest')