diff --git a/dcm_lookup_tables.org b/dcm_lookup_tables.org index 732857e..82c13fb 100644 --- a/dcm_lookup_tables.org +++ b/dcm_lookup_tables.org @@ -50,7 +50,7 @@ #+latex: \clearpage -* Introduction +* Introduction :ignore: Several Lookup Tables (LUT) are used for the DCM in order to compensate for *repeatable* errors. - Section [[sec:dcm_stepper_lut]]: the stepper motors are calibrated using interferometers. @@ -62,6 +62,10 @@ Several Lookup Tables (LUT) are used for the DCM in order to compensate for *rep :END: <> ** Introduction :ignore: +Fast jack coarse displacement is performed with a Stepper motor and a ball screw mechanism. +Such positioning system has some repeatable motion errors than can be calibrated using a measurement system having less errors. + +For the DCM, this can be done using the interferometers. ** Matlab Init :noexport:ignore: #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) @@ -86,6 +90,366 @@ Several Lookup Tables (LUT) are used for the DCM in order to compensate for *rep ** Schematic +In order to measure the errors induced by the fast jacks, we have to make some scans, and measure simultaneously: +- The wanted fast jack position: signal/step sent by the IcePAP +- The actual (measured) position + +The experimental setup to perform this is shown in Figure [[fig:block_diagram_lut_stepper]]. + +The procedure is the following: +- A scan on the Bragg angle $\theta$ is generated from Bliss +- Reference paths $[r_{u_r},\ r_{u_h},\ r_{d}]$ are sent to the IcePAP +- Initially, the LUT inside the IcePAP is not changing the reference path +- The IcePAP generates some steps $[u_{u_r},\ u_{u_h},\ u_{d}]$ that are sent to the fast jacks +- The motion of the crystals $[d_z,\ r_y,\ r_x]$ is measured with the interferometers and computed in the Speedgoat +- Finally, the corresponding motion $[d_{u_r},\ r_{u_h},\ r_d]$ of the fast jack is computed afterwards in BLISS + +The measured motion of the fast jacks $[d_{u_r},\ r_{u_h},\ r_d]$ can be compared with the IcePAP steps $[u_{u_r},\ u_{u_h},\ u_{d}]$ in order to create the LUT inside the IcePAP. + +#+begin_src latex :file block_diagram_lut_stepper.pdf +\definecolor{myblue}{rgb}{0, 0.447, 0.741} +\definecolor{myred}{rgb}{0.8500, 0.325, 0.098} +\definecolor{mygreen}{rgb}{0.639, 0.745, 0.549} +\definecolor{myyellow}{rgb}{0.922, 0.796, 0.545} + +\begin{tikzpicture} + % Blocks + \node[block={1.5cm}{2.9cm}] (traj) at (0,0){$\frac{d_{\text{off}}}{2 \cos \theta}$}; + + \node[block={1.5cm}{0.8cm}, right=1.1 of traj] (lut_uh) {LUT $u_h$}; + \node[block={1.5cm}{0.8cm}, above=0.2 of lut_uh] (lut_ur) {LUT $u_r$}; + \node[block={1.5cm}{0.8cm}, below=0.2 of lut_uh] (lut_d) {LUT $d$}; + + \node[block={1.5cm}{0.8cm}, right=1.1 of lut_ur] (fj_ur) {FJ $u_h$}; + \node[block={1.5cm}{0.8cm}, right=1.1 of lut_uh] (fj_uh) {FJ $u_r$}; + \node[block={1.5cm}{0.8cm}, right=1.1 of lut_d] (fj_d) {FJ $d$}; + + \node[block={1.5cm}{2.9cm}, right=0.2 of fj_uh] (int) {\rotatebox{90}{Interferometers}}; + + \node[block={1.5cm}{2.9cm}, right=0.6 of int] (Js) {\rotatebox{90}{\parbox[c]{2.0cm}{\centering Forward Kinematics}}}; + + \node[block={1.5cm}{2.9cm}, right=1.1 of Js] (Ja) {\rotatebox{90}{\parbox[c]{2.0cm}{\centering Inverse Kinematics}}}; + + % Signals + \draw[->] ($(traj.west) + (-0.7, 0)$)node[above right]{$\theta$} -- (traj.west); + + \draw[->] (lut_ur-|traj.east) --node[midway, above]{$r_{u_r}$} (lut_ur.west); + \draw[->] (lut_uh-|traj.east) --node[midway, above]{$r_{u_h}$} (lut_uh.west); + \draw[->] (lut_d -|traj.east) --node[midway, above]{$r_{d}$} (lut_d.west); + + \draw[->] (lut_ur.east) --node[midway, above]{$u_{u_r}$} (fj_ur.west); + \draw[->] (lut_uh.east) --node[midway, above]{$u_{u_h}$} (fj_uh.west); + \draw[->] (lut_d.east) --node[midway, above]{$u_{d}$} (fj_d.west); + + \draw[->] (int.east) -- (Js.west); + + \draw[->] (Js.east|-fj_ur) --node[midway, above]{$d_z$} (Ja.west|-fj_ur); + \draw[->] (Js.east|-fj_uh) --node[midway, above]{$r_y$} (Ja.west|-fj_uh); + \draw[->] (Js.east|-fj_d) --node[midway, above]{$r_x$} (Ja.west|-fj_d) ; + + \draw[->] (Ja.east|-fj_ur) -- ++(1.0, 0)node[above left]{$d_{u_r}$}; + \draw[->] (Ja.east|-fj_uh) -- ++(1.0, 0)node[above left]{$d_{u_h}$}; + \draw[->] (Ja.east|-fj_d) -- ++(1.0, 0)node[above left]{$d_{d}$}; + + \begin{scope}[on background layer] + \node[fit={(fj_d.south west) (int.north east)}, fill=myblue!20!white, draw, inner sep=6pt] (dcm) {}; + \node[fit={(Js.south west) (Js.north east)}, fill=myyellow!20!white, draw, inner sep=6pt] (speedgoat) {}; + \node[fit={(lut_d.south west) (lut_ur.north east)}, fill=myred!20!white, draw, inner sep=6pt] (icepap) {}; + \node[fit={(traj.south west) (traj.north east)}, fill=mygreen!20!white, draw, inner sep=6pt] (bliss_1) {}; + \node[fit={(Ja.south west) (Ja.north east)}, fill=mygreen!20!white, draw, inner sep=6pt] (bliss_2) {}; + \node[above] at (dcm.north) {DCM}; + \node[above] at (speedgoat.north) {Speedgoat}; + \node[above] at (icepap.north) {IcePAP}; + \node[above] at (bliss_1.north) {BLISS}; + \node[above] at (bliss_2.north) {BLISS}; + \end{scope} +\end{tikzpicture} +#+end_src + +#+name: fig:block_diagram_lut_stepper +#+caption: Block diagram of the experiment to create the Lookup Table +#+RESULTS: +[[file:figs/block_diagram_lut_stepper.png]] + +** TODO 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. + +Let's load the measurements of one bragg angle scan without any LUT. +#+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')); % Bragg angle [rad] +ol_dzw = 10.5e-3./(2*cos(ol_bragg)); % Wanted distance between crystals [m] + +ol_dz = 1e-9*double(h5read('Qutools_test_0001.h5','/33.1/instrument/xtal_111_dz_filter/data')); % Dz distance between crystals [m] +ol_dry = 1e-9*double(h5read('Qutools_test_0001.h5','/33.1/instrument/xtal_111_dry_filter/data')); % Ry [rad] +ol_drx = 1e-9*double(h5read('Qutools_test_0001.h5','/33.1/instrument/xtal_111_drx_filter/data')); % Rx [rad] + +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] +#+end_src + +#+begin_src matlab :exports none +%% Orientation and Distance error of the Crystal measured by the interferometers +figure; +hold on; +plot(180/pi*ol_bragg, 1e6*ol_drx, 'DisplayName', '$R_x$') +plot(180/pi*ol_bragg, 1e6*ol_dry, 'DisplayName', '$R_y$') +hold off; +legend('location', 'northwest'); +xlabel('Bragg Angle [deg]'); ylabel('Angle Error [$\mu$rad]'); +yyaxis right +plot(180/pi*ol_bragg, 1e6*ol_ddz, 'DisplayName', '$\epsilon D_z$') +ylabel('Distance Error [$\mu$m]'); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/exp_without_lut_xtal_pos_errors.pdf', 'width', 'wide', 'height', 'normal'); +#+end_src + +#+name: fig:exp_without_lut_xtal_pos_errors +#+caption: Orientation and Distance error of the Crystal measured by the interferometers +#+RESULTS: +[[file:figs/exp_without_lut_xtal_pos_errors.png]] + +Now let's convert the errors from the frame of the crystal to the frame of the fast jacks (inverse kinematics problem) using the Jacobian matrix. +#+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,:); +#+end_src + +#+begin_src matlab :exports none +%% Fast Jack position errors +figure; +hold on; +plot(180/pi*ol_bragg, 1e6*ol_fj_ur, 'DisplayName', '$\epsilon_{u_r}$') +plot(180/pi*ol_bragg, 1e6*ol_fj_uh, 'DisplayName', '$\epsilon_{u_h}$') +plot(180/pi*ol_bragg, 1e6*ol_fj_d , 'DisplayName', '$\epsilon_{d}$') +hold off; +xlabel('Bragg Angle [deg]'); ylabel('Distance Error [$\mu$m]'); +legend('location', 'northwest'); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/exp_without_lut_fj_pos_errors.pdf', 'width', 'wide', 'height', 'normal'); +#+end_src + +#+name: fig:exp_without_lut_fj_pos_errors +#+caption: Estimated motion errors of the fast jacks during the scan +#+RESULTS: +[[file:figs/exp_without_lut_fj_pos_errors.png]] + +Let's now identify this pattern as a function of the fast-jack position. + +As we want to done frequency Fourier transform, we need to have uniform sampling along the fast jack position. +To do so, the function =resample= is used. +#+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 +#+end_src + +#+begin_src matlab :exports none +% 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 + +The result is shown in Figure [[fig:exp_without_lut_fj_pos_errors_distance]]. + +#+begin_src matlab :exports none +%% Fast Jack position errors +figure; +hold on; +plot(1e3*ol_fj_u, 1e6*ol_fj_ur_u, 'DisplayName', '$\epsilon_{u_r}$') +plot(1e3*ol_fj_u, 1e6*ol_fj_uh_u, 'DisplayName', '$\epsilon_{u_h}$') +plot(1e3*ol_fj_u, 1e6*ol_fj_d_u , 'DisplayName', '$\epsilon_{d}$') +hold off; +xlabel('Fast Jack Position [mm]'); ylabel('Distance Error [$\mu$m]'); +legend('location', 'northwest'); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/exp_without_lut_fj_pos_errors_distance.pdf', 'width', 'wide', 'height', 'normal'); +#+end_src + +#+name: fig:exp_without_lut_fj_pos_errors_distance +#+caption: Position error of fast jacks as a function of the fast jack motion +#+RESULTS: +[[file:figs/exp_without_lut_fj_pos_errors_distance.png]] + +Let's now perform a Power Spectral Analysis of the measured displacement errors of the Fast Jack. +#+begin_src matlab +% Hanning Windows with 250um width +win = hanning(floor(400e-6/Xs)); + +% Power Spectral Density [m2/(1/m)] +[S_fj_ur, f] = pwelch(ol_fj_ur_u-mean(ol_fj_ur_u), win, 0, [], 1/Xs); +[S_fj_uh, ~] = pwelch(ol_fj_uh_u-mean(ol_fj_uh_u), win, 0, [], 1/Xs); +[S_fj_d, ~] = pwelch(ol_fj_d_u -mean(ol_fj_d_u ), win, 0, [], 1/Xs); +#+end_src + +As shown in Figure [[fig:exp_without_lut_wavenumber_asd]], we can see a fundamental "reciprocal length" of $5 \cdot 10^4\,[1/m]$ and its harmonics. +This corresponds to a length of $\frac{1}{5\cdot 10^4} = 20\,[\mu m]$. + +#+begin_src matlab :exports none +%% +figure; +hold on; +plot(f, sqrt(S_fj_ur), 'DisplayName', '$u_r$'); +plot(f, sqrt(S_fj_uh), 'DisplayName', '$u_h$'); +plot(f, sqrt(S_fj_d), 'DisplayName', '$d$'); +hold off; +set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log'); +xlabel('Reciprocal Length [1/m]'); +ylabel('ASD [$\frac{m}{1/\sqrt{m}}$]') +legend('location', 'northeast'); +xlim([1e4, 2e6]); ylim([1e-13, 2e-9]); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/exp_without_lut_wavenumber_asd.pdf', 'width', 'wide', 'height', 'normal'); +#+end_src + +#+name: fig:exp_without_lut_wavenumber_asd +#+caption: Spectral content of the error as a function of the reciprocal length +#+RESULTS: +[[file:figs/exp_without_lut_wavenumber_asd.png]] + + + +Instead of looking at that as a function of the reciprocal length, we can look at it as a function of the spectral distance (Figure [[fig:exp_without_lut_spectral_content_fj_error]]). + +We see that the errors have a pattern with "spectral distances" equal to $5\,[\mu m]$, $10\,[\mu m]$, $20\,[\mu m]$ and smaller harmonics. +#+begin_src matlab :exports none +figure; +hold on; +plot(1e6./f, sqrt(S_fj_ur), 'DisplayName', '$u_r$'); +plot(1e6./f, sqrt(S_fj_uh), 'DisplayName', '$u_h$'); +plot(1e6./f, sqrt(S_fj_d), 'DisplayName', '$d$'); +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-12, 1e-8]); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/exp_without_lut_spectral_content_fj_error.pdf', 'width', 'wide', 'height', 'normal'); +#+end_src + +#+name: fig:exp_without_lut_spectral_content_fj_error +#+caption: Spectral content of the error as a function of the spectral distance +#+RESULTS: +[[file:figs/exp_without_lut_spectral_content_fj_error.png]] + +Let's try to understand these results. +One turn of the stepper motor corresponds to a vertical motion of 1mm. +The stepper motor has 50 pairs of poles, therefore one pair of pole corresponds to a motion of $20\,[\mu m]$ which is the fundamental "spectral distance" we observe. + +#+begin_src matlab +CPS_ur = flip(-cumtrapz(flip(f), flip(S_fj_ur))); +CPS_uh = flip(-cumtrapz(flip(f), flip(S_fj_uh))); +CPS_d = flip(-cumtrapz(flip(f), flip(S_fj_d))); +#+end_src + +From Figure [[fig:exp_without_lut_cas_pos_error]], we can see that if the motion errors with a period of $5\,[\mu m]$ and $10\,[\mu m]$ can be dealt with the lookup table, this will reduce a lot the positioning errors of the fast jack. + +#+begin_src matlab :results none +%% Cumulative Spectrum +figure; +hold on; +plot(1e6./f, sqrt(CPS_ur), 'DisplayName', '$u_r$'); +plot(1e6./f, sqrt(CPS_uh), 'DisplayName', '$u_j$'); +plot(1e6./f, sqrt(CPS_d), 'DisplayName', '$d$'); +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/exp_without_lut_cas_pos_error.pdf', 'width', 'wide', 'height', 'normal'); +#+end_src + +#+name: fig:exp_without_lut_cas_pos_error +#+caption: Cumulative spectrum from small spectral distances to large spectral distances +#+RESULTS: +[[file:figs/exp_without_lut_cas_pos_error.png]] + +** Experimental Data - Current Method +The current used method is an iterative one. + +#+begin_src matlab +%% Load Experimental Data +ol_bragg = double(h5read('first_beam_0001.h5','/31.1/instrument/trajmot/data')); +ol_drx = h5read('first_beam_0001.h5','/31.1/instrument/xtal_111_drx_filter/data'); + +lut_1_bragg = double(h5read('first_beam_0001.h5','/32.1/instrument/trajmot/data')); +lut_1_drx = h5read('first_beam_0001.h5','/32.1/instrument/xtal_111_drx_filter/data'); + +lut_2_bragg = double(h5read('first_beam_0001.h5','/33.1/instrument/trajmot/data')); +lut_2_drx = h5read('first_beam_0001.h5','/33.1/instrument/xtal_111_drx_filter/data'); + +lut_3_bragg = double(h5read('first_beam_0001.h5','/34.1/instrument/trajmot/data')); +lut_3_drx = h5read('first_beam_0001.h5','/34.1/instrument/xtal_111_drx_filter/data'); + +lut_4_bragg = double(h5read('first_beam_0001.h5','/36.1/instrument/trajmot/data')); +lut_4_drx = h5read('first_beam_0001.h5','/36.1/instrument/xtal_111_drx_filter/data'); +#+end_src + +The relative orientation of the two =111= mirrors in the $x$ directions are compared in Figure [[fig:lut_old_method_exp_data]] for several iterations. +We can see that after the first iteration, the orientation error has an opposite sign as for the case without LUT. + +#+begin_src matlab :exports none +%% Plot Drx for all the LUT iterations +figure; +hold on; +plot(1e-5*ol_bragg, 1e-3*ol_drx , ... + 'DisplayName', sprintf('$i=0$, $\\delta_{R_x} = %.0f$ [nrad rms]', rms(ol_drx-mean(ol_drx)))) +plot(1e-5*lut_1_bragg, 1e-3*lut_1_drx, ... + 'DisplayName', sprintf('$i=1$, $\\delta_{R_x} = %.0f$ [nrad rms]', rms(lut_1_drx-mean(lut_1_drx)))) +plot(1e-5*lut_2_bragg, 1e-3*lut_2_drx, ... + 'DisplayName', sprintf('$i=2$, $\\delta_{R_x} = %.0f$ [nrad rms]', rms(lut_2_drx-mean(lut_2_drx)))) +plot(1e-5*lut_4_bragg, 1e-3*lut_4_drx, ... + 'DisplayName', sprintf('$i=4$, $\\delta_{R_x} = %.0f$ [nrad rms]', rms(lut_4_drx-mean(lut_4_drx)))) +hold off; +xlabel('Bragg Angle [deg]'); ylabel('$R_x$ error [$\mu$rad]'); +legend('location', 'southwest', 'FontSize', 8, 'NumColumns', 1); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/lut_old_method_exp_data.pdf', 'width', 'wide', 'height', 'tall'); +#+end_src + +#+name: fig:lut_old_method_exp_data +#+caption: $R_x$ error with the current LUT method +#+RESULTS: +[[file:figs/lut_old_method_exp_data.png]] + ** Simulation In this section, we suppose that we are in the frame of one fast jack (all transformations are already done), and we wish to create a LUT for one fast jack. @@ -303,6 +667,72 @@ exportFig('figs/compare_old_new_lut_motion.pdf', 'width', 'wide', 'height', 'nor #+RESULTS: [[file:figs/compare_old_new_lut_motion.png]] +** Experimental Data - Proposed method +The new proposed method has been implemented and tested. + +The result is shown in Figure [[fig:lut_comp_old_new_experiment]]. +After only one iteration, the result is close to the previous method. + +#+begin_src matlab +%% Load Data of the new LUT method +ol_new_bragg = double(h5read('Qutools_test_0001.h5','/33.1/instrument/trajmot/data')); +ol_new_drx = h5read('Qutools_test_0001.h5','/33.1/instrument/xtal_111_drx_filter/data'); + +lut_new_bragg = double(h5read('Qutools_test_0001.h5','/34.1/instrument/trajmot/data')); +lut_new_drx = h5read('Qutools_test_0001.h5','/34.1/instrument/xtal_111_drx_filter/data'); +#+end_src + +#+begin_src matlab :exports none +%% Plot Drx for new and old method +figure; +hold on; +plot(1e-5*ol_new_bragg, 1e-3*ol_new_drx , ... + 'DisplayName', sprintf('$i=0$, $\\delta_{R_x} = %.0f$ [nrad rms]', rms(ol_new_drx-mean(ol_new_drx)))) +plot(1e-5*lut_new_bragg, 1e-3*lut_new_drx, ... + 'DisplayName', sprintf('New LUT $i=1$, $\\delta_{R_x} = %.0f$ [nrad rms]', rms(lut_new_drx-mean(lut_new_drx)))) +plot(1e-5*lut_4_bragg, 1e-3*lut_4_drx, ... + 'DisplayName', sprintf('Old LUT $i=4$, $\\delta_{R_x} = %.0f$ [nrad rms]', rms(lut_4_drx-mean(lut_4_drx)))) +hold off; +xlabel('Bragg Angle [deg]'); ylabel('$R_x$ error [$\mu$rad]'); +legend('location', 'northwest', 'FontSize', 8, 'NumColumns', 1); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/lut_comp_old_new_experiment.pdf', 'width', 'wide', 'height', 'tall'); +#+end_src + +#+name: fig:lut_comp_old_new_experiment +#+caption: Comparison of the $R_x$ error for the current LUT method and the proposed one +#+RESULTS: +[[file:figs/lut_comp_old_new_experiment.png]] + +If we zoom on the 20deg to 25deg bragg angles, we can see that the new method has much less "periodic errors" as compared to the previous one which shows some patterns. + +#+begin_src matlab :exports none +%% Plot Drx for new and old method +figure; +hold on; +set(gca,'ColorOrderIndex',2) +plot(1e-5*lut_new_bragg, lut_new_drx, ... + 'DisplayName', 'New LUT') +plot(1e-5*lut_4_bragg, lut_4_drx, ... + 'DisplayName', 'Old LUT') +hold off; +xlabel('Bragg Angle [deg]'); ylabel('$R_x$ error [nrad]'); +legend('location', 'northwest', 'FontSize', 8, 'NumColumns', 1); +xlim([20, 25]); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/lut_comp_old_new_experiment_zoom.pdf', 'width', 'wide', 'height', 'normal'); +#+end_src + +#+name: fig:lut_comp_old_new_experiment_zoom +#+caption: +#+RESULTS: +[[file:figs/lut_comp_old_new_experiment_zoom.png]] + + * Attocube Calibration :PROPERTIES: :header-args:matlab+: :tangle matlab/dcm_attocube_lut.m @@ -310,6 +740,64 @@ exportFig('figs/compare_old_new_lut_motion.pdf', 'width', 'wide', 'height', 'nor <> ** Introduction :ignore: +The idea is to calibrate the periodic non-linearity of the interferometers, a known displacement must be imposed and the interferometer output compared to this displacement. +This should be performed over several periods in order to characterize the error. + +We here suppose that we are already in the frame of the Attocube (the fast-jack displacements are converted to Attocube displacement using the transformation matrices). +We also suppose that we are at a certain Bragg angle, and that the stepper motors are not moving: only the piezoelectric actuators are used. + +The setup is schematically with the block diagram in Figure [[fig:block_diagram_lut_attocube]]. +The signals are: +- $u$: Actuator Signal (position where we wish to go) +- $d$: Disturbances affecting the signal +- $y$: Displacement of the crystal +- $y_g$: Measurement of the crystal motion by the strain gauge with some noise $n_g$ +- $y_a$: Measurement of the crystal motion by the interferometer with some noise $n_a$ + +#+begin_src latex :file block_diagram_lut_attocube.pdf +\definecolor{myblue}{rgb}{0, 0.447, 0.741} +\definecolor{myred}{rgb}{0.8500, 0.325, 0.098} + +\begin{tikzpicture} + \node[block] (G) at (0,0){$G(s)$}; + \node[addb, right=1 of G] (addd) {}; + \node[block, align=center, right=1 of addd] (non_linearity) {Periodic\\Non-linearity}; + \node[addb, right=1 of non_linearity] (addna) {}; + \node[addb, below=1.8 of addna] (addnsg) {}; + + \draw[->] ($(G.west) + (-1.0, 0)$) node[above right]{$u$} -- (G.west); + \draw[->] (G.east) -- (addd.west); + \draw[->] (addd.east) -- (non_linearity.west); + \draw[->] ($(addd.north) + (0, 1.0)$) node[below right]{$d$} -- (addd.north); + \draw[->] (non_linearity.east) -- (addna.west); + \draw[->] (addna.east) -- ++(1.2, 0) node[above left]{$y_a$}; + \draw[->] ($(addna.north) + (0, 1.0)$) node[below right](na){$n_a$} -- (addna.north); + \draw[->] ($(addd.east) + (0.4, 0)$)node[branch]{} node[above]{$y$} |- (addnsg.west); + \draw[->] (addnsg.east) -- ++(1.2, 0) node[above left]{$y_g$}; + \draw[->] ($(addnsg.north) + (0, 1.0)$) node[below right](nsg){$n_{g}$} -- (addnsg.north); + + \begin{scope}[on background layer] + \node[fit={(non_linearity.south west) (na.north east)}, fill=myblue!20!white, draw, inner sep=6pt] (attocube) {}; + \node[fit={(non_linearity.west|-addnsg.south) (nsg.north east)}, fill=myred!20!white, draw, inner sep=6pt] (straingauge) {}; + \node[below right] at (attocube.north west) {Attocube}; + \node[below right] at (straingauge.north west) {Strain Gauge}; + \end{scope} +\end{tikzpicture} +#+end_src + +#+name: fig:block_diagram_lut_attocube +#+caption: Block Diagram schematic of the setup used to measure the periodic non-linearity of the Attocube +#+RESULTS: +[[file:figs/block_diagram_lut_attocube.png]] + +The problem is to estimate the periodic non-linearity of the Attocube from the imperfect measurments $y_a$ and $y_g$. + +Then a Lookup Table (LUT) is build. + +The wavelength of the Attocube is 1530nm, therefore the non-linearity has a period of 765nm. +The amplitude of the non-linearity can vary from one unit to the other (and maybe from one experimental condition to the other). +It is typically between 5nm peak to peak and 20nm peak to peak. + ** Matlab Init :noexport:ignore: #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) <> @@ -333,6 +821,21 @@ exportFig('figs/compare_old_new_lut_motion.pdf', 'width', 'wide', 'height', 'nor +** Simulations +We have some constrains on the way the motion is imposed and measured: +- We want the frequency content of the imposed motion to be at low frequency in order not to induce vibrations of the structure. + We have to make sure the forces applied by the piezoelectric actuator only moves the crystal and not the fast jack below. + Therefore, we have to move much slower than the first resonance frequency in the system. +- As both $y_a$ and $y_g$ should have rather small noise, we have to filter them with low pass filters. + The cut-off frequency of the low pass filter should be high as compared to the motion (to not induce any distortion) but still reducing sufficiently the noise. + Let's say we want the noise to be less than 1nm ($6 \sigma$). + +Suppose we have the power spectral density (PSD) of both $n_a$ and $n_g$. + +- [ ] Take the PSD of the Attocube +- [ ] Take the PSD of the strain gauge +- [ ] Using 2nd order low pass filter, estimate the required low pass filter cut-off frequency to have sufficiently low noise + * Helping Functions :noexport: ** Initialize Path #+NAME: m-init-path diff --git a/dcm_lookup_tables.pdf b/dcm_lookup_tables.pdf index 8bc4fcb..a9f7633 100644 Binary files a/dcm_lookup_tables.pdf and b/dcm_lookup_tables.pdf differ diff --git a/figs/block_diagram_lut_attocube.pdf b/figs/block_diagram_lut_attocube.pdf new file mode 100644 index 0000000..f7c9767 Binary files /dev/null and b/figs/block_diagram_lut_attocube.pdf differ diff --git a/figs/block_diagram_lut_attocube.png b/figs/block_diagram_lut_attocube.png new file mode 100644 index 0000000..99afe55 Binary files /dev/null and b/figs/block_diagram_lut_attocube.png differ diff --git a/figs/block_diagram_lut_attocube.svg b/figs/block_diagram_lut_attocube.svg new file mode 100644 index 0000000..65cb006 --- /dev/null +++ b/figs/block_diagram_lut_attocube.svg @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/figs/block_diagram_lut_stepper.pdf b/figs/block_diagram_lut_stepper.pdf new file mode 100644 index 0000000..2a5cae7 Binary files /dev/null and b/figs/block_diagram_lut_stepper.pdf differ diff --git a/figs/block_diagram_lut_stepper.png b/figs/block_diagram_lut_stepper.png new file mode 100644 index 0000000..965127f Binary files /dev/null and b/figs/block_diagram_lut_stepper.png differ diff --git a/figs/block_diagram_lut_stepper.svg b/figs/block_diagram_lut_stepper.svg new file mode 100644 index 0000000..52d8352 --- /dev/null +++ b/figs/block_diagram_lut_stepper.svg @@ -0,0 +1,550 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/figs/exp_without_lut_cas_pos_error.pdf b/figs/exp_without_lut_cas_pos_error.pdf new file mode 100644 index 0000000..c409052 Binary files /dev/null and b/figs/exp_without_lut_cas_pos_error.pdf differ diff --git a/figs/exp_without_lut_cas_pos_error.png b/figs/exp_without_lut_cas_pos_error.png new file mode 100644 index 0000000..3cbbc54 Binary files /dev/null and b/figs/exp_without_lut_cas_pos_error.png differ diff --git a/figs/exp_without_lut_fj_pos_errors.pdf b/figs/exp_without_lut_fj_pos_errors.pdf new file mode 100644 index 0000000..16e128c Binary files /dev/null and b/figs/exp_without_lut_fj_pos_errors.pdf differ diff --git a/figs/exp_without_lut_fj_pos_errors.png b/figs/exp_without_lut_fj_pos_errors.png new file mode 100644 index 0000000..c820550 Binary files /dev/null and b/figs/exp_without_lut_fj_pos_errors.png differ diff --git a/figs/exp_without_lut_fj_pos_errors_distance.pdf b/figs/exp_without_lut_fj_pos_errors_distance.pdf new file mode 100644 index 0000000..1309234 Binary files /dev/null and b/figs/exp_without_lut_fj_pos_errors_distance.pdf differ diff --git a/figs/exp_without_lut_fj_pos_errors_distance.png b/figs/exp_without_lut_fj_pos_errors_distance.png new file mode 100644 index 0000000..6b095b8 Binary files /dev/null and b/figs/exp_without_lut_fj_pos_errors_distance.png differ diff --git a/figs/exp_without_lut_spectral_content_fj_error.pdf b/figs/exp_without_lut_spectral_content_fj_error.pdf new file mode 100644 index 0000000..7222ace Binary files /dev/null and b/figs/exp_without_lut_spectral_content_fj_error.pdf differ diff --git a/figs/exp_without_lut_spectral_content_fj_error.png b/figs/exp_without_lut_spectral_content_fj_error.png new file mode 100644 index 0000000..87ce8fe Binary files /dev/null and b/figs/exp_without_lut_spectral_content_fj_error.png differ diff --git a/figs/exp_without_lut_wavenumber_asd.pdf b/figs/exp_without_lut_wavenumber_asd.pdf new file mode 100644 index 0000000..1becfe7 Binary files /dev/null and b/figs/exp_without_lut_wavenumber_asd.pdf differ diff --git a/figs/exp_without_lut_wavenumber_asd.png b/figs/exp_without_lut_wavenumber_asd.png new file mode 100644 index 0000000..1182f26 Binary files /dev/null and b/figs/exp_without_lut_wavenumber_asd.png differ diff --git a/figs/exp_without_lut_xtal_pos_errors.pdf b/figs/exp_without_lut_xtal_pos_errors.pdf new file mode 100644 index 0000000..413254b Binary files /dev/null and b/figs/exp_without_lut_xtal_pos_errors.pdf differ diff --git a/figs/exp_without_lut_xtal_pos_errors.png b/figs/exp_without_lut_xtal_pos_errors.png new file mode 100644 index 0000000..be8fbe2 Binary files /dev/null and b/figs/exp_without_lut_xtal_pos_errors.png differ diff --git a/figs/lut_comp_old_new_experiment.pdf b/figs/lut_comp_old_new_experiment.pdf new file mode 100644 index 0000000..5948f77 Binary files /dev/null and b/figs/lut_comp_old_new_experiment.pdf differ diff --git a/figs/lut_comp_old_new_experiment.png b/figs/lut_comp_old_new_experiment.png new file mode 100644 index 0000000..5f07db4 Binary files /dev/null and b/figs/lut_comp_old_new_experiment.png differ diff --git a/figs/lut_comp_old_new_experiment_zoom.pdf b/figs/lut_comp_old_new_experiment_zoom.pdf new file mode 100644 index 0000000..f3723fb Binary files /dev/null and b/figs/lut_comp_old_new_experiment_zoom.pdf differ diff --git a/figs/lut_comp_old_new_experiment_zoom.png b/figs/lut_comp_old_new_experiment_zoom.png new file mode 100644 index 0000000..69792e4 Binary files /dev/null and b/figs/lut_comp_old_new_experiment_zoom.png differ diff --git a/figs/lut_old_method_exp_data.pdf b/figs/lut_old_method_exp_data.pdf new file mode 100644 index 0000000..6fb2e84 Binary files /dev/null and b/figs/lut_old_method_exp_data.pdf differ diff --git a/figs/lut_old_method_exp_data.png b/figs/lut_old_method_exp_data.png new file mode 100644 index 0000000..445aaae Binary files /dev/null and b/figs/lut_old_method_exp_data.png differ