diff --git a/.latexmkrc b/.latexmkrc new file mode 100644 index 0000000..86be11d --- /dev/null +++ b/.latexmkrc @@ -0,0 +1,111 @@ +#!/bin/env perl + +# Shebang is only to get syntax highlighting right across GitLab, GitHub and IDEs. +# This file is not meant to be run, but read by `latexmk`. + +# ====================================================================================== +# Perl `latexmk` configuration file +# ====================================================================================== + +# ====================================================================================== +# PDF Generation/Building/Compilation +# ====================================================================================== + +@default_files=('dcm_metrology.tex'); + +# PDF-generating modes are: +# 1: pdflatex, as specified by $pdflatex variable (still largely in use) +# 2: postscript conversion, as specified by the $ps2pdf variable (useless) +# 3: dvi conversion, as specified by the $dvipdf variable (useless) +# 4: lualatex, as specified by the $lualatex variable (best) +# 5: xelatex, as specified by the $xelatex variable (second best) +$pdf_mode = 1; + +# Treat undefined references and citations as well as multiply defined references as +# ERRORS instead of WARNINGS. +# This is only checked in the *last* run, since naturally, there are undefined references +# in initial runs. +# This setting is potentially annoying when debugging/editing, but highly desirable +# in the CI pipeline, where such a warning should result in a failed pipeline, since the +# final document is incomplete/corrupted. +# +# However, I could not eradicate all warnings, so that `latexmk` currently fails with +# this option enabled. +# Specifically, `microtype` fails together with `fontawesome`/`fontawesome5`, see: +# https://tex.stackexchange.com/a/547514/120853 +# The fix in that answer did not help. +# Setting `verbose=silent` to mute `microtype` warnings did not work. +# Switching between `fontawesome` and `fontawesome5` did not help. +$warnings_as_errors = 0; + +# Show used CPU time. Looks like: https://tex.stackexchange.com/a/312224/120853 +$show_time = 1; + +# Default is 5; we seem to need more owed to the complexity of the document. +# Actual documents probably don't need this many since they won't use all features, +# plus won't be compiling from cold each time. +$max_repeat=7; + +# --shell-escape option (execution of code outside of latex) is required for the +#'svg' package. +# It converts raw SVG files to the PDF+PDF_TEX combo using InkScape. +# +# SyncTeX allows to jump between source (code) and output (PDF) in IDEs with support +# (many have it). A value of `1` is enabled (gzipped), `-1` is enabled but uncompressed, +# `0` is off. +# Testing in VSCode w/ LaTeX Workshop only worked for the compressed version. +# Adjust this as needed. Of course, only relevant for local use, no effect on a remote +# CI pipeline (except for slower compilation, probably). +# +# %O and %S will forward Options and the Source file, respectively, given to latexmk. +# +# `set_tex_cmds` applies to all *latex commands (latex, xelatex, lualatex, ...), so +# no need to specify these each. This allows to simply change `$pdf_mode` to get a +# different engine. Check if this works with `latexmk --commands`. +set_tex_cmds("--shell-escape -interaction=nonstopmode --synctex=1 %O %S"); + +# Use default pdf viewer +$pdf_previewer = 'zathura'; + +# option 2 is same as 1 (run biber when necessary), but also deletes the +# regeneratable bbl-file in a clenaup (`latexmk -c`). Do not use if original +# bib file is not available! +$bibtex_use = 2; # default: 1 + +# Change default `biber` call, help catch errors faster/clearer. See +# https://web.archive.org/web/20200526101657/https://www.semipol.de/2018/06/12/latex-best-practices.html#database-entries +$biber = "biber --validate-datamodel %O %S"; + +# Glossaries +add_cus_dep('glo', 'gls', 0, 'run_makeglossaries'); +add_cus_dep('acn', 'acr', 0, 'run_makeglossaries'); + +sub run_makeglossaries { + if ( $silent ) { + system "makeglossaries -q -s '$_[0].ist' '$_[0]'"; + } + else { + system "makeglossaries -s '$_[0].ist' '$_[0]'"; + }; +} + +# ====================================================================================== +# Auxiliary Files +# ====================================================================================== + +# Let latexmk know about generated files, so they can be used to detect if a +# rerun is required, or be deleted in a cleanup. +# loe: List of Examples (KOMAScript) +# lol: List of Listings (`listings` and `minted` packages) +# run.xml: biber runs +# glg: glossaries log +# glstex: generated from glossaries-extra +push @generated_exts, 'loe', 'lol', 'run.xml', 'glstex', 'glo', 'gls', 'glg', 'acn', 'acr', 'alg'; + +# Also delete the *.glstex files from package glossaries-extra. Problem is, +# that that package generates files of the form "basename-digit.glstex" if +# multiple glossaries are present. Latexmk looks for "basename.glstex" and so +# does not find those. For that purpose, use wildcard. +# Also delete files generated by gnuplot/pgfplots contour plots +# (.dat, .script, .table). +$clean_ext = "%R-*.glstex %R_contourtmp*.*"; diff --git a/block_diagram_lut_attocube.pdf b/block_diagram_lut_attocube.pdf deleted file mode 100644 index 3dc84ae..0000000 Binary files a/block_diagram_lut_attocube.pdf and /dev/null differ diff --git a/dcm-metrology.bib b/dcm-metrology.bib new file mode 100644 index 0000000..947b04e --- /dev/null +++ b/dcm-metrology.bib @@ -0,0 +1,26 @@ +@article{thurner15_fiber_based_distan_sensin_inter, + author = {Thurner, Klaus and Quacquarelli, Francesca Paola and Braun, + Pierre-Fran{\c{c}}ois and Dal Savio, Claudio and Karrai, + Khaled}, + title = {Fiber-Based Distance Sensing Interferometry}, + journal = {Applied optics}, + volume = 54, + number = 10, + pages = {3051--3063}, + year = 2015, + publisher = {Optical Society of America} +} + + + +@unpublished{ducourtieux18_towar_high_precis_posit_contr, + author = {Sebastien Ducourtieux}, + doi = {10.13140/rg.2.2.21044.35205}, + keywords = {metrology}, + note = {MEDSI 2018}, + title = {Toward High Precision Position Control Using Laser + Interferometry: Main Sources of Error}, + url = {https://doi.org/10.13140/rg.2.2.21044.35205}, + year = 2018 +} + diff --git a/dcm-metrology.html b/dcm-metrology.html new file mode 100644 index 0000000..1257ce7 --- /dev/null +++ b/dcm-metrology.html @@ -0,0 +1,627 @@ + + + + + + +ESRF Double Crystal Monochromator - Metrology + + + + + + + + +
+ UP + | + HOME +
+

ESRF Double Crystal Monochromator - Metrology

+
+

Table of Contents

+ +
+
+

This report is also available as a pdf.

+
+ +

+In this document, the metrology system is studied. +First, in Section 1 the goal of the metrology system is stated and the proposed concept is described. +In order to increase the accuracy of the metrology system, two problems are to be dealt with: +

+ + +
+

1. Metrology Concept

+
+

+ +

+

+The goal of the metrology system is to measure the distance and default of parallelism orientation between the first and second crystals +

+ +

+Only 3 degrees of freedom are of interest: +

+
    +
  • \(d_z\)
  • +
  • \(r_y\)
  • +
  • \(r_x\)
  • +
+
+
+

1.1. Sensor Topology

+
+

+In order to measure the relative pose of the two crystals, instead of performing a direct measurement which is complicated, the pose of the two crystals are measured from a metrology frame. +Three interferometers are used to measured the 3dof of interest for each crystals. +Three additional interferometers are used to measured the relative motion of the metrology frame. +

+ + + + +++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1: Notations for the metrology frame
NotationMeaning
d“Downstream”: Positive X
u“Upstream”: Negative X
h“Hall”: Positive Y
r“Ring”: Negative Y
f“Frame”
1“First Crystals”
2“Second Crystals”
+ + +
+

metrology_schematic.png +

+

Figure 1: Schematic of the Metrology System

+
+
+
+ +
+

1.2. Crystal’s motion computation

+
+

+From the raw interferometric measurements, the pose between the first and second crystals can be computed. +

+ +

+First, Jacobian matrices can be used to convert raw interferometer measurements to axial displacement and orientation of the crystals and metrology frame. +

+ +

+For the 311 crystals: +

+ + + + +++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 2: Table caption
NotationDescription
umMetrology Frame - Upstream
dhmMetrology Frame - Downstream Hall
drmMetrology Frame - Downstream Ring
ur1First Crystal - Upstream Ring
h1First Crystal - Hall
dr1First Crystal - Downstream Ring
ur2First Crystal - Upstream Ring
h2First Crystal - Hall
dr2First Crystal - Downstream Ring
+ + + + +++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3: Table caption
NotationDescription
dzmPositive: increase of distance
rym 
rxm 
dz1Positive: decrease of distance
ry1 
rx1 
dz2Positive: increase of distance
ry2 
rx2 
+ + +
+

schematic_sensor_jacobian_forward_kinematics_m.png +

+

Figure 2: Forward Kinematics for the Metrology frame

+
+ + +
+

schematic_sensor_jacobian_forward_kinematics_1.png +

+

Figure 3: Forward Kinematics for the 1st crystal

+
+ + +
+

schematic_sensor_jacobian_forward_kinematics_2.png +

+

Figure 4: Forward Kinematics for the 2nd crystal

+
+ +

+Then, the displacement and orientations can be combined as follows: +

+\begin{align} + d_{z} &= + d_{z1} - d_{z2} + d_{zm} \\ + d_{r_y} &= - r_{y1} + r_{y2} - r_{ym} \\ + d_{r_x} &= - r_{x1} + r_{x2} - r_{xm} +\end{align} + +

+Therefore: +

+
    +
  • \(d_z\) represents the distance between the two crystals
  • +
  • \(d_{r_y}\) represents the rotation of the second crystal w.r.t. the first crystal around \(y\) axis
  • +
  • \(d_{r_x}\) represents the rotation of the second crystal w.r.t. the first crystal around \(x\) axis
  • +
+ +

+If \(d_{r_y}\) is positive, the second crystal has a positive rotation around \(y\) w.r.t. the first crystal. +Therefore, the second crystal should be actuated such that it is making a negative rotation around \(y\) w.r.t. metrology frame. +

+ +

+The Jacobian matrices are defined as follow: +

+
+
%% Sensor Jacobian matrix for the metrology frame
+J_m = [1,  0.102,  0
+       1, -0.088,  0.1275
+       1, -0.088, -0.1275];
+
+%% Sensor Jacobian matrix for 1st "111" crystal
+J_s_111_1 = [-1, -0.036, -0.015
+             -1,  0,      0.015
+             -1,  0.036, -0.015];
+
+%% Sensor Jacobian matrix for 2nd "111" crystal
+J_s_111_2 = [1,  0.07,  0.015
+             1,  0,    -0.015
+             1, -0.07,  0.015];
+
+
+ +

+Therefore, the matrix that gives the relative pose of the crystal from the 9 interferometers is: +

+
+
%% Compute the transformation matrix
+G_111_t = [-inv(J_s_111_1), inv(J_s_111_2), -inv(J_m)];
+
+% Sign convention for the axial motion
+G_111_t(1,:) = -G_111_t(1,:);
+
+
+ + + + +++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4: Transformation Matrix
 ur1 [nm]h1 [nm]dr1 [nm]ur2 [nm]h2 [nm]dr1 [nm]um [nm]dhm [nm]drm [nm]
dz [nm]-0.25-0.5-0.25-0.25-0.5-0.250.4630.2680.268
rx [nrad]13.8890.0-13.8897.1430.0-7.143-5.2632.6322.632
ry [nrad]16.667-33.33316.66716.667-33.33316.6670.0-3.9223.922
+ +

+From table 4, we can determine the effect of each interferometer on the estimated relative pose between the crystals. +For instance, an error on dr1 will have much greater impact on ry than an error on drm. +

+
+
+
+ +
+

2. Deformations of the Metrology Frame

+
+

+ +

+

+The transformation matrix in Table 4 is valid only if the metrology frames are solid bodies. +

+ +

+The metrology frame itself is experiencing some deformations due to the gravity. +When the bragg axis is scanned, the effect of gravity on the metrology frame is changing and this introduce some measurement errors. +

+ +

+This can be calibrated. +

+
+
+

2.1. Measurement Setup

+
+

+Two beam viewers: +

+
    +
  • one close to the DCM to measure position of the beam
  • +
  • one far away to the DCM to measure orientation of the beam
  • +
+ +

+For each Bragg angle, the Fast Jacks are actuated to that the beam is at the center of the beam viewer. +Then, then position of the crystals as measured by the interferometers is recorded. +This position is the wanted position for a given Bragg angle. +

+
+
+ +
+

2.2. Simulations

+
+

+The deformations of the metrology frame and therefore the expected interferometric measurements can be computed as a function of the Bragg angle. +This may be done using FE software. +

+
+
+ +
+

2.3. Comparison

+
+
+ +
+

3. Attocube - Periodic Non-Linearity

+
+

+ +

+

+(Ducourtieux, 2018, p. 11 to 12; See Thurner et al., 2015, p. 8) +

+ +

+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 5. +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\)
  • +
+ + +
+

block_diagram_lut_attocube.png +

+

Figure 5: Block Diagram schematic of the setup used to measure the periodic non-linearity of the Attocube

+
+ +

+The problem is to estimate the periodic non-linearity of the Attocube from the imperfect measurements \(y_a\) and \(y_g\). +

+ +

+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. +

+
+ +
+

3.1. Calibration - Concept

+
+ + +
+

3.2. Measurements

+
+

+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
  • +
+
+
+
+ +
+

Bibliography

+
+
+
Ducourtieux, S., 2018. Toward high precision position control using laser interferometry: Main sources of error. https://doi.org/10.13140/rg.2.2.21044.35205
+
Thurner, K., Quacquarelli, F.P., Braun, P.-F., Dal Savio, C., Karrai, K., 2015. Fiber-based distance sensing interferometry. Applied optics 54, 3051–3063.
+
+
+
+
+
+

Author: Dehaeze Thomas

+

Created: 2022-01-05 mer. 15:27

+
+ + diff --git a/dcm-metrology.org b/dcm-metrology.org new file mode 100644 index 0000000..bdceeff --- /dev/null +++ b/dcm-metrology.org @@ -0,0 +1,1058 @@ +#+TITLE: ESRF Double Crystal Monochromator - Metrology +:DRAWER: +#+LANGUAGE: en +#+EMAIL: dehaeze.thomas@gmail.com +#+AUTHOR: Dehaeze Thomas + +#+HTML_LINK_HOME: ../index.html +#+HTML_LINK_UP: ../index.html + +#+HTML_HEAD: +#+HTML_HEAD: + +#+BIND: org-latex-image-default-option "scale=1" +#+BIND: org-latex-image-default-width "" + +#+LATEX_CLASS: scrreprt +#+LATEX_CLASS_OPTIONS: [a4paper, 10pt, DIV=12, parskip=full] +#+LATEX_HEADER_EXTRA: \input{preamble.tex} + +#+bibliography: dcm_metrology.bib +#+cite_export: csl ~/.local/data/csl-styles/elsevier-harvard.csl + +#+PROPERTY: header-args:matlab :session *MATLAB* +#+PROPERTY: header-args:matlab+ :comments org +#+PROPERTY: header-args:matlab+ :exports both +#+PROPERTY: header-args:matlab+ :results none +#+PROPERTY: header-args:matlab+ :tangle no +#+PROPERTY: header-args:matlab+ :eval no-export +#+PROPERTY: header-args:matlab+ :noweb yes +#+PROPERTY: header-args:matlab+ :mkdirp yes +#+PROPERTY: header-args:matlab+ :output-dir figs + +#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/tikz/org/}{config.tex}") +#+PROPERTY: header-args:latex+ :imagemagick t :fit yes +#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150 +#+PROPERTY: header-args:latex+ :imoutoptions -quality 100 +#+PROPERTY: header-args:latex+ :results file raw replace +#+PROPERTY: header-args:latex+ :buffer no +#+PROPERTY: header-args:latex+ :tangle no +#+PROPERTY: header-args:latex+ :eval no-export +#+PROPERTY: header-args:latex+ :exports results +#+PROPERTY: header-args:latex+ :mkdirp yes +#+PROPERTY: header-args:latex+ :output-dir figs +#+PROPERTY: header-args:latex+ :post pdf2svg(file=*this*, ext="png") +:END: + +#+begin_export html +
+

This report is also available as a pdf.

+
+#+end_export + +#+latex: \clearpage + +* Introduction :ignore: + +In this document, the metrology system is studied. +First, in Section [[sec:metrology_concept]] the goal of the metrology system is stated and the proposed concept is described. +In order to increase the accuracy of the metrology system, two problems are to be dealt with: +- The deformation of the metrology frame under the action of gravity (Section [[sec:frame_deformations]]) +- The periodic non-linearity of the interferometers (Section [[sec:dcm_attocube_lut]]) + +* Metrology Concept +<> +** Introduction :ignore: + +The goal of the metrology system is to measure the distance and default of parallelism orientation between the first and second crystals + +Only 3 degrees of freedom are of interest: +- $d_z$ +- $r_y$ +- $r_x$ + +** Matlab Init :noexport:ignore: +#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) +<> +#+end_src + +#+begin_src matlab :exports none :results silent :noweb yes +<> +#+end_src + +** Sensor Topology + +In order to measure the relative pose of the two crystals, instead of performing a direct measurement which is complicated, the pose of the two crystals are measured from a metrology frame. +Three interferometers are used to measured the 3dof of interest for each crystals. +Three additional interferometers are used to measured the relative motion of the metrology frame. + +#+name: tab:metrology_notations +#+caption: Notations for the metrology frame +#+attr_latex: :environment tabularx :width 0.4\linewidth :align cX +#+attr_latex: :center t :booktabs t +| Notation | Meaning | +|----------+--------------------------| +| =d= | "Downstream": Positive X | +| =u= | "Upstream": Negative X | +| =h= | "Hall": Positive Y | +| =r= | "Ring": Negative Y | +| =f= | "Frame" | +| =1= | "First Crystals" | +| =2= | "Second Crystals" | + +#+name: fig:metrology_schematic +#+caption: Schematic of the Metrology System +[[file:figs/metrology_schematic.png]] + +** Crystal's motion computation + +From the raw interferometric measurements, the pose between the first and second crystals can be computed. + +First, Jacobian matrices can be used to convert raw interferometer measurements to axial displacement and orientation of the crystals and metrology frame. + +For the 311 crystals: + +#+name: tab:311_crystals_notations_raw_interf +#+caption: Table caption +#+attr_latex: :environment tabularx :width 0.5\linewidth :align lX +#+attr_latex: :center t :booktabs t +| Notation | Description | +|----------+-----------------------------------| +| =um= | Metrology Frame - Upstream | +| =dhm= | Metrology Frame - Downstream Hall | +| =drm= | Metrology Frame - Downstream Ring | +|----------+-----------------------------------| +| =ur1= | First Crystal - Upstream Ring | +| =h1= | First Crystal - Hall | +| =dr1= | First Crystal - Downstream Ring | +|----------+-----------------------------------| +| =ur2= | First Crystal - Upstream Ring | +| =h2= | First Crystal - Hall | +| =dr2= | First Crystal - Downstream Ring | + +#+name: tab:311_crystals_notations_converted_interf +#+caption: Table caption +#+attr_latex: :environment tabularx :width 0.5\linewidth :align lX +#+attr_latex: :center t :booktabs t +| Notation | Description | +|----------+--------------------------------| +| =dzm= | Positive: increase of distance | +| =rym= | | +| =rxm= | | +|----------+--------------------------------| +| =dz1= | Positive: decrease of distance | +| =ry1= | | +| =rx1= | | +|----------+--------------------------------| +| =dz2= | Positive: increase of distance | +| =ry2= | | +| =rx2= | | + +#+begin_src latex :file schematic_sensor_jacobian_forward_kinematics_m.pdf +\begin{tikzpicture} + % Blocs + \node[block] (Js_inv) {$\bm{J}_{s,m}^{-1}$}; + + % Connections and labels + \draw[->] ($(Js_inv.west)+(-1.5,0)$) node[above right]{$\begin{bmatrix} u_{m} \\ dh_{m} \\ dr_{m} \end{bmatrix}$} -- (Js_inv.west); + \draw[->] (Js_inv.east) -- ++(1.5, 0) node[above left]{$\begin{bmatrix} d_{zm} \\ r_{ym} \\ r_{xm} \end{bmatrix}$}; +\end{tikzpicture} +#+end_src + +#+name: fig:schematic_sensor_jacobian_forward_kinematics_m +#+caption: Forward Kinematics for the Metrology frame +#+RESULTS: +[[file:figs/schematic_sensor_jacobian_forward_kinematics_m.png]] + +#+begin_src latex :file schematic_sensor_jacobian_forward_kinematics_1.pdf +\begin{tikzpicture} + % Blocs + \node[block] (Js_inv) {$\bm{J}_{s,1}^{-1}$}; + + % Connections and labels + \draw[->] ($(Js_inv.west)+(-1.5,0)$) node[above right]{$\begin{bmatrix} u_{r1} \\ h_1 \\ d_{r1} \end{bmatrix}$} -- (Js_inv.west); + \draw[->] (Js_inv.east) -- ++(1.5, 0) node[above left]{$\begin{bmatrix} d_{z1} \\ r_{y1} \\ r_{x1} \end{bmatrix}$}; +\end{tikzpicture} +#+end_src + +#+name: fig:schematic_sensor_jacobian_forward_kinematics_1 +#+caption: Forward Kinematics for the 1st crystal +#+RESULTS: +[[file:figs/schematic_sensor_jacobian_forward_kinematics_1.png]] + +#+begin_src latex :file schematic_sensor_jacobian_forward_kinematics_2.pdf +\begin{tikzpicture} + % Blocs + \node[block] (Js_inv) {$\bm{J}_{s,2}^{-1}$}; + + % Connections and labels + \draw[->] ($(Js_inv.west)+(-1.5,0)$) node[above right]{$\begin{bmatrix} u_{r2} \\ h_2 \\ d_{r2} \end{bmatrix}$} -- (Js_inv.west); + \draw[->] (Js_inv.east) -- ++(1.5, 0) node[above left]{$\begin{bmatrix} d_{z2} \\ r_{y2} \\ r_{x2} \end{bmatrix}$}; +\end{tikzpicture} +#+end_src + +#+name: fig:schematic_sensor_jacobian_forward_kinematics_2 +#+caption: Forward Kinematics for the 2nd crystal +#+RESULTS: +[[file:figs/schematic_sensor_jacobian_forward_kinematics_2.png]] + +Then, the displacement and orientations can be combined as follows: +\begin{align} + d_{z} &= + d_{z1} - d_{z2} + d_{zm} \\ + d_{r_y} &= - r_{y1} + r_{y2} - r_{ym} \\ + d_{r_x} &= - r_{x1} + r_{x2} - r_{xm} +\end{align} + +Therefore: +- $d_z$ represents the distance between the two crystals +- $d_{r_y}$ represents the rotation of the second crystal w.r.t. the first crystal around $y$ axis +- $d_{r_x}$ represents the rotation of the second crystal w.r.t. the first crystal around $x$ axis + +If $d_{r_y}$ is positive, the second crystal has a positive rotation around $y$ w.r.t. the first crystal. +Therefore, the second crystal should be actuated such that it is making a negative rotation around $y$ w.r.t. metrology frame. + +The Jacobian matrices are defined as follow: +#+begin_src matlab +%% Sensor Jacobian matrix for the metrology frame +J_m = [1, 0.102, 0 + 1, -0.088, 0.1275 + 1, -0.088, -0.1275]; + +%% Sensor Jacobian matrix for 1st "111" crystal +J_s_111_1 = [-1, -0.036, -0.015 + -1, 0, 0.015 + -1, 0.036, -0.015]; + +%% Sensor Jacobian matrix for 2nd "111" crystal +J_s_111_2 = [1, 0.07, 0.015 + 1, 0, -0.015 + 1, -0.07, 0.015]; +#+end_src + +Therefore, the matrix that gives the relative pose of the crystal from the 9 interferometers is: +#+begin_src matlab +%% Compute the transformation matrix +G_111_t = [-inv(J_s_111_1), inv(J_s_111_2), -inv(J_m)]; + +% Sign convention for the axial motion +G_111_t(1,:) = -G_111_t(1,:); +#+end_src + +#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*) +data2orgtable(G_111_t, ... + {'=dz= [nm]', '=rx= [nrad]', '=ry= [nrad]'}, ... + {'=ur1= [nm]', '=h1= [nm]', '=dr1= [nm]', '=ur2= [nm]', '=h2= [nm]', '=dr1= [nm]', '=um= [nm]', '=dhm= [nm]', '=drm= [nm]'}, ... + ' %.3f '); +#+end_src + +#+name: tab:transformation_matrix +#+caption: Transformation Matrix +#+attr_latex: :environment tabularx :width \linewidth :align cccccccccc +#+attr_latex: :center t :booktabs t :font \scriptsize +#+RESULTS: +| | =ur1= [nm] | =h1= [nm] | =dr1= [nm] | =ur2= [nm] | =h2= [nm] | =dr1= [nm] | =um= [nm] | =dhm= [nm] | =drm= [nm] | +|-------------+------------+-----------+------------+------------+-----------+------------+-----------+------------+------------| +| =dz= [nm] | -0.25 | -0.5 | -0.25 | -0.25 | -0.5 | -0.25 | 0.463 | 0.268 | 0.268 | +| =rx= [nrad] | 13.889 | 0.0 | -13.889 | 7.143 | 0.0 | -7.143 | -5.263 | 2.632 | 2.632 | +| =ry= [nrad] | 16.667 | -33.333 | 16.667 | 16.667 | -33.333 | 16.667 | 0.0 | -3.922 | 3.922 | + +From table [[fig:schematic_sensor_jacobian_forward_kinematics_2]], we can determine the effect of each interferometer on the estimated relative pose between the crystals. +For instance, an error on =dr1= will have much greater impact on =ry= than an error on =drm=. + +* Relation Between Crystal position and X-ray measured displacement +** Setup + +#+name: fig:calibration_setup +#+caption: Schematic of the setup +[[file:figs/calibration_setup.png]] + +Detector: + +https://www.baslerweb.com/en/products/cameras/area-scan-cameras/ace/aca1920-40gc/ + +Pixel size depends on the magnification used (1x, 6x, 12x). + +Pixel size of camera is 5.86 um x 5.86 um. +With typical magnification of 6x, pixel size is ~1.44um x 1.44um + +Frame rate is: 42 fps + +** Matlab Init :noexport:ignore: +#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) +<> +#+end_src + +#+begin_src matlab :exports none :results silent :noweb yes +<> +#+end_src + +#+begin_src matlab +bragg = pi/180*linspace(5,75,100); +#+end_src + +** Relation between second crystal motion and beam motion +*** Axial motion of second crystal +Let's consider the relation between the $[y, z]$ motion of the beam and the motion of the second crystal $[z^\prime, R_{y^\prime}, R_{x^\prime}]$. + +#+name: fig:relation_dz_output_beam +#+caption: Relation between $d_{z^\prime}$ motion of the second crystal and vertical motion of the beam +[[file:figs/relation_dz_output_beam.png]] + +\begin{equation} + d_z = d_{z^\prime} 2 \cos \theta +\end{equation} + +#+begin_src matlab :exports none :results none +%% Relation between vertical motion of the second crystal and vertical motion of the output beam +figure; +hold on; +plot(180/pi*bragg, 2*cos(bragg)) +xlabel('Bragg [deg]'); ylabel('Motion amplification'); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/relation_vert_motion_crystal_beam.pdf', 'width', 'wide', 'height', 'normal'); +#+end_src + +#+name: fig:relation_vert_motion_crystal_beam +#+caption: Relation between vertical motion of the second crystal and vertical motion of the output beam +#+RESULTS: +[[file:figs/relation_vert_motion_crystal_beam.png]] + +*** Ry motion of second crystal + +\begin{equation} +d_z = D_{\text{vlm}} d_{R_y^\prime} +\end{equation} + +with $D_{\text{vlm}} \approx 10\,m$. + +*** Rx motion of second crystal + +\begin{equation} +d_y = 2 D_{\text{vlm}} \sin \theta \cdot d_{R_x^\prime} +\end{equation} + + + +* Deformations of the Metrology Frame +<> +** Introduction :ignore: + +The transformation matrix in Table [[tab:transformation_matrix]] is valid only if the metrology frames are solid bodies. + +The metrology frame itself is experiencing some deformations due to the gravity. +When the bragg axis is scanned, the effect of gravity on the metrology frame is changing and this introduce some measurement errors. + +This can be calibrated. + +** Measurement Setup + +Two beam viewers: +- one close to the DCM to measure position of the beam +- one far away to the DCM to measure orientation of the beam + +For each Bragg angle, the Fast Jacks are actuated to that the beam is at the center of the beam viewer. +Then, then position of the crystals as measured by the interferometers is recorded. +This position is the wanted position for a given Bragg angle. + +** Simulations + +The deformations of the metrology frame and therefore the expected interferometric measurements can be computed as a function of the Bragg angle. +This may be done using FE software. + +** Comparison + +** Matlab Init :noexport:ignore: +#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) +<> +#+end_src + +#+begin_src matlab :exports none :results silent :noweb yes +<> +#+end_src + +#+begin_src matlab :tangle no :noweb yes +<> +#+end_src + +#+begin_src matlab :eval no :noweb yes +<> +#+end_src + +#+begin_src matlab :noweb yes +<> +#+end_src + +** Test +#+begin_src matlab +aa = importdata("correctInterf-vlm-220201.dat"); +#+end_src + +#+begin_src matlab +figure; +plot(aa.data(:,1), aa.data(:,24)) +#+end_src + +** Measured frame deformation + +#+begin_src matlab +data = table2array(readtable('itf_polynom.csv','NumHeaderLines',1)); +th = pi/180*data(:,1); % [rad] +fj = 0.030427 - 10.51e-3./(2*cos(th)); % [m] +rx2 = 1e-9*data(:,2); % [rad] +ry2 = 1e-9*data(:,3); % [rad] +rx1 = 1e-9*data(:,4); % [rad] +ry1 = 1e-9*data(:,5); % [rad] +#+end_src + +#+begin_src matlab +figure; +hold on; +plot(180/pi*th, 1e6*detrend(-rx2, 1), '.') +% plot(180/pi*th, detrend(ry2, 1)) +% plot(180/pi*th, detrend(rx1, 1)) +% plot(180/pi*th, detrend(ry1, 1)) +hold off; +xlabel('Bragg Angle [deg]'); +ylabel('Measured $R_x$ [$\mu$rad]') +xlim([10, 75]); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/calibration_drx_pres.pdf', 'width', 'full', 'height', 'normal'); +#+end_src + +#+name: fig:calibration_drx_pres +#+caption: description +#+RESULTS: +[[file:figs/calibration_drx_pres.png]] + + +Strange that there is correlation between Rx and Ry. +#+begin_src matlab +figure; +hold on; +plot(108/pi*th, 1e9*detrend(rx1, 0), '-', 'DisplayName', '$Rx_1$') +plot(108/pi*th, 1e9*detrend(ry1, 0), '-', 'DisplayName', '$Ry_1$') +hold off; +xlabel('Bragg Angle [deg]'); ylabel('Angle Offset [nrad]'); +legend() +#+end_src + +#+begin_src matlab +figure; +hold on; +plot(1e3*fj, detrend(rx2, 1), 'DisplayName', '$Rx_1$') +plot(1e3*fj, detrend(ry2, 1), 'DisplayName', '$Ry_1$') +hold off; +xlabel('Fast Jack Displacement [mm]'); ylabel('Angle Offset [nrad]'); +legend() +#+end_src + +#+begin_src matlab +%% Compute best polynomial fit +f_rx2 = fit(180/pi*th, 1e9*rx2, 'poly4'); +f_ry2 = fit(180/pi*th, 1e9*ry2, 'poly4'); +f_rx1 = fit(180/pi*th, 1e9*rx1, 'poly4'); +f_ry1 = fit(180/pi*th, 1e9*ry1, 'poly4'); +#+end_src + +#+begin_src matlab +figure; +hold on; +plot(180/pi*th, f_rx2(180/pi*th)) +plot(180/pi*th, f_ry2(180/pi*th)) +plot(180/pi*th, f_rx1(180/pi*th)) +plot(180/pi*th, f_ry1(180/pi*th)) +hold off; +#+end_src + +#+begin_src matlab +figure; +hold on; +plot(th, f_rx2(th) - rx2) +plot(th, f_ry2(th) - ry2) +plot(th, f_rx1(th) - rx1) +plot(th, f_ry1(th) - ry1) +hold off; +#+end_src + +#+begin_src matlab +figure; +hold on; +plot(th, f(th)) +plot(th, rx2, '.') +#+end_src + +** Test +#+begin_src matlab +filename = "/home/thomas/mnt/data_id21/22Jan/blc13550/id21/test_xtal1_interf/test_xtal1_interf_0001/test_xtal1_interf_0001.h5"; +#+end_src + +#+begin_src matlab +data = struct(); + +data.xtal1_111_u = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM4/data')); +data.xtal1_111_m = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM5/data')); +data.xtal1_111_d = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM6/data')); +data.mframe_u = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM3/data')); +data.mframe_dh = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM4/data')); +data.mframe_dr = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM5/data')); +data.bragg = (pi/180)*double(h5read(filename, '/7.1/instrument/FPGA2_SSIM6/data')); +data.fj_pos = 0.030427 - 10.5e-3./(2*cos(data.bragg)); +data.time = double(h5read(filename, '/7.1/instrument/time/data')); +data.rx = 1e-9*double(h5read(filename, '/7.1/instrument/xtal1_111_rx/data')); +data.ry = 1e-9*double(h5read(filename, '/7.1/instrument/xtal1_111_ry/data')); +data.z = 1e-9*double(h5read(filename, '/7.1/instrument/xtal1_111_z/data')); +data.drx = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_drx_filter/data')); +data.dry = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_dry_filter/data')); +data.dz = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_dz_filter/data')); +data.xtal2_111_u = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM10/data'))+10.5e6./(2*cos(data.bragg)); +data.xtal2_111_m = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM1/data'))+10.5e6./(2*cos(data.bragg)); +data.xtal2_111_d = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM2/data'))+10.5e6./(2*cos(data.bragg)); +#+end_src + +#+begin_src matlab :exports none +%% Drifts of the metrology as a function of Bragg Angle +figure; +tiledlayout(1, 3, 'TileSpacing', 'Compact', 'Padding', 'None'); + +ax1 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.mframe_dh, 0)) +plot(180/pi*data.bragg, detrend(data.mframe_u, 0)) +plot(180/pi*data.bragg, detrend(data.mframe_dr, 0)) +hold off; +xlabel('Bragg [deg]'); ylabel('Drift [nm]'); + +ax2 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.mframe_dh, 1)) +plot(180/pi*data.bragg, detrend(data.mframe_u, 1)) +plot(180/pi*data.bragg, detrend(data.mframe_dr, 1)) +hold off; +xlabel('Bragg [deg]'); set(gca, 'YTickLabel',[]); + +ax3 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.mframe_dh, 2), 'DisplayName', 'dh') +plot(180/pi*data.bragg, detrend(data.mframe_u, 2), 'DisplayName', 'u') +plot(180/pi*data.bragg, detrend(data.mframe_dr, 2), 'DisplayName', 'dr') +hold off; +xlabel('Bragg [deg]'); set(gca, 'YTickLabel',[]); +legend(); + +linkaxes([ax1,ax2,ax3], 'xy'); +xlim([10, 70]); ylim([-50, 50]); +#+end_src + +#+begin_src matlab :exports none +%% Drifts of the first crystal as a function of Bragg Angle +figure; +tiledlayout(1, 3, 'TileSpacing', 'Compact', 'Padding', 'None'); + +ax1 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.xtal1_111_u, 0)) +plot(180/pi*data.bragg, detrend(data.xtal1_111_m, 0)) +plot(180/pi*data.bragg, detrend(data.xtal1_111_d, 0)) +hold off; +xlabel('Bragg [deg]'); ylabel('Drift [nm]'); + +ax2 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.xtal1_111_u, 1)) +plot(180/pi*data.bragg, detrend(data.xtal1_111_m, 1)) +plot(180/pi*data.bragg, detrend(data.xtal1_111_d, 1)) +hold off; +xlabel('Bragg [deg]'); set(gca, 'YTickLabel',[]); + +ax3 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.xtal1_111_u, 2), 'DisplayName', 'u') +plot(180/pi*data.bragg, detrend(data.xtal1_111_m, 2), 'DisplayName', 'm') +plot(180/pi*data.bragg, detrend(data.xtal1_111_d, 2), 'DisplayName', 'd') +hold off; +xlabel('Bragg [deg]'); set(gca, 'YTickLabel',[]); +legend(); + +linkaxes([ax1,ax2,ax3], 'xy'); +xlim([10, 70]); ylim([-1000, 1000]); +#+end_src + +#+begin_src matlab :exports none :results none +%% Drifts of the second crystal as a function of Bragg Angle +figure; +tiledlayout(1, 3, 'TileSpacing', 'Compact', 'Padding', 'None'); + +ax1 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.xtal2_111_u, 0)) +plot(180/pi*data.bragg, detrend(data.xtal2_111_m, 0)) +plot(180/pi*data.bragg, detrend(data.xtal2_111_d, 0)) +hold off; +xlabel('Bragg [deg]'); ylabel('Drift [nm]') + +ax2 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.xtal2_111_u, 1)) +plot(180/pi*data.bragg, detrend(data.xtal2_111_m, 1)) +plot(180/pi*data.bragg, detrend(data.xtal2_111_d, 1)) +hold off; +xlabel('Bragg [deg]'); set(gca, 'YTickLabel',[]); + +ax3 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.xtal2_111_u, 2)) +plot(180/pi*data.bragg, detrend(data.xtal2_111_m, 2)) +plot(180/pi*data.bragg, detrend(data.xtal2_111_d, 2)) +hold off; +xlabel('Bragg [deg]'); set(gca, 'YTickLabel',[]); + +linkaxes([ax1,ax2,ax3], 'xy'); +xlim([10, 70]); ylim([-1000, 1000]); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/drifts_xtal2_detrend.pdf', 'width', 'full', 'height', 'normal'); +#+end_src + +#+name: fig:drifts_xtal2_detrend +#+caption: Drifts of the second crystal as a function of Bragg Angle +#+RESULTS: +[[file:figs/drifts_xtal2_detrend.png]] + +#+begin_src matlab :exports none :results none +%% Drifts of the second crystal as a function of Bragg Angle +figure; +tiledlayout(1, 3, 'TileSpacing', 'Compact', 'Padding', 'None'); + +ax1 = nexttile(); +hold on; +plot(1e3*data.dz, detrend(data.xtal2_111_u, 0)) +plot(1e3*data.dz, detrend(data.xtal2_111_m, 0)) +plot(1e3*data.dz, detrend(data.xtal2_111_d, 0)) +hold off; +xlabel('FJ position [mm]'); ylabel('Drift [nrad]') + +ax2 = nexttile(); +hold on; +plot(1e3*data.dz, detrend(data.xtal2_111_u, 1)) +plot(1e3*data.dz, detrend(data.xtal2_111_m, 1)) +plot(1e3*data.dz, detrend(data.xtal2_111_d, 1)) +hold off; +xlabel('FJ position [mm]'); set(gca, 'YTickLabel',[]); + +ax3 = nexttile(); +hold on; +plot(1e3*data.dz, detrend(data.xtal2_111_u, 2)) +plot(1e3*data.dz, detrend(data.xtal2_111_m, 2)) +plot(1e3*data.dz, detrend(data.xtal2_111_d, 2)) +hold off; +xlabel('FJ position [mm]'); set(gca, 'YTickLabel',[]); + +linkaxes([ax1,ax2,ax3], 'xy'); +% xlim([10, 40]); ylim([-1000, 1000]); +#+end_src + +#+begin_src matlab +figure; +hold on; +plot(108/pi*data.bragg, data.drx) +plot(108/pi*data.bragg, data.dry) +hold off; +#+end_src + +** Repeatability of frame deformation +#+begin_src matlab +filename = "/home/thomas/mnt/data_id21/22Jan/blc13550/id21/test_xtal1_interf/test_xtal1_interf_0001/test_xtal1_interf_0001.h5"; +#+end_src + +#+begin_src matlab +data_1 = struct(); +data_1.time = double(h5read(filename, '/7.1/instrument/time/data')); +data_1.bragg = (pi/180)*double(h5read(filename, '/7.1/instrument/FPGA2_SSIM6/data')); +data_1.fj_pos = 0.030427 - 10.5e-3./(2*cos(data_1.bragg)); +data_1.xtal1_111_u = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM4/data')); +data_1.xtal1_111_m = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM5/data')); +data_1.xtal1_111_d = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM6/data')); +data_1.xtal2_111_u = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM10/data'))+10.5e6./(2*cos(data_1.bragg)); +data_1.xtal2_111_m = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM1/data'))+10.5e6./(2*cos(data_1.bragg)); +data_1.xtal2_111_d = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM2/data'))+10.5e6./(2*cos(data_1.bragg)); +data_1.mframe_u = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM3/data')); +data_1.mframe_dh = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM4/data')); +data_1.mframe_dr = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM5/data')); +data_1.drx = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_drx_filter/data')); +data_1.dry = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_dry_filter/data')); +data_1.dz = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_dz_filter/data')); +#+end_src + +#+begin_src matlab +data_2 = struct(); +data_2.time = double(h5read(filename, '/6.1/instrument/time/data')); +data_2.bragg = (pi/180)*double(h5read(filename, '/6.1/instrument/FPGA2_SSIM6/data')); +data_2.fj_pos = 0.030427 - 10.5e-3./(2*cos(data_2.bragg)); +data_2.xtal1_111_u = double(h5read(filename, '/6.1/instrument/FPGA1_SSIM4/data')); +data_2.xtal1_111_m = double(h5read(filename, '/6.1/instrument/FPGA1_SSIM5/data')); +data_2.xtal1_111_d = double(h5read(filename, '/6.1/instrument/FPGA1_SSIM6/data')); +data_2.xtal2_111_u = double(h5read(filename, '/6.1/instrument/FPGA1_SSIM10/data'))+10.5e6./(2*cos(data_2.bragg)); +data_2.xtal2_111_m = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM1/data'))+10.5e6./(2*cos(data_2.bragg)); +data_2.xtal2_111_d = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM2/data'))+10.5e6./(2*cos(data_2.bragg)); +data_2.mframe_u = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM3/data')); +data_2.mframe_dh = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM4/data')); +data_2.mframe_dr = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM5/data')); +data_2.drx = 1e-9*double(h5read(filename, '/6.1/instrument/xtal_111_drx_filter/data')); +data_2.dry = 1e-9*double(h5read(filename, '/6.1/instrument/xtal_111_dry_filter/data')); +data_2.dz = 1e-9*double(h5read(filename, '/6.1/instrument/xtal_111_dz_filter/data')); +#+end_src + +#+begin_src matlab :exports none +figure; +hold on; +plot(180/pi*data_1.bragg, data_1.mframe_dh) +plot(180/pi*data_2.bragg, data_2.mframe_dh) +hold off; +#+end_src + +#+begin_src matlab :exports none +figure; +hold on; +plot(1e3*data_1.fj_pos, data_1.xtal1_111_u) +plot(1e3*data_2.fj_pos, data_2.xtal1_111_u) +#+end_src + +#+begin_src matlab :exports none +figure; +hold on; +plot(data_1.bragg, data_1.mframe_u) +plot(data_2.bragg, data_2.mframe_u) +#+end_src + +* Attocube - Periodic Non-Linearity +:PROPERTIES: +:header-args:matlab+: :tangle matlab/dcm_attocube_lut.m +:END: +<> + +** Introduction :ignore: + +Interferometers have some periodic nonlinearity [cite:@thurner15_fiber_based_distan_sensin_inter]. +The period is a fraction of the wavelength (usually $\lambda/2$) and can be due to polarization mixing, non perfect alignment of the optical components and unwanted reflected beams [cite:See @ducourtieux18_towar_high_precis_posit_contr page 67 to 69;@thurner15_fiber_based_distan_sensin_inter;]. +The amplitude of the nonlinearity can vary from a fraction of a nanometer to tens of nanometers. + +In the DCM case, when using Attocube interferometers, the period non-linearity are in the order of several nanometers with a period of $765\,nm$. +This is inducing some positioning errors which are too high. + +In order to overcome this issue, the periodic non-linearity of the interferometers have to be calibrated. +To do so, a displacement is imposed and measured both by the interferometers and by another metrology system which does not have this nonlinearity. +By comparing the two measured displacements, the nonlinearity can be calibration. +This process is performed over several periods in order to characterize the error over the full stroke. + +** Matlab Init :noexport:ignore: +#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) +<> +#+end_src + +#+begin_src matlab :exports none :results silent :noweb yes +<> +#+end_src + +#+begin_src matlab :tangle no :noweb yes +<> +#+end_src + +#+begin_src matlab :eval no :noweb yes +<> +#+end_src + +#+begin_src matlab :noweb yes +<> +#+end_src + +** Measurement Setup +The metrology that will be compared with the interferometers are the strain gauges incorporated in the PI piezoelectric stacks. + +It is here supposed that the measured displacement by the strain gauges are converted to the displacement at the interferometer locations. +It is also supposed that we are at a certain Bragg angle, and that the stepper motors are not moving: only the piezoelectric actuators are used. + +#+begin_note +Note that the strain gauges are measuring the relative displacement of the piezoelectric stacks while the interferometers are measuring the relative motion between the second crystals and the metrology frame. + +Only the interferometers measuring the second crystal motion can be calibrated here. + +As any deformations of the metrology frame of deformation of the crystal's support can degrade the quality of the calibration, it is better to perform this calibration without any bragg angle motion. +#+end_note + +The setup is schematically with the block diagram in Figure [[fig:block_diagram_lut_attocube]]. + +The signals are: +- $u$: Reference Signal sent to the PI controller (position where we wish to three stacks to be). + The PI controller takes care or controlling to position as measured by the strain gauges such that it is close to the reference position. +- $d$: Disturbances affecting the position of the crystals +- $y$: Displacement of the crystal as measured by one interferometer +- $y_g$: Measurement of the motion in the frame of the interferometer 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[block, align=center, right=1 of G] (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.north) + (0, 1.0)$) node[below right]{$d$} -- (G.north); + \draw[->] (G.east) -- (non_linearity.west); + \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[->] ($(G.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 measurements $y_a$ and $y_g$. + +** Choice of the reference signal + +The main specifications for the reference signal are; +- sweep several periods (i.e. several micrometers) +- stay in the linear region of the strain gauge +- no excitation of mechanical modes (i.e. the frequency content of the signal should be at low frequency) +- no phase shift due to limited bandwidth of both the interferometers and the strain gauge +- the full process should be quite fast + +The travel range of the piezoelectric stacks is 15 micrometers, the resolution of the strain gauges is 0.3nm and the maximum non-linearity is 0.15%. +If one non-linear period is swept (765nm), the maximum estimation error of the strain gauge is around 1nm. + +Based on the above discussion, one suitable excitation signal is a sinusoidal sweep with a frequency of 10Hz. + +** Repeatability of the non-linearity + +Instead of calibrating the non-linear errors of the interferometers over the full fast jack stroke (25mm), one can only calibrate the errors of one period. + +For that, we need to make sure that the errors are repeatable from one period to the other and also the period should be very precisely estimated (i.e. the wavelength of the laser). + +Also, the laser wavelength should be very stable (specified at 50ppb). + +One way to precisely estimate the laser wavelength is to estimate the non linear errors of the interferometer at an initial position, and then to estimate the non linear errors at a large offset, say 10mm. + +** Simulation +Suppose we have a first approximation of the non-linear period. +#+begin_src matlab +period_est = 765e-9; % Estimated period [m] +#+end_src + +And suppose the real period of the non-linear errors is a little bit above (by 0.02nm): +#+begin_src matlab +period_err = 0.02e-9; % Error on the period estimation [m] +period_nl = period_est + period_err; % Period of the non-linear errors [m] +#+end_src + +#+begin_src matlab :exports none +displacement_step = 1e-8; +stroke = 0:displacement_step:25e-3; % Measured Stroke [m] + +nl_errors = 5e-9*sin(2*pi*stroke/period_nl) + ... + 3e-9*sin(2*pi*2*stroke/period_nl) - ... + 1e-9*sin(2*pi*3*stroke/period_nl); % Measured non-linear errors [m] + +est_errors = 5e-9*sin(2*pi*stroke/period_est) + ... + 3e-9*sin(2*pi*2*stroke/period_est) - ... + 1e-9*sin(2*pi*3*stroke/period_est); % Estimated non-linear errors [m] +#+end_src + +The non-linear errors are first estimated at the beginning of the stroke (Figure [[fig:non_linear_errors_start_stroke]]). +#+begin_src matlab :exports none +%% Measured errors at the begining of the stroke +figure; +plot(1e9*stroke, 1e9*nl_errors); +xlabel('Displacement [nm]'); ylabel('Non linearity [nm]'); +xlim([0, 1e9*period_nl]); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/non_linear_errors_start_stroke.pdf', 'width', 'wide', 'height', 'normal'); +#+end_src + +#+name: fig:non_linear_errors_start_stroke +#+caption: Estimation of the non-linear errors at the beginning of the stroke +#+RESULTS: +[[file:figs/non_linear_errors_start_stroke.png]] + +From this only measurement, it is not possible to estimate with great accuracy the period of the error. +To do so, the same measurement is performed with a stroke of several millimeters (Figure [[fig:non_linear_errors_middle_stroke]]). + +It can be seen that there is an offset between the estimated and the measured errors. +This is due to a mismatch between the estimated period and the true period of the error. + +#+begin_src matlab :exports none +%% Comparison of the estimated error and measured error +figure; +hold on; +plot(1e3*stroke, 1e9*nl_errors, ... + 'DisplayName', 'Measured Errors'); +plot(1e3*stroke, 1e9*est_errors, '--', ... + 'DisplayName', 'Estimated Errors'); +hold off; +xlabel('Displacement [mm]'); ylabel('Non linearity [nm]'); +xlim([1e3*(5e-3-period_nl/2), 1e3*(5e-3+period_nl/2)]); +legend('location', 'southeast'); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/non_linear_errors_middle_stroke.pdf', 'width', 'wide', 'height', 'normal'); +#+end_src + +#+name: fig:non_linear_errors_middle_stroke +#+caption: Estimated non-linear errors at a latter position +#+RESULTS: +[[file:figs/non_linear_errors_middle_stroke.png]] + +Suppose the non-linear error is characterized by a periodic function $\mathcal{E}$, to simplify let's take a sinusoidal function (this can be generalized by taking the fourier transform of the function): +\begin{equation} +\mathcal{E}(x) = \sin\left(\frac{x}{\lambda}\right) +\end{equation} +with $x$ the displacement and $\lambda$ the period of the error. + +The measured error at $x_0$ is then: +\begin{equation} +\mathcal{E}_m(x_0) = \sin\left( \frac{x_0}{\lambda} \right) +\end{equation} +And the estimated one is: +\begin{equation} +\mathcal{E}_e(x_0) = \sin \left( \frac{x_0}{\lambda_{\text{est}}} \right) +\end{equation} +with $\lambda_{\text{est}}$ the estimated error's period. + +From Figure [[fig:non_linear_errors_middle_stroke]], we can see that there is an offset between the two curves. +Let's call this offset $\epsilon_x$, we then have: +\begin{equation} +\mathcal{E}_m(x_0) = \mathcal{E}_e(x_0 + \epsilon_x) +\end{equation} + +Which gives us: +\begin{equation} +\sin\left( \frac{x_0}{\lambda} \right) = \sin \left( \frac{x_0 + \epsilon_x}{\lambda_{\text{est}}} \right) +\end{equation} + +Finally: +\begin{equation} +\boxed{\lambda = \lambda_{\text{est}} \frac{x_0}{x_0 + \epsilon_x}} +\end{equation} + +The estimated delay is computed: +#+begin_src matlab +%% Estimation of the offset between the estimated and measured errors +i_period = stroke > 5e-3-period_nl/2 & stroke < 5e-3+period_nl/2; +epsilon_x = finddelay(nl_errors(i_period), est_errors(i_period)) % [m] +#+end_src + +#+begin_src matlab :results value replace :exports results :tangle no +ans = sprintf('Estimated delay x0 is %.0f [nm]', 1e9*displacement_step*epsilon_x) +#+end_src + +#+RESULTS: +: Estimated delay x0 is -120 [nm] + +And the period $\lambda$ can be estimated: +#+begin_src matlab +%% Computation of the period [m] +period_fin = period_est * (5e-3)/(5e-3 + d_offset); % Estimated period after measurement [m] +#+end_src + +#+begin_src matlab :results value replace :exports results :tangle no +ans = sprintf('The estimated period is %.3f [nm]', 1e9*period_fin) +#+end_src + +#+RESULTS: +: The estimated period is 765.020 [nm] + +And the results confirms that this method is working on paper. + +When doing this computation, we suppose that there are *at most* one half period of offset between the estimated and the measured non-linear (to not have any ambiguity whether the estimated period is too large or too small). +Mathematically this means that the displacement $x_0$ should be smaller than: +\begin{equation} +x_0 < \frac{1}{2} \cdot \lambda \cdot \frac{\lambda}{\epsilon_\lambda} +\end{equation} +With $\epsilon_\lambda$ the absolute estimation error of the period in meters. + +For instance, if we estimate the error on the period to be less than 0.1nm, the maximum displacement is: +#+begin_src matlab +%% Estimated maximum stroke [m] +max_x0 = 0.5 * 765e-9 * (765e-9)/(0.1e-9); +#+end_src + +#+begin_src matlab :results value replace :exports results :tangle no +ans = sprintf('The maximum stroke is %.1f [mm]', 1e3*max_x0) +#+end_src + +#+RESULTS: +: The maximum stroke is 2.9 [mm] + +** Measurements + +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 +#+BEGIN_SRC matlab +%% Path for functions, data and scripts +addpath('./matlab/mat/'); % Path for data +addpath('./matlab/src/'); % Path for functions +addpath('./matlab/'); % Path for scripts +#+END_SRC + +#+NAME: m-init-path-tangle +#+BEGIN_SRC matlab +%% Path for functions, data and scripts +addpath('./mat/'); % Path for data +addpath('./src/'); % Path for functions +#+END_SRC + +** Initialize other elements +#+NAME: m-init-other +#+BEGIN_SRC matlab +%% Colors for the figures +colors = colororder; + +%% Frequency Vector +freqs = logspace(1, 3, 1000); +#+END_SRC + +* Bibliography +:PROPERTIES: +:UNNUMBERED: t +:END: + +#+print_bibliography: diff --git a/dcm_metrology.pdf b/dcm-metrology.pdf similarity index 50% rename from dcm_metrology.pdf rename to dcm-metrology.pdf index 2f35946..7707c55 100644 Binary files a/dcm_metrology.pdf and b/dcm-metrology.pdf differ diff --git a/dcm_metrology.html b/dcm_metrology.html index 771fd93..92b2f2b 100644 --- a/dcm_metrology.html +++ b/dcm_metrology.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + ESRF Double Crystal Monochromator - Metrology @@ -39,35 +39,69 @@

Table of Contents


-

This report is also available as a pdf.

+

This report is also available as a pdf.


-
-

1. Metrology Concept

+

+In this document, the metrology system is studied. +First, in Section 1 the goal of the metrology system is stated and the proposed concept is described. +In order to increase the accuracy of the metrology system, two problems are to be dealt with: +

+
    +
  • The deformation of the metrology frame under the action of gravity (Section 3)
  • +
  • The periodic non-linearity of the interferometers (Section 4)
  • +
+ +
+

1. Metrology Concept

+ +

+

The goal of the metrology system is to measure the distance and default of parallelism orientation between the first and second crystals

@@ -80,9 +114,8 @@ Only 3 degrees of freedom are of interest:
  • \(r_x\)
  • - -
    -

    1.1. Sensor Topology

    +
    +

    1.1. Sensor Topology

    In order to measure the relative pose of the two crystals, instead of performing a direct measurement which is complicated, the pose of the two crystals are measured from a metrology frame. @@ -90,7 +123,7 @@ Three interferometers are used to measured the 3dof of interest for each crystal Three additional interferometers are used to measured the relative motion of the metrology frame.

    - +
    @@ -143,7 +176,7 @@ Three additional interferometers are used to measured the relative motion of the
    Table 1: Notations for the metrology frame
    -
    +

    metrology_schematic.png

    Figure 1: Schematic of the Metrology System

    @@ -151,8 +184,8 @@ Three additional interferometers are used to measured the relative motion of the
    -
    -

    1.2. Crystal’s motion computation

    +
    +

    1.2. Crystal’s motion computation

    From the raw interferometric measurements, the pose between the first and second crystals can be computed. @@ -166,7 +199,7 @@ First, Jacobian matrices can be used to convert raw interferometer measurements For the 311 crystals:

    - +
    @@ -230,7 +263,7 @@ For the 311 crystals:
    Table 2: Table caption
    - +
    @@ -295,21 +328,21 @@ For the 311 crystals:
    Table 3: Table caption
    -
    +

    schematic_sensor_jacobian_forward_kinematics_m.png

    Figure 2: Forward Kinematics for the Metrology frame

    -
    +

    schematic_sensor_jacobian_forward_kinematics_1.png

    Figure 3: Forward Kinematics for the 1st crystal

    -
    +

    schematic_sensor_jacobian_forward_kinematics_2.png

    Figure 4: Forward Kinematics for the 2nd crystal

    @@ -371,7 +404,7 @@ G_111_t(1,:) = -
    - +
    @@ -452,18 +485,115 @@ G_111_t(1,:) = -

    -From table 4, we can determine the effect of each interferometer on the estimated relative pose between the crystals. +From table 4, we can determine the effect of each interferometer on the estimated relative pose between the crystals. For instance, an error on dr1 will have much greater impact on ry than an error on drm.

    -
    -

    2. Deformations of the Metrology Frame

    +
    +

    2. Relation Between Crystal position and X-ray measured displacement

    +
    +
    +

    2.1. Setup

    +
    + +
    +

    calibration_setup.png +

    +

    Figure 5: Schematic of the setup

    +
    +

    -The transformation matrix in Table 4 is valid only if the metrology frames are solid bodies. +Detector: +

    + +

    +https://www.baslerweb.com/en/products/cameras/area-scan-cameras/ace/aca1920-40gc/ +

    + +

    +Pixel size depends on the magnification used (1x, 6x, 12x). +

    + +

    +Pixel size of camera is 5.86 um x 5.86 um. +With typical magnification of 6x, pixel size is ~1.44um x 1.44um +

    + +

    +Frame rate is: 42 fps +

    +
    +
    + +
    +

    2.2. Relation between second crystal motion and beam motion

    +
    +
    +
    +

    2.2.1. Axial motion of second crystal

    +
    +

    +Let’s consider the relation between the \([y, z]\) motion of the beam and the motion of the second crystal \([z^\prime, R_{y^\prime}, R_{x^\prime}]\). +

    + + +
    +

    relation_dz_output_beam.png +

    +

    Figure 6: Relation between \(d_{z^\prime}\) motion of the second crystal and vertical motion of the beam

    +
    + +\begin{equation} + d_z = d_{z^\prime} 2 \cos \theta +\end{equation} + + +
    +

    relation_vert_motion_crystal_beam.png +

    +

    Figure 7: Relation between vertical motion of the second crystal and vertical motion of the output beam

    +
    +
    +
    + +
    +

    2.2.2. Ry motion of second crystal

    +
    +\begin{equation} +d_z = D_{\text{vlm}} d_{R_y^\prime} +\end{equation} + +

    +with \(D_{\text{vlm}} \approx 10\,m\). +

    +
    +
    + +
    +

    2.2.3. Rx motion of second crystal

    +
    +\begin{equation} +d_y = 2 D_{\text{vlm}} \sin \theta \cdot d_{R_x^\prime} +\end{equation} +
    +
    +
    +
    + + + +
    +

    3. Deformations of the Metrology Frame

    +
    +

    + +

    +

    +The transformation matrix in Table 4 is valid only if the metrology frames are solid bodies.

    @@ -475,10 +605,9 @@ When the bragg axis is scanned, the effect of gravity on the metrology frame is This can be calibrated.

    - -
    -

    2.1. Measurement Setup

    -
    +
    +

    3.1. Measurement Setup

    +

    Two beam viewers:

    @@ -495,9 +624,9 @@ This position is the wanted position for a given Bragg angle.
    -
    -

    2.2. Simulations

    -
    +
    +

    3.2. Simulations

    +

    The deformations of the metrology frame and therefore the expected interferometric measurements can be computed as a function of the Bragg angle. This may be done using FE software. @@ -505,60 +634,513 @@ This may be done using FE software.

    -
    -

    2.3. Comparison

    +
    +

    3.3. Comparison

    +
    + +
    +

    3.4. Test

    +
    +
    +
    aa = importdata("correctInterf-vlm-220201.dat");
    +
    +
    + +
    +
    figure;
    +plot(aa.data(:,1), aa.data(:,24))
    +
    +
    -
    -

    3. Attocube - Periodic Non-Linearity

    -
    +
    +

    3.5. Measured frame deformation

    +
    +
    +
    data = table2array(readtable('itf_polynom.csv','NumHeaderLines',1));
    +th = pi/180*data(:,1); % [rad]
    +fj = 0.030427 - 10.51e-3./(2*cos(th)); % [m]
    +rx2 = 1e-9*data(:,2); % [rad]
    +ry2 = 1e-9*data(:,3); % [rad]
    +rx1 = 1e-9*data(:,4); % [rad]
    +ry1 = 1e-9*data(:,5); % [rad]
    +
    +
    + +
    +
    figure;
    +hold on;
    +plot(180/pi*th, 1e6*detrend(-rx2, 1), '.')
    +% plot(180/pi*th, detrend(ry2, 1))
    +% plot(180/pi*th, detrend(rx1, 1))
    +% plot(180/pi*th, detrend(ry1, 1))
    +hold off;
    +xlabel('Bragg Angle [deg]');
    +ylabel('Measured $R_x$ [$\mu$rad]')
    +xlim([10, 75]);
    +
    +
    + + +
    +

    calibration_drx_pres.png +

    +

    Figure 8: description

    +
    + +

    - +Strange that there is correlation between Rx and Ry. +

    +
    +
    figure;
    +hold on;
    +plot(108/pi*th, 1e9*detrend(rx1, 0), '-', 'DisplayName', '$Rx_1$')
    +plot(108/pi*th, 1e9*detrend(ry1, 0), '-', 'DisplayName', '$Ry_1$')
    +hold off;
    +xlabel('Bragg Angle [deg]'); ylabel('Angle Offset [nrad]');
    +legend()
    +
    +
    + +
    +
    figure;
    +hold on;
    +plot(1e3*fj, detrend(rx2, 1), 'DisplayName', '$Rx_1$')
    +plot(1e3*fj, detrend(ry2, 1), 'DisplayName', '$Ry_1$')
    +hold off;
    +xlabel('Fast Jack Displacement [mm]'); ylabel('Angle Offset [nrad]');
    +legend()
    +
    +
    + +
    +
    %% Compute best polynomial fit
    +f_rx2 = fit(180/pi*th, 1e9*rx2, 'poly4');
    +f_ry2 = fit(180/pi*th, 1e9*ry2, 'poly4');
    +f_rx1 = fit(180/pi*th, 1e9*rx1, 'poly4');
    +f_ry1 = fit(180/pi*th, 1e9*ry1, 'poly4');
    +
    +
    + +
    +
    figure;
    +hold on;
    +plot(180/pi*th, f_rx2(180/pi*th))
    +plot(180/pi*th, f_ry2(180/pi*th))
    +plot(180/pi*th, f_rx1(180/pi*th))
    +plot(180/pi*th, f_ry1(180/pi*th))
    +hold off;
    +
    +
    + +
    +
    figure;
    +hold on;
    +plot(th, f_rx2(th) - rx2)
    +plot(th, f_ry2(th) - ry2)
    +plot(th, f_rx1(th) - rx1)
    +plot(th, f_ry1(th) - ry1)
    +hold off;
    +
    +
    + +
    +
    figure;
    +hold on;
    +plot(th, f(th))
    +plot(th, rx2, '.')
    +
    +
    +
    +
    + +
    +

    3.6. Test

    +
    +
    +
    filename = "/home/thomas/mnt/data_id21/22Jan/blc13550/id21/test_xtal1_interf/test_xtal1_interf_0001/test_xtal1_interf_0001.h5";
    +
    +
    + +
    +
    data = struct();
    +
    +data.xtal1_111_u = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM4/data'));
    +data.xtal1_111_m = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM5/data'));
    +data.xtal1_111_d = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM6/data'));
    +data.mframe_u = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM3/data'));
    +data.mframe_dh = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM4/data'));
    +data.mframe_dr = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM5/data'));
    +data.bragg = (pi/180)*double(h5read(filename, '/7.1/instrument/FPGA2_SSIM6/data'));
    +data.fj_pos = 0.030427 - 10.5e-3./(2*cos(data.bragg));
    +data.time  = double(h5read(filename, '/7.1/instrument/time/data'));
    +data.rx    = 1e-9*double(h5read(filename, '/7.1/instrument/xtal1_111_rx/data'));
    +data.ry    = 1e-9*double(h5read(filename, '/7.1/instrument/xtal1_111_ry/data'));
    +data.z     = 1e-9*double(h5read(filename, '/7.1/instrument/xtal1_111_z/data'));
    +data.drx   = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_drx_filter/data'));
    +data.dry   = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_dry_filter/data'));
    +data.dz    = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_dz_filter/data'));
    +data.xtal2_111_u = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM10/data'))+10.5e6./(2*cos(data.bragg));
    +data.xtal2_111_m = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM1/data'))+10.5e6./(2*cos(data.bragg));
    +data.xtal2_111_d = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM2/data'))+10.5e6./(2*cos(data.bragg));
    +
    +
    + + +
    +

    drifts_xtal2_detrend.png +

    +

    Figure 9: Drifts of the second crystal as a function of Bragg Angle

    +
    + +
    +
    figure;
    +hold on;
    +plot(108/pi*data.bragg, data.drx)
    +plot(108/pi*data.bragg, data.dry)
    +hold off;
    +
    +
    +
    +
    + +
    +

    3.7. Repeatability of frame deformation

    +
    +
    +
    filename = "/home/thomas/mnt/data_id21/22Jan/blc13550/id21/test_xtal1_interf/test_xtal1_interf_0001/test_xtal1_interf_0001.h5";
    +
    +
    + +
    +
    data_1 = struct();
    +data_1.time  = double(h5read(filename, '/7.1/instrument/time/data'));
    +data_1.bragg = (pi/180)*double(h5read(filename, '/7.1/instrument/FPGA2_SSIM6/data'));
    +data_1.fj_pos = 0.030427 - 10.5e-3./(2*cos(data_1.bragg));
    +data_1.xtal1_111_u = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM4/data'));
    +data_1.xtal1_111_m = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM5/data'));
    +data_1.xtal1_111_d = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM6/data'));
    +data_1.xtal2_111_u = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM10/data'))+10.5e6./(2*cos(data_1.bragg));
    +data_1.xtal2_111_m = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM1/data'))+10.5e6./(2*cos(data_1.bragg));
    +data_1.xtal2_111_d = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM2/data'))+10.5e6./(2*cos(data_1.bragg));
    +data_1.mframe_u = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM3/data'));
    +data_1.mframe_dh = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM4/data'));
    +data_1.mframe_dr = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM5/data'));
    +data_1.drx   = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_drx_filter/data'));
    +data_1.dry   = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_dry_filter/data'));
    +data_1.dz    = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_dz_filter/data'));
    +
    +
    + +
    +
    data_2 = struct();
    +data_2.time  = double(h5read(filename, '/6.1/instrument/time/data'));
    +data_2.bragg = (pi/180)*double(h5read(filename, '/6.1/instrument/FPGA2_SSIM6/data'));
    +data_2.fj_pos = 0.030427 - 10.5e-3./(2*cos(data_2.bragg));
    +data_2.xtal1_111_u = double(h5read(filename, '/6.1/instrument/FPGA1_SSIM4/data'));
    +data_2.xtal1_111_m = double(h5read(filename, '/6.1/instrument/FPGA1_SSIM5/data'));
    +data_2.xtal1_111_d = double(h5read(filename, '/6.1/instrument/FPGA1_SSIM6/data'));
    +data_2.xtal2_111_u = double(h5read(filename, '/6.1/instrument/FPGA1_SSIM10/data'))+10.5e6./(2*cos(data_2.bragg));
    +data_2.xtal2_111_m = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM1/data'))+10.5e6./(2*cos(data_2.bragg));
    +data_2.xtal2_111_d = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM2/data'))+10.5e6./(2*cos(data_2.bragg));
    +data_2.mframe_u = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM3/data'));
    +data_2.mframe_dh = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM4/data'));
    +data_2.mframe_dr = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM5/data'));
    +data_2.drx   = 1e-9*double(h5read(filename, '/6.1/instrument/xtal_111_drx_filter/data'));
    +data_2.dry   = 1e-9*double(h5read(filename, '/6.1/instrument/xtal_111_dry_filter/data'));
    +data_2.dz    = 1e-9*double(h5read(filename, '/6.1/instrument/xtal_111_dz_filter/data'));
    +
    +
    +
    +
    +
    + +
    +

    4. Attocube - Periodic Non-Linearity

    +
    +

    +

    -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. +Interferometers have some periodic nonlinearity (Thurner et al., 2015). +The period is a fraction of the wavelength (usually \(\lambda/2\)) and can be due to polarization mixing, non perfect alignment of the optical components and unwanted reflected beams (See Ducourtieux, 2018, p. 67 to 69; Thurner et al., 2015). +The amplitude of the nonlinearity can vary from a fraction of a nanometer to tens of nanometers.

    -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. +In the DCM case, when using Attocube interferometers, the period non-linearity are in the order of several nanometers with a period of \(765\,nm\). +This is inducing some positioning errors which are too high. +

    + +

    +In order to overcome this issue, the periodic non-linearity of the interferometers have to be calibrated. +To do so, a displacement is imposed and measured both by the interferometers and by another metrology system which does not have this nonlinearity. +By comparing the two measured displacements, the nonlinearity can be calibration. +This process is performed over several periods in order to characterize the error over the full stroke. +

    +
    + +
    +

    4.1. Measurement Setup

    +
    +

    +The metrology that will be compared with the interferometers are the strain gauges incorporated in the PI piezoelectric stacks. +

    + +

    +It is here supposed that the measured displacement by the strain gauges are converted to the displacement at the interferometer locations. +It is also supposed that we are at a certain Bragg angle, and that the stepper motors are not moving: only the piezoelectric actuators are used. +

    + +
    +

    +Note that the strain gauges are measuring the relative displacement of the piezoelectric stacks while the interferometers are measuring the relative motion between the second crystals and the metrology frame. +

    + +

    +Only the interferometers measuring the second crystal motion can be calibrated here. +

    + +

    +As any deformations of the metrology frame of deformation of the crystal’s support can degrade the quality of the calibration, it is better to perform this calibration without any bragg angle motion. +

    + +
    + +

    +The setup is schematically with the block diagram in Figure 10.

    -The setup is schematically with the block diagram in Figure 5. 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\)
    • +
    • \(u\): Reference Signal sent to the PI controller (position where we wish to three stacks to be). +The PI controller takes care or controlling to position as measured by the strain gauges such that it is close to the reference position.
    • +
    • \(d\): Disturbances affecting the position of the crystals
    • +
    • \(y\): Displacement of the crystal as measured by one interferometer
    • +
    • \(y_g\): Measurement of the motion in the frame of the interferometer by the strain gauge with some noise \(n_g\)
    • \(y_a\): Measurement of the crystal motion by the interferometer with some noise \(n_a\)
    -
    +

    block_diagram_lut_attocube.png

    -

    Figure 5: Block Diagram schematic of the setup used to measure the periodic non-linearity of the Attocube

    +

    Figure 10: Block Diagram schematic of the setup used to measure the periodic non-linearity of the Attocube

    The problem is to estimate the periodic non-linearity of the Attocube from the imperfect measurements \(y_a\) and \(y_g\).

    - -

    -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. -

    +
    -
    -

    3.1. Simulations

    -
    +
    +

    4.2. Choice of the reference signal

    +
    +

    +The main specifications for the reference signal are; +

    +
      +
    • sweep several periods (i.e. several micrometers)
    • +
    • stay in the linear region of the strain gauge
    • +
    • no excitation of mechanical modes (i.e. the frequency content of the signal should be at low frequency)
    • +
    • no phase shift due to limited bandwidth of both the interferometers and the strain gauge
    • +
    • the full process should be quite fast
    • +
    + +

    +The travel range of the piezoelectric stacks is 15 micrometers, the resolution of the strain gauges is 0.3nm and the maximum non-linearity is 0.15%. +If one non-linear period is swept (765nm), the maximum estimation error of the strain gauge is around 1nm. +

    + +

    +Based on the above discussion, one suitable excitation signal is a sinusoidal sweep with a frequency of 10Hz. +

    +
    +
    + +
    +

    4.3. Repeatability of the non-linearity

    +
    +

    +Instead of calibrating the non-linear errors of the interferometers over the full fast jack stroke (25mm), one can only calibrate the errors of one period. +

    + +

    +For that, we need to make sure that the errors are repeatable from one period to the other and also the period should be very precisely estimated (i.e. the wavelength of the laser). +

    + +

    +Also, the laser wavelength should be very stable (specified at 50ppb). +

    + +

    +One way to precisely estimate the laser wavelength is to estimate the non linear errors of the interferometer at an initial position, and then to estimate the non linear errors at a large offset, say 10mm. +

    +
    +
    + +
    +

    4.4. Simulation

    +
    +

    +Suppose we have a first approximation of the non-linear period. +

    +
    +
    period_est = 765e-9;  % Estimated period [m]
    +
    +
    + +

    +And suppose the real period of the non-linear errors is a little bit above (by 0.02nm): +

    +
    +
    period_err = 0.02e-9; % Error on the period estimation [m]
    +period_nl = period_est + period_err; % Period of the non-linear errors [m]
    +
    +
    + +

    +The non-linear errors are first estimated at the beginning of the stroke (Figure 11). +

    + +
    +

    non_linear_errors_start_stroke.png +

    +

    Figure 11: Estimation of the non-linear errors at the beginning of the stroke

    +
    + +

    +From this only measurement, it is not possible to estimate with great accuracy the period of the error. +To do so, the same measurement is performed with a stroke of several millimeters (Figure 12). +

    + +

    +It can be seen that there is an offset between the estimated and the measured errors. +This is due to a mismatch between the estimated period and the true period of the error. +

    + + +
    +

    non_linear_errors_middle_stroke.png +

    +

    Figure 12: Estimated non-linear errors at a latter position

    +
    + +

    +Suppose the non-linear error is characterized by a periodic function \(\mathcal{E}\), to simplify let’s take a sinusoidal function (this can be generalized by taking the fourier transform of the function): +

    +\begin{equation} +\mathcal{E}(x) = \sin\left(\frac{x}{\lambda}\right) +\end{equation} +

    +with \(x\) the displacement and \(\lambda\) the period of the error. +

    + +

    +The measured error at \(x_0\) is then: +

    +\begin{equation} +\mathcal{E}_m(x_0) = \sin\left( \frac{x_0}{\lambda} \right) +\end{equation} +

    +And the estimated one is: +

    +\begin{equation} +\mathcal{E}_e(x_0) = \sin \left( \frac{x_0}{\lambda_{\text{est}}} \right) +\end{equation} +

    +with \(\lambda_{\text{est}}\) the estimated error’s period. +

    + +

    +From Figure 12, we can see that there is an offset between the two curves. +Let’s call this offset \(\epsilon_x\), we then have: +

    +\begin{equation} +\mathcal{E}_m(x_0) = \mathcal{E}_e(x_0 + \epsilon_x) +\end{equation} + +

    +Which gives us: +

    +\begin{equation} +\sin\left( \frac{x_0}{\lambda} \right) = \sin \left( \frac{x_0 + \epsilon_x}{\lambda_{\text{est}}} \right) +\end{equation} + +

    +Finally: +

    +\begin{equation} +\boxed{\lambda = \lambda_{\text{est}} \frac{x_0}{x_0 + \epsilon_x}} +\end{equation} + +

    +The estimated delay is computed: +

    +
    +
    %% Estimation of the offset between the estimated and measured errors
    +i_period = stroke > 5e-3-period_nl/2 & stroke < 5e-3+period_nl/2;
    +epsilon_x = finddelay(nl_errors(i_period), est_errors(i_period)) % [m]
    +
    +
    + +
    +Estimated delay x0 is -120 [nm]
    +
    + + +

    +And the period \(\lambda\) can be estimated: +

    +
    +
    %% Computation of the period [m]
    +period_fin = period_est * (5e-3)/(5e-3 + d_offset); % Estimated period after measurement [m]
    +
    +
    + +
    +The estimated period is 765.020 [nm]
    +
    + + +

    +And the results confirms that this method is working on paper. +

    + +

    +When doing this computation, we suppose that there are at most one half period of offset between the estimated and the measured non-linear (to not have any ambiguity whether the estimated period is too large or too small). +Mathematically this means that the displacement \(x_0\) should be smaller than: +

    +\begin{equation} +x_0 < \frac{1}{2} \cdot \lambda \cdot \frac{\lambda}{\epsilon_\lambda} +\end{equation} +

    +With \(\epsilon_\lambda\) the absolute estimation error of the period in meters. +

    + +

    +For instance, if we estimate the error on the period to be less than 0.1nm, the maximum displacement is: +

    +
    +
    %% Estimated maximum stroke [m]
    +max_x0 = 0.5 * 765e-9 * (765e-9)/(0.1e-9);
    +
    +
    + +
    +The maximum stroke is 2.9 [mm]
    +
    +
    +
    + +
    +

    4.5. Measurements

    +

    We have some constrains on the way the motion is imposed and measured:

    @@ -583,10 +1165,20 @@ Suppose we have the power spectral density (PSD) of both \(n_a\) and \(n_g\).
    + +
    +

    Bibliography

    +
    +
    +
    Ducourtieux, S., 2018. Toward high precision position control using laser interferometry: Main sources of error. https://doi.org/10.13140/rg.2.2.21044.35205
    +
    Thurner, K., Quacquarelli, F.P., Braun, P.-F., Dal Savio, C., Karrai, K., 2015. Fiber-based distance sensing interferometry. Applied optics 54, 3051–3063.
    +
    +
    +

    Author: Dehaeze Thomas

    -

    Created: 2022-01-05 mer. 10:28

    +

    Created: 2022-02-15 mar. 14:24

    diff --git a/dcm_metrology.org b/dcm_metrology.org index 56cdb03..9d82b4a 100644 --- a/dcm_metrology.org +++ b/dcm_metrology.org @@ -13,10 +13,12 @@ #+BIND: org-latex-image-default-option "scale=1" #+BIND: org-latex-image-default-width "" -#+LaTeX_CLASS: scrreprt -#+LaTeX_CLASS_OPTIONS: [a4paper, 10pt, DIV=12, parskip=full] -#+LaTeX_HEADER_EXTRA: \input{preamble.tex} -#+LATEX_HEADER_EXTRA: \bibliography{ref} +#+LATEX_CLASS: scrreprt +#+LATEX_CLASS_OPTIONS: [a4paper, 10pt, DIV=12, parskip=full] +#+LATEX_HEADER_EXTRA: \input{preamble.tex} + +#+bibliography: dcm-metrology.bib +#+cite_export: csl ~/.local/data/csl-styles/elsevier-harvard.csl #+PROPERTY: header-args:matlab :session *MATLAB* #+PROPERTY: header-args:matlab+ :comments org @@ -44,13 +46,22 @@ #+begin_export html
    -

    This report is also available as a pdf.

    +

    This report is also available as a pdf.


    #+end_export #+latex: \clearpage +* Introduction :ignore: + +In this document, the metrology system is studied. +First, in Section [[sec:metrology_concept]] the goal of the metrology system is stated and the proposed concept is described. +In order to increase the accuracy of the metrology system, two problems are to be dealt with: +- The deformation of the metrology frame under the action of gravity (Section [[sec:frame_deformations]]) +- The periodic non-linearity of the interferometers (Section [[sec:dcm_attocube_lut]]) + * Metrology Concept +<> ** Introduction :ignore: The goal of the metrology system is to measure the distance and default of parallelism orientation between the first and second crystals @@ -248,10 +259,87 @@ data2orgtable(G_111_t, ... From table [[fig:schematic_sensor_jacobian_forward_kinematics_2]], we can determine the effect of each interferometer on the estimated relative pose between the crystals. For instance, an error on =dr1= will have much greater impact on =ry= than an error on =drm=. +* Relation Between Crystal position and X-ray measured displacement +** Setup + +#+name: fig:calibration_setup +#+caption: Schematic of the setup +[[file:figs/calibration_setup.png]] + +Detector: + +https://www.baslerweb.com/en/products/cameras/area-scan-cameras/ace/aca1920-40gc/ + +Pixel size depends on the magnification used (1x, 6x, 12x). + +Pixel size of camera is 5.86 um x 5.86 um. +With typical magnification of 6x, pixel size is ~1.44um x 1.44um + +Frame rate is: 42 fps + +** Matlab Init :noexport:ignore: +#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) +<> +#+end_src + +#+begin_src matlab :exports none :results silent :noweb yes +<> +#+end_src + +#+begin_src matlab +bragg = pi/180*linspace(5,75,100); +#+end_src + +** Relation between second crystal motion and beam motion +*** Axial motion of second crystal +Let's consider the relation between the $[y, z]$ motion of the beam and the motion of the second crystal $[z^\prime, R_{y^\prime}, R_{x^\prime}]$. + +#+name: fig:relation_dz_output_beam +#+caption: Relation between $d_{z^\prime}$ motion of the second crystal and vertical motion of the beam +[[file:figs/relation_dz_output_beam.png]] + +\begin{equation} + d_z = d_{z^\prime} 2 \cos \theta +\end{equation} + +#+begin_src matlab :exports none :results none +%% Relation between vertical motion of the second crystal and vertical motion of the output beam +figure; +hold on; +plot(180/pi*bragg, 2*cos(bragg)) +xlabel('Bragg [deg]'); ylabel('Motion amplification'); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/relation_vert_motion_crystal_beam.pdf', 'width', 'wide', 'height', 'normal'); +#+end_src + +#+name: fig:relation_vert_motion_crystal_beam +#+caption: Relation between vertical motion of the second crystal and vertical motion of the output beam +#+RESULTS: +[[file:figs/relation_vert_motion_crystal_beam.png]] + +*** Ry motion of second crystal + +\begin{equation} +d_z = D_{\text{vlm}} d_{R_y^\prime} +\end{equation} + +with $D_{\text{vlm}} \approx 10\,m$. + +*** Rx motion of second crystal + +\begin{equation} +d_y = 2 D_{\text{vlm}} \sin \theta \cdot d_{R_x^\prime} +\end{equation} + + + * Deformations of the Metrology Frame +<> ** Introduction :ignore: -The transformation matrix in Table [[fig:schematic_sensor_jacobian_forward_kinematics_2]] is valid only if the metrology frames are solid bodies. +The transformation matrix in Table [[tab:transformation_matrix]] is valid only if the metrology frames are solid bodies. The metrology frame itself is experiencing some deformations due to the gravity. When the bragg axis is scanned, the effect of gravity on the metrology frame is changing and this introduce some measurement errors. @@ -275,6 +363,372 @@ This may be done using FE software. ** Comparison +** Matlab Init :noexport:ignore: +#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) +<> +#+end_src + +#+begin_src matlab :exports none :results silent :noweb yes +<> +#+end_src + +#+begin_src matlab :tangle no :noweb yes +<> +#+end_src + +#+begin_src matlab :eval no :noweb yes +<> +#+end_src + +#+begin_src matlab :noweb yes +<> +#+end_src + +** Test +#+begin_src matlab +aa = importdata("correctInterf-vlm-220201.dat"); +#+end_src + +#+begin_src matlab +figure; +plot(aa.data(:,1), aa.data(:,24)) +#+end_src + +** Measured frame deformation + +#+begin_src matlab +data = table2array(readtable('itf_polynom.csv','NumHeaderLines',1)); +th = pi/180*data(:,1); % [rad] +fj = 0.030427 - 10.51e-3./(2*cos(th)); % [m] +rx2 = 1e-9*data(:,2); % [rad] +ry2 = 1e-9*data(:,3); % [rad] +rx1 = 1e-9*data(:,4); % [rad] +ry1 = 1e-9*data(:,5); % [rad] +#+end_src + +#+begin_src matlab +figure; +hold on; +plot(180/pi*th, 1e6*detrend(-rx2, 1), '.') +% plot(180/pi*th, detrend(ry2, 1)) +% plot(180/pi*th, detrend(rx1, 1)) +% plot(180/pi*th, detrend(ry1, 1)) +hold off; +xlabel('Bragg Angle [deg]'); +ylabel('Measured $R_x$ [$\mu$rad]') +xlim([10, 75]); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/calibration_drx_pres.pdf', 'width', 'full', 'height', 'normal'); +#+end_src + +#+name: fig:calibration_drx_pres +#+caption: description +#+RESULTS: +[[file:figs/calibration_drx_pres.png]] + + +Strange that there is correlation between Rx and Ry. +#+begin_src matlab +figure; +hold on; +plot(108/pi*th, 1e9*detrend(rx1, 0), '-', 'DisplayName', '$Rx_1$') +plot(108/pi*th, 1e9*detrend(ry1, 0), '-', 'DisplayName', '$Ry_1$') +hold off; +xlabel('Bragg Angle [deg]'); ylabel('Angle Offset [nrad]'); +legend() +#+end_src + +#+begin_src matlab +figure; +hold on; +plot(1e3*fj, detrend(rx2, 1), 'DisplayName', '$Rx_1$') +plot(1e3*fj, detrend(ry2, 1), 'DisplayName', '$Ry_1$') +hold off; +xlabel('Fast Jack Displacement [mm]'); ylabel('Angle Offset [nrad]'); +legend() +#+end_src + +#+begin_src matlab +%% Compute best polynomial fit +f_rx2 = fit(180/pi*th, 1e9*rx2, 'poly4'); +f_ry2 = fit(180/pi*th, 1e9*ry2, 'poly4'); +f_rx1 = fit(180/pi*th, 1e9*rx1, 'poly4'); +f_ry1 = fit(180/pi*th, 1e9*ry1, 'poly4'); +#+end_src + +#+begin_src matlab +figure; +hold on; +plot(180/pi*th, f_rx2(180/pi*th)) +plot(180/pi*th, f_ry2(180/pi*th)) +plot(180/pi*th, f_rx1(180/pi*th)) +plot(180/pi*th, f_ry1(180/pi*th)) +hold off; +#+end_src + +#+begin_src matlab +figure; +hold on; +plot(th, f_rx2(th) - rx2) +plot(th, f_ry2(th) - ry2) +plot(th, f_rx1(th) - rx1) +plot(th, f_ry1(th) - ry1) +hold off; +#+end_src + +#+begin_src matlab +figure; +hold on; +plot(th, f(th)) +plot(th, rx2, '.') +#+end_src + +** Test +#+begin_src matlab +filename = "/home/thomas/mnt/data_id21/22Jan/blc13550/id21/test_xtal1_interf/test_xtal1_interf_0001/test_xtal1_interf_0001.h5"; +#+end_src + +#+begin_src matlab +data = struct(); + +data.xtal1_111_u = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM4/data')); +data.xtal1_111_m = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM5/data')); +data.xtal1_111_d = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM6/data')); +data.mframe_u = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM3/data')); +data.mframe_dh = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM4/data')); +data.mframe_dr = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM5/data')); +data.bragg = (pi/180)*double(h5read(filename, '/7.1/instrument/FPGA2_SSIM6/data')); +data.fj_pos = 0.030427 - 10.5e-3./(2*cos(data.bragg)); +data.time = double(h5read(filename, '/7.1/instrument/time/data')); +data.rx = 1e-9*double(h5read(filename, '/7.1/instrument/xtal1_111_rx/data')); +data.ry = 1e-9*double(h5read(filename, '/7.1/instrument/xtal1_111_ry/data')); +data.z = 1e-9*double(h5read(filename, '/7.1/instrument/xtal1_111_z/data')); +data.drx = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_drx_filter/data')); +data.dry = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_dry_filter/data')); +data.dz = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_dz_filter/data')); +data.xtal2_111_u = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM10/data'))+10.5e6./(2*cos(data.bragg)); +data.xtal2_111_m = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM1/data'))+10.5e6./(2*cos(data.bragg)); +data.xtal2_111_d = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM2/data'))+10.5e6./(2*cos(data.bragg)); +#+end_src + +#+begin_src matlab :exports none +%% Drifts of the metrology as a function of Bragg Angle +figure; +tiledlayout(1, 3, 'TileSpacing', 'Compact', 'Padding', 'None'); + +ax1 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.mframe_dh, 0)) +plot(180/pi*data.bragg, detrend(data.mframe_u, 0)) +plot(180/pi*data.bragg, detrend(data.mframe_dr, 0)) +hold off; +xlabel('Bragg [deg]'); ylabel('Drift [nm]'); + +ax2 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.mframe_dh, 1)) +plot(180/pi*data.bragg, detrend(data.mframe_u, 1)) +plot(180/pi*data.bragg, detrend(data.mframe_dr, 1)) +hold off; +xlabel('Bragg [deg]'); set(gca, 'YTickLabel',[]); + +ax3 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.mframe_dh, 2), 'DisplayName', 'dh') +plot(180/pi*data.bragg, detrend(data.mframe_u, 2), 'DisplayName', 'u') +plot(180/pi*data.bragg, detrend(data.mframe_dr, 2), 'DisplayName', 'dr') +hold off; +xlabel('Bragg [deg]'); set(gca, 'YTickLabel',[]); +legend(); + +linkaxes([ax1,ax2,ax3], 'xy'); +xlim([10, 70]); ylim([-50, 50]); +#+end_src + +#+begin_src matlab :exports none +%% Drifts of the first crystal as a function of Bragg Angle +figure; +tiledlayout(1, 3, 'TileSpacing', 'Compact', 'Padding', 'None'); + +ax1 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.xtal1_111_u, 0)) +plot(180/pi*data.bragg, detrend(data.xtal1_111_m, 0)) +plot(180/pi*data.bragg, detrend(data.xtal1_111_d, 0)) +hold off; +xlabel('Bragg [deg]'); ylabel('Drift [nm]'); + +ax2 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.xtal1_111_u, 1)) +plot(180/pi*data.bragg, detrend(data.xtal1_111_m, 1)) +plot(180/pi*data.bragg, detrend(data.xtal1_111_d, 1)) +hold off; +xlabel('Bragg [deg]'); set(gca, 'YTickLabel',[]); + +ax3 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.xtal1_111_u, 2), 'DisplayName', 'u') +plot(180/pi*data.bragg, detrend(data.xtal1_111_m, 2), 'DisplayName', 'm') +plot(180/pi*data.bragg, detrend(data.xtal1_111_d, 2), 'DisplayName', 'd') +hold off; +xlabel('Bragg [deg]'); set(gca, 'YTickLabel',[]); +legend(); + +linkaxes([ax1,ax2,ax3], 'xy'); +xlim([10, 70]); ylim([-1000, 1000]); +#+end_src + +#+begin_src matlab :exports none :results none +%% Drifts of the second crystal as a function of Bragg Angle +figure; +tiledlayout(1, 3, 'TileSpacing', 'Compact', 'Padding', 'None'); + +ax1 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.xtal2_111_u, 0)) +plot(180/pi*data.bragg, detrend(data.xtal2_111_m, 0)) +plot(180/pi*data.bragg, detrend(data.xtal2_111_d, 0)) +hold off; +xlabel('Bragg [deg]'); ylabel('Drift [nm]') + +ax2 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.xtal2_111_u, 1)) +plot(180/pi*data.bragg, detrend(data.xtal2_111_m, 1)) +plot(180/pi*data.bragg, detrend(data.xtal2_111_d, 1)) +hold off; +xlabel('Bragg [deg]'); set(gca, 'YTickLabel',[]); + +ax3 = nexttile(); +hold on; +plot(180/pi*data.bragg, detrend(data.xtal2_111_u, 2)) +plot(180/pi*data.bragg, detrend(data.xtal2_111_m, 2)) +plot(180/pi*data.bragg, detrend(data.xtal2_111_d, 2)) +hold off; +xlabel('Bragg [deg]'); set(gca, 'YTickLabel',[]); + +linkaxes([ax1,ax2,ax3], 'xy'); +xlim([10, 70]); ylim([-1000, 1000]); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/drifts_xtal2_detrend.pdf', 'width', 'full', 'height', 'normal'); +#+end_src + +#+name: fig:drifts_xtal2_detrend +#+caption: Drifts of the second crystal as a function of Bragg Angle +#+RESULTS: +[[file:figs/drifts_xtal2_detrend.png]] + +#+begin_src matlab :exports none :results none +%% Drifts of the second crystal as a function of Bragg Angle +figure; +tiledlayout(1, 3, 'TileSpacing', 'Compact', 'Padding', 'None'); + +ax1 = nexttile(); +hold on; +plot(1e3*data.dz, detrend(data.xtal2_111_u, 0)) +plot(1e3*data.dz, detrend(data.xtal2_111_m, 0)) +plot(1e3*data.dz, detrend(data.xtal2_111_d, 0)) +hold off; +xlabel('FJ position [mm]'); ylabel('Drift [nrad]') + +ax2 = nexttile(); +hold on; +plot(1e3*data.dz, detrend(data.xtal2_111_u, 1)) +plot(1e3*data.dz, detrend(data.xtal2_111_m, 1)) +plot(1e3*data.dz, detrend(data.xtal2_111_d, 1)) +hold off; +xlabel('FJ position [mm]'); set(gca, 'YTickLabel',[]); + +ax3 = nexttile(); +hold on; +plot(1e3*data.dz, detrend(data.xtal2_111_u, 2)) +plot(1e3*data.dz, detrend(data.xtal2_111_m, 2)) +plot(1e3*data.dz, detrend(data.xtal2_111_d, 2)) +hold off; +xlabel('FJ position [mm]'); set(gca, 'YTickLabel',[]); + +linkaxes([ax1,ax2,ax3], 'xy'); +% xlim([10, 40]); ylim([-1000, 1000]); +#+end_src + +#+begin_src matlab +figure; +hold on; +plot(108/pi*data.bragg, data.drx) +plot(108/pi*data.bragg, data.dry) +hold off; +#+end_src + +** Repeatability of frame deformation +#+begin_src matlab +filename = "/home/thomas/mnt/data_id21/22Jan/blc13550/id21/test_xtal1_interf/test_xtal1_interf_0001/test_xtal1_interf_0001.h5"; +#+end_src + +#+begin_src matlab +data_1 = struct(); +data_1.time = double(h5read(filename, '/7.1/instrument/time/data')); +data_1.bragg = (pi/180)*double(h5read(filename, '/7.1/instrument/FPGA2_SSIM6/data')); +data_1.fj_pos = 0.030427 - 10.5e-3./(2*cos(data_1.bragg)); +data_1.xtal1_111_u = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM4/data')); +data_1.xtal1_111_m = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM5/data')); +data_1.xtal1_111_d = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM6/data')); +data_1.xtal2_111_u = double(h5read(filename, '/7.1/instrument/FPGA1_SSIM10/data'))+10.5e6./(2*cos(data_1.bragg)); +data_1.xtal2_111_m = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM1/data'))+10.5e6./(2*cos(data_1.bragg)); +data_1.xtal2_111_d = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM2/data'))+10.5e6./(2*cos(data_1.bragg)); +data_1.mframe_u = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM3/data')); +data_1.mframe_dh = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM4/data')); +data_1.mframe_dr = double(h5read(filename, '/7.1/instrument/FPGA2_SSIM5/data')); +data_1.drx = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_drx_filter/data')); +data_1.dry = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_dry_filter/data')); +data_1.dz = 1e-9*double(h5read(filename, '/7.1/instrument/xtal_111_dz_filter/data')); +#+end_src + +#+begin_src matlab +data_2 = struct(); +data_2.time = double(h5read(filename, '/6.1/instrument/time/data')); +data_2.bragg = (pi/180)*double(h5read(filename, '/6.1/instrument/FPGA2_SSIM6/data')); +data_2.fj_pos = 0.030427 - 10.5e-3./(2*cos(data_2.bragg)); +data_2.xtal1_111_u = double(h5read(filename, '/6.1/instrument/FPGA1_SSIM4/data')); +data_2.xtal1_111_m = double(h5read(filename, '/6.1/instrument/FPGA1_SSIM5/data')); +data_2.xtal1_111_d = double(h5read(filename, '/6.1/instrument/FPGA1_SSIM6/data')); +data_2.xtal2_111_u = double(h5read(filename, '/6.1/instrument/FPGA1_SSIM10/data'))+10.5e6./(2*cos(data_2.bragg)); +data_2.xtal2_111_m = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM1/data'))+10.5e6./(2*cos(data_2.bragg)); +data_2.xtal2_111_d = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM2/data'))+10.5e6./(2*cos(data_2.bragg)); +data_2.mframe_u = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM3/data')); +data_2.mframe_dh = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM4/data')); +data_2.mframe_dr = double(h5read(filename, '/6.1/instrument/FPGA2_SSIM5/data')); +data_2.drx = 1e-9*double(h5read(filename, '/6.1/instrument/xtal_111_drx_filter/data')); +data_2.dry = 1e-9*double(h5read(filename, '/6.1/instrument/xtal_111_dry_filter/data')); +data_2.dz = 1e-9*double(h5read(filename, '/6.1/instrument/xtal_111_dz_filter/data')); +#+end_src + +#+begin_src matlab :exports none +figure; +hold on; +plot(180/pi*data_1.bragg, data_1.mframe_dh) +plot(180/pi*data_2.bragg, data_2.mframe_dh) +hold off; +#+end_src + +#+begin_src matlab :exports none +figure; +hold on; +plot(1e3*data_1.fj_pos, data_1.xtal1_111_u) +plot(1e3*data_2.fj_pos, data_2.xtal1_111_u) +#+end_src + +#+begin_src matlab :exports none +figure; +hold on; +plot(data_1.bragg, data_1.mframe_u) +plot(data_2.bragg, data_2.mframe_u) +#+end_src + * Attocube - Periodic Non-Linearity :PROPERTIES: :header-args:matlab+: :tangle matlab/dcm_attocube_lut.m @@ -283,61 +737,17 @@ This may be done using FE software. ** 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. +Interferometers have some periodic nonlinearity [cite:@thurner15_fiber_based_distan_sensin_inter]. +The period is a fraction of the wavelength (usually $\lambda/2$) and can be due to polarization mixing, non perfect alignment of the optical components and unwanted reflected beams [cite:See @ducourtieux18_towar_high_precis_posit_contr page 67 to 69;@thurner15_fiber_based_distan_sensin_inter;]. +The amplitude of the nonlinearity can vary from a fraction of a nanometer to tens of nanometers. -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. +In the DCM case, when using Attocube interferometers, the period non-linearity are in the order of several nanometers with a period of $765\,nm$. +This is inducing some positioning errors which are too high. -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 measurements $y_a$ and $y_g$. - -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. +In order to overcome this issue, the periodic non-linearity of the interferometers have to be calibrated. +To do so, a displacement is imposed and measured both by the interferometers and by another metrology system which does not have this nonlinearity. +By comparing the two measured displacements, the nonlinearity can be calibration. +This process is performed over several periods in order to characterize the error over the full stroke. ** Matlab Init :noexport:ignore: #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) @@ -360,7 +770,245 @@ It is typically between 5nm peak to peak and 20nm peak to peak. <> #+end_src -** Simulations +** Measurement Setup +The metrology that will be compared with the interferometers are the strain gauges incorporated in the PI piezoelectric stacks. + +It is here supposed that the measured displacement by the strain gauges are converted to the displacement at the interferometer locations. +It is also supposed that we are at a certain Bragg angle, and that the stepper motors are not moving: only the piezoelectric actuators are used. + +#+begin_note +Note that the strain gauges are measuring the relative displacement of the piezoelectric stacks while the interferometers are measuring the relative motion between the second crystals and the metrology frame. + +Only the interferometers measuring the second crystal motion can be calibrated here. + +As any deformations of the metrology frame of deformation of the crystal's support can degrade the quality of the calibration, it is better to perform this calibration without any bragg angle motion. +#+end_note + +The setup is schematically with the block diagram in Figure [[fig:block_diagram_lut_attocube]]. + +The signals are: +- $u$: Reference Signal sent to the PI controller (position where we wish to three stacks to be). + The PI controller takes care or controlling to position as measured by the strain gauges such that it is close to the reference position. +- $d$: Disturbances affecting the position of the crystals +- $y$: Displacement of the crystal as measured by one interferometer +- $y_g$: Measurement of the motion in the frame of the interferometer 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[block, align=center, right=1 of G] (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.north) + (0, 1.0)$) node[below right]{$d$} -- (G.north); + \draw[->] (G.east) -- (non_linearity.west); + \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[->] ($(G.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 measurements $y_a$ and $y_g$. + +** Choice of the reference signal + +The main specifications for the reference signal are; +- sweep several periods (i.e. several micrometers) +- stay in the linear region of the strain gauge +- no excitation of mechanical modes (i.e. the frequency content of the signal should be at low frequency) +- no phase shift due to limited bandwidth of both the interferometers and the strain gauge +- the full process should be quite fast + +The travel range of the piezoelectric stacks is 15 micrometers, the resolution of the strain gauges is 0.3nm and the maximum non-linearity is 0.15%. +If one non-linear period is swept (765nm), the maximum estimation error of the strain gauge is around 1nm. + +Based on the above discussion, one suitable excitation signal is a sinusoidal sweep with a frequency of 10Hz. + +** Repeatability of the non-linearity + +Instead of calibrating the non-linear errors of the interferometers over the full fast jack stroke (25mm), one can only calibrate the errors of one period. + +For that, we need to make sure that the errors are repeatable from one period to the other and also the period should be very precisely estimated (i.e. the wavelength of the laser). + +Also, the laser wavelength should be very stable (specified at 50ppb). + +One way to precisely estimate the laser wavelength is to estimate the non linear errors of the interferometer at an initial position, and then to estimate the non linear errors at a large offset, say 10mm. + +** Simulation +Suppose we have a first approximation of the non-linear period. +#+begin_src matlab +period_est = 765e-9; % Estimated period [m] +#+end_src + +And suppose the real period of the non-linear errors is a little bit above (by 0.02nm): +#+begin_src matlab +period_err = 0.02e-9; % Error on the period estimation [m] +period_nl = period_est + period_err; % Period of the non-linear errors [m] +#+end_src + +#+begin_src matlab :exports none +displacement_step = 1e-8; +stroke = 0:displacement_step:25e-3; % Measured Stroke [m] + +nl_errors = 5e-9*sin(2*pi*stroke/period_nl) + ... + 3e-9*sin(2*pi*2*stroke/period_nl) - ... + 1e-9*sin(2*pi*3*stroke/period_nl); % Measured non-linear errors [m] + +est_errors = 5e-9*sin(2*pi*stroke/period_est) + ... + 3e-9*sin(2*pi*2*stroke/period_est) - ... + 1e-9*sin(2*pi*3*stroke/period_est); % Estimated non-linear errors [m] +#+end_src + +The non-linear errors are first estimated at the beginning of the stroke (Figure [[fig:non_linear_errors_start_stroke]]). +#+begin_src matlab :exports none +%% Measured errors at the begining of the stroke +figure; +plot(1e9*stroke, 1e9*nl_errors); +xlabel('Displacement [nm]'); ylabel('Non linearity [nm]'); +xlim([0, 1e9*period_nl]); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/non_linear_errors_start_stroke.pdf', 'width', 'wide', 'height', 'normal'); +#+end_src + +#+name: fig:non_linear_errors_start_stroke +#+caption: Estimation of the non-linear errors at the beginning of the stroke +#+RESULTS: +[[file:figs/non_linear_errors_start_stroke.png]] + +From this only measurement, it is not possible to estimate with great accuracy the period of the error. +To do so, the same measurement is performed with a stroke of several millimeters (Figure [[fig:non_linear_errors_middle_stroke]]). + +It can be seen that there is an offset between the estimated and the measured errors. +This is due to a mismatch between the estimated period and the true period of the error. + +#+begin_src matlab :exports none +%% Comparison of the estimated error and measured error +figure; +hold on; +plot(1e3*stroke, 1e9*nl_errors, ... + 'DisplayName', 'Measured Errors'); +plot(1e3*stroke, 1e9*est_errors, '--', ... + 'DisplayName', 'Estimated Errors'); +hold off; +xlabel('Displacement [mm]'); ylabel('Non linearity [nm]'); +xlim([1e3*(5e-3-period_nl/2), 1e3*(5e-3+period_nl/2)]); +legend('location', 'southeast'); +#+end_src + +#+begin_src matlab :tangle no :exports results :results file replace +exportFig('figs/non_linear_errors_middle_stroke.pdf', 'width', 'wide', 'height', 'normal'); +#+end_src + +#+name: fig:non_linear_errors_middle_stroke +#+caption: Estimated non-linear errors at a latter position +#+RESULTS: +[[file:figs/non_linear_errors_middle_stroke.png]] + +Suppose the non-linear error is characterized by a periodic function $\mathcal{E}$, to simplify let's take a sinusoidal function (this can be generalized by taking the fourier transform of the function): +\begin{equation} +\mathcal{E}(x) = \sin\left(\frac{x}{\lambda}\right) +\end{equation} +with $x$ the displacement and $\lambda$ the period of the error. + +The measured error at $x_0$ is then: +\begin{equation} +\mathcal{E}_m(x_0) = \sin\left( \frac{x_0}{\lambda} \right) +\end{equation} +And the estimated one is: +\begin{equation} +\mathcal{E}_e(x_0) = \sin \left( \frac{x_0}{\lambda_{\text{est}}} \right) +\end{equation} +with $\lambda_{\text{est}}$ the estimated error's period. + +From Figure [[fig:non_linear_errors_middle_stroke]], we can see that there is an offset between the two curves. +Let's call this offset $\epsilon_x$, we then have: +\begin{equation} +\mathcal{E}_m(x_0) = \mathcal{E}_e(x_0 + \epsilon_x) +\end{equation} + +Which gives us: +\begin{equation} +\sin\left( \frac{x_0}{\lambda} \right) = \sin \left( \frac{x_0 + \epsilon_x}{\lambda_{\text{est}}} \right) +\end{equation} + +Finally: +\begin{equation} +\boxed{\lambda = \lambda_{\text{est}} \frac{x_0}{x_0 + \epsilon_x}} +\end{equation} + +The estimated delay is computed: +#+begin_src matlab +%% Estimation of the offset between the estimated and measured errors +i_period = stroke > 5e-3-period_nl/2 & stroke < 5e-3+period_nl/2; +epsilon_x = finddelay(nl_errors(i_period), est_errors(i_period)) % [m] +#+end_src + +#+begin_src matlab :results value replace :exports results :tangle no +ans = sprintf('Estimated delay x0 is %.0f [nm]', 1e9*displacement_step*epsilon_x) +#+end_src + +#+RESULTS: +: Estimated delay x0 is -120 [nm] + +And the period $\lambda$ can be estimated: +#+begin_src matlab +%% Computation of the period [m] +period_fin = period_est * (5e-3)/(5e-3 + d_offset); % Estimated period after measurement [m] +#+end_src + +#+begin_src matlab :results value replace :exports results :tangle no +ans = sprintf('The estimated period is %.3f [nm]', 1e9*period_fin) +#+end_src + +#+RESULTS: +: The estimated period is 765.020 [nm] + +And the results confirms that this method is working on paper. + +When doing this computation, we suppose that there are *at most* one half period of offset between the estimated and the measured non-linear (to not have any ambiguity whether the estimated period is too large or too small). +Mathematically this means that the displacement $x_0$ should be smaller than: +\begin{equation} +x_0 < \frac{1}{2} \cdot \lambda \cdot \frac{\lambda}{\epsilon_\lambda} +\end{equation} +With $\epsilon_\lambda$ the absolute estimation error of the period in meters. + +For instance, if we estimate the error on the period to be less than 0.1nm, the maximum displacement is: +#+begin_src matlab +%% Estimated maximum stroke [m] +max_x0 = 0.5 * 765e-9 * (765e-9)/(0.1e-9); +#+end_src + +#+begin_src matlab :results value replace :exports results :tangle no +ans = sprintf('The maximum stroke is %.1f [mm]', 1e3*max_x0) +#+end_src + +#+RESULTS: +: The maximum stroke is 2.9 [mm] + +** Measurements + 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. @@ -402,5 +1050,9 @@ colors = colororder; freqs = logspace(1, 3, 1000); #+END_SRC -* Bibliography :ignore: -#+latex: \printbibliography +* Bibliography +:PROPERTIES: +:UNNUMBERED: t +:END: + +#+print_bibliography: diff --git a/figs/block_diagram_lut_attocube.pdf b/figs/block_diagram_lut_attocube.pdf index 3bc660b..777677a 100644 Binary files a/figs/block_diagram_lut_attocube.pdf 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 index 99afe55..b6b41d1 100644 Binary files a/figs/block_diagram_lut_attocube.png 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 index 65cb006..7373edf 100644 --- a/figs/block_diagram_lut_attocube.svg +++ b/figs/block_diagram_lut_attocube.svg @@ -1,5 +1,5 @@ - + @@ -109,173 +109,162 @@ - + - + - - - - + - - + + - + - - - + + + - - - + + + - + - - - - - - + + + + + + - - - - - + + + + + - + - + - + - + - + - + - - - - - + - - - - + + + + - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + - + - + - + - + - + - + + + + + + + + + + + + + + + + + - + - - + - - - - - - - + - - - - + + + + + + + + + + + + + + + + - + - + - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/figs/calibration_drx_pres.pdf b/figs/calibration_drx_pres.pdf new file mode 100644 index 0000000..5deedc3 Binary files /dev/null and b/figs/calibration_drx_pres.pdf differ diff --git a/figs/calibration_drx_pres.png b/figs/calibration_drx_pres.png new file mode 100644 index 0000000..9bd41da Binary files /dev/null and b/figs/calibration_drx_pres.png differ diff --git a/figs/calibration_setup.pdf b/figs/calibration_setup.pdf new file mode 100644 index 0000000..f1f35b2 Binary files /dev/null and b/figs/calibration_setup.pdf differ diff --git a/figs/calibration_setup.png b/figs/calibration_setup.png new file mode 100644 index 0000000..e835593 Binary files /dev/null and b/figs/calibration_setup.png differ diff --git a/figs/calibration_setup.svg b/figs/calibration_setup.svg new file mode 100644 index 0000000..12065d1 --- /dev/null +++ b/figs/calibration_setup.svg @@ -0,0 +1,695 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DCM + VLM + Camera + Zoom + + + + + + + + FluorescentScreen + + + + + + + + + + + + + + + + x + z + + + y + + + + + + x' + z' + + + y' + + + + + + x" + z" + + + y" + + + + + + diff --git a/figs/drifts_xtal2_detrend.pdf b/figs/drifts_xtal2_detrend.pdf new file mode 100644 index 0000000..ce3a381 Binary files /dev/null and b/figs/drifts_xtal2_detrend.pdf differ diff --git a/figs/drifts_xtal2_detrend.png b/figs/drifts_xtal2_detrend.png new file mode 100644 index 0000000..adf7d39 Binary files /dev/null and b/figs/drifts_xtal2_detrend.png differ diff --git a/figs/non_linear_errors_middle_stroke.pdf b/figs/non_linear_errors_middle_stroke.pdf new file mode 100644 index 0000000..cf8e272 Binary files /dev/null and b/figs/non_linear_errors_middle_stroke.pdf differ diff --git a/figs/non_linear_errors_middle_stroke.png b/figs/non_linear_errors_middle_stroke.png new file mode 100644 index 0000000..917b556 Binary files /dev/null and b/figs/non_linear_errors_middle_stroke.png differ diff --git a/figs/non_linear_errors_start_stroke.pdf b/figs/non_linear_errors_start_stroke.pdf new file mode 100644 index 0000000..8bce817 Binary files /dev/null and b/figs/non_linear_errors_start_stroke.pdf differ diff --git a/figs/non_linear_errors_start_stroke.png b/figs/non_linear_errors_start_stroke.png new file mode 100644 index 0000000..dcbd6dc Binary files /dev/null and b/figs/non_linear_errors_start_stroke.png differ diff --git a/figs/relation_dz_output_beam.pdf b/figs/relation_dz_output_beam.pdf new file mode 100644 index 0000000..f04629d Binary files /dev/null and b/figs/relation_dz_output_beam.pdf differ diff --git a/figs/relation_dz_output_beam.png b/figs/relation_dz_output_beam.png new file mode 100644 index 0000000..9ad3027 Binary files /dev/null and b/figs/relation_dz_output_beam.png differ diff --git a/figs/relation_dz_output_beam.svg b/figs/relation_dz_output_beam.svg new file mode 100644 index 0000000..90264a0 --- /dev/null +++ b/figs/relation_dz_output_beam.svg @@ -0,0 +1,496 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + x + z + + + y + + + + + + x' + z' + + + y' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/figs/relation_vert_motion_crystal_beam.pdf b/figs/relation_vert_motion_crystal_beam.pdf new file mode 100644 index 0000000..11ca977 Binary files /dev/null and b/figs/relation_vert_motion_crystal_beam.pdf differ diff --git a/figs/relation_vert_motion_crystal_beam.png b/figs/relation_vert_motion_crystal_beam.png new file mode 100644 index 0000000..bbe11c4 Binary files /dev/null and b/figs/relation_vert_motion_crystal_beam.png differ diff --git a/figs/relation_vert_motion_roll.pdf b/figs/relation_vert_motion_roll.pdf new file mode 100644 index 0000000..f871b30 Binary files /dev/null and b/figs/relation_vert_motion_roll.pdf differ diff --git a/figs/relation_vert_motion_roll.png b/figs/relation_vert_motion_roll.png new file mode 100644 index 0000000..953932d Binary files /dev/null and b/figs/relation_vert_motion_roll.png differ diff --git a/figs/schematic_dcm_overview.svg b/figs/schematic_dcm_overview.svg new file mode 100644 index 0000000..4ea0aeb --- /dev/null +++ b/figs/schematic_dcm_overview.svg @@ -0,0 +1,1054 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "White Beam" + + Source + + + + Fix Exit + + Monochromatic + + + Sample + + PositioningStage + + diff --git a/index.html b/index.html new file mode 120000 index 0000000..6ae78a7 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +dcm-metrology.html \ No newline at end of file diff --git a/ref.bib b/ref.bib deleted file mode 100644 index ec616ff..0000000 --- a/ref.bib +++ /dev/null @@ -1,11 +0,0 @@ -@article{fleming10_integ_strain_force_feedb_high, - author = {Fleming, Andrew J and Leang, Kam K}, - title = {Integrated Strain and Force Feedback for High-Performance - Control of Piezoelectric Actuators}, - journal = {Sensors and Actuators A: Physical}, - volume = 161, - number = {1-2}, - pages = {256--265}, - year = 2010, - publisher = {Elsevier} -}
    Table 4: Transformation Matrix