nass-micro-station-measurem.../static-spindle/index.html

970 lines
47 KiB
HTML
Raw Permalink Normal View History

2019-03-14 16:40:28 +01:00
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
2020-11-12 10:30:56 +01:00
<!-- 2020-11-12 jeu. 10:30 -->
2019-03-14 16:40:28 +01:00
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Spindle Analysis</title>
<meta name="generator" content="Org mode" />
2020-11-12 10:30:56 +01:00
<meta name="author" content="Dehaeze Thomas" />
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
<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>
2019-03-14 16:40:28 +01:00
</head>
<body>
2020-11-12 10:30:56 +01:00
<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">
2019-03-14 16:40:28 +01:00
<h1 class="title">Spindle Analysis</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
2020-11-12 10:30:56 +01:00
<li><a href="#org926cca8">1. Notes</a></li>
<li><a href="#org31b9342">2. Data Processing</a>
2019-03-14 16:40:28 +01:00
<ul>
2020-11-12 10:30:56 +01:00
<li><a href="#org55318f9">2.1. Load Measurement Data</a></li>
<li><a href="#orge988a52">2.2. Convert Signals from [deg] to [sec]</a></li>
<li><a href="#orgb06c483">2.3. Convert Signals</a></li>
<li><a href="#org56d1113">2.4. Ts and Fs for both measurements</a></li>
<li><a href="#org535061e">2.5. Find Noise of the ADC [\(\frac{m}{\sqrt{Hz}}\)]</a></li>
<li><a href="#orgd8739c6">2.6. Save all the data under spindle struct</a></li>
<li><a href="#org7d5ef48">2.7. Compute Asynchronous data</a></li>
<li><a href="#org4554fa6">2.8. Save data</a></li>
2019-03-14 16:40:28 +01:00
</ul>
</li>
2020-11-12 10:30:56 +01:00
<li><a href="#org87d8df4">3. Time Domain Data</a>
2019-03-14 16:40:28 +01:00
<ul>
2020-11-12 10:30:56 +01:00
<li><a href="#org97eb643">3.1. Load the processed data</a></li>
<li><a href="#orge2f8b97">3.2. Plot X-Y-Z position with respect to Time - 1rpm</a></li>
<li><a href="#orgca1fa1e">3.3. Plot X-Y-Z position with respect to Time - 60rpm</a></li>
<li><a href="#org1f349e8">3.4. Plot Synchronous and Asynchronous - 1rpm</a></li>
<li><a href="#orgd12a5c7">3.5. Plot Synchronous and Asynchronous - 60rpm</a></li>
<li><a href="#orgc54777a">3.6. Plot X against Y</a></li>
<li><a href="#orgc2dcbf0">3.7. Plot X against Y - Asynchronous</a></li>
2019-03-14 16:40:28 +01:00
</ul>
</li>
2020-11-12 10:30:56 +01:00
<li><a href="#orgbb9b6e0">4. Model of the spindle</a>
2019-03-14 16:40:28 +01:00
<ul>
2020-11-12 10:30:56 +01:00
<li><a href="#org6c8ee27">4.1. Schematic of the model</a></li>
<li><a href="#orgcf466f7">4.2. Parameters</a></li>
<li><a href="#org3d29eaa">4.3. Compute Mass and Stiffness Matrices</a></li>
<li><a href="#org87a0e41">4.4. Compute resonance frequencies</a></li>
<li><a href="#orgac905f5">4.5. From model_damping compute the Damping Matrix</a></li>
<li><a href="#orgfb4ae66">4.6. Define inputs, outputs and state names</a></li>
<li><a href="#org42fbd26">4.7. Define A, B and C matrices</a></li>
<li><a href="#org4554e76">4.8. Generate the State Space Model</a></li>
<li><a href="#org7b72401">4.9. Bode Plot</a></li>
<li><a href="#org156efe8">4.10. Save the model</a></li>
2019-03-14 16:40:28 +01:00
</ul>
</li>
2020-11-12 10:30:56 +01:00
<li><a href="#org055ab30">5. Frequency Domain Data</a>
2019-03-14 16:40:28 +01:00
<ul>
2020-11-12 10:30:56 +01:00
<li><a href="#org4e59d5a">5.1. Load the processed data and the model</a></li>
<li><a href="#org76b5b80">5.2. Compute the PSD</a></li>
<li><a href="#org0a76f2c">5.3. Plot the computed PSD</a></li>
<li><a href="#org85095d4">5.4. Compute the response of the model</a></li>
<li><a href="#org6e1d56d">5.5. Plot the PSD of the Force using the model</a></li>
<li><a href="#orgedd234c">5.6. Estimated Shape of the PSD of the force</a></li>
<li><a href="#org0a01476">5.7. PSD in [N]</a></li>
<li><a href="#orgb29a3ce">5.8. PSD in [m]</a></li>
<li><a href="#org2ce75a0">5.9. Compute the resulting RMS value [m]</a></li>
<li><a href="#org9bcf259">5.10. Compute the resulting RMS value [m]</a></li>
2019-03-14 16:40:28 +01:00
</ul>
</li>
2020-11-12 10:30:56 +01:00
<li><a href="#orgc7eca20">6. Functions</a>
2019-03-14 16:40:28 +01:00
<ul>
2020-11-12 10:30:56 +01:00
<li><a href="#orgb688035">6.1. getAsynchronousError</a></li>
2019-03-14 16:40:28 +01:00
</ul>
</li>
</ul>
</div>
</div>
<p>
The report made by the PEL is accessible <a href="documents/Spindle_report_test.pdf">here</a>.
</p>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org926cca8" class="outline-2">
<h2 id="org926cca8"><span class="section-number-2">1</span> Notes</h2>
2019-03-14 16:40:28 +01:00
<div class="outline-text-2" id="text-1">
2020-11-12 10:30:56 +01:00
<div id="org6208f54" class="figure">
<p><img src="./img/setup_spindle.png" alt="setup_spindle.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Measurement setup at the PEL lab</p>
</div>
2020-11-12 10:30:56 +01:00
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-right" />
</colgroup>
<tbody>
<tr>
<td class="org-left"><b>Date</b></td>
<td class="org-right">2017-04-25</td>
</tr>
<tr>
<td class="org-left"><b>Location</b></td>
<td class="org-right">PEL Lab</td>
</tr>
</tbody>
</table>
<p>
The goal is to estimate all the error motions induced by the Spindle
</p>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org31b9342" class="outline-2">
<h2 id="org31b9342"><span class="section-number-2">2</span> Data Processing</h2>
<div class="outline-text-2" id="text-2">
2020-11-12 10:30:56 +01:00
<p>
<a id="org1273092"></a>
</p>
<div class="note" id="org2ad3b15">
<p>
All the files (data and Matlab scripts) are accessible <a href="data/spindle_data_processing.zip">here</a>.
</p>
</div>
2019-03-14 16:40:28 +01:00
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org55318f9" class="outline-3">
<h3 id="org55318f9"><span class="section-number-3">2.1</span> Load Measurement Data</h3>
<div class="outline-text-3" id="text-2-1">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">spindle_1rpm_table = readtable(<span class="org-string">'./mat/10turns_1rpm_icepap.txt'</span>);
spindle_60rpm_table = readtable(<span class="org-string">'./mat/10turns_60rpm_IcepapFIR.txt'</span>);
2019-03-14 16:40:28 +01:00
</pre>
</div>
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">spindle_1rpm_table(1, <span class="org-type">:</span>)
2019-03-14 16:40:28 +01:00
</pre>
</div>
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">spindle_1rpm = table2array(spindle_1rpm_table);
spindle_60rpm = table2array(spindle_60rpm_table);
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-orge988a52" class="outline-3">
<h3 id="orge988a52"><span class="section-number-3">2.2</span> Convert Signals from [deg] to [sec]</h3>
<div class="outline-text-3" id="text-2-2">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">speed_1rpm = 360<span class="org-type">/</span>60; <span class="org-comment">% [deg/sec]</span>
spindle_1rpm(<span class="org-type">:</span>, 1) = spindle_1rpm(<span class="org-type">:</span>, 2)<span class="org-type">/</span>speed_1rpm; <span class="org-comment">% From position [deg] to time [s]</span>
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
speed_60rpm = 360<span class="org-type">/</span>1; <span class="org-comment">% [deg/sec]</span>
spindle_60rpm(<span class="org-type">:</span>, 1) = spindle_60rpm(<span class="org-type">:</span>, 2)<span class="org-type">/</span>speed_60rpm; <span class="org-comment">% From position [deg] to time [s]</span>
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-orgb06c483" class="outline-3">
<h3 id="orgb06c483"><span class="section-number-3">2.3</span> Convert Signals</h3>
<div class="outline-text-3" id="text-2-3">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-comment">% scaling = 1/80000; % 80 mV/um</span>
scaling = 1e<span class="org-type">-</span>6; <span class="org-comment">% [um] to [m]</span>
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
spindle_1rpm(<span class="org-type">:</span>, 3<span class="org-type">:</span>end) = scaling<span class="org-type">*</span>spindle_1rpm(<span class="org-type">:</span>, 3<span class="org-type">:</span>end); <span class="org-comment">% [V] to [m]</span>
spindle_1rpm(<span class="org-type">:</span>, 3<span class="org-type">:</span>end) = spindle_1rpm(<span class="org-type">:</span>, 3<span class="org-type">:</span>end)<span class="org-type">-</span>mean(spindle_1rpm(<span class="org-type">:</span>, 3<span class="org-type">:</span>end)); <span class="org-comment">% Remove mean</span>
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
spindle_60rpm(<span class="org-type">:</span>, 3<span class="org-type">:</span>end) = scaling<span class="org-type">*</span>spindle_60rpm(<span class="org-type">:</span>, 3<span class="org-type">:</span>end); <span class="org-comment">% [V] to [m]</span>
spindle_60rpm(<span class="org-type">:</span>, 3<span class="org-type">:</span>end) = spindle_60rpm(<span class="org-type">:</span>, 3<span class="org-type">:</span>end)<span class="org-type">-</span>mean(spindle_60rpm(<span class="org-type">:</span>, 3<span class="org-type">:</span>end)); <span class="org-comment">% Remove mean</span>
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org56d1113" class="outline-3">
<h3 id="org56d1113"><span class="section-number-3">2.4</span> Ts and Fs for both measurements</h3>
<div class="outline-text-3" id="text-2-4">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">Ts_1rpm = spindle_1rpm(end, 1)<span class="org-type">/</span>(length(spindle_1rpm(<span class="org-type">:</span>, 1))<span class="org-type">-</span>1);
Fs_1rpm = 1<span class="org-type">/</span>Ts_1rpm;
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
Ts_60rpm = spindle_60rpm(end, 1)<span class="org-type">/</span>(length(spindle_60rpm(<span class="org-type">:</span>, 1))<span class="org-type">-</span>1);
Fs_60rpm = 1<span class="org-type">/</span>Ts_60rpm;
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org535061e" class="outline-3">
<h3 id="org535061e"><span class="section-number-3">2.5</span> Find Noise of the ADC [\(\frac{m}{\sqrt{Hz}}\)]</h3>
<div class="outline-text-3" id="text-2-5">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">data = spindle_1rpm(<span class="org-type">:</span>, 5);
dV_1rpm = min(abs(data(1) <span class="org-type">-</span> data(data <span class="org-type">~=</span> data(1))));
noise_1rpm = dV_1rpm<span class="org-type">/</span>sqrt(12<span class="org-type">*</span>Fs_1rpm<span class="org-type">/</span>2);
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
data = spindle_60rpm(<span class="org-type">:</span>, 5);
dV_60rpm = min(abs(data(50) <span class="org-type">-</span> data(data <span class="org-type">~=</span> data(50))));
noise_60rpm = dV_60rpm<span class="org-type">/</span>sqrt(12<span class="org-type">*</span>Fs_60rpm<span class="org-type">/</span>2);
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-orgd8739c6" class="outline-3">
<h3 id="orgd8739c6"><span class="section-number-3">2.6</span> Save all the data under spindle struct</h3>
<div class="outline-text-3" id="text-2-6">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">spindle.rpm1.time = spindle_1rpm(<span class="org-type">:</span>, 1);
spindle.rpm1.deg = spindle_1rpm(<span class="org-type">:</span>, 2);
2019-03-14 16:40:28 +01:00
spindle.rpm1.Ts = Ts_1rpm;
2020-11-12 10:30:56 +01:00
spindle.rpm1.Fs = 1<span class="org-type">/</span>Ts_1rpm;
spindle.rpm1.x = spindle_1rpm(<span class="org-type">:</span>, 3);
spindle.rpm1.y = spindle_1rpm(<span class="org-type">:</span>, 4);
spindle.rpm1.z = spindle_1rpm(<span class="org-type">:</span>, 5);
2019-03-14 16:40:28 +01:00
spindle.rpm1.adcn = noise_1rpm;
2020-11-12 10:30:56 +01:00
spindle.rpm60.time = spindle_60rpm(<span class="org-type">:</span>, 1);
spindle.rpm60.deg = spindle_60rpm(<span class="org-type">:</span>, 2);
2019-03-14 16:40:28 +01:00
spindle.rpm60.Ts = Ts_60rpm;
2020-11-12 10:30:56 +01:00
spindle.rpm60.Fs = 1<span class="org-type">/</span>Ts_60rpm;
spindle.rpm60.x = spindle_60rpm(<span class="org-type">:</span>, 3);
spindle.rpm60.y = spindle_60rpm(<span class="org-type">:</span>, 4);
spindle.rpm60.z = spindle_60rpm(<span class="org-type">:</span>, 5);
2019-03-14 16:40:28 +01:00
spindle.rpm60.adcn = noise_60rpm;
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org7d5ef48" class="outline-3">
<h3 id="org7d5ef48"><span class="section-number-3">2.7</span> Compute Asynchronous data</h3>
<div class="outline-text-3" id="text-2-7">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-keyword">for</span> <span class="org-variable-name">direction</span> = <span class="org-constant">{</span><span class="org-constant"><span class="org-string">'x'</span></span>, <span class="org-string">'y'</span>, <span class="org-string">'z'</span>}
spindle.rpm1.([direction{1}, <span class="org-string">'async'</span>]) = getAsynchronousError(spindle.rpm1.(direction{1}), 10);
spindle.rpm60.([direction{1}, <span class="org-string">'async'</span>]) = getAsynchronousError(spindle.rpm60.(direction{1}), 10);
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org4554fa6" class="outline-3">
<h3 id="org4554fa6"><span class="section-number-3">2.8</span> Save data</h3>
<div class="outline-text-3" id="text-2-8">
<div class="org-src-container">
<pre class="src src-matlab">save(<span class="org-string">'./mat/spindle_data.mat'</span>, <span class="org-string">'spindle'</span>);
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org87d8df4" class="outline-2">
<h2 id="org87d8df4"><span class="section-number-2">3</span> Time Domain Data</h2>
<div class="outline-text-2" id="text-3">
2020-11-12 10:30:56 +01:00
<p>
<a id="org3ae8d1c"></a>
</p>
<div class="note" id="org033f214">
<p>
All the files (data and Matlab scripts) are accessible <a href="data/spindle_time_domain.zip">here</a>.
</p>
2019-03-14 16:40:28 +01:00
</div>
2020-11-12 10:30:56 +01:00
</div>
<div id="outline-container-org97eb643" class="outline-3">
<h3 id="org97eb643"><span class="section-number-3">3.1</span> Load the processed data</h3>
<div class="outline-text-3" id="text-3-1">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">load(<span class="org-string">'./mat/spindle_data.mat'</span>, <span class="org-string">'spindle'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-orge2f8b97" class="outline-3">
<h3 id="orge2f8b97"><span class="section-number-3">3.2</span> Plot X-Y-Z position with respect to Time - 1rpm</h3>
<div class="outline-text-3" id="text-3-2">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">figure</span>;
2019-03-14 16:40:28 +01:00
hold on;
2020-11-12 10:30:56 +01:00
plot(spindle.rpm1.time, spindle.rpm1.x);
plot(spindle.rpm1.time, spindle.rpm1.y);
plot(spindle.rpm1.time, spindle.rpm1.z);
2019-03-14 16:40:28 +01:00
hold off;
2020-11-12 10:30:56 +01:00
xlabel(<span class="org-string">'Time [s]'</span>); ylabel(<span class="org-string">'Amplitude [m]'</span>);
legend({<span class="org-string">'tx - 1rpm'</span>, <span class="org-string">'ty - 1rpm'</span>, <span class="org-string">'tz - 1rpm'</span>});
2019-03-14 16:40:28 +01:00
</pre>
</div>
2020-11-12 10:30:56 +01:00
<div id="org3945d8b" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="figs/spindle_xyz_1rpm.png" alt="spindle_xyz_1rpm.png" />
</p>
<p><span class="figure-number">Figure 2: </span>Raw time domain translation - 1rpm</p>
2019-03-14 16:40:28 +01:00
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-orgca1fa1e" class="outline-3">
<h3 id="orgca1fa1e"><span class="section-number-3">3.3</span> Plot X-Y-Z position with respect to Time - 60rpm</h3>
<div class="outline-text-3" id="text-3-3">
2019-03-14 16:40:28 +01:00
<p>
2020-11-12 10:30:56 +01:00
The measurements for the spindle turning at 60rpm are shown figure <a href="#orgf769c8a">3</a>.
2019-03-14 16:40:28 +01:00
</p>
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-type">figure</span>;
2019-03-14 16:40:28 +01:00
hold on;
2020-11-12 10:30:56 +01:00
plot(spindle.rpm60.time, spindle.rpm60.x);
plot(spindle.rpm60.time, spindle.rpm60.y);
plot(spindle.rpm60.time, spindle.rpm60.z);
2019-03-14 16:40:28 +01:00
hold off;
2020-11-12 10:30:56 +01:00
xlabel(<span class="org-string">'Time [s]'</span>); ylabel(<span class="org-string">'Amplitude [m]'</span>);
legend({<span class="org-string">'tx - 60rpm'</span>, <span class="org-string">'ty - 60rpm'</span>, <span class="org-string">'tz - 60rpm'</span>});
2019-03-14 16:40:28 +01:00
</pre>
</div>
2020-11-12 10:30:56 +01:00
<div id="orgf769c8a" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="figs/spindle_xyz_60rpm.png" alt="spindle_xyz_60rpm.png" />
</p>
<p><span class="figure-number">Figure 3: </span>Raw time domain translation - 60rpm</p>
2019-03-14 16:40:28 +01:00
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org1f349e8" class="outline-3">
<h3 id="org1f349e8"><span class="section-number-3">3.4</span> Plot Synchronous and Asynchronous - 1rpm</h3>
<div class="outline-text-3" id="text-3-4">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-type">figure</span>;
2019-03-14 16:40:28 +01:00
hold on;
2020-11-12 10:30:56 +01:00
plot(spindle.rpm1.time, spindle.rpm1.x);
plot(spindle.rpm1.time, spindle.rpm1.xasync);
2019-03-14 16:40:28 +01:00
hold off;
2020-11-12 10:30:56 +01:00
xlabel(<span class="org-string">'Time [s]'</span>); ylabel(<span class="org-string">'Amplitude [m]'</span>);
legend({<span class="org-string">'tx - 1rpm - Sync'</span>, <span class="org-string">'tx - 1rpm - Async'</span>});
2019-03-14 16:40:28 +01:00
</pre>
</div>
2020-11-12 10:30:56 +01:00
<div id="orgb601205" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="figs/spindle_1rpm_sync_async.png" alt="spindle_1rpm_sync_async.png" />
</p>
<p><span class="figure-number">Figure 4: </span>Comparison of the synchronous and asynchronous displacements - 1rpm</p>
2019-03-14 16:40:28 +01:00
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-orgd12a5c7" class="outline-3">
<h3 id="orgd12a5c7"><span class="section-number-3">3.5</span> Plot Synchronous and Asynchronous - 60rpm</h3>
<div class="outline-text-3" id="text-3-5">
2019-03-14 16:40:28 +01:00
<p>
2020-11-12 10:30:56 +01:00
The data is split into its Synchronous and Asynchronous part (figure <a href="#org4b7ac99">5</a>). We then use the Asynchronous part for the analysis in the following sections as we suppose that we can deal with the synchronous part with feedforward control.
2019-03-14 16:40:28 +01:00
</p>
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-type">figure</span>;
2019-03-14 16:40:28 +01:00
hold on;
2020-11-12 10:30:56 +01:00
plot(spindle.rpm60.time, spindle.rpm60.x);
plot(spindle.rpm60.time, spindle.rpm60.xasync);
2019-03-14 16:40:28 +01:00
hold off;
2020-11-12 10:30:56 +01:00
xlabel(<span class="org-string">'Time [s]'</span>); ylabel(<span class="org-string">'Amplitude [m]'</span>);
legend({<span class="org-string">'tx - 60rpm - Sync'</span>, <span class="org-string">'tx - 60rpm - Async'</span>});
2019-03-14 16:40:28 +01:00
</pre>
</div>
2020-11-12 10:30:56 +01:00
<div id="org4b7ac99" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="figs/spindle_60rpm_sync_async.png" alt="spindle_60rpm_sync_async.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Comparison of the synchronous and asynchronous displacements - 60rpm</p>
2019-03-14 16:40:28 +01:00
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-orgc54777a" class="outline-3">
<h3 id="orgc54777a"><span class="section-number-3">3.6</span> Plot X against Y</h3>
<div class="outline-text-3" id="text-3-6">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-type">figure</span>;
2019-03-14 16:40:28 +01:00
hold on;
2020-11-12 10:30:56 +01:00
plot(spindle.rpm1.x, spindle.rpm1.y);
plot(spindle.rpm60.x, spindle.rpm60.y);
2019-03-14 16:40:28 +01:00
hold off;
2020-11-12 10:30:56 +01:00
xlabel(<span class="org-string">'X Amplitude [m]'</span>); ylabel(<span class="org-string">'Y Amplitude [m]'</span>);
legend({<span class="org-string">'1rpm'</span>, <span class="org-string">'60rpm'</span>});
2019-03-14 16:40:28 +01:00
</pre>
</div>
2020-11-12 10:30:56 +01:00
<div id="org476bb3d" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="figs/spindle_xy_1_60rpm.png" alt="spindle_xy_1_60rpm.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Synchronous x-y displacement</p>
2019-03-14 16:40:28 +01:00
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-orgc2dcbf0" class="outline-3">
<h3 id="orgc2dcbf0"><span class="section-number-3">3.7</span> Plot X against Y - Asynchronous</h3>
<div class="outline-text-3" id="text-3-7">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-type">figure</span>;
2019-03-14 16:40:28 +01:00
hold on;
2020-11-12 10:30:56 +01:00
plot(spindle.rpm1.xasync, spindle.rpm1.yasync);
plot(spindle.rpm60.xasync, spindle.rpm60.yasync);
2019-03-14 16:40:28 +01:00
hold off;
2020-11-12 10:30:56 +01:00
xlabel(<span class="org-string">'X Amplitude [m]'</span>); ylabel(<span class="org-string">'Y Amplitude [m]'</span>);
legend({<span class="org-string">'1rpm'</span>, <span class="org-string">'60rpm'</span>});
2019-03-14 16:40:28 +01:00
</pre>
</div>
2020-11-12 10:30:56 +01:00
<div id="org258fc09" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="figs/spindle_xy_1_60_rpm_async.png" alt="spindle_xy_1_60_rpm_async.png" />
</p>
<p><span class="figure-number">Figure 7: </span>Asynchronous x-y displacement</p>
2019-03-14 16:40:28 +01:00
</div>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-orgbb9b6e0" class="outline-2">
<h2 id="orgbb9b6e0"><span class="section-number-2">4</span> Model of the spindle</h2>
<div class="outline-text-2" id="text-4">
2019-03-14 16:40:28 +01:00
<p>
2020-11-12 10:30:56 +01:00
<a id="orgf994efb"></a>
</p>
<div class="note" id="orgbebec4b">
<p>
All the files (data and Matlab scripts) are accessible <a href="data/spindle_model.zip">here</a>.
</p>
</div>
</div>
<div id="outline-container-org6c8ee27" class="outline-3">
<h3 id="org6c8ee27"><span class="section-number-3">4.1</span> Schematic of the model</h3>
<div class="outline-text-3" id="text-4-1">
<p>
The model of the spindle used is shown figure <a href="#org23eb2b8">8</a>.
2019-03-14 16:40:28 +01:00
</p>
<p>
\(f\) is the perturbation force of the spindle and \(d\) is the measured displacement.
</p>
2020-11-12 10:30:56 +01:00
<div id="org23eb2b8" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="./figs/uniaxial-model-spindle.png" alt="uniaxial-model-spindle.png" />
</p>
<p><span class="figure-number">Figure 8: </span>Model of the Spindle</p>
2019-03-14 16:40:28 +01:00
</div>
</div>
2020-11-12 10:30:56 +01:00
</div>
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
<div id="outline-container-orgcf466f7" class="outline-3">
<h3 id="orgcf466f7"><span class="section-number-3">4.2</span> Parameters</h3>
<div class="outline-text-3" id="text-4-2">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">mg = 3000; <span class="org-comment">% Mass of granite [kg]</span>
ms = 50; <span class="org-comment">% Mass of Spindle [kg]</span>
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
kg = 1e8; <span class="org-comment">% Stiffness of granite [N/m]</span>
ks = 5e7; <span class="org-comment">% Stiffness of spindle [N/m]</span>
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org3d29eaa" class="outline-3">
<h3 id="org3d29eaa"><span class="section-number-3">4.3</span> Compute Mass and Stiffness Matrices</h3>
<div class="outline-text-3" id="text-4-3">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">Mm = diag([ms, mg]);
Km = diag([ks, ks<span class="org-type">+</span>kg]) <span class="org-type">-</span> diag(ks, <span class="org-type">-</span>1) <span class="org-type">-</span> diag(ks, 1);
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org87a0e41" class="outline-3">
<h3 id="org87a0e41"><span class="section-number-3">4.4</span> Compute resonance frequencies</h3>
<div class="outline-text-3" id="text-4-4">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">A = [zeros(size(Mm)) eye(size(Mm)) ; <span class="org-type">-</span>Mm<span class="org-type">\</span>Km zeros(size(Mm))];
eigA = imag(eigs(A))<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span>;
eigA = eigA(eigA<span class="org-type">&gt;</span>0);
eigA = eigA(1<span class="org-type">:</span>2);
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-orgac905f5" class="outline-3">
<h3 id="orgac905f5"><span class="section-number-3">4.5</span> From model_damping compute the Damping Matrix</h3>
<div class="outline-text-3" id="text-4-5">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">modal_damping = 1e<span class="org-type">-</span>5;
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
ab = [0.5<span class="org-type">*</span>eigA(1) 0.5<span class="org-type">/</span>eigA(1) ; 0.5<span class="org-type">*</span>eigA(2) 0.5<span class="org-type">/</span>eigA(2)]<span class="org-type">\</span>[modal_damping ; modal_damping];
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
Cm = ab(1)<span class="org-type">*</span>Mm <span class="org-type">+</span>ab(2)<span class="org-type">*</span>Km;
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-orgfb4ae66" class="outline-3">
<h3 id="orgfb4ae66"><span class="section-number-3">4.6</span> Define inputs, outputs and state names</h3>
<div class="outline-text-3" id="text-4-6">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">StateName = {...
<span class="org-string">'xs'</span>, ...<span class="org-comment"> % Displacement of Spindle [m]</span>
<span class="org-string">'xg'</span>, ...<span class="org-comment"> % Displacement of Granite [m]</span>
<span class="org-string">'vs'</span>, ...<span class="org-comment"> % Velocity of Spindle [m]</span>
<span class="org-string">'vg'</span>, ...<span class="org-comment"> % Velocity of Granite [m]</span>
};
StateUnit = {<span class="org-string">'m'</span>, <span class="org-string">'m'</span>, <span class="org-string">'m/s'</span>, <span class="org-string">'m/s'</span>};
InputName = {...
<span class="org-string">'f'</span> ...<span class="org-comment"> % Spindle Force [N]</span>
};
InputUnit = {<span class="org-string">'N'</span>};
OutputName = {...
<span class="org-string">'d'</span> ...<span class="org-comment"> % Displacement [m]</span>
};
OutputUnit = {<span class="org-string">'m'</span>};
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org42fbd26" class="outline-3">
<h3 id="org42fbd26"><span class="section-number-3">4.7</span> Define A, B and C matrices</h3>
<div class="outline-text-3" id="text-4-7">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-comment">% A Matrix</span>
A = [zeros(size(Mm)) eye(size(Mm)) ; ...
<span class="org-type">-</span>Mm<span class="org-type">\</span>Km <span class="org-type">-</span>Mm<span class="org-type">\</span>Cm];
<span class="org-comment">% B Matrix</span>
B_low = zeros(length(StateName), length(InputName));
B_low(strcmp(StateName,<span class="org-string">'vs'</span>), strcmp(InputName,<span class="org-string">'f'</span>)) = 1;
B_low(strcmp(StateName,<span class="org-string">'vg'</span>), strcmp(InputName,<span class="org-string">'f'</span>)) = <span class="org-type">-</span>1;
B = blkdiag(zeros(length(StateName)<span class="org-type">/</span>2), pinv(Mm))<span class="org-type">*</span>B_low;
<span class="org-comment">% C Matrix</span>
C = zeros(length(OutputName), length(StateName));
C(strcmp(OutputName,<span class="org-string">'d'</span>), strcmp(StateName,<span class="org-string">'xs'</span>)) = 1;
C(strcmp(OutputName,<span class="org-string">'d'</span>), strcmp(StateName,<span class="org-string">'xg'</span>)) = <span class="org-type">-</span>1;
<span class="org-comment">% D Matrix</span>
D = zeros(length(OutputName), length(InputName));
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org4554e76" class="outline-3">
<h3 id="org4554e76"><span class="section-number-3">4.8</span> Generate the State Space Model</h3>
<div class="outline-text-3" id="text-4-8">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">sys = ss(A, B, C, D);
2019-03-14 16:40:28 +01:00
sys.StateName = StateName;
sys.StateUnit = StateUnit;
sys.InputName = InputName;
sys.InputUnit = InputUnit;
sys.OutputName = OutputName;
sys.OutputUnit = OutputUnit;
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org7b72401" class="outline-3">
<h3 id="org7b72401"><span class="section-number-3">4.9</span> Bode Plot</h3>
<div class="outline-text-3" id="text-4-9">
2019-03-14 16:40:28 +01:00
<p>
2020-11-12 10:30:56 +01:00
The transfer function from a disturbance force \(f\) to the measured displacement \(d\) is shown figure <a href="#orgc179dd0">9</a>.
2019-03-14 16:40:28 +01:00
</p>
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">freqs = logspace(<span class="org-type">-</span>1, 3, 1000);
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
<span class="org-type">figure</span>;
plot(freqs, abs(squeeze(freqresp(sys(<span class="org-string">'d'</span>, <span class="org-string">'f'</span>), freqs, <span class="org-string">'Hz'</span>))));
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
xlabel(<span class="org-string">'Frequency [Hz]'</span>); ylabel(<span class="org-string">'Amplitude [m/N]'</span>);
2019-03-14 16:40:28 +01:00
</pre>
</div>
2020-11-12 10:30:56 +01:00
<div id="orgc179dd0" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="figs/spindle_f_to_d.png" alt="spindle_f_to_d.png" />
</p>
<p><span class="figure-number">Figure 9: </span>Bode plot of the transfer function from \(f\) to \(d\)</p>
2019-03-14 16:40:28 +01:00
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org156efe8" class="outline-3">
<h3 id="org156efe8"><span class="section-number-3">4.10</span> Save the model</h3>
<div class="outline-text-3" id="text-4-10">
<div class="org-src-container">
<pre class="src src-matlab">save(<span class="org-string">'./mat/spindle_model.mat'</span>, <span class="org-string">'sys'</span>);
</pre>
</div>
</div>
</div>
2019-03-14 16:40:28 +01:00
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org055ab30" class="outline-2">
<h2 id="org055ab30"><span class="section-number-2">5</span> Frequency Domain Data</h2>
<div class="outline-text-2" id="text-5">
2020-11-12 10:30:56 +01:00
<p>
<a id="orgbaa269a"></a>
</p>
<div class="note" id="org76ead94">
<p>
All the files (data and Matlab scripts) are accessible <a href="data/spindle_psd.zip">here</a>.
</p>
2019-03-14 16:40:28 +01:00
</div>
2020-11-12 10:30:56 +01:00
</div>
<div id="outline-container-org4e59d5a" class="outline-3">
<h3 id="org4e59d5a"><span class="section-number-3">5.1</span> Load the processed data and the model</h3>
<div class="outline-text-3" id="text-5-1">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">load(<span class="org-string">'./mat/spindle_data.mat'</span>, <span class="org-string">'spindle'</span>);
load(<span class="org-string">'./mat/spindle_model.mat'</span>, <span class="org-string">'sys'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-org76b5b80" class="outline-3">
<h3 id="org76b5b80"><span class="section-number-3">5.2</span> Compute the PSD</h3>
<div class="outline-text-3" id="text-5-2">
<div class="org-src-container">
<pre class="src src-matlab">n_av = 4; <span class="org-comment">% Number of average</span>
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
[pxx_1rpm, f_1rpm] = pwelch(spindle.rpm1.xasync, hanning(ceil(length(spindle.rpm1.xasync)<span class="org-type">/</span>n_av)), [], [], spindle.rpm1.Fs);
[pyy_1rpm, <span class="org-type">~</span>] = pwelch(spindle.rpm1.yasync, hanning(ceil(length(spindle.rpm1.yasync)<span class="org-type">/</span>n_av)), [], [], spindle.rpm1.Fs);
[pzz_1rpm, <span class="org-type">~</span>] = pwelch(spindle.rpm1.zasync, hanning(ceil(length(spindle.rpm1.zasync)<span class="org-type">/</span>n_av)), [], [], spindle.rpm1.Fs);
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
[pxx_60rpm, f_60rpm] = pwelch(spindle.rpm60.xasync, hanning(ceil(length(spindle.rpm60.xasync)<span class="org-type">/</span>n_av)), [], [], spindle.rpm60.Fs);
[pyy_60rpm, <span class="org-type">~</span>] = pwelch(spindle.rpm60.yasync, hanning(ceil(length(spindle.rpm60.yasync)<span class="org-type">/</span>n_av)), [], [], spindle.rpm60.Fs);
[pzz_60rpm, <span class="org-type">~</span>] = pwelch(spindle.rpm60.zasync, hanning(ceil(length(spindle.rpm60.zasync)<span class="org-type">/</span>n_av)), [], [], spindle.rpm60.Fs);
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org0a76f2c" class="outline-3">
<h3 id="org0a76f2c"><span class="section-number-3">5.3</span> Plot the computed PSD</h3>
<div class="outline-text-3" id="text-5-3">
2019-03-14 16:40:28 +01:00
<p>
2020-11-12 10:30:56 +01:00
The Amplitude Spectral Densities of the displacement of the spindle for the \(x\), \(y\) and \(z\) directions are shown figure <a href="#org0bf401d">11</a>. They correspond to the Asynchronous part shown figure <a href="#org4b7ac99">5</a>.
2019-03-14 16:40:28 +01:00
</p>
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-type">figure</span>;
2019-03-14 16:40:28 +01:00
hold on;
2020-11-12 10:30:56 +01:00
plot(f_1rpm, (pxx_1rpm)<span class="org-type">.^</span>.5, <span class="org-string">'DisplayName'</span>, <span class="org-string">'$P_{xx}$ - 1rpm'</span>);
plot(f_1rpm, (pyy_1rpm)<span class="org-type">.^</span>.5, <span class="org-string">'DisplayName'</span>, <span class="org-string">'$P_{yy}$ - 1rpm'</span>);
plot(f_1rpm, (pzz_1rpm)<span class="org-type">.^</span>.5, <span class="org-string">'DisplayName'</span>, <span class="org-string">'$P_{zz}$ - 1rpm'</span>);
<span class="org-comment">% plot(f_1rpm, spindle.rpm1.adcn*ones(size(f_1rpm)), '--k', 'DisplayName', 'ADC - 1rpm');</span>
2019-03-14 16:40:28 +01:00
hold off;
2020-11-12 10:30:56 +01:00
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
xlabel(<span class="org-string">'Frequency [Hz]'</span>); ylabel(<span class="org-string">'ASD [$m/\sqrt{Hz}$]'</span>);
legend(<span class="org-string">'Location'</span>, <span class="org-string">'northeast'</span>);
xlim([f_1rpm(2), f_1rpm(end)]);
2019-03-14 16:40:28 +01:00
</pre>
</div>
2020-11-12 10:30:56 +01:00
<div id="org618a78b" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="figs/spindle_psd_xyz_1rpm.png" alt="spindle_psd_xyz_1rpm.png" />
</p>
<p><span class="figure-number">Figure 10: </span>Power spectral density of the Asynchronous displacement - 1rpm</p>
2019-03-14 16:40:28 +01:00
</div>
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-type">figure</span>;
2019-03-14 16:40:28 +01:00
hold on;
2020-11-12 10:30:56 +01:00
plot(f_60rpm, (pxx_60rpm)<span class="org-type">.^</span>.5, <span class="org-string">'DisplayName'</span>, <span class="org-string">'$P_{xx}$ - 60rpm'</span>);
plot(f_60rpm, (pyy_60rpm)<span class="org-type">.^</span>.5, <span class="org-string">'DisplayName'</span>, <span class="org-string">'$P_{yy}$ - 60rpm'</span>);
plot(f_60rpm, (pzz_60rpm)<span class="org-type">.^</span>.5, <span class="org-string">'DisplayName'</span>, <span class="org-string">'$P_{zz}$ - 60rpm'</span>);
<span class="org-comment">% plot(f_60rpm, spindle.rpm60.adcn*ones(size(f_60rpm)), '--k', 'DisplayName', 'ADC - 60rpm');</span>
2019-03-14 16:40:28 +01:00
hold off;
2020-11-12 10:30:56 +01:00
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
xlabel(<span class="org-string">'Frequency [Hz]'</span>); ylabel(<span class="org-string">'ASD [$m/\sqrt{Hz}$]'</span>);
legend(<span class="org-string">'Location'</span>, <span class="org-string">'northeast'</span>);
xlim([f_60rpm(2), f_60rpm(end)]);
2019-03-14 16:40:28 +01:00
</pre>
</div>
2020-11-12 10:30:56 +01:00
<div id="org0bf401d" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="figs/spindle_psd_xyz_60rpm.png" alt="spindle_psd_xyz_60rpm.png" />
</p>
<p><span class="figure-number">Figure 11: </span>Power spectral density of the Asynchronous displacement - 60rpm</p>
2019-03-14 16:40:28 +01:00
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org85095d4" class="outline-3">
<h3 id="org85095d4"><span class="section-number-3">5.4</span> Compute the response of the model</h3>
<div class="outline-text-3" id="text-5-4">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">Tfd = abs(squeeze(freqresp(sys(<span class="org-string">'d'</span>, <span class="org-string">'f'</span>), f_60rpm, <span class="org-string">'Hz'</span>)));
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org6e1d56d" class="outline-3">
<h3 id="org6e1d56d"><span class="section-number-3">5.5</span> Plot the PSD of the Force using the model</h3>
<div class="outline-text-3" id="text-5-5">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-type">figure</span>;
plot(f_60rpm, (pxx_60rpm<span class="org-type">.^</span>.5)<span class="org-type">./</span>Tfd, <span class="org-string">'DisplayName'</span>, <span class="org-string">'$P_{xx}$'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
xlabel(<span class="org-string">'Frequency [Hz]'</span>); ylabel(<span class="org-string">'ASD [$N/\sqrt{Hz}$]'</span>);
xlim([f_60rpm(2), f_60rpm(end)]);
2019-03-14 16:40:28 +01:00
</pre>
</div>
2020-11-12 10:30:56 +01:00
<div id="orgeb951fe" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="figs/spindle_psd_f_60rpm.png" alt="spindle_psd_f_60rpm.png" />
</p>
<p><span class="figure-number">Figure 12: </span>Power spectral density of the force - 60rpm</p>
2019-03-14 16:40:28 +01:00
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-orgedd234c" class="outline-3">
<h3 id="orgedd234c"><span class="section-number-3">5.6</span> Estimated Shape of the PSD of the force</h3>
<div class="outline-text-3" id="text-5-6">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab">s = tf(<span class="org-string">'s'</span>);
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
Wd_simple = 1e<span class="org-type">-</span>8<span class="org-type">/</span>(1<span class="org-type">+</span>s<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">/</span>0.5)<span class="org-type">/</span>(1<span class="org-type">+</span>s<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">/</span>100);
Wf_simple = Wd_simple<span class="org-type">/</span>tf(sys(<span class="org-string">'d'</span>, <span class="org-string">'f'</span>));
TWf_simple = abs(squeeze(freqresp(Wf_simple, f_60rpm, <span class="org-string">'Hz'</span>)));
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
<span class="org-comment">% Wf = 0.48902*(s+327.9)*(s^2 + 109.6*s + 1.687e04)/((s^2 + 30.59*s + 8541)*(s^2 + 29.11*s + 3.268e04));</span>
<span class="org-comment">% Wf = 0.15788*(s+418.6)*(s+1697)^2*(s^2 + 124.3*s + 2.529e04)*(s^2 + 681.3*s + 9.018e05)/((s^2 + 23.03*s + 8916)*(s^2 + 33.85*s + 6.559e04)*(s^2 + 71.43*s + 4.283e05)*(s^2 + 40.64*s + 1.789e06));</span>
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
Wf = (s<span class="org-type">+</span>1697)<span class="org-type">^</span>2<span class="org-type">*</span>(s<span class="org-type">^</span>2 <span class="org-type">+</span> 114.5<span class="org-type">*</span>s <span class="org-type">+</span> 2.278e04)<span class="org-type">*</span>(s<span class="org-type">^</span>2 <span class="org-type">+</span> 205.1<span class="org-type">*</span>s <span class="org-type">+</span> 1.627e05)<span class="org-type">*</span>(s<span class="org-type">^</span>2 <span class="org-type">+</span> 285.8<span class="org-type">*</span>s <span class="org-type">+</span> 8.624e05)<span class="org-type">*</span>(s<span class="org-type">+</span>100)<span class="org-type">/</span>((s<span class="org-type">+</span>0.5)<span class="org-type">*</span>3012<span class="org-type">*</span>(s<span class="org-type">^</span>2 <span class="org-type">+</span> 23.03<span class="org-type">*</span>s <span class="org-type">+</span> 8916)<span class="org-type">*</span>(s<span class="org-type">^</span>2 <span class="org-type">+</span> 17.07<span class="org-type">*</span>s <span class="org-type">+</span> 4.798e04)<span class="org-type">*</span>(s<span class="org-type">^</span>2 <span class="org-type">+</span> 41.17<span class="org-type">*</span>s <span class="org-type">+</span> 4.347e05)<span class="org-type">*</span>(s<span class="org-type">^</span>2 <span class="org-type">+</span> 78.99<span class="org-type">*</span>s <span class="org-type">+</span> 1.789e06));
2019-03-14 16:40:28 +01:00
2020-11-12 10:30:56 +01:00
TWf = abs(squeeze(freqresp(Wf, f_60rpm, <span class="org-string">'Hz'</span>)));
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org0a01476" class="outline-3">
<h3 id="org0a01476"><span class="section-number-3">5.7</span> PSD in [N]</h3>
<div class="outline-text-3" id="text-5-7">
2019-03-14 16:40:28 +01:00
<p>
2020-11-12 10:30:56 +01:00
Above \(200Hz\), the Amplitude Spectral Density seems dominated by noise coming from the electronics (charge amplifier, ADC, &#x2026;). So we don&rsquo;t know what is the frequency content of the force above that frequency. However, we assume that \(P_{xx}\) is decreasing with \(1/f\) as it seems so be the case below \(100Hz\) (figure <a href="#org0bf401d">11</a>).
2019-03-14 16:40:28 +01:00
</p>
<p>
2020-11-12 10:30:56 +01:00
We then fit the PSD of the displacement with a transfer function (figure <a href="#orgeeae78e">14</a>).
2019-03-14 16:40:28 +01:00
</p>
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-type">figure</span>;
2019-03-14 16:40:28 +01:00
hold on;
2020-11-12 10:30:56 +01:00
plot(f_60rpm, (pxx_60rpm<span class="org-type">.^</span>.5)<span class="org-type">./</span>Tfd, <span class="org-string">'DisplayName'</span>, <span class="org-string">'$\sqrt{P_{xx}}/|T_{d/f}|$'</span>);
plot(f_60rpm, TWf, <span class="org-string">'DisplayName'</span>, <span class="org-string">'Wf'</span>);
plot(f_60rpm, TWf_simple, <span class="org-string">'-k'</span>, <span class="org-string">'DisplayName'</span>, <span class="org-string">'Wfs'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
xlabel(<span class="org-string">'Frequency [Hz]'</span>); ylabel(<span class="org-string">'ASD [$N/\sqrt{Hz}$]'</span>);
xlim([f_60rpm(2), f_60rpm(end)]);
legend(<span class="org-string">'Location'</span>, <span class="org-string">'northeast'</span>);
2019-03-14 16:40:28 +01:00
</pre>
</div>
2020-11-12 10:30:56 +01:00
<div id="org2c48007" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="figs/spindle_psd_f_comp_60rpm.png" alt="spindle_psd_f_comp_60rpm.png" />
</p>
<p><span class="figure-number">Figure 13: </span>Power spectral density of the force - 60rpm</p>
2019-03-14 16:40:28 +01:00
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-orgb29a3ce" class="outline-3">
<h3 id="orgb29a3ce"><span class="section-number-3">5.8</span> PSD in [m]</h3>
<div class="outline-text-3" id="text-5-8">
2019-03-14 16:40:28 +01:00
<p>
To obtain the PSD of the force \(f\) that induce such displacement, we use the following formula:
\[ \sqrt{PSD(d)} = |T_{d/f}| \sqrt{PSD(f)} \]
</p>
<p>
And so we have:
\[ \sqrt{PSD(f)} = |T_{d/f}|^{-1} \sqrt{PSD(d)} \]
</p>
<p>
2020-11-12 10:30:56 +01:00
The obtain Power Spectral Density of the force is displayed figure <a href="#org2c48007">13</a>.
2019-03-14 16:40:28 +01:00
</p>
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-type">figure</span>;
2019-03-14 16:40:28 +01:00
hold on;
2020-11-12 10:30:56 +01:00
plot(f_60rpm, pxx_60rpm<span class="org-type">.^</span>.5, <span class="org-string">'DisplayName'</span>, <span class="org-string">'$\sqrt{P_{xx}}$'</span>);
plot(f_60rpm, TWf<span class="org-type">.*</span>Tfd, <span class="org-string">'DisplayName'</span>, <span class="org-string">'$|W_f|*|T_{d/f}|$'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
xlabel(<span class="org-string">'Frequency [Hz]'</span>); ylabel(<span class="org-string">'ASD [$m/\sqrt{Hz}$]'</span>);
xlim([f_60rpm(2), f_60rpm(end)]);
legend(<span class="org-string">'Location'</span>, <span class="org-string">'northeast'</span>);
2019-03-14 16:40:28 +01:00
</pre>
</div>
2020-11-12 10:30:56 +01:00
<div id="orgeeae78e" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="figs/spindle_psd_d_comp_60rpm.png" alt="spindle_psd_d_comp_60rpm.png" />
</p>
<p><span class="figure-number">Figure 14: </span>Comparison of the power spectral density of the measured displacement and of the model</p>
2019-03-14 16:40:28 +01:00
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org2ce75a0" class="outline-3">
<h3 id="org2ce75a0"><span class="section-number-3">5.9</span> Compute the resulting RMS value [m]</h3>
<div class="outline-text-3" id="text-5-9">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-type">figure</span>;
2019-03-14 16:40:28 +01:00
hold on;
2020-11-12 10:30:56 +01:00
plot(f_60rpm, 1e9<span class="org-type">*</span>cumtrapz(f_60rpm, (pxx_60rpm))<span class="org-type">.^</span>.5, <span class="org-string">'--'</span>, <span class="org-string">'DisplayName'</span>, <span class="org-string">'Exp. Data'</span>);
plot(f_60rpm, 1e9<span class="org-type">*</span>cumtrapz(f_60rpm, ((TWf<span class="org-type">.*</span>Tfd)<span class="org-type">.^</span>2))<span class="org-type">.^</span>.5, <span class="org-string">'--'</span>, <span class="org-string">'DisplayName'</span>, <span class="org-string">'Estimated'</span>);
2019-03-14 16:40:28 +01:00
hold off;
2020-11-12 10:30:56 +01:00
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>);
xlabel(<span class="org-string">'Frequency [Hz]'</span>); ylabel(<span class="org-string">'CPS [$nm$ rms]'</span>);
xlim([f_60rpm(2), f_60rpm(end)]);
legend(<span class="org-string">'Location'</span>, <span class="org-string">'southeast'</span>);
2019-03-14 16:40:28 +01:00
</pre>
</div>
2020-11-12 10:30:56 +01:00
<div id="org96369c9" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="figs/spindle_cps_d_comp_60rpm.png" alt="spindle_cps_d_comp_60rpm.png" />
</p>
<p><span class="figure-number">Figure 15: </span>Cumulative Power Spectrum - 60rpm</p>
2019-03-14 16:40:28 +01:00
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-org9bcf259" class="outline-3">
<h3 id="org9bcf259"><span class="section-number-3">5.10</span> Compute the resulting RMS value [m]</h3>
<div class="outline-text-3" id="text-5-10">
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-type">figure</span>;
2019-03-14 16:40:28 +01:00
hold on;
2020-11-12 10:30:56 +01:00
plot(f_1rpm, 1e9<span class="org-type">*</span>cumtrapz(f_1rpm, (pxx_1rpm)), <span class="org-string">'--'</span>, <span class="org-string">'DisplayName'</span>, <span class="org-string">'Exp. Data'</span>);
plot(f_1rpm, 1e9<span class="org-type">*</span>(f_1rpm(end)<span class="org-type">-</span>f_1rpm(1))<span class="org-type">/</span>(length(f_1rpm)<span class="org-type">-</span>1)<span class="org-type">*</span>cumsum(pxx_1rpm), <span class="org-string">'--'</span>, <span class="org-string">'DisplayName'</span>, <span class="org-string">'Exp. Data'</span>);
2019-03-14 16:40:28 +01:00
hold off;
2020-11-12 10:30:56 +01:00
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>);
xlabel(<span class="org-string">'Frequency [Hz]'</span>); ylabel(<span class="org-string">'CPS [$nm$ rms]'</span>);
xlim([f_1rpm(2), f_1rpm(end)]);
legend(<span class="org-string">'Location'</span>, <span class="org-string">'southeast'</span>);
2019-03-14 16:40:28 +01:00
</pre>
</div>
2020-11-12 10:30:56 +01:00
<div id="org48f5cad" class="figure">
2019-03-14 16:40:28 +01:00
<p><img src="figs/spindle_cps_d_comp_1rpm.png" alt="spindle_cps_d_comp_1rpm.png" />
</p>
<p><span class="figure-number">Figure 16: </span>Cumulative Power Spectrum - 1rpm</p>
2019-03-14 16:40:28 +01:00
</div>
</div>
</div>
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-orgc7eca20" class="outline-2">
<h2 id="orgc7eca20"><span class="section-number-2">6</span> Functions</h2>
<div class="outline-text-2" id="text-6">
2019-03-14 16:40:28 +01:00
</div>
2020-11-12 10:30:56 +01:00
<div id="outline-container-orgb688035" class="outline-3">
<h3 id="orgb688035"><span class="section-number-3">6.1</span> getAsynchronousError</h3>
<div class="outline-text-3" id="text-6-1">
2020-11-12 10:30:56 +01:00
<p>
<a id="org34058ab"></a>
</p>
<p>
This Matlab function is accessible <a href="src/getAsynchronousError.m">here</a>.
</p>
2019-03-14 16:40:28 +01:00
<div class="org-src-container">
2020-11-12 10:30:56 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[Wxdec]</span> = <span class="org-function-name">getAsynchronousError</span>(<span class="org-variable-name">data</span>, <span class="org-variable-name">NbTurn</span>)
<span class="org-matlab-cellbreak"><span class="org-comment">%%</span></span>
L = length(data);
res_per_rev = L<span class="org-type">/</span>NbTurn;
P = 0<span class="org-type">:</span>(res_per_rev<span class="org-type">*</span>NbTurn<span class="org-type">-</span>1);
Pos = P<span class="org-type">'</span> <span class="org-type">*</span> 360<span class="org-type">/</span>res_per_rev;
<span class="org-comment">% Temperature correction</span>
x1 = myfit2(Pos, data);
<span class="org-comment">% Convert data to frequency domain and scale accordingly</span>
X2 = 2<span class="org-type">/</span>(res_per_rev<span class="org-type">*</span>NbTurn)<span class="org-type">*</span>fft(x1);
f2 = (0<span class="org-type">:</span>L<span class="org-type">-</span>1)<span class="org-type">./</span>NbTurn; <span class="org-comment">%upr -&gt; once per revolution</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%%</span></span>
X2dec = zeros(size(X2));
<span class="org-comment">% Get only the non integer data</span>
X2dec(mod(f2(<span class="org-type">:</span>), 1) <span class="org-type">~=</span> 0) = X2(mod(f2(<span class="org-type">:</span>), 1) <span class="org-type">~=</span> 0);
Wxdec = real((res_per_rev<span class="org-type">*</span>NbTurn)<span class="org-type">/</span>2 <span class="org-type">*</span> ifft(X2dec));
<span class="org-matlab-cellbreak"><span class="org-comment">%%</span></span>
<span class="org-keyword">function</span> <span class="org-variable-name">Y</span> = <span class="org-function-name">myfit2</span>(<span class="org-variable-name">x</span>,<span class="org-variable-name">y</span>)
A = [x ones(size(x))]<span class="org-type">\</span>y;
a = A(1); b = A(2);
Y = y <span class="org-type">-</span> (a<span class="org-type">*</span>x <span class="org-type">+</span> b);
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
2019-03-14 16:40:28 +01:00
</pre>
</div>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
2020-11-12 10:30:56 +01:00
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2020-11-12 jeu. 10:30</p>
2019-03-14 16:40:28 +01:00
</div>
</body>
</html>