2019-03-14 16:40:28 +01:00
#+TITLE :Static Measurements
2019-05-14 10:04:13 +02:00
:DRAWER:
#+STARTUP : overview
2019-03-15 11:48:56 +01:00
2019-05-14 10:04:13 +02:00
#+LANGUAGE : en
#+EMAIL : dehaeze.thomas@gmail.com
#+AUTHOR : Dehaeze Thomas
#+HTML_LINK_HOME : ../index.html
2020-11-12 10:30:56 +01:00
#+HTML_LINK_UP : ../index.html
2019-05-14 10:04:13 +02:00
2020-11-12 10:30:56 +01:00
#+HTML_HEAD : <link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
#+HTML_HEAD : <script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
2019-05-14 10:04:13 +02:00
#+HTML_MATHJAX : align: center tagside: right font: TeX
#+PROPERTY : header-args:matlab :session *MATLAB*
#+PROPERTY : header-args:matlab+ :comments org
#+PROPERTY : header-args:matlab+ :results none
#+PROPERTY : header-args:matlab+ :exports both
#+PROPERTY : header-args:matlab+ :eval no-export
#+PROPERTY : header-args:matlab+ :output-dir figs
#+PROPERTY : header-args:shell :eval no-export
:END:
2019-05-17 10:04:35 +02:00
* Measurement description
** Setup :ignore:
*Setup* :
Each stage is statically moved of all its stroke on after the other.
A metrology element is located at the sample position and its motion is measured in translations and rotations.
For each small displacement, the stage is stopped and the motion of the sample is recorded and averaged.
2019-05-14 10:04:13 +02:00
The report by H-P van der Kleij on the static measurement of the ID31 station is available [[file:data/ID31_report_static_meas.pdf ][here ]].
2019-05-14 23:02:36 +02:00
| *Date* | 2019-01-09 |
| *Sensors* | Interferometer |
| *Location* | Experimental Hutch |
2019-05-17 10:04:35 +02:00
** Goal :ignore:
*Goal* :
The goal here is to analyze the static measurement on the station (guiding error of each stage) and convert them to dynamic disturbances that can be use in the model of the micro-station.
2019-05-14 23:02:36 +02:00
2019-05-14 10:04:13 +02:00
* Static measurement of the translation stage
:PROPERTIES:
:header-args:matlab+: :tangle matlab/static_ty.m
:header-args:matlab+: :comments org :mkdirp yes
:END:
<<sec:static_ty >>
2019-05-14 16:59:02 +02:00
** ZIP file containing the data and matlab files :ignore:
2019-05-14 10:04:13 +02:00
#+begin_src bash :exports none :results none
if [ matlab/static_ty.m -nt data/static_ty.zip ]; then
cp matlab/static_ty.m static_ty.m;
zip data/static_ty \
mat/data_tyz.txt \
static_ty.m
rm static_ty.m;
fi
#+end_src
#+begin_note
All the files (data and Matlab scripts) are accessible [[file:data/static_ty.zip ][here ]].
#+end_note
** Notes
2019-03-14 16:40:28 +01:00
- *5530* : Straightness Plot: Yz
- *Filename* : =r:\home\PDMU\PEL\Measurement_library\ID31\ID31_u_station\TY\12_12_2018\linear deviation _tyz_401_points.txt=
- *Acquisition date* : 09/01/2019 13:49:42
- *Current date* : 08/03/2019 08:46:35
- *Measurement Type* : STRAIGHTNESS vertical
- *Travel Mode* : Bidirectional
- *Number of Target Positions* : 401
- *Number of total data pairs* : 2406
- *Number of total data runs* :6
- *Position Value Units* : millimeters
- *Error Value Units* : micrometers
| Environmental Data | Min | Max | Avg |
|--------------------+--------+--------+--------|
| Air Temp (C) | 024,57 | 024,61 | 024,59 |
| Air Prs (mm) | 742,56 | 743,29 | 742,83 |
| Air Hmd (%) | 024,00 | 024,00 | 024,00 |
| MT1 Temp (C) | | | 020,00 |
| MT2 Temp (C) | 024,40 | 024,44 | 024,42 |
| MT3 Temp (C) | 024,32 | 024,36 | 024,34 |
2019-05-14 10:04:13 +02:00
In a very schematic way, the measurement is explained on figure [[fig:guiding_error ]].
The positioning error $d$ is measure as a function of $x$.
Because the measurement is done in a static way, the dynamics of the station (represented by the mass-spring-damper system on the schematic) does not play a role in the measure.
The obtained data corresponds to the guiding errors.
#+name : fig:guiding_error
#+caption : Schematic of the measurement
[[file:./figs/guiding_error.png ]]
** Data Pre-processing
2019-03-14 16:40:28 +01:00
#+begin_src shell :results silent
2019-05-14 10:04:13 +02:00
sed 's/\t/ /g;s/ \,/./g' "mat/linear_deviation_tyz_401_points.txt" > mat/data_tyz.txt
2019-03-14 16:40:28 +01:00
#+end_src
#+begin_src shell :exports both :post addhdr(*this* )
2019-05-14 10:04:13 +02:00
head "mat/data_tyz.txt"
2019-03-14 16:40:28 +01:00
#+end_src
#+RESULTS :
| Run | Pos | TargetValue | ErrorValue |
|-----+-----+-------------+---------------|
| 1 | 1 | -4.5E+00 | 7.5377892E+00 |
| 1 | 2 | -4.4775E+00 | 7.5422246E+00 |
| 1 | 3 | -4.455E+00 | 7.5655617E+00 |
| 1 | 4 | -4.4325E+00 | 7.5149518E+00 |
| 1 | 5 | -4.41E+00 | 7.4886377E+00 |
| 1 | 6 | -4.3875E+00 | 7.437007E+00 |
| 1 | 7 | -4.365E+00 | 7.4449354E+00 |
| 1 | 8 | -4.3425E+00 | 7.3937387E+00 |
| 1 | 9 | -4.32E+00 | 7.3287468E+00 |
2019-05-14 10:04:13 +02:00
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir >>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init >>
#+end_src
** Matlab - Data Import
#+begin_src matlab :tangle no
filename = 'mat/data_tyz.txt';
2019-03-14 16:40:28 +01:00
fileID = fopen(filename);
data = cell2mat(textscan(fileID,'%f %f %f %f', 'collectoutput', 1,'headerlines',1));
fclose(fileID);
#+end_src
2019-05-14 10:04:13 +02:00
** Data - Plot
First, we plot the straightness error as a function of the position (figure [[fig:raw_data_tyz ]]).
#+begin_src matlab
2019-03-14 16:40:28 +01:00
figure;
hold on;
for i=1:data(end, 1)
plot(data(data(:, 1) == i, 3), data(data(:, 1) = = i, 4), '-k');
end
hold off;
2019-05-14 10:04:13 +02:00
xlabel('Target Value [mm]'); ylabel('Error Value [$\mu m$]');
2019-03-14 16:40:28 +01:00
#+end_src
2019-05-14 10:04:13 +02:00
#+NAME : fig:raw_data_tyz
2019-03-14 16:40:28 +01:00
#+HEADER : :tangle no :exports results :results raw :noweb yes
2019-05-14 10:04:13 +02:00
#+begin_src matlab :var filepath="figs/raw_data_tyz.pdf" :var figsize= "wide-tall" :post pdf2svg(file=*this*, ext= "png")
2019-03-14 16:40:28 +01:00
<<plt-matlab >>
#+end_src
2019-05-14 10:04:13 +02:00
#+NAME : fig:raw_data_tyz
2019-03-14 16:40:28 +01:00
#+CAPTION : Time domain Data
2019-05-14 10:04:13 +02:00
#+RESULTS : fig:raw_data_tyz
[[file:figs/raw_data_tyz.png ]]
2019-03-14 16:40:28 +01:00
2019-05-14 10:04:13 +02:00
Then, we compute mean value of each position, and we remove this mean value from the data.
The results are shown on figure [[fig:processed_data_tyz ]].
2019-03-14 16:40:28 +01:00
#+begin_src matlab :results silent
mean_pos = zeros(sum(data(:, 1)= =1), 1);
for i=1:sum(data(:, 1)= =1)
mean_pos(i) = mean(data(data(:, 2)= =i, 4));
end
#+end_src
#+begin_src matlab :results silent
figure;
hold on;
for i=1:data(end, 1)
filt = data(:, 1) = = i;
plot(data(filt, 3), data(filt, 4) - mean_pos, '-k');
end
hold off;
2019-05-14 10:04:13 +02:00
xlabel('Target Value [mm]'); ylabel('Error Value [$\mu m$]');
2019-03-14 16:40:28 +01:00
#+end_src
2019-05-14 10:04:13 +02:00
#+NAME : fig:processed_data_tyz
2019-03-14 16:40:28 +01:00
#+HEADER : :tangle no :exports results :results raw :noweb yes
2019-05-14 10:04:13 +02:00
#+begin_src matlab :var filepath="figs/processed_data_tyz.pdf" :var figsize= "wide-tall" :post pdf2svg(file=*this*, ext= "png")
2019-03-14 16:40:28 +01:00
<<plt-matlab >>
#+end_src
2019-05-14 10:04:13 +02:00
#+NAME : fig:processed_data_tyz
2019-03-14 16:40:28 +01:00
#+CAPTION : caption
2019-05-14 10:04:13 +02:00
#+RESULTS : fig:processed_data_tyz
[[file:figs/processed_data_tyz.png ]]
** Translate to time domain
We here make the assumptions that, during a scan with the translation stage, the Z motion of the translation stage will follow the guiding error measured.
We then create a time vector $t$ from 0 to 1 second that corresponds to a typical scan, and we plot the guiding error as a function of the time on figure [[fig:time_domain_tyz ]].
2019-03-14 16:40:28 +01:00
#+begin_src matlab :results none
t = linspace(0, 1, length(data(data(:, 1)= =1, 4)));
#+end_src
#+begin_src matlab :results none
figure;
hold on;
plot(t, data(data(:, 1) == 1, 4) - mean_pos, '-k');
hold off;
xlabel('Time [s]'); ylabel('Error Value [um]');
#+end_src
2019-05-14 10:04:13 +02:00
#+NAME : fig:time_domain_tyz
2019-03-14 16:40:28 +01:00
#+HEADER : :tangle no :exports results :results raw :noweb yes
2019-05-14 10:04:13 +02:00
#+begin_src matlab :var filepath="figs/time_domain_tyz.pdf" :var figsize= "wide-tall" :post pdf2svg(file=*this*, ext= "png")
2019-03-14 16:40:28 +01:00
<<plt-matlab >>
#+end_src
2019-05-14 10:04:13 +02:00
#+NAME : fig:time_domain_tyz
2019-03-14 16:40:28 +01:00
#+CAPTION : caption
2019-05-14 10:04:13 +02:00
#+RESULTS : fig:time_domain_tyz
[[file:figs/time_domain_tyz.png ]]
2019-03-14 16:40:28 +01:00
2019-05-14 10:04:13 +02:00
** Compute the PSD
We first compute some parameters that will be used for the PSD computation.
#+begin_src matlab
dt = t(2)-t(1);
2019-03-14 16:40:28 +01:00
2019-05-14 10:04:13 +02:00
Fs = 1/dt; % [Hz]
win = hanning(ceil(1*Fs));
#+end_src
We remove the mean position from the data.
#+begin_src matlab
2019-03-14 16:40:28 +01:00
x = data(data(:, 1) = = 1, 4) - mean_pos;
2019-05-14 10:04:13 +02:00
#+end_src
And finally, we compute the power spectral density of the displacement obtained in the time domain.
The result is shown on figure [[fig:psd_tyz ]].
#+begin_src matlab :results none
[pxx, f] = pwelch(x, win, [], [], Fs);
2019-03-14 16:40:28 +01:00
pxx_t = zeros(length(pxx), data(end, 1));
for i=1:data(end, 1)
x = data(data(:, 1) = = i, 4) - mean_pos;
2019-05-14 10:04:13 +02:00
[pxx, f] = pwelch(x, win, [], [], Fs);
2019-03-14 16:40:28 +01:00
pxx_t(:, i) = pxx;
end
#+end_src
#+begin_src matlab :results none
figure;
hold on;
2019-05-14 10:04:13 +02:00
plot(f, sqrt(mean(pxx_t, 2)), 'k-');
2019-03-14 16:40:28 +01:00
hold off;
xlabel('Frequency (Hz)');
2019-05-14 10:04:13 +02:00
ylabel('Amplitude Spectral Density $\left[\frac{m}{\sqrt{Hz}}\right]$');
2019-03-14 16:40:28 +01:00
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
#+end_src
2019-05-14 10:04:13 +02:00
#+NAME : fig:psd_tyz
2019-03-14 16:40:28 +01:00
#+HEADER : :tangle no :exports results :results raw :noweb yes
2019-05-14 10:04:13 +02:00
#+begin_src matlab :var filepath="figs/psd_tyz.pdf" :var figsize= "wide-tall" :post pdf2svg(file=*this*, ext= "png")
2019-03-14 16:40:28 +01:00
<<plt-matlab >>
#+end_src
2019-05-14 10:04:13 +02:00
#+NAME : fig:psd_tyz
2019-03-14 16:40:28 +01:00
#+CAPTION : PSD of the Z motion when scanning with Ty at 1Hz
2019-05-14 10:04:13 +02:00
#+RESULTS : fig:psd_tyz
[[file:figs/psd_tyz.png ]]
* TODO Static Measurement of the spindle
:PROPERTIES:
:header-args:matlab+: :tangle matlab/spindle_static.m
:header-args:matlab+: :comments org :mkdirp yes
:END:
<<sec:spindle_static >>
2019-05-14 16:59:02 +02:00
** ZIP file containing the data and matlab files :ignore:
2019-05-14 10:04:13 +02:00
#+begin_src bash :exports none :results none
if [ matlab/spindle_static.m -nt data/spindle_static.zip ]; then
cp matlab/spindle_static.m spindle_static.m;
zip data/spindle_static \
mat/data.mat \
spindle_static.m
rm spindle_static.m;
fi
#+end_src
#+begin_note
All the files (data and Matlab scripts) are accessible [[file:data/spindle_static.zip ][here ]].
#+end_note