Optimal stiffness / OL budget error analysis

This commit is contained in:
2020-04-07 19:34:05 +02:00
parent 60c41f1cbc
commit 60aeb7d5ab
21 changed files with 466 additions and 208 deletions

View File

@@ -74,11 +74,6 @@ The level of these disturbances has been identified form experiments which are d
simulinkproject('../');
#+end_src
#+begin_src matlab
load('mat/conf_simulink.mat');
open('nass_model.slx')
#+end_src
** Plots :ignore:
The measured Amplitude Spectral Densities (ASD) of these forces are shown in Figures [[fig:opt_stiff_dist_gm]] and [[fig:opt_stiff_dist_fty_frz]].
@@ -149,9 +144,9 @@ We do that for a wide range of nano-hexapod stiffnesses and we compare the obtai
#+begin_src matlab
load('mat/conf_simulink.mat');
open('nass_model.slx')
#+end_src
** Initialization
We initialize all the stages with the default parameters.
#+begin_src matlab
@@ -399,6 +394,19 @@ The effect of direct forces/torques applied on the sample (cable forces for inst
** Introduction :ignore:
In this section, we wish to see if a soft granite suspension could help in reducing the effect of disturbances on the position error of the sample.
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src
#+begin_src matlab :tangle no
simulinkproject('../');
#+end_src
** Analytical Analysis
*** Simple mass-spring-damper model
Let's consider the system shown in Figure [[fig:2dof_system_granite_stiffness]] consisting of two stacked mass-spring-damper systems.
@@ -691,6 +699,10 @@ From Figures [[fig:opt_stiff_soft_granite_Frz]] and [[fig:opt_stiff_soft_granite
* Open Loop Budget Error
<<sec:open_loop_budget_error>>
** Introduction :ignore:
Now that the frequency content of disturbances have been estimated (Section [[sec:psd_disturbances]]) and the transfer functions from disturbances to the position error of the sample have been identified (Section [[sec:effect_disturbances]]), we can compute the level of sample vibration due to the disturbances.
We then can conclude and the nano-hexapod stiffness that will lower the sample position error.
** 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>>
@@ -704,30 +716,120 @@ From Figures [[fig:opt_stiff_soft_granite_Frz]] and [[fig:opt_stiff_soft_granite
simulinkproject('../');
#+end_src
#+begin_src matlab
load('mat/conf_simulink.mat');
** Noise Budgeting - Theory
Let's consider Figure [[fig:psd_change_tf]] there $G_d(s)$ is the transfer function from a signal $d$ (the perturbation) to a signal $y$ (the sample's position error).
open('nass_model.slx')
#+begin_src latex :file psd_change_tf.pdf
\begin{tikzpicture}
\node[block] (G) at (0, 0) {$G_d(s)$};
\draw[<-] (G.west) -- ++(-1, 0) node[above right]{$d$};
\draw[->] (G.east) -- ++( 1, 0) node[above left ]{$y$};
\end{tikzpicture}
#+end_src
** Load of the identified disturbances and transfer functions
#+begin_src matlab
#+name: fig:psd_change_tf
#+caption: Figure caption
#+RESULTS:
[[file:figs/psd_change_tf.png]]
We can compute the Power Spectral Density (PSD) of signal $y$ from the PSD of $d$ and the norm of $G_d(s)$:
\begin{equation}
S_{y}(\omega) = \left|G_d(j\omega)\right|^2 S_{d}(\omega) \label{eq:psd_transfer_function}
\end{equation}
If we now consider multiple disturbances $d_1, \dots, d_n$ as shown in Figure [[fig:psd_change_tf_multiple_pert]], we have that:
\begin{equation}
S_{y}(\omega) = \left|G_{d_1}(j\omega)\right|^2 S_{d_1}(\omega) + \dots + \left|G_{d_n}(j\omega)\right|^2 S_{d_n}(\omega) \label{eq:sum_psd}
\end{equation}
Sometimes, we prefer to compute the *Amplitude* Spectral Density (ASD) which is related to the PSD by:
\[ \Gamma_y(\omega) = \sqrt{S_y(\omega)} \]
#+begin_src latex :file psd_change_tf_multiple_pert.pdf
\begin{tikzpicture}
\node[block] (Gm) at (0, 0) {$\dots$};
\draw[<-] (Gm.west) -- ++(-1, 0);
\node[block, above=0.5 of Gm] (G1) {$G_{d_1}(s)$};
\draw[<-] (G1.west) -- ++(-1, 0) node[above right]{$d_1$};
\node[block, below=0.5 of Gm] (Gn) {$G_{d_n}(s)$};
\draw[<-] (Gn.west) -- ++(-1, 0) node[above right]{$d_n$};
\node[addb, right= of Gm] (add) {};
\draw[->] (G1.east) -| (add.north);
\draw[->] (Gm.east) -- (add.west);
\draw[->] (Gn.east) -| (add.south);
\draw[->] (add) -- ++( 1, 0) node[above left]{$y$};
\end{tikzpicture}
#+end_src
#+name: fig:psd_change_tf_multiple_pert
#+caption: Figure caption
#+RESULTS:
[[file:figs/psd_change_tf_multiple_pert.png]]
The Cumulative Power Spectrum (CPS) is here defined as:
\begin{equation}
\Phi_y(\omega) = \int_\omega^\infty S_y(\nu) d\nu
\end{equation}
And the Cumulative Amplitude Spectrum (CAS):
\begin{equation}
\Psi(\omega) = \sqrt{\Phi(\omega)} = \sqrt{\int_\omega^\infty S_y(\nu) d\nu}
\end{equation}
The CAS evaluation for all frequency corresponds to the rms value of the considered quantity:
\[ y_{\text{rms}} = \Psi(\omega = 0) = \sqrt{\int_0^\infty S_y(\nu) d\nu} \]
** Power Spectral Densities
We compute the effect of perturbations on the motion error thanks to Eq. eqref:eq:psd_transfer_function.
The result is shown in:
- Figure [[fig:opt_stiff_psd_dz_gm]]: PSD of the vertical sample's motion error due to vertical ground motion
- Figure [[fig:opt_stiff_psd_dz_rz]]: PSD of the vertical sample's motion error due to vertical vibrations of the Spindle
#+begin_src matlab :exports none
load('./mat/dist_psd.mat', 'dist_f');
load('./mat/opt_stiffness_disturbances.mat', 'Gd')
#+end_src
** Equations
** Results
Effect of all disturbances
#+begin_src matlab
#+begin_src matlab :exports none
freqs = dist_f.f;
figure;
hold on;
for i = 1:length(Ks)
plot(freqs, sqrt(dist_f.psd_rz).*abs(squeeze(freqresp(Gd{i}('Ez', 'Frz_z'), freqs, 'Hz'))));
plot(freqs, sqrt(dist_f.psd_gm).*abs(squeeze(freqresp(Gd{i}('Ez', 'Dwz'), freqs, 'Hz'))), '-', ...
'DisplayName', sprintf('$k = %.0g$ [N/m]', Ks(i)));
end
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD $\left[\frac{m}{\sqrt{Hz}}\right]$')
legend('location', 'southwest');
xlim([1, 500]);
#+end_src
#+header: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/opt_stiff_psd_dz_gm.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+name: fig:opt_stiff_psd_dz_gm
#+caption: Amplitude Spectral Density of the Sample vertical position error due to Ground motion for multiple nano-hexapod stiffnesses ([[./figs/opt_stiff_psd_dz_gm.png][png]], [[./figs/opt_stiff_psd_dz_gm.pdf][pdf]])
[[file:figs/opt_stiff_psd_dz_gm.png]]
#+begin_src matlab :exports none
freqs = dist_f.f;
figure;
hold on;
for i = 1:length(Ks)
plot(freqs, sqrt(dist_f.psd_rz).*abs(squeeze(freqresp(Gd{i}('Ez', 'Frz_z'), freqs, 'Hz'))), '-', ...
'DisplayName', sprintf('$k = %.0g$ [N/m]', Ks(i)));
end
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
@@ -736,24 +838,85 @@ Effect of all disturbances
xlim([2, 500]);
#+end_src
#+header: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/opt_stiff_psd_dz_rz.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+name: fig:opt_stiff_psd_dz_rz
#+caption: Amplitude Spectral Density of the Sample vertical position error due to Vertical vibration of the Spindle for multiple nano-hexapod stiffnesses ([[./figs/opt_stiff_psd_dz_rz.png][png]], [[./figs/opt_stiff_psd_dz_rz.pdf][pdf]])
[[file:figs/opt_stiff_psd_dz_rz.png]]
We compute the effect of all perturbations on the vertical position error using Eq. eqref:eq:sum_psd and the resulting PSD is shown in Figure [[fig:opt_stiff_psd_dz_tot]].
#+begin_src matlab :exports none
psd_tot = zeros(length(freqs), length(Ks));
for i = 1:length(Ks)
psd_tot(:,i) = dist_f.psd_gm.*abs(squeeze(freqresp(Gd{i}('Ez', 'Dwz' ), freqs, 'Hz'))).^2 + ...
dist_f.psd_ty.*abs(squeeze(freqresp(Gd{i}('Ez', 'Fty_z'), freqs, 'Hz'))).^2 + ...
dist_f.psd_rz.*abs(squeeze(freqresp(Gd{i}('Ez', 'Frz_z'), freqs, 'Hz'))).^2;
end
#+end_src
#+begin_src matlab :exports none
freqs = dist_f.f;
figure;
hold on;
for i = 1:length(Ks)
plot(freqs, sqrt(psd_tot(:,i)), '-', ...
'DisplayName', sprintf('$k = %.0g$ [N/m]', Ks(i)));
end
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('ASD $\left[\frac{m}{\sqrt{Hz}}\right]$')
legend('location', 'southwest')
xlim([1, 500]);
#+end_src
#+header: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/opt_stiff_psd_dz_tot.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+name: fig:opt_stiff_psd_dz_tot
#+caption: Amplitude Spectral Density of the Sample vertical position error due to all considered perturbations for multiple nano-hexapod stiffnesses ([[./figs/opt_stiff_psd_dz_tot.png][png]], [[./figs/opt_stiff_psd_dz_tot.pdf][pdf]])
[[file:figs/opt_stiff_psd_dz_tot.png]]
** Cumulative Amplitude Spectrum
Similarly, the Cumulative Amplitude Spectrum of the sample vibrations are shown:
- Figure [[fig:opt_stiff_cas_dz_gm]]: due to vertical ground motion
- Figure [[fig:opt_stiff_cas_dz_rz]]: due to vertical vibrations of the Spindle
- Figure [[fig:opt_stiff_cas_dz_tot]]: due to all considered perturbations
The black dashed line corresponds to the performance objective of a sample vibration equal to $10\ nm [rms]$.
#+begin_src matlab
freqs = dist_f.f;
figure;
hold on;
for i = 1:length(Ks)
plot(freqs, sqrt(flip(-cumtrapz(flip(freqs), flip(dist_f.psd_ty.*abs(squeeze(freqresp(Gd{i}('Ez', 'Fty_z'), freqs, 'Hz'))).^2)))), '-', ...
plot(freqs, sqrt(flip(-cumtrapz(flip(freqs), flip(dist_f.psd_gm.*abs(squeeze(freqresp(Gd{i}('Ez', 'Dwz'), freqs, 'Hz'))).^2)))), '-', ...
'DisplayName', sprintf('$k = %.0g$ [N/m]', Ks(i)));
end
plot([freqs(1) freqs(end)], [10e-9 10e-9], 'k--', 'HandleVisibility', 'off');
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('CAS $[m]$')
legend('Location', 'southwest');
xlim([2, 500]); ylim([1e-10 1e-6]);
xlabel('Frequency [Hz]'); ylabel('CAS $E_y$ $[m]$')
legend('Location', 'northeast');
xlim([1, 500]); ylim([1e-10 1e-6]);
#+end_src
#+header: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/opt_stiff_cas_dz_gm.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+name: fig:opt_stiff_cas_dz_gm
#+caption: Cumulative Amplitude Spectrum of the Sample vertical position error due to Ground motion for multiple nano-hexapod stiffnesses ([[./figs/opt_stiff_cas_dz_gm.png][png]], [[./figs/opt_stiff_cas_dz_gm.pdf][pdf]])
[[file:figs/opt_stiff_cas_dz_gm.png]]
#+begin_src matlab
freqs = dist_f.f;
@@ -768,71 +931,17 @@ Effect of all disturbances
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('CAS $[m]$')
legend('Location', 'southwest');
xlim([2, 500]); ylim([1e-10 1e-6]);
xlim([1, 500]); ylim([1e-10 1e-6]);
#+end_src
Ground motion
#+begin_src matlab
freqs = dist_f.f;
figure;
hold on;
for i = 1:length(Ks)
plot(freqs, sqrt(flip(-cumtrapz(flip(freqs), flip(dist_f.psd_gm.*abs(squeeze(freqresp(Gd{i}('Ez', 'Dwz'), freqs, 'Hz'))).^2)))), '-', ...
'DisplayName', sprintf('$k = %.0g$ [N/m]', Ks(i)));
end
plot([freqs(1) freqs(end)], [10e-9 10e-9], 'k--', 'HandleVisibility', 'off');
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Frequency [Hz]'); ylabel('CAS $E_y$ $[m]$')
legend('Location', 'northeast');
xlim([2, 500]); ylim([1e-10 1e-6]);
#+header: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/opt_stiff_cas_dz_rz.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+begin_src matlab
freqs = dist_f.f;
figure;
hold on;
for i = 1:length(Ks)
plot(freqs, sqrt(flip(-cumtrapz(flip(freqs), flip(dist_f.psd_gm.*abs(squeeze(freqresp(Gd{i}('Ex', 'Dwx'), freqs, 'Hz'))).^2)))), '-', ...
'DisplayName', sprintf('$k = %.0g$ [N/m]', Ks(i)));
end
plot([freqs(1) freqs(end)], [10e-9 10e-9], 'k--', 'HandleVisibility', 'off');
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'lin');
xlabel('Frequency [Hz]'); ylabel('CAS $E_y$ $[m]$')
legend('Location', 'northeast');
xlim([2, 500]);
#+end_src
#+begin_src matlab
freqs = dist_f.f;
figure;
hold on;
for i = 1:length(Ks)
plot(freqs, sqrt(flip(-cumtrapz(flip(freqs), flip(dist_f.psd_gm.*abs(squeeze(freqresp(Gd{i}('Ey', 'Dwy'), freqs, 'Hz'))).^2)))), '-', ...
'DisplayName', sprintf('$k = %.0g$ [N/m]', Ks(i)));
end
plot([freqs(1) freqs(end)], [10e-9 10e-9], 'k--', 'HandleVisibility', 'off');
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'lin');
xlabel('Frequency [Hz]'); ylabel('CAS $E_y$ $[m]$')
legend('Location', 'northeast');
xlim([2, 500]);
#+end_src
Sum of all perturbations
#+begin_src matlab
psd_tot = zeros(length(freqs), length(Ks));
for i = 1:length(Ks)
psd_tot(:,i) = dist_f.psd_gm.*abs(squeeze(freqresp(Gd{i}('Ez', 'Dwz' ), freqs, 'Hz'))).^2 + ...
dist_f.psd_ty.*abs(squeeze(freqresp(Gd{i}('Ez', 'Fty_z'), freqs, 'Hz'))).^2 + ...
dist_f.psd_rz.*abs(squeeze(freqresp(Gd{i}('Ez', 'Frz_z'), freqs, 'Hz'))).^2;
end
#+end_src
#+name: fig:opt_stiff_cas_dz_rz
#+caption: Cumulative Amplitude Spectrum of the Sample vertical position error due to Vertical vibration of the Spindle for multiple nano-hexapod stiffnesses ([[./figs/opt_stiff_cas_dz_rz.png][png]], [[./figs/opt_stiff_cas_dz_rz.pdf][pdf]])
[[file:figs/opt_stiff_cas_dz_rz.png]]
#+begin_src matlab
freqs = dist_f.f;
@@ -851,9 +960,77 @@ Sum of all perturbations
xlim([1, 500]); ylim([1e-10 1e-6]);
#+end_src
#+header: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/opt_stiff_cas_dz_tot.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+name: fig:opt_stiff_cas_dz_tot
#+caption: Cumulative Amplitude Spectrum of the Sample vertical position error due to all considered perturbations for multiple nano-hexapod stiffnesses ([[./figs/opt_stiff_cas_dz_tot.png][png]], [[./figs/opt_stiff_cas_dz_tot.pdf][pdf]])
[[file:figs/opt_stiff_cas_dz_tot.png]]
** Conclusion
#+begin_important
From Figure [[fig:opt_stiff_cas_dz_tot]], we can see that a soft nano-hexapod $k<10^6\ [N/m]$ significantly reduces the effect of perturbations from 20Hz to 300Hz.
#+end_important
* Closed Loop Budget Error
<<sec:closed_loop_budget_error>>
** Introduction :ignore:
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src
#+begin_src matlab :tangle no
simulinkproject('../');
#+end_src
** Approximation of the effect of feedback on the motion error
Let's consider Figure [[fig:effect_feedback_disturbance_diagram]] where a controller $K$ is used to reduce the effect of the disturbance $d$ on the position error $y$.
#+begin_src latex :file effect_feedback_disturbance_diagram.pdf
\begin{tikzpicture}
\node[addb={+}{}{}{}{-}] (addfb) at (0, 0){};
\node[block, right=0.6 of addfb] (K){$K$};
\node[block, right=0.6 of K] (G){$G$};
\node[addb={+}{}{}{}{}, right=0.6 of G] (adddy){};
\node[block, above=0.6 of adddy] (Gd){$G_d$};
\draw[<-] (addfb.west) -- ++(-0.6, 0) node[above right]{$r$};
\draw[->] (addfb.east) -- (K.west);
\draw[->] (K.east) -- (G.west) node[above left]{$u$};
\draw[->] (G.east) -- (adddy.west);
\draw[->] (adddy.east) -- ++(1, 0) node[above left]{$y$};
\draw[->] ($(adddy.east)+(0.6, 0)$) node[branch]{} -- ++(0, -1) -| (addfb.south);
\draw[<-] (Gd.north) -- ++(0, 0.6) node[below right]{$d$};
\draw[->] (Gd.south) -- (adddy.north);
\end{tikzpicture}
#+end_src
#+name: fig:effect_feedback_disturbance_diagram
#+caption: Feedback System
#+RESULTS:
[[file:figs/effect_feedback_disturbance_diagram.png]]
The reduction of the impact of $d$ on $y$ thanks to feedback is described by the following equation:
\begin{equation}
\frac{y}{d} = \frac{G_d}{1 + KG}
\end{equation}
As a first approximation, we can consider that the controller is designed in such a way that the loop gain $KG$ is a pure integrator:
\[ L_1(s) = K_1(s) G(s) = \frac{\omega_c}{s} \]
where $\omega_c$ is the crossover frequency.
We may then consider another controller in such a way that the loop gain corresponds to a double integrator with a lead centered with the crossover frequency $\omega_c$:
\[ L_2(s) = K_2(s) G(s) = \left( \frac{\omega_c}{s} \right)^2 \cdot \frac{1 + \frac{s}{\omega_c/2}}{1 + \frac{s}{2\omega_c}} \]
** Reduction thanks to feedback - Required bandwidth
#+begin_src matlab
wc = 1*2*pi; % [rad/s]