Add analysis on the effect of LUT on the errors

This commit is contained in:
Thomas Dehaeze 2021-12-08 18:30:20 +01:00
parent c4371a8634
commit ba7508bf96
5 changed files with 155 additions and 4 deletions

View File

@ -56,7 +56,7 @@ Several Lookup Tables (LUT) are used for the DCM in order to compensate for *rep
- Section [[sec:dcm_stepper_lut]]: the stepper motors are calibrated using interferometers.
- Section [[sec:dcm_attocube_lut]]: the Attocube periodic non-linearities are calibrated using piezoelectric actuators.
* Stepper Motors Calibration
* Stepper Motors
:PROPERTIES:
:header-args:matlab+: :tangle matlab/dcm_stepper_lut.m
:END:
@ -171,7 +171,7 @@ The measured motion of the fast jacks $[d_{u_r},\ r_{u_h},\ r_d]$ can be compare
#+RESULTS:
[[file:figs/block_diagram_lut_stepper.png]]
** TODO Repeatability of the motion :noexport:
** TODO [#A] Repeatability of the motion :noexport:
** Patterns in the Fast Jack motion errors
In order to understand what should be the "sampling distance" for the lookup table of the stepper motor, we have to analyze the displacement errors induced by the stepper motor.
@ -188,7 +188,7 @@ ol_drx = 1e-9*double(h5read('Qutools_test_0001.h5','/33.1/instrument/xtal_111_
ol_t = 1e-6*double(h5read('Qutools_test_0001.h5','/33.1/instrument/time/data')); % Time [s]
ol_ddz = ol_fj-ol_dz; % Distance Error between crystals [m]
ol_ddz = ol_dzw-ol_dz; % Distance Error between crystals [m]
#+end_src
#+begin_src matlab :exports none
@ -732,8 +732,159 @@ exportFig('figs/lut_comp_old_new_experiment_zoom.pdf', 'width', 'wide', 'height'
#+RESULTS:
[[file:figs/lut_comp_old_new_experiment_zoom.png]]
** Comparison of the errors in the reciprocal length space
#+begin_src matlab
%% Load Data of the new LUT method
ol_bragg = (pi/180)*1e-5*double(h5read('Qutools_test_0001.h5','/33.1/instrument/trajmot/data'));
ol_dz = 1e-9*double(h5read('Qutools_test_0001.h5','/33.1/instrument/xtal_111_dz_filter/data'));
ol_dry = 1e-9*double(h5read('Qutools_test_0001.h5','/33.1/instrument/xtal_111_dry_filter/data'));
ol_drx = 1e-9*double(h5read('Qutools_test_0001.h5','/33.1/instrument/xtal_111_drx_filter/data'));
ol_dzw = 10.5e-3./(2*cos(ol_bragg)); % Wanted distance between crystals [m]
ol_t = 1e-6*double(h5read('Qutools_test_0001.h5','/33.1/instrument/time/data')); % Time [s]
ol_ddz = ol_dzw-ol_dz; % Distance Error between crystals [m]
* Attocube Calibration
lut_bragg = (pi/180)*1e-5*double(h5read('Qutools_test_0001.h5','/34.1/instrument/trajmot/data'));
lut_dz = 1e-9*double(h5read('Qutools_test_0001.h5','/34.1/instrument/xtal_111_dz_filter/data'));
lut_dry = 1e-9*double(h5read('Qutools_test_0001.h5','/34.1/instrument/xtal_111_dry_filter/data'));
lut_drx = 1e-9*double(h5read('Qutools_test_0001.h5','/34.1/instrument/xtal_111_drx_filter/data'));
lut_dzw = 10.5e-3./(2*cos(lut_bragg)); % Wanted distance between crystals [m]
lut_t = 1e-6*double(h5read('Qutools_test_0001.h5','/34.1/instrument/time/data')); % Time [s]
lut_ddz = lut_dzw-lut_dz; % Distance Error between crystals [m]
#+end_src
#+begin_src matlab
%% Compute Fast Jack position errors
% Jacobian matrix for Fast Jacks and 111 crystal
J_a_111 = [1, 0.14, -0.1525
1, 0.14, 0.0675
1, -0.14, 0.0425];
ol_de_111 = [ol_ddz'; ol_dry'; ol_drx'];
% Fast Jack position errors
ol_de_fj = J_a_111*ol_de_111;
ol_fj_ur = ol_de_fj(1,:);
ol_fj_uh = ol_de_fj(2,:);
ol_fj_d = ol_de_fj(3,:);
lut_de_111 = [lut_ddz'; lut_dry'; lut_drx'];
% Fast Jack position errors
lut_de_fj = J_a_111*lut_de_111;
lut_fj_ur = lut_de_fj(1,:);
lut_fj_uh = lut_de_fj(2,:);
lut_fj_d = lut_de_fj(3,:);
#+end_src
#+begin_src matlab
Xs = 0.1e-6; % Sampling Distance [m]
%% Re-sampled data with uniform spacing [m]
ol_fj_ur_u = resample(ol_fj_ur, ol_dzw, 1/Xs);
ol_fj_uh_u = resample(ol_fj_uh, ol_dzw, 1/Xs);
ol_fj_d_u = resample(ol_fj_d, ol_dzw, 1/Xs);
ol_fj_u = Xs*[1:length(ol_fj_ur_u)]; % Sampled Jack Position
% Only take first 500um
ol_fj_ur_u = ol_fj_ur_u(ol_fj_u<0.5e-3);
ol_fj_uh_u = ol_fj_uh_u(ol_fj_u<0.5e-3);
ol_fj_d_u = ol_fj_d_u (ol_fj_u<0.5e-3);
ol_fj_u = ol_fj_u (ol_fj_u<0.5e-3);
#+end_src
#+begin_src matlab
%% Re-sampled data with uniform spacing [m]
lut_fj_ur_u = resample(lut_fj_ur, lut_dzw, 1/Xs);
lut_fj_uh_u = resample(lut_fj_uh, lut_dzw, 1/Xs);
lut_fj_d_u = resample(lut_fj_d, lut_dzw, 1/Xs);
lut_fj_u = Xs*[1:length(lut_fj_ur_u)]; % Sampled Jack Position
% Only take first 500um
lut_fj_ur_u = lut_fj_ur_u(lut_fj_u<0.5e-3);
lut_fj_uh_u = lut_fj_uh_u(lut_fj_u<0.5e-3);
lut_fj_d_u = lut_fj_d_u (lut_fj_u<0.5e-3);
lut_fj_u = lut_fj_u (lut_fj_u<0.5e-3);
#+end_src
#+begin_src matlab
% Hanning Windows with 250um width
win = hanning(floor(400e-6/Xs));
% Power Spectral Density [m2/(1/m)]
[S_ol_ur, f] = pwelch(ol_fj_ur_u-mean(ol_fj_ur_u), win, 0, [], 1/Xs);
[S_ol_uh, ~] = pwelch(ol_fj_uh_u-mean(ol_fj_uh_u), win, 0, [], 1/Xs);
[S_ol_d, ~] = pwelch(ol_fj_d_u -mean(ol_fj_d_u ), win, 0, [], 1/Xs);
[S_lut_ur, ~] = pwelch(lut_fj_ur_u-mean(lut_fj_ur_u), win, 0, [], 1/Xs);
[S_lut_uh, ~] = pwelch(lut_fj_uh_u-mean(lut_fj_uh_u), win, 0, [], 1/Xs);
[S_lut_d, ~] = pwelch(lut_fj_d_u -mean(lut_fj_d_u ), win, 0, [], 1/Xs);
#+end_src
As seen in Figure [[fig:effect_lut_on_psd_error_spatial]], the LUT as an effect only on spatial errors with a period of at least few $\mu m$.
This is very logical considering the $1\,\mu m$ sampling of the LUT in the IcePAP.
#+begin_src matlab :exports none
figure;
hold on;
plot(1e6./f, sqrt(S_ol_d) , 'DisplayName', '$u_r$ - OL');
plot(1e6./f, sqrt(S_lut_d), 'DisplayName', '$u_r$ - LUT');
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Spectral Distance [$\mu$m]');
ylabel('Spectral Content [$\frac{m}{1/\sqrt{m}}$]')
legend('location', 'northwest');
xlim([0.5, 200]); ylim([1e-13, 1e-8]);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/effect_lut_on_psd_error_spatial.pdf', 'width', 'wide', 'height', 'normal');
#+end_src
#+name: fig:effect_lut_on_psd_error_spatial
#+caption: Effect of the LUT on the spectral content of the positioning errors
#+RESULTS:
[[file:figs/effect_lut_on_psd_error_spatial.png]]
Let's now look at it in a cumulative way.
#+begin_src matlab
CPS_ol_ur = flip(-cumtrapz(flip(f), flip(S_ol_ur)));
CPS_ol_uh = flip(-cumtrapz(flip(f), flip(S_ol_uh)));
CPS_ol_d = flip(-cumtrapz(flip(f), flip(S_ol_d)));
CPS_lut_ur = flip(-cumtrapz(flip(f), flip(S_lut_ur)));
CPS_lut_uh = flip(-cumtrapz(flip(f), flip(S_lut_uh)));
CPS_lut_d = flip(-cumtrapz(flip(f), flip(S_lut_d)));
#+end_src
#+begin_src matlab :results none
%% Cumulative Spectrum
figure;
hold on;
plot(1e6./f, sqrt(CPS_ol_ur) , 'DisplayName', '$u_r$ - OL');
plot(1e6./f, sqrt(CPS_lut_ur), 'DisplayName', '$u_r$ - LUT');
hold off;
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
xlabel('Spectral Distance [$\mu m$]'); ylabel('Cumulative Spectrum [$m$]')
xlim([1, 500]); ylim([1e-9, 1e-5]);
legend('location', 'northwest');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/effect_lut_on_cps_error_spatial.pdf', 'width', 'wide', 'height', 'normal');
#+end_src
#+name: fig:effect_lut_on_cps_error_spatial
#+caption: Cumulative Spectrum with and without the LUT
#+RESULTS:
[[file:figs/effect_lut_on_cps_error_spatial.png]]
* Metrology Frame Deformations
* Attocube Periodic Non-Linearity
:PROPERTIES:
:header-args:matlab+: :tangle matlab/dcm_attocube_lut.m
:END:

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB