diff --git a/index.org b/index.org index 50380ea..7763fb4 100644 --- a/index.org +++ b/index.org @@ -1856,7 +1856,17 @@ The file =mat/plant.mat= is accessible [[./mat/plant.mat][here]]. figure; bode(sys_cl({'Vph', 'Vpv'}, {'Uch', 'Ucv'}), sys({'Vph', 'Vpv'}, {'Uch', 'Ucv'})) #+end_src -* TODO Huddle Test +* Huddle Test +** 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 + +** Load data We load the data taken during the Huddle Test. #+begin_src matlab load('mat/data_huddle_test.mat', ... @@ -1868,6 +1878,7 @@ We load the data taken during the Huddle Test. 'Va'); #+end_src +** Pre-processing We remove the first second of data where everything is settling down. #+begin_src matlab t0 = 1; @@ -1888,11 +1899,12 @@ We remove the first second of data where everything is settling down. t = t - t(1); % We start at t=0 #+end_src +** Time Domain Data #+begin_src matlab :exports none figure; hold on; - plot(t, Vph, 'DisplayName', '$Vp_h$'); - plot(t, Vpv, 'DisplayName', '$Vp_v$'); + plot(t, Uch, 'DisplayName', '$Vp_h$'); + plot(t, Ucv, 'DisplayName', '$Vp_v$'); hold off; xlabel('Time [s]'); ylabel('Amplitude [V]'); @@ -1906,7 +1918,7 @@ We compute the Power Spectral Density of the horizontal and vertical positions o [psd_Vpv, ~] = pwelch(Vpv, hanning(ceil(1*fs)), [], [], fs); #+end_src -#+begin_src matlab :results none +#+begin_src matlab :exports none figure; hold on; plot(f, sqrt(psd_Vph), 'DisplayName', '$\Gamma_{Vp_h}$'); @@ -1936,7 +1948,7 @@ We compute the Power Spectral Density of the voltage across the inductance used [psd_Vcv, ~] = pwelch(Vcv, hanning(ceil(1*fs)), [], [], fs); #+end_src -#+begin_src matlab :results none +#+begin_src matlab :exports none figure; hold on; plot(f, sqrt(psd_Vch), 'DisplayName', '$\Gamma_{Vc_h}$'); @@ -2237,7 +2249,12 @@ The controllers can be downloaded [[./mat/K_newport.mat][here]]. save('mat/K_newport.mat', 'Kn', 'Knd'); #+end_src -* Measurement of the non-repeatability +* Measuement of the non-repeatability +** Introduction :ignore: +- Explanation of the procedure +- List all sources of error and their effects on the Attocube measurement +- Think about how to determine the value of the individual sources of error + ** Matlab Init :noexport:ignore: #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) <> @@ -2247,37 +2264,305 @@ The controllers can be downloaded [[./mat/K_newport.mat][here]]. <> #+end_src +#+begin_src matlab + fs = 1e4; +#+end_src + ** Data Load #+begin_src matlab - load('mat/data_rep_1.mat', ... + uh = load('mat/data_rep_h.mat', ... + 't', 'Uch', 'Ucv', ... + 'Unh', 'Unv', ... + 'Vph', 'Vpv', ... + 'Vnh', 'Vnv', ... + 'Va'); + + uv = load('mat/data_rep_v.mat', ... 't', 'Uch', 'Ucv', ... 'Unh', 'Unv', ... 'Vph', 'Vpv', ... - 'Vch', 'Vcv', ... 'Vnh', 'Vnv', ... 'Va'); #+end_src #+begin_src matlab - t0 = 5; + % Let's start one second after the first command in the system + i0 = find(uh.Unh ~= 0, 1) + fs; + iend = i0+fs*floor((length(uh.t)-i0)/fs); - Uch(t