Add analysis with LPF

This commit is contained in:
Thomas Dehaeze 2019-10-15 11:01:28 +02:00
parent 5d0d06dbdf
commit 7b472d199c
22 changed files with 631 additions and 413 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

BIN
figs/error_4qd_half.pdf Normal file

Binary file not shown.

BIN
figs/error_4qd_half.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
figs/repeat_plot_lpf.pdf Normal file

Binary file not shown.

BIN
figs/repeat_plot_lpf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

File diff suppressed because it is too large Load Diff

157
index.org
View File

@ -18,7 +18,7 @@
#+LATEX_CLASS_OPTIONS: [] #+LATEX_CLASS_OPTIONS: []
#+LATEX_HEADER: \usepackage{minted} #+LATEX_HEADER: \usepackage{minted}
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{/home/thomas/Cloud/These/LaTeX/}{config.tex}") #+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{/home/thomas/Cloud/thesis/latex/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes #+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150 #+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100 #+PROPERTY: header-args:latex+ :imoutoptions -quality 100
@ -1868,36 +1868,54 @@ Multiple measurements are done with different experimental configuration as foll
ht_4 = ht_s{4}; ht_4 = ht_s{4};
#+end_src #+end_src
** Filter data with low pass filter
We filter the data with a first order low pass filter with a crossover frequency of $\omega_0$.
#+begin_src matlab
w0 = 50; % [Hz]
G_lpf = 1/(1 + s/2/pi/w0);
ht_1.Vaf = lsim(G_lpf, ht_1.Va, ht_1.t);
ht_2.Vaf = lsim(G_lpf, ht_2.Va, ht_2.t);
ht_3.Vaf = lsim(G_lpf, ht_3.Va, ht_3.t);
ht_4.Vaf = lsim(G_lpf, ht_4.Va, ht_4.t);
#+end_src
** Time domain plots ** Time domain plots
#+begin_src matlab :exports none #+begin_src matlab :exports none
figure; figure;
ax1 = subaxis(2, 2, 1) ax1 = subplot(2, 2, 1);
hold on; hold on;
plot(ht_1.t, 1e9*ht_1.Va); plot(ht_1.t, 1e9*ht_1.Va);
plot(ht_1.t, 1e9*ht_1.Vaf);
hold off; hold off;
ylabel('Displacement [nm]'); ylabel('Displacement [nm]');
set(gca, 'XTickLabel',[]); set(gca, 'XTickLabel',[]);
title('OL'); title('OL');
ax2 = subaxis(2, 2, 2) ax2 = subplot(2, 2, 2);
hold on; hold on;
plot(ht_2.t, 1e9*ht_2.Va); plot(ht_2.t, 1e9*ht_2.Va);
plot(ht_2.t, 1e9*ht_2.Vaf);
hold off; hold off;
set(gca, 'XTickLabel',[]); set(gca, 'XTickLabel',[]);
set(gca, 'YTickLabel',[]); set(gca, 'YTickLabel',[]);
title('OL + CU'); title('OL + CU');
ax3 = subaxis(2, 2, 3) ax3 = subplot(2, 2, 3);
hold on; hold on;
plot(ht_3.t, 1e9*ht_3.Va); plot(ht_3.t, 1e9*ht_3.Va);
plot(ht_3.t, 1e9*ht_3.Vaf);
hold off; hold off;
xlabel('Time [s]'); xlabel('Time [s]');
ylabel('Displacement [nm]'); ylabel('Displacement [nm]');
title('CL + CU'); title('CL + CU');
ax4 = subaxis(2, 2, 4) ax4 = subplot(2, 2, 4);
hold on; hold on;
plot(ht_4.t, 1e9*ht_4.Va); plot(ht_4.t, 1e9*ht_4.Va);
plot(ht_4.t, 1e9*ht_4.Vaf);
hold off; hold off;
xlabel('Time [s]'); xlabel('Time [s]');
set(gca, 'YTickLabel',[]); set(gca, 'YTickLabel',[]);
@ -1917,7 +1935,7 @@ Multiple measurements are done with different experimental configuration as foll
#+begin_src matlab :exports none #+begin_src matlab :exports none
figure; figure;
ax1 = subaxis(2, 2, 1) ax1 = subplot(2, 2, 1)
hold on; hold on;
plot(ht_1.t, ht_1.Vph); plot(ht_1.t, ht_1.Vph);
plot(ht_1.t, ht_1.Vpv); plot(ht_1.t, ht_1.Vpv);
@ -1926,7 +1944,7 @@ Multiple measurements are done with different experimental configuration as foll
set(gca, 'XTickLabel',[]); set(gca, 'XTickLabel',[]);
title('OL'); title('OL');
ax2 = subaxis(2, 2, 2) ax2 = subplot(2, 2, 2)
hold on; hold on;
plot(ht_2.t, ht_2.Vph); plot(ht_2.t, ht_2.Vph);
plot(ht_2.t, ht_2.Vpv); plot(ht_2.t, ht_2.Vpv);
@ -1935,7 +1953,7 @@ Multiple measurements are done with different experimental configuration as foll
set(gca, 'YTickLabel',[]); set(gca, 'YTickLabel',[]);
title('OL + CU'); title('OL + CU');
ax3 = subaxis(2, 2, 3) ax3 = subplot(2, 2, 3)
hold on; hold on;
plot(ht_3.t, ht_3.Vph); plot(ht_3.t, ht_3.Vph);
plot(ht_3.t, ht_3.Vpv); plot(ht_3.t, ht_3.Vpv);
@ -1944,7 +1962,7 @@ Multiple measurements are done with different experimental configuration as foll
ylabel('Voltage [V]'); ylabel('Voltage [V]');
title('CL + CU'); title('CL + CU');
ax4 = subaxis(2, 2, 4) ax4 = subplot(2, 2, 4)
hold on; hold on;
plot(ht_4.t, ht_4.Vph); plot(ht_4.t, ht_4.Vph);
plot(ht_4.t, ht_4.Vpv); plot(ht_4.t, ht_4.Vpv);
@ -2784,7 +2802,7 @@ The plant is put in a general configuration as shown in Fig. [[fig:general_contr
#+begin_src matlab :exports none #+begin_src matlab :exports none
figure; figure;
% Magnitude % Magnitude
ax1 = subaxis(2,1,1); ax1 = subplot(2,1,1);
hold on; hold on;
plot(freqs, abs(squeeze(freqresp(G, freqs, 'Hz'))), 'k-'); plot(freqs, abs(squeeze(freqresp(G, freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log'); set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
@ -2793,7 +2811,7 @@ The plant is put in a general configuration as shown in Fig. [[fig:general_contr
hold off; hold off;
% Phase % Phase
ax2 = subaxis(2,1,2); ax2 = subplot(2,1,2);
hold on; hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(G, freqs, 'Hz'))), 'k-'); plot(freqs, 180/pi*angle(squeeze(freqresp(G, freqs, 'Hz'))), 'k-');
set(gca,'xscale','log'); set(gca,'xscale','log');
@ -2875,7 +2893,7 @@ The two SISO loop gains are shown in Fig. [[fig:diag_contr_loop_gain]].
#+begin_src matlab :exports none #+begin_src matlab :exports none
figure; figure;
% Magnitude % Magnitude
ax1 = subaxis(2,1,1); ax1 = subplot(2,1,1);
hold on; hold on;
plot(freqs, abs(squeeze(freqresp(Kh*sys('Rh', 'Uch'), freqs, 'Hz'))), 'DisplayName', '$L_h = K_h G_{d,h}^{-1} G_{\frac{V_{p,h}}{\tilde{U}_{c,h}}} G_{i,h} $'); plot(freqs, abs(squeeze(freqresp(Kh*sys('Rh', 'Uch'), freqs, 'Hz'))), 'DisplayName', '$L_h = K_h G_{d,h}^{-1} G_{\frac{V_{p,h}}{\tilde{U}_{c,h}}} G_{i,h} $');
plot(freqs, abs(squeeze(freqresp(Kv*sys('Rv', 'Ucv'), freqs, 'Hz'))), 'DisplayName', '$L_v = K_v G_{d,v}^{-1} G_{\frac{V_{p,v}}{\tilde{U}_{c,v}}} G_{i,v} $'); plot(freqs, abs(squeeze(freqresp(Kv*sys('Rv', 'Ucv'), freqs, 'Hz'))), 'DisplayName', '$L_v = K_v G_{d,v}^{-1} G_{\frac{V_{p,v}}{\tilde{U}_{c,v}}} G_{i,v} $');
@ -2886,7 +2904,7 @@ The two SISO loop gains are shown in Fig. [[fig:diag_contr_loop_gain]].
legend('location', 'northeast'); legend('location', 'northeast');
% Phase % Phase
ax2 = subaxis(2,1,2); ax2 = subplot(2,1,2);
hold on; hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(Kh*sys('Rh', 'Uch'), freqs, 'Hz')))); plot(freqs, 180/pi*angle(squeeze(freqresp(Kh*sys('Rh', 'Uch'), freqs, 'Hz'))));
plot(freqs, 180/pi*angle(squeeze(freqresp(Kv*sys('Rv', 'Ucv'), freqs, 'Hz')))); plot(freqs, 180/pi*angle(squeeze(freqresp(Kv*sys('Rv', 'Ucv'), freqs, 'Hz'))));
@ -3329,14 +3347,14 @@ And we can compute the RMS value of the non-repeatable part:
figure; figure;
ax1 = subplot(1, 2, 1); ax1 = subplot(1, 2, 1);
hold on; hold on;
plot(uh.Unh, uh.Va); plot(uh.Unh, uh.Vaf);
plot(Unhm, Vahm) plot(Unhm, Vahm)
hold off; hold off;
xlabel('$V_{n,h}$ [V]'); ylabel('$V_a$ [m]'); xlabel('$V_{n,h}$ [V]'); ylabel('$V_a$ [m]');
ax2 = subplot(1, 2, 2); ax2 = subplot(1, 2, 2);
hold on; hold on;
plot(uv.Unv, uv.Va); plot(uv.Unv, uv.Vaf);
plot(Unvm, Vavm) plot(Unvm, Vavm)
hold off; hold off;
xlabel('$V_{n,v}$ [V]'); ylabel('$V_a$ [m]'); xlabel('$V_{n,v}$ [V]'); ylabel('$V_a$ [m]');
@ -3353,18 +3371,17 @@ And we can compute the RMS value of the non-repeatable part:
#+CAPTION: Repeatability of the measurement ([[./figs/repeat_plot_raw.png][png]], [[./figs/repeat_plot_raw.pdf][pdf]]) #+CAPTION: Repeatability of the measurement ([[./figs/repeat_plot_raw.png][png]], [[./figs/repeat_plot_raw.pdf][pdf]])
[[file:figs/repeat_plot_raw.png]] [[file:figs/repeat_plot_raw.png]]
#+begin_src matlab :exports none #+begin_src matlab :exports none
figure; figure;
ax1 = subplot(1, 2, 1); ax1 = subplot(1, 2, 1);
hold on; hold on;
plot(uh.Unh, 1e9*(uh.Va - repmat(Vahm, length(uh.t)/length(Vahm),1))); plot(uh.Unh, 1e9*(uh.Vaf - repmat(Vahm, length(uh.t)/length(Vahm),1)));
hold off; hold off;
xlabel('$V_{n,h}$ [V]'); ylabel('$V_a$ [nm]'); xlabel('$V_{n,h}$ [V]'); ylabel('$V_a$ [nm]');
ax2 = subplot(1, 2, 2); ax2 = subplot(1, 2, 2);
hold on; hold on;
plot(uv.Unv, 1e9*(uv.Va - repmat(Vavm, length(uv.t)/length(Vavm),1))); plot(uv.Unv, 1e9*(uv.Vaf - repmat(Vavm, length(uv.t)/length(Vavm),1)));
hold off; hold off;
xlabel('$V_{n,v}$ [V]'); ylabel('$V_a$ [nm]'); xlabel('$V_{n,v}$ [V]'); ylabel('$V_a$ [nm]');
@ -3418,6 +3435,24 @@ All the signals are shown on Fig. [[fig:non-repeatability-parts]].
htm = 1e9*ht.Va(1:length(Vaheq)) - repmat(mean(1e9*ht.Va(1:length(Vaheq))), length(uh.t)/length(Vaheq),1); htm = 1e9*ht.Va(1:length(Vaheq)) - repmat(mean(1e9*ht.Va(1:length(Vaheq))), length(uh.t)/length(Vaheq),1);
#+end_src #+end_src
#+begin_src matlab :exports none
figure;
hold on;
plot(uh.Unh, 1e9*(uh.Va - repmat(Vahm, length(uh.t)/length(Vahm),1)), 'DisplayName', 'Measured Non-Repeatability');
plot(uh.Unh, 1e9*ht.Va(1:length(Vaheq))-mean(1e9*ht.Va(1:length(Vaheq))), 'DisplayName', 'Huddle Test');
plot(uh.Unh, 1e9*Vaheq, 'DisplayName', 'Due to Sercalo Angle Error');
hold off;
xlabel('$V_{n,h}$ [V]'); ylabel('$V_a$ [nm]');
ylim([-100 100]);
legend();
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/non-repeatability-parts-half.pdf" :var figsize="normal-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+begin_src matlab :exports none #+begin_src matlab :exports none
figure; figure;
ax1 = subplot(1, 2, 1); ax1 = subplot(1, 2, 1);
@ -3449,3 +3484,89 @@ All the signals are shown on Fig. [[fig:non-repeatability-parts]].
#+NAME: fig:non-repeatability-parts #+NAME: fig:non-repeatability-parts
#+CAPTION: Non repeatabilities ([[./figs/non-repeatability-parts.png][png]], [[./figs/non-repeatability-parts.pdf][pdf]]) #+CAPTION: Non repeatabilities ([[./figs/non-repeatability-parts.png][png]], [[./figs/non-repeatability-parts.pdf][pdf]])
[[file:figs/non-repeatability-parts.png]] [[file:figs/non-repeatability-parts.png]]
** Results with a low pass filter
We filter the data with a first order low pass filter with a crossover frequency of $\omega_0$.
#+begin_src matlab
w0 = 10; % [Hz]
G_lpf = 1/(1 + s/2/pi/w0);
uh.Vaf = lsim(G_lpf, uh.Va, uh.t);
uv.Vaf = lsim(G_lpf, uv.Va, uv.t);
#+end_src
** Processing
First, we get the mean value as measured by the interferometer for each value of the Newport angle.
#+begin_src matlab
Vahm = mean(reshape(uh.Vaf, [fs floor(length(uh.t)/fs)]),2);
Unhm = mean(reshape(uh.Unh, [fs floor(length(uh.t)/fs)]),2);
Vavm = mean(reshape(uv.Vaf, [fs floor(length(uv.t)/fs)]),2);
Unvm = mean(reshape(uv.Unv, [fs floor(length(uv.t)/fs)]),2);
#+end_src
And we can compute the RMS value of the non-repeatable part:
#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
data2orgtable([rms(1e9*(uh.Vaf - repmat(Vahm, length(uh.t)/length(Vahm),1))), rms(1e9*(uv.Vaf - repmat(Vavm, length(uv.t)/length(Vavm),1)))], {}, {'Va - Horizontal [nm rms]', 'Va - Vertical [nm rms]'}, ' %.1f ');
#+end_src
#+RESULTS:
| Va - Horizontal [nm rms] | Va - Vertical [nm rms] |
|--------------------------+------------------------|
| 22.9 | 13.9 |
#+begin_src matlab :exports none
figure;
ax1 = subplot(1, 2, 1);
hold on;
plot(uh.Unh, uh.Vaf);
plot(Unhm, Vahm)
hold off;
xlabel('$V_{n,h}$ [V]'); ylabel('$V_a$ [m]');
ax2 = subplot(1, 2, 2);
hold on;
plot(uv.Unv, uv.Vaf);
plot(Unvm, Vavm)
hold off;
xlabel('$V_{n,v}$ [V]'); ylabel('$V_a$ [m]');
linkaxes([ax1,ax2],'xy');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/repeat_plot_lpf.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:repeat_plot_raw
#+CAPTION: Repeatability of the measurement ([[./figs/repeat_plot_lpf.png][png]], [[./figs/repeat_plot_lpf.pdf][pdf]])
[[file:figs/repeat_plot_lpf.png]]
#+begin_src matlab :exports none
figure;
ax1 = subplot(1, 2, 1);
hold on;
plot(uh.Unh, 1e9*(uh.Vaf - repmat(Vahm, length(uh.t)/length(Vahm),1)));
hold off;
xlabel('$V_{n,h}$ [V]'); ylabel('$V_a$ [nm]');
ax2 = subplot(1, 2, 2);
hold on;
plot(uv.Unv, 1e9*(uv.Vaf - repmat(Vavm, length(uv.t)/length(Vavm),1)));
hold off;
xlabel('$V_{n,v}$ [V]'); ylabel('$V_a$ [nm]');
linkaxes([ax1,ax2],'xy');
ylim([-60 60]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/repeat_plot_subtract_mean_lpf.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:repeat_plot_subtract_mean_lpf
#+CAPTION: Repeatability of the measurement after subtracting the mean value ([[./figs/repeat_plot_subtract_mean_lpf.png][png]], [[./figs/repeat_plot_subtract_mean_lpf.pdf][pdf]])
[[file:figs/repeat_plot_subtract_mean_lpf.png]]