Rework the disturbance file

This commit is contained in:
2020-03-17 11:23:17 +01:00
parent f69edd6dce
commit c7207b96cb
9 changed files with 149 additions and 278 deletions

View File

@@ -4,7 +4,7 @@
"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-03-13 ven. 17:39 -->
<!-- 2020-03-17 mar. 11:21 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Identification of the disturbances</title>
@@ -254,7 +254,6 @@
<li><a href="#Compute-the-Power-Spectral-Density-of-the-disturbance-force">5. Compute the Power Spectral Density of the disturbance force</a></li>
<li><a href="#Noise-Budget">6. Noise Budget</a></li>
<li><a href="#Save">7. Save</a></li>
<li><a href="#org9a1d0a9">8. Error motion of the Sample without Control</a></li>
</ul>
</div>
</div>
@@ -277,7 +276,6 @@ Because we cannot measure directly the perturbation forces, we have the measure
</p>
<div id="org3b8025c" class="figure">
<p><img src="figs/uniaxial-model-micro-station.png" alt="uniaxial-model-micro-station.png" />
</p>
@@ -324,7 +322,8 @@ We load the configuration and we set a small <code>StopTime</code>.
</div>
<p>
We initialize all the stages.
We initialize all the stages without the sample nor the nano-hexapod.
The obtained system corresponds to the status micro-station when the vibration measurements were conducted.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeGround();
@@ -339,6 +338,30 @@ initializeNanoHexapod(<span class="org-string">'type'</span>, <span class="org-s
initializeSample(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
</pre>
</div>
<p>
Open Loop Control.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
<p>
We don&rsquo;t need gravity here.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeSimscapeConfiguration(<span class="org-string">'gravity'</span>, <span class="org-constant">false</span>);
</pre>
</div>
<p>
We log the signals.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeLoggingConfiguration(<span class="org-string">'log'</span>, <span class="org-string">'all'</span>);
</pre>
</div>
</div>
</div>
@@ -351,41 +374,41 @@ The transfer functions from the disturbance forces to the relative velocity of t
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'nass_model'</span>;
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Micro-Hexapod</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances'</span>], 1, <span class="org-string">'openinput'</span>, [], <span class="org-string">'Dwz'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Vertical Ground Motion</span>
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances'</span>], 1, <span class="org-string">'openinput'</span>, [], <span class="org-string">'Fty_z'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Parasitic force Ty</span>
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances'</span>], 1, <span class="org-string">'openinput'</span>, [], <span class="org-string">'Frz_z'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Parasitic force Rz</span>
io(io_i) = linio([mdl, <span class="org-string">'/Micro-Station/Granite/Modal Analysis/accelerometer'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Absolute motion - Granite</span>
io(io_i) = linio([mdl, <span class="org-string">'/Micro-Station/Micro Hexapod/Modal Analysis/accelerometer'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Absolute Motion - Hexapod</span>
<span class="org-comment">% io(io_i) = linio([mdl, '/Vm'], 1, 'openoutput'); io_i = io_i + 1; % Relative Velocity hexapod/granite</span>
</pre>
</div>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Micro-Hexapod</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances'</span>], 1, <span class="org-string">'openinput'</span>, [], <span class="org-string">'Dwz'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Vertical Ground Motion</span>
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances'</span>], 1, <span class="org-string">'openinput'</span>, [], <span class="org-string">'Fty_z'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Parasitic force Ty</span>
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances'</span>], 1, <span class="org-string">'openinput'</span>, [], <span class="org-string">'Frz_z'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Parasitic force Rz</span>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-comment">% Run the linearization</span>
io(io_i) = linio([mdl, <span class="org-string">'/Micro-Station/Granite/Modal Analysis/accelerometer'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Absolute motion - Granite</span>
io(io_i) = linio([mdl, <span class="org-string">'/Micro-Station/Micro Hexapod/Modal Analysis/accelerometer'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Absolute Motion - Hexapod</span>
<span class="org-comment">% io(io_i) = linio([mdl, '/Vm'], 1, 'openoutput'); io_i = io_i + 1; % Relative Velocity hexapod/granite</span>
<span class="org-comment">% Run the linearization</span>
G = linearize(mdl, io, 0);
</pre>
</div>
<span class="org-comment">% We Take only the outputs corresponding to the vertical acceleration</span>
G = G([3,9], <span class="org-type">:</span>);
<p>
We Take only the outputs corresponding to the vertical acceleration.
</p>
<div class="org-src-container">
<pre class="src src-matlab">G = G([3,9], <span class="org-type">:</span>);
<span class="org-comment">% Input/Output names</span>
G.InputName = {<span class="org-string">'Dw'</span>, <span class="org-string">'Fty'</span>, <span class="org-string">'Frz'</span>};
G.OutputName = {<span class="org-string">'Agm'</span>, <span class="org-string">'Ahm'</span>};
</pre>
</div>
<span class="org-comment">% We integrate 1 time the output to have the velocity and we</span>
<span class="org-comment">% substract the absolute velocities to have the relative velocity</span>
G = (1<span class="org-type">/</span>s)<span class="org-type">*</span>tf([<span class="org-type">-</span>1, 1])<span class="org-type">*</span>G;
<p>
We integrate 1 time the output to have the velocity and we substract the absolute velocities to have the relative velocity.
</p>
<div class="org-src-container">
<pre class="src src-matlab">G = (1<span class="org-type">/</span>s)<span class="org-type">*</span>tf([<span class="org-type">-</span>1, 1])<span class="org-type">*</span>G;
<span class="org-comment">% Input/Output names</span>
G.InputName = {<span class="org-string">'Dw'</span>, <span class="org-string">'Fty'</span>, <span class="org-string">'Frz'</span>};
@@ -402,6 +425,14 @@ G.OutputName = {<span class="org-string">'Vm'</span>};
<a id="org5636fee"></a>
</p>
<p>
The obtained sensitivity to disturbances are shown bellow:
</p>
<ul class="org-ul">
<li>The transfer function from vertical ground motion \(D_w\) to the vertical relative displacement from the micro-hexapod to the granite \(D\) is shown in Figure <a href="#org7fe296c">2</a></li>
<li>The sensitive from vertical forces applied in the Translation stage is shown in Figure <a href="#orgce9715c">3</a></li>
</ul>
<div id="org7fe296c" class="figure">
<p><img src="figs/sensitivity_dist_gm.png" alt="sensitivity_dist_gm.png" />
@@ -432,10 +463,13 @@ G.OutputName = {<span class="org-string">'Vm'</span>};
<div class="outline-text-2" id="text-Power-Spectral-Density-of-the-effect-of-the-disturbances">
<p>
<a id="org40a7e4e"></a>
The PSD of the relative velocity between the hexapod and the marble in \([(m/s)^2/Hz]\) are loaded for the following sources of disturbance:
</p>
<p>
The Power Spectral Densities of the relative velocity between the hexapod and the marble in \([(m/s)^2/Hz]\) are loaded for the following sources of disturbance:
</p>
<ul class="org-ul">
<li>Slip Ring Rotation</li>
<li>Slip Ring Rotation (\(F_{r_z}\))</li>
<li>Scan of the translation stage (effect in the vertical direction and in the horizontal direction)</li>
</ul>
@@ -460,7 +494,7 @@ We now compute the relative velocity between the hexapod and the granite due to
</div>
<p>
The Power Spectral Density of the relative motion/velocity of the hexapod with respect to the granite are shown in figures <a href="#orgb815ef2">5</a> and <a href="#org4c2c215">6</a>.
The Power Spectral Density of the relative motion and velocity of the hexapod with respect to the granite are shown in figures <a href="#orgb815ef2">5</a> and <a href="#org4c2c215">6</a>.
</p>
<p>
@@ -487,6 +521,14 @@ The Cumulative Amplitude Spectrum of the relative motion is shown in figure <a h
<p><img src="figs/dist_effect_relative_motion_cas.png" alt="dist_effect_relative_motion_cas.png" />
</p>
<p><span class="figure-number">Figure 7: </span>Cumulative Amplitude Spectrum of the relative motion due to different sources of perturbation (<a href="./figs/dist_effect_relative_motion_cas.png">png</a>, <a href="./figs/dist_effect_relative_motion_cas.pdf">pdf</a>)</p>
</div>
<div class="important">
<p>
From Figure <a href="#orgaf910f1">7</a>, we can see that the translation stage and the rotation stage have almost the same effect on the position error.
Also, the ground motion has a relatively negligible effect on the position error.
</p>
</div>
</div>
</div>
@@ -499,15 +541,22 @@ The Cumulative Amplitude Spectrum of the relative motion is shown in figure <a h
</p>
<p>
Now, from the extracted transfer functions from the disturbance force to the relative motion of the hexapod with respect to the granite (section <a href="#org5636fee">3</a>) and from the measured PSD of the relative motion (section <a href="#org40a7e4e">4</a>), we can compute the PSD of the disturbance force.
Using the extracted transfer functions from the disturbance force to the relative motion of the hexapod with respect to the granite (section <a href="#org5636fee">3</a>) and using the measured PSD of the relative motion (section <a href="#org40a7e4e">4</a>), we can compute the PSD of the disturbance force.
</p>
<p>
This is done below.
</p>
<div class="org-src-container">
<pre class="src src-matlab">rz.psd_f = rz.pxsp_r<span class="org-type">./</span>abs(squeeze(freqresp(G(<span class="org-string">'Vm'</span>, <span class="org-string">'Frz'</span>), rz.f, <span class="org-string">'Hz'</span>)))<span class="org-type">.^</span>2;
tyz.psd_f = tyz.pxz_ty_r<span class="org-type">./</span>abs(squeeze(freqresp(G(<span class="org-string">'Vm'</span>, <span class="org-string">'Fty'</span>), tyz.f, <span class="org-string">'Hz'</span>)))<span class="org-type">.^</span>2;
</pre>
</div>
<p>
The obtained amplitude spectral densities of the disturbance forces are shown in Figure <a href="#org45cf35c">8</a>.
</p>
<div id="org45cf35c" class="figure">
<p><img src="figs/dist_force_psd.png" alt="dist_force_psd.png" />
@@ -525,24 +574,31 @@ tyz.psd_f = tyz.pxz_ty_r<span class="org-type">./</span>abs(squeeze(freqresp(G(<
</p>
<p>
Now, from the compute spectral density of the disturbance sources, we can compute the resulting relative motion of the Hexapod with respect to the granite using the model.
We should verify that this is coherent with the measurements.
From the obtained spectral density of the disturbance sources, we can compute the resulting relative motion of the Hexapod with respect to the granite using the model.
</p>
<p>
This is equivalent as doing the inverse that was done in the previous section.
This is done in order to verify that this is coherent with the measurements.
</p>
<p>
The power spectral density of the relative motion is computed below and the result is shown in Figure <a href="#orgcacf809">9</a>.
We can see that this is exactly the same as the Figure <a href="#org4c2c215">6</a>.
</p>
<div class="org-src-container">
<pre class="src src-matlab">psd_gm_d = gm.psd_gm<span class="org-type">.*</span>abs(squeeze(freqresp(G(<span class="org-string">'Vm'</span>, <span class="org-string">'Dw'</span>)<span class="org-type">/</span>s, gm.f, <span class="org-string">'Hz'</span>)))<span class="org-type">.^</span>2;
psd_ty_d = tyz.psd_f<span class="org-type">.*</span>abs(squeeze(freqresp(G(<span class="org-string">'Vm'</span>, <span class="org-string">'Fty'</span>)<span class="org-type">/</span>s, tyz.f, <span class="org-string">'Hz'</span>)))<span class="org-type">.^</span>2;
psd_rz_d = rz.psd_f<span class="org-type">.*</span>abs(squeeze(freqresp(G(<span class="org-string">'Vm'</span>, <span class="org-string">'Frz'</span>)<span class="org-type">/</span>s, rz.f, <span class="org-string">'Hz'</span>)))<span class="org-type">.^</span>2;
</pre>
</div>
<div id="orgcacf809" class="figure">
<p><img src="figs/psd_effect_dist_verif.png" alt="psd_effect_dist_verif.png" />
</p>
<p><span class="figure-number">Figure 9: </span>Computed Effect of the disturbances on the relative displacement hexapod/granite (<a href="./figs/psd_effect_dist_verif.png">png</a>, <a href="./figs/psd_effect_dist_verif.pdf">pdf</a>)</p>
</div>
<div id="orgf872ab1" class="figure">
<p><img src="figs/cas_computed_relative_displacement.png" alt="cas_computed_relative_displacement.png" />
</p>
<p><span class="figure-number">Figure 10: </span>CAS of the total Relative Displacement due to all considered sources of perturbation (<a href="./figs/cas_computed_relative_displacement.png">png</a>, <a href="./figs/cas_computed_relative_displacement.pdf">pdf</a>)</p>
</div>
</div>
</div>
@@ -567,117 +623,10 @@ save(<span class="org-string">'./mat/dist_psd.mat'</span>, <span class="org-stri
</div>
</div>
</div>
<div id="outline-container-org9a1d0a9" class="outline-2">
<h2 id="org9a1d0a9"><span class="section-number-2">8</span> Error motion of the Sample without Control</h2>
<div class="outline-text-2" id="text-8">
<div class="org-src-container">
<pre class="src src-matlab">initializeGround();
initializeGranite(<span class="org-string">'Foffset'</span>, <span class="org-constant">false</span>);
initializeTy(<span class="org-string">'Foffset'</span>, <span class="org-constant">false</span>);
initializeRy(<span class="org-string">'Foffset'</span>, <span class="org-constant">false</span>);
initializeRz(<span class="org-string">'Foffset'</span>, <span class="org-constant">false</span>);
initializeMicroHexapod(<span class="org-string">'Foffset'</span>, <span class="org-constant">false</span>);
initializeAxisc(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>);
initializeMirror(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>);
</pre>
</div>
<p>
The nano-hexapod is a piezoelectric hexapod and the sample has a mass of 50kg.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeNanoHexapod(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>);
initializeSample(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'mass'</span>, 50);
</pre>
</div>
<p>
We set the references and disturbances to zero.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeReferences();
initializeDisturbances();
</pre>
</div>
<p>
We set the controller type to Open-Loop.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
<p>
And we put some gravity.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeSimscapeConfiguration(<span class="org-string">'gravity'</span>, <span class="org-constant">false</span>);
</pre>
</div>
<p>
We do not need to log any signal.
</p>
<div class="org-src-container">
<pre class="src src-matlab">initializeLoggingConfiguration(<span class="org-string">'log'</span>, <span class="org-string">'all'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">initializePosError(<span class="org-string">'error'</span>, <span class="org-constant">false</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">load(<span class="org-string">'mat/conf_simulink.mat'</span>);
<span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-variable-name">conf_simulink</span>, <span class="org-string">'StopTime'</span>, <span class="org-string">'1'</span>);
</pre>
</div>
<p>
We simulate the model.
</p>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'nass_model'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">figure</span>;
subplot(1, 2, 1);
hold on;
plot(simout.Em.Eg.Time, simout.Em.Eg.Data(<span class="org-type">:</span>, 1), <span class="org-string">'DisplayName'</span>, <span class="org-string">'X'</span>);
plot(simout.Em.Eg.Time, simout.Em.Eg.Data(<span class="org-type">:</span>, 2), <span class="org-string">'DisplayName'</span>, <span class="org-string">'Y'</span>);
plot(simout.Em.Eg.Time, simout.Em.Eg.Data(<span class="org-type">:</span>, 3), <span class="org-string">'DisplayName'</span>, <span class="org-string">'Z'</span>);
hold off;
xlabel(<span class="org-string">'Time [s]'</span>);
ylabel(<span class="org-string">'Position error [m]'</span>);
legend();
subplot(1, 2, 2);
hold on;
plot(simout.Em.Eg.Time, simout.Em.Eg.Data(<span class="org-type">:</span>, 4));
plot(simout.Em.Eg.Time, simout.Em.Eg.Data(<span class="org-type">:</span>, 5));
plot(simout.Em.Eg.Time, simout.Em.Eg.Data(<span class="org-type">:</span>, 6));
hold off;
xlabel(<span class="org-string">'Time [s]'</span>);
ylabel(<span class="org-string">'Orientation error [rad]'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">Eg = simout.Em.Eg;
save(<span class="org-string">'./mat/motion_error_ol.mat'</span>, <span class="org-string">'Eg'</span>);
</pre>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2020-03-13 ven. 17:39</p>
<p class="date">Created: 2020-03-17 mar. 11:21</p>
</div>
</body>
</html>