attocube-test-bench/index.org

197 lines
6.6 KiB
Org Mode
Raw Normal View History

2020-10-29 10:07:20 +01:00
#+TITLE: Attocube - Test Bench
:DRAWER:
#+LANGUAGE: en
#+EMAIL: dehaeze.thomas@gmail.com
#+AUTHOR: Dehaeze Thomas
#+HTML_LINK_HOME: ../index.html
#+HTML_LINK_UP: ../index.html
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/htmlize.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/readtheorg.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/zenburn.css"/>
#+HTML_HEAD: <script type="text/javascript" src="./js/jquery.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="./js/bootstrap.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="./js/jquery.stickytableheaders.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="./js/readtheorg.js"></script>
#+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 raw replace :buffer no
#+PROPERTY: header-args:latex+ :eval no-export
#+PROPERTY: header-args:latex+ :exports both
#+PROPERTY: header-args:latex+ :mkdirp yes
#+PROPERTY: header-args:latex+ :output-dir figs
#+PROPERTY: header-args:latex+ :post pdf2svg(file=*this*, ext="png")
#+PROPERTY: header-args:matlab :session *MATLAB*
#+PROPERTY: header-args:matlab+ :tangle script.m
#+PROPERTY: header-args:matlab+ :comments org
#+PROPERTY: header-args:matlab+ :exports both
#+PROPERTY: header-args:matlab+ :results none
#+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
:END:
2020-10-29 10:42:00 +01:00
* Estimation of the Spectral Density of the Attocube Noise
2020-10-29 10:07:20 +01: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
2020-10-29 10:42:00 +01:00
** Long and Slow measurement
The first measurement was made during ~17 hours with a sampling time of $T_s = 0.1\,s$.
2020-10-29 10:07:20 +01:00
#+begin_src matlab
2020-10-29 10:42:00 +01:00
load('./mat/long_test2.mat', 'x', 't')
Ts = 0.1; % [s]
#+end_src
#+begin_src matlab :exports none
figure;
plot(t/60/60, 1e9*x)
xlabel('Time [h]'); ylabel('Displacement [nm]');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/long_meas_time_domain_full.pdf', 'width', 'wide', 'height', 'normal');
#+end_src
#+name: fig:long_meas_time_domain_full
#+caption: Long measurement time domain data
#+RESULTS:
[[file:figs/long_meas_time_domain_full.png]]
Let's fit the data with a step response to a first order low pass filter (Figure [[fig:long_meas_time_domain_fit]]).
#+begin_src matlab
f = @(b,x) b(1)*(1 - exp(-x/b(2)));
y_cur = x(t < 17*60*60);
t_cur = t(t < 17*60*60);
nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function
B0 = [400e-9, 2*60*60]; % Choose Appropriate Initial Estimates
[B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters B
#+end_src
The corresponding time constant is (in [h]):
#+begin_src matlab :results value replace :exports results
B(2)/60/60
#+end_src
#+RESULTS:
: 2.0576
#+begin_src matlab :exports none
figure;
hold on;
plot(t_cur/60/60, 1e9*y_cur);
plot(t_cur/60/60, 1e9*f(B, t_cur));
hold off;
xlabel('Time [h]'); ylabel('Displacement [nm]');
#+end_src
#+name: fig:long_meas_time_domain_fit
#+caption: Fit of the measurement data with a step response of a first order low pass filter
[[file:figs/long_meas_time_domain_fit.pdf]]
2020-10-29 10:42:00 +01:00
We can see in Figure [[fig:long_meas_time_domain_full]] that there is a transient period where the measured displacement experiences some drifts.
This is probably due to thermal effects.
We only select the data between =t1= and =t2=.
The obtained displacement is shown in Figure [[fig:long_meas_time_domain_zoom]].
#+begin_src matlab
t1 = 11; t2 = 17; % [h]
x = x(t > t1*60*60 & t < t2*60*60);
x = x - mean(x);
t = t(t > t1*60*60 & t < t2*60*60);
t = t - t(1);
#+end_src
#+begin_src matlab :exports none
figure;
plot(t/60/60, 1e9*x);
xlabel('Time [h]'); ylabel('Measured Displacement [nm]')
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/long_meas_time_domain_zoom.pdf', 'width', 'wide', 'height', 'normal');
#+end_src
#+name: fig:long_meas_time_domain_zoom
#+caption: Kept data (removed slow drifts during the first hours)
#+RESULTS:
[[file:figs/long_meas_time_domain_zoom.png]]
2020-10-29 10:07:20 +01:00
2020-10-29 10:42:00 +01:00
The Power Spectral Density of the measured displacement is computed
#+begin_src matlab
win = hann(ceil(length(x)/20));
2020-10-29 10:07:20 +01:00
[p_1, f_1] = pwelch(x, win, [], [], 1/Ts);
#+end_src
2020-10-29 10:42:00 +01:00
** Short and Fast measurement
An second measurement is done in order to estimate the high frequency noise of the interferometer.
The measurement is done with a sampling time of $T_s = 0.1\,ms$ and a duration of ~100s.
2020-10-29 10:07:20 +01:00
#+begin_src matlab
load('./mat/test.mat', 'x', 't')
Ts = 1e-4; % [s]
2020-10-29 10:42:00 +01:00
#+end_src
The time domain measurement is shown in Figure [[fig:short_meas_time_domain]].
#+begin_src matlab :exports none
figure;
plot(t, 1e9*x)
xlabel('Time [s]'); ylabel('Displacement [nm]');
xlim([0, 100]);
#+end_src
2020-10-29 10:07:20 +01:00
2020-10-29 10:42:00 +01:00
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/short_meas_time_domain.pdf', 'width', 'wide', 'height', 'normal');
#+end_src
#+name: fig:short_meas_time_domain
#+caption: Time domain measurement with the high sampling rate
#+RESULTS:
[[file:figs/short_meas_time_domain.png]]
The Power Spectral Density of the measured displacement is computed
#+begin_src matlab
win = hann(ceil(length(x)/20));
2020-10-29 10:07:20 +01:00
[p_2, f_2] = pwelch(x, win, [], [], 1/Ts);
#+end_src
2020-10-29 10:42:00 +01:00
** Obtained Amplitude Spectral Density of the measured displacement
The computed ASD of the two measurements are combined in Figure [[fig:psd_combined]].
2020-10-29 10:07:20 +01:00
#+begin_src matlab :exports none
figure;
hold on;
2020-10-29 10:42:00 +01:00
plot(f_1(8:end), sqrt(p_1(8:end)), 'k-');
plot(f_2(8:end), sqrt(p_2(8:end)), 'k-');
2020-10-29 10:07:20 +01:00
hold off;
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
ylabel('ASD [$m/\sqrt{Hz}$]'); xlabel('Frequency [Hz]');
#+end_src
2020-10-29 10:42:00 +01:00
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/psd_combined.pdf', 'width', 'wide', 'height', 'tall');
#+end_src
#+name: fig:psd_combined
#+caption: Obtained Amplitude Spectral Density of the measured displacement
#+RESULTS:
[[file:figs/psd_combined.png]]