Rename cercalo to sercalo
This commit is contained in:
parent
b24cf1f7ff
commit
916dc5bb45
Binary file not shown.
BIN
figs/cercalo_amplifier.pdf
Normal file
BIN
figs/cercalo_amplifier.pdf
Normal file
Binary file not shown.
BIN
figs/cercalo_amplifier.png
Normal file
BIN
figs/cercalo_amplifier.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.6 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
774
index.html
774
index.html
File diff suppressed because it is too large
Load Diff
236
index.org
236
index.org
@ -1,4 +1,4 @@
|
||||
#+TITLE: Cercalo Test Bench
|
||||
#+TITLE: Sercalo Test Bench
|
||||
:DRAWER:
|
||||
#+STARTUP: overview
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
** Block Diagram
|
||||
The block diagram of the setup to be controlled is shown in Fig. [[fig:block_diagram_simplify]].
|
||||
|
||||
#+begin_src latex :file cercalo_diagram_simplify.pdf :exports results
|
||||
#+begin_src latex :file sercalo_diagram_simplify.pdf :exports results
|
||||
\begin{tikzpicture}
|
||||
\node[DAC] (dac) at (0, 0) {};
|
||||
\node[block, right=1.2 of dac] (Gi) {$G_i$};
|
||||
@ -58,9 +58,9 @@ The block diagram of the setup to be controlled is shown in Fig. [[fig:block_dia
|
||||
\node[block, right= of adc] (Gd) {${G_{d}}^{-1}$};
|
||||
|
||||
\node[above, align=center] at (Gi.north) {Current\\Amplifier};
|
||||
\node[left, align=right] at (Zc.west) {Cercalo's\\Impedance};
|
||||
\node[left, align=right] at (Zc.west) {Sercalo's\\Impedance};
|
||||
\node[left, align=right] at (Ga.west) {Voltage\\Amplifier};
|
||||
\node[above, align=center] at (Gc.north) {Cercalo};
|
||||
\node[above, align=center] at (Gc.north) {Sercalo};
|
||||
\node[left, align=right] at (Gn.west) {Newport};
|
||||
|
||||
\draw[->] ($(dac.west) + (-1, 0)$) --node[midway, sloped]{$/$} (dac.west);
|
||||
@ -81,19 +81,19 @@ The block diagram of the setup to be controlled is shown in Fig. [[fig:block_dia
|
||||
#+name: fig:block_diagram_simplify
|
||||
#+caption: Block Diagram of the Experimental Setup
|
||||
#+RESULTS:
|
||||
[[file:figs/cercalo_diagram_simplify.png]]
|
||||
[[file:figs/sercalo_diagram_simplify.png]]
|
||||
|
||||
The transfer functions in the system are:
|
||||
- *Current Amplifier*: from the voltage set by the DAC to the current going to the Cercalo's inductors
|
||||
- *Current Amplifier*: from the voltage set by the DAC to the current going to the Sercalo's inductors
|
||||
\[ G_i = \begin{bmatrix} G_{i,h} & 0 \\ 0 & G_{i,v} \end{bmatrix} \text{ in } \left[ \frac{A}{V} \right] \]
|
||||
\[ \begin{bmatrix} I_{c,h} \\ I_{c,v} \end{bmatrix} = G_i \begin{bmatrix} U_{c,h} \\ U_{c,v} \end{bmatrix} \]
|
||||
- *Impedance of the Cercalo* that converts the current going to the cercalo to the voltage across the cercalo:
|
||||
- *Impedance of the Sercalo* that converts the current going to the sercalo to the voltage across the sercalo:
|
||||
\[ Z_c = \begin{bmatrix} Z_{c,h} & 0 \\ 0 & Z_{c,v} \end{bmatrix} \text{ in } \left[ \frac{V}{A} \right] \]
|
||||
\[ \begin{bmatrix} \tilde{V}_{c,h} \\ \tilde{V}_{c,v} \end{bmatrix} = Z_c \begin{bmatrix} I_{c,h} \\ I_{c,v} \end{bmatrix} \]
|
||||
- *Voltage Amplifier*: from the voltage across the Cercalo inductors to the measured voltage
|
||||
- *Voltage Amplifier*: from the voltage across the Sercalo inductors to the measured voltage
|
||||
\[ G_a = \begin{bmatrix} G_{a,h} & 0 \\ 0 & G_{a,v} \end{bmatrix} \text{ in } \left[ \frac{V}{V} \right] \]
|
||||
\[ \begin{bmatrix} V_{c,h} \\ V_{c,v} \end{bmatrix} = G_a \begin{bmatrix} \tilde{V}_{c,h} \\ \tilde{V}_{c,v} \end{bmatrix} \]
|
||||
- *Cercalo*: Transfer function from the current going through the cercalo inductors to the 4 quadrant measurement
|
||||
- *Sercalo*: Transfer function from the current going through the sercalo inductors to the 4 quadrant measurement
|
||||
\[ G_c = \begin{bmatrix} G_{\frac{V_{p,h}}{\tilde{U}_{c,h}}} & G_{\frac{V_{p,h}}{\tilde{U}_{c,v}}} \\ G_{\frac{V_{p,v}}{\tilde{U}_{c,h}}} & G_{\frac{V_{p,v}}{\tilde{U}_{c,v}}} \end{bmatrix} \text{ in } \left[ \frac{V}{A} \right] \]
|
||||
\[ \begin{bmatrix} V_{p,h} \\ V_{p,v} \end{bmatrix} = G_c \begin{bmatrix} I_{c,h} \\ I_{c,v} \end{bmatrix} \]
|
||||
- *Newport* Transfer function from the command signal of the Newport to the 4 quadrant measurement
|
||||
@ -103,7 +103,7 @@ The transfer functions in the system are:
|
||||
\[ G_d = \begin{bmatrix} G_{d,h} & 0 \\ 0 & G_{d,v} \end{bmatrix} \text{ in } \left[\frac{V}{rad}\right] \]
|
||||
|
||||
The block diagram with each transfer function is shown in Fig. [[fig:block_diagram]].
|
||||
#+begin_src latex :file cercalo_diagram.pdf :exports results
|
||||
#+begin_src latex :file sercalo_diagram.pdf :exports results
|
||||
\begin{tikzpicture}
|
||||
\node[DAC] (dac) at (0, 0) {};
|
||||
\node[block, right=1.5 of dac] (Gi) {$\begin{bmatrix} G_{i,h} & 0 \\ 0 & G_{i,v} \end{bmatrix}$};
|
||||
@ -117,7 +117,7 @@ The block diagram with each transfer function is shown in Fig. [[fig:block_diagr
|
||||
\node[block, right= of adc] (Gd) {$\begin{bmatrix} G_{d,h}^{-1} & 0 \\ 0 & G_{d,v}^{-1} \end{bmatrix}$};
|
||||
|
||||
\node[above, align=center] at (Gi.north) {Current\\Amplifier};
|
||||
\node[above, align=center] at (Gc.north) {Cercalo};
|
||||
\node[above, align=center] at (Gc.north) {Sercalo};
|
||||
\node[left, align=right] at (Gn.west) {Newport};
|
||||
|
||||
\draw[->] ($(dac.west) + (-1, 0)$) --node[midway, sloped]{$/$} (dac.west);
|
||||
@ -138,27 +138,27 @@ The block diagram with each transfer function is shown in Fig. [[fig:block_diagr
|
||||
#+name: fig:block_diagram
|
||||
#+caption: Block Diagram of the Experimental Setup with detailed dynamics
|
||||
#+RESULTS:
|
||||
[[file:figs/cercalo_diagram.png]]
|
||||
[[file:figs/sercalo_diagram.png]]
|
||||
|
||||
** Cercalo
|
||||
From the Cercalo documentation, we have the parameters shown on table [[tab:cercalo_parameters]].
|
||||
** Sercalo
|
||||
From the Sercalo documentation, we have the parameters shown on table [[tab:sercalo_parameters]].
|
||||
|
||||
#+name: tab:cercalo_parameters
|
||||
#+caption: Cercalo Parameters
|
||||
#+name: tab:sercalo_parameters
|
||||
#+caption: Sercalo Parameters
|
||||
| | Maximum Stroke [deg] | Resonance Frequency [Hz] | DC Gain [mA/deg] | Gain at resonance [deg/V] | RC Resistance [Ohm] |
|
||||
|------------------+----------------------+--------------------------+------------------+---------------------------+---------------------|
|
||||
| AX1 (Horizontal) | 5 | 411.13 | 28.4 | 382.9 | 9.41 |
|
||||
| AX2 (Vertical) | 5 | 252.5 | 35.2 | 350.4 | |
|
||||
|
||||
The Inductance and DC resistance of the two axis of the Cercalo have been measured:
|
||||
The Inductance and DC resistance of the two axis of the Sercalo have been measured:
|
||||
- $L_{c,h} = 0.1\ \text{mH}$
|
||||
- $L_{c,v} = 0.1\ \text{mH}$
|
||||
- $R_{c,h} = 9.3\ \Omega$
|
||||
- $R_{c,v} = 8.3\ \Omega$
|
||||
|
||||
Let's first consider the *horizontal direction* and we try to model the Cercalo by a spring/mass/damper system (Fig. [[fig:mech_cercalo]]).
|
||||
Let's first consider the *horizontal direction* and we try to model the Sercalo by a spring/mass/damper system (Fig. [[fig:mech_sercalo]]).
|
||||
|
||||
#+begin_src latex :file mech_cercalo.pdf :exports results
|
||||
#+begin_src latex :file mech_sercalo.pdf :exports results
|
||||
\begin{tikzpicture}
|
||||
\def\massw{2.2} % Width of the masses
|
||||
\def\massh{0.8} % Height of the masses
|
||||
@ -184,10 +184,10 @@ Let's first consider the *horizontal direction* and we try to model the Cercalo
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
|
||||
#+name: fig:mech_cercalo
|
||||
#+caption: 1 degree-of-freedom model of the Cercalo
|
||||
#+name: fig:mech_sercalo
|
||||
#+caption: 1 degree-of-freedom model of the Sercalo
|
||||
#+RESULTS:
|
||||
[[file:figs/mech_cercalo.png]]
|
||||
[[file:figs/mech_sercalo.png]]
|
||||
|
||||
|
||||
The equation of motion is:
|
||||
@ -211,7 +211,7 @@ The current $I$ is also proportional to the voltage at the output of the buffer:
|
||||
\end{align*}
|
||||
|
||||
Let's try to determine the equivalent mass and spring values.
|
||||
From table [[tab:cercalo_parameters]], for the horizontal direction:
|
||||
From table [[tab:sercalo_parameters]], for the horizontal direction:
|
||||
\[ \left| \frac{x}{I} \right|(0) = \left| \alpha \frac{x}{F} \right|(0) = 28.4\ \frac{mA}{deg} = 1.63\ \frac{A}{rad} \]
|
||||
|
||||
So:
|
||||
@ -326,17 +326,17 @@ with $\Delta V$ the total range of the ADC, $n$ its number of bits, $q$ the quan
|
||||
|
||||
* Identification of the system dynamics
|
||||
:PROPERTIES:
|
||||
:header-args:matlab+: :tangle matlab/cercalo_identification.m
|
||||
:header-args:matlab+: :tangle matlab/sercalo_identification.m
|
||||
:header-args:matlab+: :comments org :mkdirp yes
|
||||
:END:
|
||||
<<sec:cercalo_identification>>
|
||||
<<sec:sercalo_identification>>
|
||||
** Introduction :ignore:
|
||||
In this section, we seek to identify all the blocks as shown in Fig. [[fig:block_diagram_simplify]].
|
||||
|
||||
| Signal | Name | Unit |
|
||||
|-----------------------------------------------------+-------+------|
|
||||
| Voltage Sent to Cercalo - Horizontal | =Uch= | [V] |
|
||||
| Voltage Sent to Cercalo - Vertical | =Ucv= | [V] |
|
||||
| Voltage Sent to Sercalo - Horizontal | =Uch= | [V] |
|
||||
| Voltage Sent to Sercalo - Vertical | =Ucv= | [V] |
|
||||
| Voltage Sent to Newport - Horizontal | =Unh= | [V] |
|
||||
| Voltage Sent to Newport - Vertical | =Unv= | [V] |
|
||||
|-----------------------------------------------------+-------+------|
|
||||
@ -351,22 +351,22 @@ In this section, we seek to identify all the blocks as shown in Fig. [[fig:block
|
||||
|
||||
** ZIP file containing the data and matlab files :ignore:
|
||||
#+begin_src bash :exports none :results none
|
||||
if [ matlab/cercalo_identification.m -nt data/cercalo_identification.zip ]; then
|
||||
cp matlab/cercalo_identification.m cercalo_identification.m;
|
||||
zip data/cercalo_identification \
|
||||
if [ matlab/sercalo_identification.m -nt data/sercalo_identification.zip ]; then
|
||||
cp matlab/sercalo_identification.m sercalo_identification.m;
|
||||
zip data/sercalo_identification \
|
||||
mat/data_cal_pd_h.mat \
|
||||
mat/data_cal_pd_v.mat \
|
||||
mat/data_uch.mat \
|
||||
mat/data_ucv.mat \
|
||||
mat/data_unh.mat \
|
||||
mat/data_unv.mat \
|
||||
cercalo_identification.m
|
||||
rm cercalo_identification.m;
|
||||
sercalo_identification.m
|
||||
rm sercalo_identification.m;
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
#+begin_note
|
||||
All the files (data and Matlab scripts) are accessible [[file:data/cercalo_identification.zip][here]].
|
||||
All the files (data and Matlab scripts) are accessible [[file:data/sercalo_identification.zip][here]].
|
||||
#+end_note
|
||||
|
||||
** Matlab Init :noexport:ignore:
|
||||
@ -387,7 +387,7 @@ In this section, we seek to identify all the blocks as shown in Fig. [[fig:block
|
||||
** Calibration of the 4 Quadrant Diode
|
||||
*** Introduction :ignore:
|
||||
Prior to any dynamic identification, we would like to be able to determine the meaning of the 4 quadrant diode measurement.
|
||||
For instance, instead of obtaining transfer function in [V/V] from the input of the cercalo to the measurement voltage of the 4QD, we would like to obtain the transfer function in [rad/V].
|
||||
For instance, instead of obtaining transfer function in [V/V] from the input of the sercalo to the measurement voltage of the 4QD, we would like to obtain the transfer function in [rad/V].
|
||||
This will give insight to physical interpretation.
|
||||
|
||||
To calibrate the 4 quadrant photo-diode, we can use the metrology included in the Newport.
|
||||
@ -401,7 +401,7 @@ The identification data is loaded
|
||||
uv = load('mat/data_cal_pd_v.mat', 't', 'Vph', 'Vpv', 'Vnv');
|
||||
#+end_src
|
||||
|
||||
We remove the first seconds where the Cercalo is turned on.
|
||||
We remove the first seconds where the Sercalo is turned on.
|
||||
#+begin_src matlab
|
||||
t0 = 1;
|
||||
|
||||
@ -561,16 +561,16 @@ We obtain:
|
||||
&\approx 27.6\ \left[ \frac{\mu rad}{mV} \right]
|
||||
\end{align*}
|
||||
|
||||
** Identification of the Cercalo Impedance, Current Amplifier and Voltage Amplifier dynamics
|
||||
** Identification of the Sercalo Impedance, Current Amplifier and Voltage Amplifier dynamics
|
||||
*** Introduction :ignore:
|
||||
We wish here to determine $G_i$ and $G_a$ shown in Fig. [[fig:block_diagram_simplify]].
|
||||
|
||||
We ignore the electro-mechanical coupling.
|
||||
|
||||
*** Electrical Schematic
|
||||
The schematic of the electrical circuit used to drive the Cercalo is shown in Fig. [[fig:current_amplifier]].
|
||||
The schematic of the electrical circuit used to drive the Sercalo is shown in Fig. [[fig:current_amplifier]].
|
||||
|
||||
#+begin_src latex :file cercalo_amplifier.pdf :exports results
|
||||
#+begin_src latex :file sercalo_amplifier.pdf :exports results
|
||||
\begin{circuitikz}[]
|
||||
\ctikzset{bipoles/length=1.0cm}
|
||||
\draw
|
||||
@ -590,17 +590,17 @@ The schematic of the electrical circuit used to drive the Cercalo is shown in Fi
|
||||
#+name: fig:current_amplifier
|
||||
#+caption: Current Amplifier Schematic
|
||||
#+RESULTS:
|
||||
[[file:figs/cercalo_amplifier.png]]
|
||||
[[file:figs/sercalo_amplifier.png]]
|
||||
|
||||
The elements are:
|
||||
- $U_c$: the voltage generated by the DAC
|
||||
- BUF: is a unity-gain open-loop buffer that allows to increase the output current
|
||||
- $R$: a chosen resistor that will determine the gain of the current amplifier
|
||||
- $L_c$: inductor present in the Cercalo
|
||||
- $L_c$: inductor present in the Sercalo
|
||||
- $R_c$: resistance of the inductor
|
||||
- $\tilde{V}_c$: voltage measured across the Cercalo's inductor
|
||||
- $V_c$: amplified voltage measured across the Cercalo's inductor
|
||||
- $I_c$ is the current going through the Cercalo's inductor
|
||||
- $\tilde{V}_c$: voltage measured across the Sercalo's inductor
|
||||
- $V_c$: amplified voltage measured across the Sercalo's inductor
|
||||
- $I_c$ is the current going through the Sercalo's inductor
|
||||
|
||||
|
||||
The values of the components have been measured for the horizontal and vertical directions:
|
||||
@ -737,7 +737,7 @@ The identification data is loaded.
|
||||
uv = load('mat/data_ucv.mat', 't', 'Ucv', 'Vcv');
|
||||
#+end_src
|
||||
|
||||
We remove the first seconds where the Cercalo is turned on.
|
||||
We remove the first seconds where the Sercalo is turned on.
|
||||
#+begin_src matlab :exports none
|
||||
t0 = 1;
|
||||
|
||||
@ -798,7 +798,7 @@ We remove the first seconds where the Cercalo is turned on.
|
||||
#+CAPTION: Identified and Theoretical Transfer Function $G_a G_i$ ([[./figs/current_amplifier_comp_theory_id.png][png]], [[./figs/current_amplifier_comp_theory_id.pdf][pdf]])
|
||||
[[file:figs/current_amplifier_comp_theory_id.png]]
|
||||
|
||||
There is a gain mismatch, that is probably due to bad identification of the inductance and resistance measurement of the cercalo inductors.
|
||||
There is a gain mismatch, that is probably due to bad identification of the inductance and resistance measurement of the sercalo inductors.
|
||||
Thus, we suppose $G_a$ is perfectly known (the gain and cut-off frequency of the voltage amplifier is very accurate) and that $G_i$ is also well determined as it mainly depends on the resistor used in the amplifier that is well measured.
|
||||
#+begin_src matlab
|
||||
Gi_resp_h = abs(GaZcGi_h)./squeeze(abs(freqresp(Ga(1,1)*Zc(1,1), f, 'Hz')));
|
||||
@ -916,9 +916,9 @@ Ga =
|
||||
Continuous-time zero/pole/gain model.
|
||||
#+end_example
|
||||
|
||||
** Identification of the Cercalo Dynamics
|
||||
** Identification of the Sercalo Dynamics
|
||||
*** Introduction :ignore:
|
||||
We now wish to identify the dynamics of the Cercalo identified by $G_c$ on the block diagram in Fig. [[fig:block_diagram_simplify]].
|
||||
We now wish to identify the dynamics of the Sercalo identified by $G_c$ on the block diagram in Fig. [[fig:block_diagram_simplify]].
|
||||
|
||||
To do so, we inject some noise at the input of the current amplifier $[U_{c,h},\ U_{c,v}]$ (one input after the other) and we measure simultaneously the output of the 4QD $[V_{p,h},\ V_{p,v}]$.
|
||||
|
||||
@ -931,7 +931,7 @@ The identification data is loaded
|
||||
uv = load('mat/data_ucv.mat', 't', 'Ucv', 'Vph', 'Vpv');
|
||||
#+end_src
|
||||
|
||||
We remove the first seconds where the Cercalo is turned on.
|
||||
We remove the first seconds where the Sercalo is turned on.
|
||||
#+begin_src matlab
|
||||
t0 = 1;
|
||||
|
||||
@ -1063,13 +1063,13 @@ The window used for the spectral analysis is an =hanning= windows with temporal
|
||||
#+end_src
|
||||
|
||||
#+HEADER: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/coh_cercalo.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
|
||||
#+begin_src matlab :var filepath="figs/coh_sercalo.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:coh_cercalo
|
||||
#+CAPTION: Coherence ([[./figs/coh_cercalo.png][png]], [[./figs/coh_cercalo.pdf][pdf]])
|
||||
[[file:figs/coh_cercalo.png]]
|
||||
#+NAME: fig:coh_sercalo
|
||||
#+CAPTION: Coherence ([[./figs/coh_sercalo.png][png]], [[./figs/coh_sercalo.pdf][pdf]])
|
||||
[[file:figs/coh_sercalo.png]]
|
||||
|
||||
*** Estimation of the Frequency Response Function Matrix
|
||||
We compute an estimate of the transfer functions.
|
||||
@ -1119,13 +1119,13 @@ We compute an estimate of the transfer functions.
|
||||
#+end_src
|
||||
|
||||
#+HEADER: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/frf_cercalo_gain.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
|
||||
#+begin_src matlab :var filepath="figs/frf_sercalo_gain.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:frf_cercalo_gain
|
||||
#+CAPTION: Frequency Response Matrix ([[./figs/frf_cercalo_gain.png][png]], [[./figs/frf_cercalo_gain.pdf][pdf]])
|
||||
[[file:figs/frf_cercalo_gain.png]]
|
||||
#+NAME: fig:frf_sercalo_gain
|
||||
#+CAPTION: Frequency Response Matrix ([[./figs/frf_sercalo_gain.png][png]], [[./figs/frf_sercalo_gain.pdf][pdf]])
|
||||
[[file:figs/frf_sercalo_gain.png]]
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
@ -1170,13 +1170,13 @@ We compute an estimate of the transfer functions.
|
||||
#+end_src
|
||||
|
||||
#+HEADER: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/frf_cercalo_phase.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
|
||||
#+begin_src matlab :var filepath="figs/frf_sercalo_phase.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:frf_cercalo_phase
|
||||
#+CAPTION: Frequency Response Matrix_Phase ([[./figs/frf_cercalo_phase.png][png]], [[./figs/frf_cercalo_phase.pdf][pdf]])
|
||||
[[file:figs/frf_cercalo_phase.png]]
|
||||
#+NAME: fig:frf_sercalo_phase
|
||||
#+CAPTION: Frequency Response Matrix_Phase ([[./figs/frf_sercalo_phase.png][png]], [[./figs/frf_sercalo_phase.pdf][pdf]])
|
||||
[[file:figs/frf_sercalo_phase.png]]
|
||||
|
||||
*** Time Delay
|
||||
Now, we would like to remove the time delay included in the FRF prior to the model extraction.
|
||||
@ -1237,7 +1237,7 @@ Finally, we ignore data above some frequency.
|
||||
weight_Ucv_Vpv(f>1000) = 0;
|
||||
#+end_src
|
||||
|
||||
The weights are shown in Fig. [[fig:weights_cercalo]].
|
||||
The weights are shown in Fig. [[fig:weights_sercalo]].
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
@ -1254,13 +1254,13 @@ The weights are shown in Fig. [[fig:weights_cercalo]].
|
||||
#+end_src
|
||||
|
||||
#+HEADER: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/weights_cercalo.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
|
||||
#+begin_src matlab :var filepath="figs/weights_sercalo.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:weights_cercalo
|
||||
#+CAPTION: Weights amplitude ([[./figs/weights_cercalo.png][png]], [[./figs/weights_cercalo.pdf][pdf]])
|
||||
[[file:figs/weights_cercalo.png]]
|
||||
#+NAME: fig:weights_sercalo
|
||||
#+CAPTION: Weights amplitude ([[./figs/weights_sercalo.png][png]], [[./figs/weights_sercalo.pdf][pdf]])
|
||||
[[file:figs/weights_sercalo.png]]
|
||||
|
||||
When we set some options for =vfit3=.
|
||||
#+begin_src matlab
|
||||
@ -1429,7 +1429,7 @@ The identification data is loaded
|
||||
uv = load('mat/data_unv.mat', 't', 'Unv', 'Vph', 'Vpv');
|
||||
#+end_src
|
||||
|
||||
We remove the first seconds where the Cercalo is turned on.
|
||||
We remove the first seconds where the Sercalo is turned on.
|
||||
#+begin_src matlab
|
||||
t0 = 3;
|
||||
|
||||
@ -2054,26 +2054,26 @@ The Attocube's "Environmental Compensation Unit" does not have a significant eff
|
||||
|
||||
*Sources of error for the Attocube measurement*:
|
||||
- Beam non-perpendicularity to the concave mirror is linked to the non-perfect feedback loop:
|
||||
- We have only finite gain / limited bandwidth so the Cercalo mirror angle will not be perfect
|
||||
- We have only finite gain / limited bandwidth so the Sercalo mirror angle will not be perfect
|
||||
- The non-perpendicularity is measured by the 4QD and is used as the feedback signal, however this signal is noisy and even with infinite gain, this noise will be transmitted to the angle of the beam
|
||||
- Cercalo/Newport unwanted translation perpendicular to its surface.
|
||||
- Sercalo/Newport unwanted translation perpendicular to its surface.
|
||||
This can be due to:
|
||||
- Non idealities in the mechanics of the Cercalo
|
||||
- Non idealities in the mechanics of the Sercalo
|
||||
- Temperature variations
|
||||
- The reproducible part of the perpendicular translation with respect to the angle of the Cercalo can be taken into account and subtracted from the Attocube measurement
|
||||
- The reproducible part of the perpendicular translation with respect to the angle of the Sercalo can be taken into account and subtracted from the Attocube measurement
|
||||
- Temperature variations of the metrology frame
|
||||
- Change in the refractive air index in the beam path.
|
||||
This can be due to change of Temperature, Pressure and Humidity of the air in the beam path
|
||||
|
||||
*Procedure*:
|
||||
- in section [[sec:cercalo_angle_error]]:
|
||||
We estimate the effect of an angle error of the Cercalo mirror on the Attocube measurement
|
||||
- in section [[sec:sercalo_angle_error]]:
|
||||
We estimate the effect of an angle error of the Sercalo mirror on the Attocube measurement
|
||||
- in section [[sec:mirror_perpendicular_motion]]:
|
||||
The effect of perpendicular motion of the Newport and Cercalo mirrors on the Attocube measurement is determined.
|
||||
The effect of perpendicular motion of the Newport and Sercalo mirrors on the Attocube measurement is determined.
|
||||
- in section [[sec:effect_refractive_index]]:
|
||||
We estimate the expected change of refractive index of the air in the beam path and the resulting Attocube measurement error
|
||||
- in section [[sec:feedback_error]]:
|
||||
The feedback system using the 4 quadrant diode and the Cercalo is studied.
|
||||
The feedback system using the 4 quadrant diode and the Sercalo is studied.
|
||||
Sensor noise, actuator noise and their effects on the control error is discussed.
|
||||
|
||||
** Matlab Init :noexport:ignore:
|
||||
@ -2085,13 +2085,13 @@ The Attocube's "Environmental Compensation Unit" does not have a significant eff
|
||||
<<matlab-init>>
|
||||
#+end_src
|
||||
|
||||
** Effect of the Cercalo angle error on the measured distance by the Attocube
|
||||
<<sec:cercalo_angle_error>>
|
||||
** Effect of the Sercalo angle error on the measured distance by the Attocube
|
||||
<<sec:sercalo_angle_error>>
|
||||
To simplify, we suppose that the Newport mirror is a flat mirror (instead of a concave one).
|
||||
|
||||
The geometry of the setup is shown in Fig. [[fig:angle_error_schematic_cercalo]] where:
|
||||
The geometry of the setup is shown in Fig. [[fig:angle_error_schematic_sercalo]] where:
|
||||
- $O$ is the reference surface of the Attocube
|
||||
- $S$ is the point where the beam first hits the Cercalo mirror
|
||||
- $S$ is the point where the beam first hits the Sercalo mirror
|
||||
- $X$ is the point where the beam first hits the Newport mirror
|
||||
- $\delta \theta_c$ is the angle error from its ideal 45 degrees
|
||||
|
||||
@ -2106,7 +2106,7 @@ The geometrical parameters of the setup are defined below.
|
||||
L = 0.05; % [m]
|
||||
#+end_src
|
||||
|
||||
#+begin_src latex :file angle_error_schematic_cercalo.pdf :exports results
|
||||
#+begin_src latex :file angle_error_schematic_sercalo.pdf :exports results
|
||||
\begin{tikzpicture}
|
||||
\draw[->] (0, 0)coordinate(O)node[below]{$O (0,0)$} -- ++(1, 0) node[above left]{$x$};
|
||||
\draw[->] (0, 0) -- ++(0, 1) node[below right]{$y$};
|
||||
@ -2120,10 +2120,10 @@ The geometrical parameters of the setup are defined below.
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:angle_error_schematic_cercalo
|
||||
#+NAME: fig:angle_error_schematic_sercalo
|
||||
#+CAPTION: Schematic of the geometry used to evaluate the effect of $\delta \theta_c$ on the measured distance $\delta L$
|
||||
#+RESULTS:
|
||||
[[file:figs/angle_error_schematic_cercalo.png]]
|
||||
[[file:figs/angle_error_schematic_sercalo.png]]
|
||||
|
||||
The nominal points $O$, $S$ and $X$ are defined.
|
||||
#+begin_src matlab
|
||||
@ -2137,7 +2137,7 @@ Thus, the initial path length $L$ is:
|
||||
path_nominal = norm(S-O) + norm(X-S) + norm(S-X) + norm(O-S);
|
||||
#+end_src
|
||||
|
||||
We now compute the new path length when there is an error angle $\delta \theta_c$ on the Cercalo mirror angle.
|
||||
We now compute the new path length when there is an error angle $\delta \theta_c$ on the Sercalo mirror angle.
|
||||
#+begin_src matlab
|
||||
path_length = zeros(size(thetas_c));
|
||||
|
||||
@ -2151,7 +2151,7 @@ We now compute the new path length when there is an error angle $\delta \theta_c
|
||||
end
|
||||
#+end_src
|
||||
|
||||
We then compute the distance error and we plot it as a function of the Cercalo angle error (Fig. [[fig:effect_cercalo_angle_distance_meas]]).
|
||||
We then compute the distance error and we plot it as a function of the Sercalo angle error (Fig. [[fig:effect_sercalo_angle_distance_meas]]).
|
||||
#+begin_src matlab
|
||||
path_error = path_length - path_nominal;
|
||||
#+end_src
|
||||
@ -2161,18 +2161,18 @@ We then compute the distance error and we plot it as a function of the Cercalo a
|
||||
plot(thetas_c, path_error)
|
||||
set(gca,'xscale','log');
|
||||
set(gca,'yscale','log');
|
||||
xlabel('Cercalo angle error [rad]');
|
||||
xlabel('Sercalo angle error [rad]');
|
||||
ylabel('Attocube measurement error [m]');
|
||||
#+end_src
|
||||
|
||||
#+HEADER: :tangle no :exports results :results none :noweb yes
|
||||
#+begin_src matlab :var filepath="figs/effect_cercalo_angle_distance_meas.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
|
||||
#+begin_src matlab :var filepath="figs/effect_sercalo_angle_distance_meas.pdf" :var figsize="wide-normal" :post pdf2svg(file=*this*, ext="png")
|
||||
<<plt-matlab>>
|
||||
#+end_src
|
||||
|
||||
#+NAME: fig:effect_cercalo_angle_distance_meas
|
||||
#+CAPTION: Effect of an angle error of the Cercalo on the distance error measured by the Attocube ([[./figs/effect_cercalo_angle_distance_meas.png][png]], [[./figs/effect_cercalo_angle_distance_meas.pdf][pdf]])
|
||||
[[file:figs/effect_cercalo_angle_distance_meas.png]]
|
||||
#+NAME: fig:effect_sercalo_angle_distance_meas
|
||||
#+CAPTION: Effect of an angle error of the Sercalo on the distance error measured by the Attocube ([[./figs/effect_sercalo_angle_distance_meas.png][png]], [[./figs/effect_sercalo_angle_distance_meas.pdf][pdf]])
|
||||
[[file:figs/effect_sercalo_angle_distance_meas.png]]
|
||||
|
||||
And we plot the beam path using Matlab for an high angle to verify that the code is working (Fig. [[fig:simulation_beam_path_high_angle]]).
|
||||
#+begin_src matlab
|
||||
@ -2212,7 +2212,7 @@ And we plot the beam path using Matlab for an high angle to verify that the code
|
||||
[[file:figs/simulation_beam_path_high_angle.png]]
|
||||
|
||||
#+begin_important
|
||||
Based on Fig. [[fig:effect_cercalo_angle_distance_meas]], we see that an angle error $\delta\theta_c$ of the Cercalo mirror induces a distance error $\delta L$ measured by the Attocube which is dependent of the square of $\delta \theta_c$:
|
||||
Based on Fig. [[fig:effect_sercalo_angle_distance_meas]], we see that an angle error $\delta\theta_c$ of the Sercalo mirror induces a distance error $\delta L$ measured by the Attocube which is dependent of the square of $\delta \theta_c$:
|
||||
|
||||
\begin{equation}
|
||||
\delta L = \delta\theta_c^2
|
||||
@ -2223,24 +2223,24 @@ with:
|
||||
|
||||
Some example are shown in table [[tab:effect_angle_error]].
|
||||
|
||||
The tracking error of the feedback system used to position the Cercalo mirror should thus be limited to few micro-meters.
|
||||
The tracking error of the feedback system used to position the Sercalo mirror should thus be limited to few micro-meters.
|
||||
#+end_important
|
||||
|
||||
#+name: tab:effect_angle_error
|
||||
#+caption: Effect of an angle error $\delta \theta_c$ of the Cercalo's mirror on the measurement error $\delta L$ by the Attocube
|
||||
#+caption: Effect of an angle error $\delta \theta_c$ of the Sercalo's mirror on the measurement error $\delta L$ by the Attocube
|
||||
| Angle Error $\delta \theta_c$ | Distance measurement error $\delta L$ |
|
||||
|-------------------------------+---------------------------------------|
|
||||
| $1\,\mu\text{rad}$ | $1\, nm$ |
|
||||
| $5\,\mu\text{rad}$ | $25\, nm$ |
|
||||
| $10\,\mu\text{rad}$ | $100\, nm$ |
|
||||
|
||||
** Unwanted motion of Cercalo/Newport mirrors perpendicular to its surface
|
||||
** Unwanted motion of Sercalo/Newport mirrors perpendicular to its surface
|
||||
<<sec:mirror_perpendicular_motion>>
|
||||
|
||||
From Figs [[fig:cercalo_perpendicular_motion]] and [[fig:newport_perpendicular_motion]], it is clear that perpendicular motions of the Cercalo mirror and of the Newport mirror have an impact on the measured distance by the Attocube interferometer.
|
||||
From Figs [[fig:sercalo_perpendicular_motion]] and [[fig:newport_perpendicular_motion]], it is clear that perpendicular motions of the Sercalo mirror and of the Newport mirror have an impact on the measured distance by the Attocube interferometer.
|
||||
|
||||
More precisely, if the note:
|
||||
- $\delta d_c$ the perpendicular motion of the Cercalo's mirror
|
||||
- $\delta d_c$ the perpendicular motion of the Sercalo's mirror
|
||||
- $\delta d_n$ the perpendicular motion of the Newport's mirror
|
||||
We have that:
|
||||
\begin{align}
|
||||
@ -2251,14 +2251,14 @@ We have that:
|
||||
Note here that $\delta L$ denote the change of beam traveled distance.
|
||||
The error in measured distance by the Attocube will we $\delta L/2$.
|
||||
|
||||
#+begin_src latex :file cercalo_perpendicular_motion.pdf :exports results
|
||||
#+begin_src latex :file sercalo_perpendicular_motion.pdf :exports results
|
||||
\begin{tikzpicture}
|
||||
% X-Y axis
|
||||
\draw[->] (0, 0)coordinate(O) -- ++(1, 0) node[above left]{$x$};
|
||||
\draw[->] (0, 0) -- ++(0, 1) node[below right]{$y$};
|
||||
|
||||
% Cercalo Mirror
|
||||
\draw[] ($(4, 0)+(225:1)$)coordinate(a) --node[midway, below, rotate=45]{Cercalo}coordinate[midway](S) ($(4, 0)+(45:1)$);
|
||||
% Sercalo Mirror
|
||||
\draw[] ($(4, 0)+(225:1)$)coordinate(a) --node[midway, below, rotate=45]{Sercalo}coordinate[midway](S) ($(4, 0)+(45:1)$);
|
||||
\draw[dashed, name path=Cc--Cd] ($(4, 0)+(135:0.5)+(225:1)$)coordinate(b) -- ($(4, 0)+(135:0.5)+(45:1)$);
|
||||
|
||||
% Mirror displacement
|
||||
@ -2279,10 +2279,10 @@ The error in measured distance by the Attocube will we $\delta L/2$.
|
||||
\end{tikzpicture}
|
||||
#+end_src
|
||||
|
||||
#+name: fig:cercalo_perpendicular_motion
|
||||
#+caption: Effect of a Perpendicular motion of the Cercalo Mirror
|
||||
#+name: fig:sercalo_perpendicular_motion
|
||||
#+caption: Effect of a Perpendicular motion of the Sercalo Mirror
|
||||
#+RESULTS:
|
||||
[[file:figs/cercalo_perpendicular_motion.png]]
|
||||
[[file:figs/sercalo_perpendicular_motion.png]]
|
||||
|
||||
#+begin_src latex :file newport_perpendicular_motion.pdf :exports results
|
||||
\begin{tikzpicture}
|
||||
@ -2290,8 +2290,8 @@ The error in measured distance by the Attocube will we $\delta L/2$.
|
||||
\draw[->] (0, 0)coordinate(O) -- ++(1, 0) node[above left]{$x$};
|
||||
\draw[->] (0, 0) -- ++(0, 1) node[below right]{$y$};
|
||||
|
||||
% Cercalo Mirror
|
||||
\draw[] ($(4, 0)+(225:1)$) --node[midway, below, rotate=45]{Cercalo}coordinate[midway](S) ($(4, 0)+(45:1)$);
|
||||
% Sercalo Mirror
|
||||
\draw[] ($(4, 0)+(225:1)$) --node[midway, below, rotate=45]{Sercalo}coordinate[midway](S) ($(4, 0)+(45:1)$);
|
||||
|
||||
% Newport Mirror
|
||||
\draw[] (3, 2)coordinate(a) --coordinate[midway](X) (5, 2);
|
||||
@ -2314,7 +2314,7 @@ The error in measured distance by the Attocube will we $\delta L/2$.
|
||||
[[file:figs/newport_perpendicular_motion.png]]
|
||||
|
||||
#+begin_important
|
||||
The motion of the both Cercalo's and Newport's mirrors perpendicular to its surface is fully transmitted to the measured distance by the Attocube interferometer.
|
||||
The motion of the both Sercalo's and Newport's mirrors perpendicular to its surface is fully transmitted to the measured distance by the Attocube interferometer.
|
||||
|
||||
This motion can be measured and the repeatable part can be compensated.
|
||||
However, the non repeatability of this motion should be less than few nano-meters.
|
||||
@ -2362,13 +2362,13 @@ If invar is used ($\alpha = 1.2 \cdot 10^{-6} \, K^{-1}$):
|
||||
|
||||
Thus, the temperature of the metrology frame should be kept constant to less than $0.1\,^oC$.
|
||||
|
||||
** Estimation of the Cercalo angle error due to Noise
|
||||
** Estimation of the Sercalo angle error due to Noise
|
||||
<<sec:feedback_error>>
|
||||
*** Introduction :ignore:
|
||||
In this section, we seek to estimate the angle error $\delta \theta$
|
||||
|
||||
Consider the block diagram in Fig. [[fig:feedback_diagram]] with:
|
||||
- $G$: represents the transfer function from a voltage applied by the Speedgoat DAC used for the Cercalo to the Beam angle
|
||||
- $G$: represents the transfer function from a voltage applied by the Speedgoat DAC used for the Sercalo to the Beam angle
|
||||
- $K$: is the control law used
|
||||
The signals are:
|
||||
- $\delta \theta$: is the "true" laser beam angle
|
||||
@ -2377,7 +2377,7 @@ The signals are:
|
||||
It includes:
|
||||
- ADC noise
|
||||
- $1/f$ noise, Shot noise, Ambian noise, Intensity noise...
|
||||
- $d_u$: is noise at the input of the Cercalo.
|
||||
- $d_u$: is noise at the input of the Sercalo.
|
||||
It includes:
|
||||
- DAC noise of the speadgoat
|
||||
- $d$: is disturbance on the angle of the beam.
|
||||
@ -2499,8 +2499,8 @@ We will rotate the Newport mirror in order to simulate a displacement of the Sam
|
||||
\draw[->] (0, 0)coordinate(O) -- ++(1, 0) node[above left]{$x$};
|
||||
\draw[->] (0, 0) -- ++(0, 1) node[below right]{$y$};
|
||||
|
||||
% Cercalo Mirror
|
||||
\draw[] ($(4, 0)+(225:1)$) --node[midway, below, rotate=45]{Cercalo}coordinate[midway](S) ($(4, 0)+(45:1)$);
|
||||
% Sercalo Mirror
|
||||
\draw[] ($(4, 0)+(225:1)$) --node[midway, below, rotate=45]{Sercalo}coordinate[midway](S) ($(4, 0)+(45:1)$);
|
||||
|
||||
% Concave Newport Mirror
|
||||
\draw[] ([shift=(260:6)]4, 10)coordinate(a) arc (260:280:6)coordinate(b)coordinate[midway](X);
|
||||
@ -2543,7 +2543,7 @@ If we suppose small angles, the corresponding beam deviation is:
|
||||
where $\alpha$ is the rotation of the Newport mirror.
|
||||
|
||||
*** Perfect Control
|
||||
If the feedback is perfect, the Cercalo angle error will be equal to the 4 quadrant diode noise.
|
||||
If the feedback is perfect, the Sercalo angle error will be equal to the 4 quadrant diode noise.
|
||||
Let's estimate the 4QD noise in radians.
|
||||
|
||||
If we note $V_1$, $V_2$, $V_3$ and $V_4$ the voltage of each of the quadrant, a measurement error $\delta V_i$ of one of the quadrant will have an effect $\delta \theta$ on the measured angle:
|
||||
@ -2562,7 +2562,7 @@ If we just consider the ADC noise:
|
||||
\[ \frac{20}{2^{16}} \approx 0.000305\,V = 0.305\,mV \]
|
||||
- this corresponds to an error $\delta L \approx 0.5 nm$
|
||||
|
||||
*** Error due to DAC noise used for the Cercalo
|
||||
*** Error due to DAC noise used for the Sercalo
|
||||
#+begin_src matlab
|
||||
load('./mat/plant.mat', 'Gi', 'Gc', 'Gd');
|
||||
#+end_src
|
||||
@ -2572,15 +2572,15 @@ If we just consider the ADC noise:
|
||||
#+end_src
|
||||
|
||||
Dynamical estimation:
|
||||
- ASD of DAC noise used for the Cercalo
|
||||
- Multiply by transfer function from Cercalo voltage to angle estimation using the 4QD
|
||||
- ASD of DAC noise used for the Sercalo
|
||||
- Multiply by transfer function from Sercalo voltage to angle estimation using the 4QD
|
||||
|
||||
#+begin_src matlab
|
||||
freqs = logspace(1, 3, 1000);
|
||||
|
||||
fs = 1e4;
|
||||
|
||||
% ASD of the DAC voltage going to the Cercalo in [V/sqrt(Hz)]
|
||||
% ASD of the DAC voltage going to the Sercalo in [V/sqrt(Hz)]
|
||||
asd_uc = (20/2^16)/sqrt(12*fs)*ones(length(freqs), 1);
|
||||
|
||||
% ASD of the measured angle by the QD in [rad/sqrt(Hz)]
|
||||
@ -2613,9 +2613,9 @@ The RMS value is:
|
||||
loglog(freqs, cps_L)
|
||||
#+end_src
|
||||
|
||||
Let's estimate the beam angle error corresponding to 1 LSB of the cercalo's DAC.
|
||||
Gain of the Cercalo is approximatively 5 degrees for 10V.
|
||||
However the beam angle deviation is 4 times the angle deviation of the cercalo mirror, thus:
|
||||
Let's estimate the beam angle error corresponding to 1 LSB of the sercalo's DAC.
|
||||
Gain of the Sercalo is approximatively 5 degrees for 10V.
|
||||
However the beam angle deviation is 4 times the angle deviation of the sercalo mirror, thus:
|
||||
#+begin_src matlab :results value replace
|
||||
d_alpha = 4*(20/2^16)*(5*pi/180)/10 % [rad]
|
||||
#+end_src
|
||||
@ -2632,7 +2632,7 @@ This corresponds to a measurement error of the Attocube equals to (in [m])
|
||||
: 1.0653e-11
|
||||
|
||||
#+begin_important
|
||||
The DAC noise use for the Cercalo does not limit the performance of the system.
|
||||
The DAC noise use for the Sercalo does not limit the performance of the system.
|
||||
#+end_important
|
||||
|
||||
* Plant Uncertainty
|
||||
@ -2818,7 +2818,7 @@ The plant is put in a general configuration as shown in Fig. [[fig:general_contr
|
||||
** Conclusion
|
||||
Active damping does not seems to be applicable here.
|
||||
|
||||
* Decentralized Control of the Cercalo
|
||||
* Decentralized Control of the Sercalo
|
||||
:PROPERTIES:
|
||||
:header-args:matlab+: :tangle matlab/decentralized_control.m
|
||||
:header-args:matlab+: :comments org :mkdirp yes
|
||||
|
50
matlab/active_damping.m
Normal file
50
matlab/active_damping.m
Normal file
@ -0,0 +1,50 @@
|
||||
%% Clear Workspace and Close figures
|
||||
clear; close all; clc;
|
||||
|
||||
%% Intialize Laplace variable
|
||||
s = zpk('s');
|
||||
|
||||
freqs = logspace(1, 3, 1000);
|
||||
|
||||
% Load Plant
|
||||
|
||||
load('mat/plant.mat', 'sys', 'Gi', 'Zc', 'Ga', 'Gc', 'Gn', 'Gd');
|
||||
|
||||
% Integral Force Feedback
|
||||
|
||||
bode(sys({'Vch', 'Vcv'}, {'Uch', 'Ucv'}));
|
||||
|
||||
Kppf = blkdiag(-10000/s, tf(0));
|
||||
|
||||
Kppf.InputName = {'Vch', 'Vcv'};
|
||||
Kppf.OutputName = {'Uch', 'Ucv'};
|
||||
|
||||
figure;
|
||||
% Magnitude
|
||||
ax1 = subaxis(2,1,1);
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G, freqs, 'Hz'))), 'k-');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
set(gca, 'XTickLabel',[]);
|
||||
ylabel('Magnitude [dB]');
|
||||
hold off;
|
||||
|
||||
% Phase
|
||||
ax2 = subaxis(2,1,2);
|
||||
hold on;
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G, freqs, 'Hz'))), 'k-');
|
||||
set(gca,'xscale','log');
|
||||
yticks(-360:90:180);
|
||||
ylim([-360 0]);
|
||||
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||
hold off;
|
||||
|
||||
linkaxes([ax1,ax2],'x');
|
||||
xlim([freqs(1), freqs(end)]);
|
||||
|
||||
inputs = {'Uch', 'Ucv', 'Unh', 'Unv'};
|
||||
outputs = {'Ich', 'Icv', 'Rh', 'Rv', 'Vph', 'Vpv'};
|
||||
|
||||
sys_cl = connect(sys, Kppf, inputs, outputs);
|
||||
|
||||
figure; bode(sys_cl({'Vph', 'Vpv'}, {'Uch', 'Ucv'}), sys({'Vph', 'Vpv'}, {'Uch', 'Ucv'}))
|
@ -75,3 +75,13 @@ xlabel('Frequency [Hz]'); ylabel('Magnitude [dB]');
|
||||
hold off;
|
||||
xlim([freqs(1), freqs(end)]);
|
||||
legend('location', 'southeast');
|
||||
|
||||
% Save the Controller
|
||||
|
||||
Kd = c2d(K, 1e-4, 'tustin');
|
||||
|
||||
|
||||
|
||||
% The diagonal controller is accessible [[./mat/K_diag.mat][here]].
|
||||
|
||||
save('mat/K_diag.mat', 'K', 'Kd');
|
||||
|
@ -4,99 +4,186 @@ clear; close all; clc;
|
||||
%% Intialize Laplace variable
|
||||
s = zpk('s');
|
||||
|
||||
% Load Plant
|
||||
% Effect of the Sercalo angle error on the measured distance by the Attocube
|
||||
% <<sec:sercalo_angle_error>>
|
||||
% To simplify, we suppose that the Newport mirror is a flat mirror (instead of a concave one).
|
||||
|
||||
load('mat/plant.mat', 'Gi', 'Zc', 'Ga', 'Gc', 'Gn', 'Gd');
|
||||
% The geometry of the setup is shown in Fig. [[fig:angle_error_schematic_sercalo]] where:
|
||||
% - $O$ is the reference surface of the Attocube
|
||||
% - $S$ is the point where the beam first hits the Sercalo mirror
|
||||
% - $X$ is the point where the beam first hits the Newport mirror
|
||||
% - $\delta \theta_c$ is the angle error from its ideal 45 degrees
|
||||
|
||||
% Test
|
||||
% We define the angle error range $\delta \theta_c$ where we want to evaluate the distance error $\delta L$ measured by the Attocube.
|
||||
|
||||
bodeFig({Ga*Zc*Gi}, struct('phase', true));
|
||||
|
||||
% TODO Huddle Test
|
||||
% We load the data taken during the Huddle Test.
|
||||
|
||||
load('mat/data_huddle_test.mat', ...
|
||||
't', 'Uch', 'Ucv', ...
|
||||
'Unh', 'Unv', ...
|
||||
'Vph', 'Vpv', ...
|
||||
'Vch', 'Vcv', ...
|
||||
'Vnh', 'Vnv', ...
|
||||
'Va');
|
||||
thetas_c = logspace(-7, -4, 100); % [rad]
|
||||
|
||||
|
||||
|
||||
% We remove the first second of data where everything is settling down.
|
||||
% The geometrical parameters of the setup are defined below.
|
||||
|
||||
t0 = 1;
|
||||
H = 0.05; % [m]
|
||||
L = 0.05; % [m]
|
||||
|
||||
Uch(t<t0) = [];
|
||||
Ucv(t<t0) = [];
|
||||
Unh(t<t0) = [];
|
||||
Unv(t<t0) = [];
|
||||
Vph(t<t0) = [];
|
||||
Vpv(t<t0) = [];
|
||||
Vch(t<t0) = [];
|
||||
Vcv(t<t0) = [];
|
||||
Vnh(t<t0) = [];
|
||||
Vnv(t<t0) = [];
|
||||
Va(t<t0) = [];
|
||||
t(t<t0) = [];
|
||||
|
||||
t = t - t(1); % We start at t=0
|
||||
|
||||
% #+NAME: fig:angle_error_schematic_sercalo
|
||||
% #+CAPTION: Schematic of the geometry used to evaluate the effect of $\delta \theta_c$ on the measured distance $\delta L$
|
||||
% #+RESULTS:
|
||||
% [[file:figs/angle_error_schematic_sercalo.png]]
|
||||
|
||||
% The nominal points $O$, $S$ and $X$ are defined.
|
||||
|
||||
O = [-L, 0];
|
||||
S = [0, 0];
|
||||
X = [0, H];
|
||||
|
||||
|
||||
|
||||
% Thus, the initial path length $L$ is:
|
||||
|
||||
path_nominal = norm(S-O) + norm(X-S) + norm(S-X) + norm(O-S);
|
||||
|
||||
|
||||
|
||||
% We now compute the new path length when there is an error angle $\delta \theta_c$ on the Sercalo mirror angle.
|
||||
|
||||
path_length = zeros(size(thetas_c));
|
||||
|
||||
for i = 1:length(thetas_c)
|
||||
theta_c = thetas_c(i);
|
||||
Y = [H*tan(2*theta_c), H];
|
||||
M = 2*H/(tan(pi/4-theta_c)+1/tan(2*theta_c))*[1, tan(pi/4-theta_c)];
|
||||
T = [-L, M(2)+(L+M(1))*tan(4*theta_c)];
|
||||
|
||||
path_length(i) = norm(S-O) + norm(Y-S) + norm(M-Y) + norm(T-M);
|
||||
end
|
||||
|
||||
|
||||
|
||||
% We then compute the distance error and we plot it as a function of the Sercalo angle error (Fig. [[fig:effect_sercalo_angle_distance_meas]]).
|
||||
|
||||
path_error = path_length - path_nominal;
|
||||
|
||||
figure;
|
||||
plot(thetas_c, path_error)
|
||||
set(gca,'xscale','log');
|
||||
set(gca,'yscale','log');
|
||||
xlabel('Sercalo angle error [rad]');
|
||||
ylabel('Attocube measurement error [m]');
|
||||
|
||||
|
||||
|
||||
% #+NAME: fig:effect_sercalo_angle_distance_meas
|
||||
% #+CAPTION: Effect of an angle error of the Sercalo on the distance error measured by the Attocube ([[./figs/effect_sercalo_angle_distance_meas.png][png]], [[./figs/effect_sercalo_angle_distance_meas.pdf][pdf]])
|
||||
% [[file:figs/effect_sercalo_angle_distance_meas.png]]
|
||||
|
||||
% And we plot the beam path using Matlab for an high angle to verify that the code is working (Fig. [[fig:simulation_beam_path_high_angle]]).
|
||||
|
||||
theta = 2*2*pi/360; % [rad]
|
||||
H = 0.05; % [m]
|
||||
L = 0.05; % [m]
|
||||
|
||||
O = [-L, 0];
|
||||
S = [0, 0];
|
||||
X = [0, H];
|
||||
Y = [H*tan(2*theta), H];
|
||||
M = 2*H/(tan(pi/4-theta)+1/tan(2*theta))*[1, tan(pi/4-theta)];
|
||||
T = [-L, M(2)+(L+M(1))*tan(4*theta)];
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(t, Vph, 'DisplayName', '$Vp_h$');
|
||||
plot(t, Vpv, 'DisplayName', '$Vp_v$');
|
||||
plot([-L, -L], [0, H], 'k-'); % Interferometer
|
||||
plot([-L, 0.1*L], [H, H], 'k-'); % Reflector
|
||||
plot(0.5*min(L, H)*[-cos(pi/4-theta), cos(pi/4-theta)], 0.5*min(L, H)*[-sin(pi/4-theta), sin(pi/4-theta)], 'k-'); % Tilt-Mirror
|
||||
plot(0.5*min(L, H)*[-cos(pi/4), cos(pi/4)], 0.5*min(L, H)*[-sin(pi/4), sin(pi/4)], 'k--'); % Initial position of tilt mirror
|
||||
plot([O(1), S(1), Y(1), M(1), T(1)], [O(2), S(2), Y(2), M(2), T(2)], 'r-');
|
||||
plot([O(1), S(1), X(1), S(1), O(1)], [O(2), S(2), X(2), S(2), O(2)], 'b--');
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Amplitude [V]');
|
||||
xlim([t(1), t(end)]);
|
||||
legend();
|
||||
xlabel('X [m]'); ylabel('Y [m]');
|
||||
axis equal
|
||||
|
||||
% Error due to DAC noise used for the Sercalo
|
||||
|
||||
load('./mat/plant.mat', 'Gi', 'Gc', 'Gd');
|
||||
|
||||
G = inv(Gd)*Gc*Gi;
|
||||
|
||||
|
||||
|
||||
% We compute the Power Spectral Density of the horizontal and vertical positions of the beam as measured by the 4 quadrant diode.
|
||||
% Dynamical estimation:
|
||||
% - ASD of DAC noise used for the Sercalo
|
||||
% - Multiply by transfer function from Sercalo voltage to angle estimation using the 4QD
|
||||
|
||||
[psd_Vph, f] = pwelch(Vph, hanning(ceil(1*fs)), [], [], fs);
|
||||
[psd_Vpv, ~] = pwelch(Vpv, hanning(ceil(1*fs)), [], [], fs);
|
||||
|
||||
freqs = logspace(1, 3, 1000);
|
||||
|
||||
fs = 1e4;
|
||||
|
||||
% ASD of the DAC voltage going to the Sercalo in [V/sqrt(Hz)]
|
||||
asd_uc = (20/2^16)/sqrt(12*fs)*ones(length(freqs), 1);
|
||||
|
||||
% ASD of the measured angle by the QD in [rad/sqrt(Hz)]
|
||||
asd_theta = asd_uc.*abs(squeeze(freqresp(G(1,1), freqs, 'Hz')));
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(psd_Vph), 'DisplayName', '$\Gamma_{Vp_h}$');
|
||||
plot(f, sqrt(psd_Vpv), 'DisplayName', '$\Gamma_{Vp_v}$');
|
||||
hold off;
|
||||
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('ASD $\left[\frac{V}{\sqrt{Hz}}\right]$')
|
||||
legend('Location', 'southwest');
|
||||
xlim([1, 1000]);
|
||||
loglog(freqs, asd_theta)
|
||||
|
||||
|
||||
|
||||
% Then the corresponding ASD of the measured displacement by the interferometer is:
|
||||
|
||||
asd_L = asd_theta*10^(-6); % [m/sqrt(Hz)]
|
||||
|
||||
|
||||
|
||||
% And we integrate that to have the RMS value:
|
||||
|
||||
cps_L = 1/pi*cumtrapz(2*pi*freqs, (asd_L).^2);
|
||||
|
||||
|
||||
|
||||
% The RMS value is:
|
||||
|
||||
sqrt(cps_L(end))
|
||||
|
||||
|
||||
|
||||
% #+RESULTS:
|
||||
% : 1.647e-11
|
||||
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(t, Vch, 'DisplayName', '$Vc_h$');
|
||||
plot(t, Vcv, 'DisplayName', '$Vc_v$');
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Amplitude [V]');
|
||||
xlim([t(1), t(end)]);
|
||||
legend();
|
||||
loglog(freqs, cps_L)
|
||||
|
||||
|
||||
|
||||
% We compute the Power Spectral Density of the voltage across the inductance used for horizontal and vertical positioning of the Cercalo.
|
||||
% Let's estimate the beam angle error corresponding to 1 LSB of the sercalo's DAC.
|
||||
% Gain of the Sercalo is approximatively 5 degrees for 10V.
|
||||
% However the beam angle deviation is 4 times the angle deviation of the sercalo mirror, thus:
|
||||
|
||||
[psd_Vch, f] = pwelch(Vch, hanning(ceil(1*fs)), [], [], fs);
|
||||
[psd_Vcv, ~] = pwelch(Vcv, hanning(ceil(1*fs)), [], [], fs);
|
||||
d_alpha = 4*(20/2^16)*(5*pi/180)/10 % [rad]
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(psd_Vch), 'DisplayName', '$\Gamma_{Vc_h}$');
|
||||
plot(f, sqrt(psd_Vcv), 'DisplayName', '$\Gamma_{Vc_v}$');
|
||||
hold off;
|
||||
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('ASD $\left[\frac{V}{\sqrt{Hz}}\right]$')
|
||||
legend('Location', 'southwest');
|
||||
xlim([1, 1000]);
|
||||
|
||||
|
||||
% #+RESULTS:
|
||||
% : 1.0653e-05
|
||||
|
||||
% This corresponds to a measurement error of the Attocube equals to (in [m])
|
||||
|
||||
1e-6*d_alpha % [m]
|
||||
|
||||
%% Clear Workspace and Close figures
|
||||
clear; close all; clc;
|
||||
|
||||
%% Intialize Laplace variable
|
||||
s = zpk('s');
|
||||
|
||||
% Coprime Factorization
|
||||
|
||||
load('mat/plant.mat', 'sys', 'Gi', 'Zc', 'Ga', 'Gc', 'Gn', 'Gd');
|
||||
|
||||
[fact, Ml, Nl] = lncf(Gc*Gi);
|
||||
|
||||
%% Clear Workspace and Close figures
|
||||
clear; close all; clc;
|
||||
@ -139,3 +226,379 @@ end
|
||||
% Rotation Matrix
|
||||
|
||||
G0 = freqresp(G, 0);
|
||||
|
||||
%% Clear Workspace and Close figures
|
||||
clear; close all; clc;
|
||||
|
||||
%% Intialize Laplace variable
|
||||
s = zpk('s');
|
||||
|
||||
freqs = logspace(0, 2, 1000);
|
||||
|
||||
% Load Plant
|
||||
|
||||
load('mat/plant.mat', 'Gn', 'Gd');
|
||||
|
||||
% Analysis
|
||||
% The plant is basically a constant until frequencies up to the required bandwidth.
|
||||
|
||||
% We get that constant value.
|
||||
|
||||
Gn0 = freqresp(inv(Gd)*Gn, 0);
|
||||
|
||||
|
||||
|
||||
% We design two controller containing 2 integrators and one lead near the crossover frequency set to 10Hz.
|
||||
|
||||
h = 2;
|
||||
w0 = 2*pi*10;
|
||||
|
||||
Knh = 1/Gn0(1,1) * (w0/s)^2 * (1 + s/w0*h)/(1 + s/w0/h)/h;
|
||||
Knv = 1/Gn0(2,2) * (w0/s)^2 * (1 + s/w0*h)/(1 + s/w0/h)/h;
|
||||
|
||||
figure;
|
||||
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(Gn0(1,1)*Knh, freqs, 'Hz'))))
|
||||
hold off;
|
||||
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('Loop Gain');
|
||||
|
||||
% Save
|
||||
|
||||
Kn = blkdiag(Knh, Knv);
|
||||
Knd = c2d(Kn, 1e-4, 'tustin');
|
||||
|
||||
|
||||
|
||||
|
||||
% The controllers can be downloaded [[./mat/K_newport.mat][here]].
|
||||
|
||||
|
||||
save('mat/K_newport.mat', 'Kn', 'Knd');
|
||||
|
||||
%% Clear Workspace and Close figures
|
||||
clear; close all; clc;
|
||||
|
||||
%% Intialize Laplace variable
|
||||
s = zpk('s');
|
||||
|
||||
fs = 1e4;
|
||||
|
||||
% Data Load and pre-processing
|
||||
|
||||
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', ...
|
||||
'Vnh', 'Vnv', ...
|
||||
'Va');
|
||||
|
||||
% 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);
|
||||
|
||||
uh.Uch([1:i0-1, iend:end]) = [];
|
||||
uh.Ucv([1:i0-1, iend:end]) = [];
|
||||
uh.Unh([1:i0-1, iend:end]) = [];
|
||||
uh.Unv([1:i0-1, iend:end]) = [];
|
||||
uh.Vph([1:i0-1, iend:end]) = [];
|
||||
uh.Vpv([1:i0-1, iend:end]) = [];
|
||||
uh.Vnh([1:i0-1, iend:end]) = [];
|
||||
uh.Vnv([1:i0-1, iend:end]) = [];
|
||||
uh.Va ([1:i0-1, iend:end]) = [];
|
||||
uh.t ([1:i0-1, iend:end]) = [];
|
||||
|
||||
% We reset the time t
|
||||
uh.t = uh.t - uh.t(1);
|
||||
|
||||
% Let's start one second after the first command in the system
|
||||
i0 = find(uv.Unv ~= 0, 1) + fs;
|
||||
iend = i0+fs*floor((length(uv.t)-i0)/fs);
|
||||
|
||||
uv.Uch([1:i0-1, iend:end]) = [];
|
||||
uv.Ucv([1:i0-1, iend:end]) = [];
|
||||
uv.Unh([1:i0-1, iend:end]) = [];
|
||||
uv.Unv([1:i0-1, iend:end]) = [];
|
||||
uv.Vph([1:i0-1, iend:end]) = [];
|
||||
uv.Vpv([1:i0-1, iend:end]) = [];
|
||||
uv.Vnh([1:i0-1, iend:end]) = [];
|
||||
uv.Vnv([1:i0-1, iend:end]) = [];
|
||||
uv.Va ([1:i0-1, iend:end]) = [];
|
||||
uv.t ([1:i0-1, iend:end]) = [];
|
||||
|
||||
% We reset the time t
|
||||
uv.t = uv.t - uv.t(1);
|
||||
|
||||
% Some Time domain plots
|
||||
|
||||
tend = 5; % [s]
|
||||
|
||||
figure;
|
||||
ax1 = subplot(2, 2, 1);
|
||||
hold on;
|
||||
plot(uh.t(1:tend*fs), uh.Unh(1:tend*fs));
|
||||
hold off;
|
||||
xlabel('Time [s]'); ylabel('Voltage [V]');
|
||||
title('Newport Tilt - Horizontal Direction');
|
||||
|
||||
ax3 = subplot(2, 2, 3);
|
||||
hold on;
|
||||
plot(uh.t(1:tend*fs), 1e9*uh.Va(1:tend*fs));
|
||||
hold off;
|
||||
xlabel('Time [s]'); ylabel('Distance [nm]');
|
||||
title('Attocube - Horizontal Direction');
|
||||
|
||||
ax2 = subplot(2, 2, 2);
|
||||
hold on;
|
||||
plot(uv.t(1:tend*fs), uv.Unv(1:tend*fs));
|
||||
hold off;
|
||||
xlabel('Time [s]'); ylabel('Voltage [V]');
|
||||
title('Newport Tilt - Vertical Direction');
|
||||
|
||||
ax4 = subplot(2, 2, 4);
|
||||
hold on;
|
||||
plot(uv.t(1:tend*fs), 1e9*uv.Va(1:tend*fs));
|
||||
hold off;
|
||||
xlabel('Time [s]'); ylabel('Distance [nm]');
|
||||
title('Attocube - Vertical Direction');
|
||||
|
||||
linkaxes([ax1,ax2,ax3,ax4],'x');
|
||||
linkaxes([ax1,ax2],'xy');
|
||||
linkaxes([ax3,ax4],'xy');
|
||||
|
||||
% Verify Tracking Angle Error
|
||||
% Let's verify that the positioning error of the beam is small and what could be the effect on the distance measured by the intereferometer.
|
||||
|
||||
|
||||
load('./mat/plant.mat', 'Gd');
|
||||
|
||||
figure;
|
||||
ax1 = subplot(1, 2, 1);
|
||||
hold on;
|
||||
plot(uh.t(1:2*fs), 1e6*uh.Vph(1:2*fs)/freqresp(Gd(1,1), 0), 'DisplayName', '$\theta_{h}$');
|
||||
plot(uh.t(1:2*fs), 1e6*uh.Vpv(1:2*fs)/freqresp(Gd(2,2), 0), 'DisplayName', '$\theta_{v}$');
|
||||
hold off;
|
||||
xlabel('Time [s]'); ylabel('$\theta$ [$\mu$ rad]');
|
||||
title('Newport Tilt - Horizontal Direction');
|
||||
legend();
|
||||
|
||||
ax2 = subplot(1, 2, 2);
|
||||
hold on;
|
||||
plot(uv.t(1:2*fs), 1e6*uv.Vph(1:2*fs)/freqresp(Gd(1,1), 0), 'DisplayName', '$\theta_{h}$');
|
||||
plot(uv.t(1:2*fs), 1e6*uv.Vpv(1:2*fs)/freqresp(Gd(2,2), 0), 'DisplayName', '$\theta_{v}$');
|
||||
hold off;
|
||||
xlabel('Time [s]'); ylabel('$\theta$ [$\mu$ rad]');
|
||||
title('Newport Tilt - Vertical Direction');
|
||||
legend();
|
||||
|
||||
linkaxes([ax1,ax2],'xy');
|
||||
|
||||
|
||||
|
||||
% #+NAME: fig:repeat_tracking_errors
|
||||
% #+CAPTION: Tracking errors during the repeatability measurement ([[./figs/repeat_tracking_errors.png][png]], [[./figs/repeat_tracking_errors.pdf][pdf]])
|
||||
% [[file:figs/repeat_tracking_errors.png]]
|
||||
|
||||
% Let's compute the PSD of the error to see the frequency content.
|
||||
|
||||
|
||||
[psd_UhRh, f] = pwelch(uh.Vph/freqresp(Gd(1,1), 0), hanning(ceil(1*fs)), [], [], fs);
|
||||
[psd_UhRv, ~] = pwelch(uh.Vpv/freqresp(Gd(2,2), 0), hanning(ceil(1*fs)), [], [], fs);
|
||||
[psd_UvRh, ~] = pwelch(uv.Vph/freqresp(Gd(1,1), 0), hanning(ceil(1*fs)), [], [], fs);
|
||||
[psd_UvRv, ~] = pwelch(uv.Vpv/freqresp(Gd(2,2), 0), hanning(ceil(1*fs)), [], [], fs);
|
||||
|
||||
figure;
|
||||
ax1 = subplot(1, 2, 1);
|
||||
hold on;
|
||||
plot(f, sqrt(psd_UhRh), 'DisplayName', '$\Gamma_{\theta_h}$');
|
||||
plot(f, sqrt(psd_UhRv), 'DisplayName', '$\Gamma_{\theta_v}$');
|
||||
hold off;
|
||||
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('ASD $\left[\frac{rad}{\sqrt{Hz}}\right]$')
|
||||
legend('Location', 'southwest');
|
||||
title('Newport Tilt - Horizontal Direction');
|
||||
|
||||
ax2 = subplot(1, 2, 2);
|
||||
hold on;
|
||||
plot(f, sqrt(psd_UvRh), 'DisplayName', '$\Gamma_{\theta_h}$');
|
||||
plot(f, sqrt(psd_UvRv), 'DisplayName', '$\Gamma_{\theta_v}$');
|
||||
hold off;
|
||||
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('ASD $\left[\frac{rad}{\sqrt{Hz}}\right]$')
|
||||
legend('Location', 'southwest');
|
||||
title('Newport Tilt - Vertical Direction');
|
||||
|
||||
linkaxes([ax1,ax2],'xy');
|
||||
xlim([1, 1000]);
|
||||
|
||||
|
||||
|
||||
% #+NAME: fig:psd_tracking_error_rad
|
||||
% #+CAPTION: Power Spectral Density of the tracking errors ([[./figs/psd_tracking_error_rad.png][png]], [[./figs/psd_tracking_error_rad.pdf][pdf]])
|
||||
% [[file:figs/psd_tracking_error_rad.png]]
|
||||
|
||||
|
||||
% Let's convert that to errors in distance
|
||||
|
||||
% \[ \Delta L = L^\prime - L = \frac{L}{\cos(\alpha)} - L \approx \frac{L \alpha^2}{2} \]
|
||||
% with
|
||||
% - $L$ is the nominal distance traveled by the beam
|
||||
% - $L^\prime$ is the distance traveled by the beam with an angle error
|
||||
% - $\alpha$ is the angle error
|
||||
|
||||
|
||||
L = 0.1; % [m]
|
||||
|
||||
[psd_UhLh, f] = pwelch(0.5*L*(uh.Vph/freqresp(Gd(1,1), 0)).^2, hanning(ceil(1*fs)), [], [], fs);
|
||||
[psd_UhLv, ~] = pwelch(0.5*L*(uh.Vpv/freqresp(Gd(2,2), 0)).^2, hanning(ceil(1*fs)), [], [], fs);
|
||||
[psd_UvLh, ~] = pwelch(0.5*L*(uv.Vph/freqresp(Gd(1,1), 0)).^2, hanning(ceil(1*fs)), [], [], fs);
|
||||
[psd_UvLv, ~] = pwelch(0.5*L*(uv.Vpv/freqresp(Gd(2,2), 0)).^2, hanning(ceil(1*fs)), [], [], fs);
|
||||
|
||||
|
||||
|
||||
% Now, compare that with the PSD of the measured distance by the interferometer (Fig. [[fig:compare_tracking_error_attocube_meas]]).
|
||||
|
||||
[psd_Lh, f] = pwelch(uh.Va, hanning(ceil(1*fs)), [], [], fs);
|
||||
[psd_Lv, ~] = pwelch(uv.Va, hanning(ceil(1*fs)), [], [], fs);
|
||||
|
||||
figure;
|
||||
ax1 = subplot(1, 2, 1);
|
||||
hold on;
|
||||
plot(f, sqrt(psd_UhLh), 'DisplayName', '$\Gamma_{L_h}$');
|
||||
plot(f, sqrt(psd_UhLv), 'DisplayName', '$\Gamma_{L_v}$');
|
||||
plot(f, sqrt(psd_Lh), '--k', 'DisplayName', '$\Gamma_{L_h}$');
|
||||
hold off;
|
||||
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('ASD $\left[\frac{m}{\sqrt{Hz}}\right]$')
|
||||
legend('Location', 'southwest');
|
||||
title('Newport Tilt - Horizontal Direction');
|
||||
|
||||
ax2 = subplot(1, 2, 2);
|
||||
hold on;
|
||||
plot(f, sqrt(psd_UvLh), 'DisplayName', '$\Gamma_{L_h}$');
|
||||
plot(f, sqrt(psd_UvLv), 'DisplayName', '$\Gamma_{L_v}$');
|
||||
plot(f, sqrt(psd_Lv), '--k', 'DisplayName', '$\Gamma_{L_h}$');
|
||||
hold off;
|
||||
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('ASD $\left[\frac{m}{\sqrt{Hz}}\right]$')
|
||||
legend('Location', 'southwest');
|
||||
title('Newport Tilt - Vertical Direction');
|
||||
|
||||
linkaxes([ax1,ax2],'xy');
|
||||
xlim([1, 1000]);
|
||||
|
||||
% Processing
|
||||
% First, we get the mean value as measured by the interferometer for each value of the Newport angle.
|
||||
|
||||
Vahm = mean(reshape(uh.Va, [fs floor(length(uh.t)/fs)]),2);
|
||||
Unhm = mean(reshape(uh.Unh, [fs floor(length(uh.t)/fs)]),2);
|
||||
|
||||
Vavm = mean(reshape(uv.Va, [fs floor(length(uv.t)/fs)]),2);
|
||||
Unvm = mean(reshape(uv.Unv, [fs floor(length(uv.t)/fs)]),2);
|
||||
|
||||
|
||||
|
||||
% #+RESULTS:
|
||||
% | Va - Horizontal [nm rms] | Va - Vertical [nm rms] |
|
||||
% |--------------------------+------------------------|
|
||||
% | 19.6 | 13.9 |
|
||||
|
||||
|
||||
figure;
|
||||
ax1 = subplot(1, 2, 1);
|
||||
hold on;
|
||||
plot(uh.Unh, uh.Va);
|
||||
plot(Unhm, Vahm)
|
||||
hold off;
|
||||
xlabel('$V_{n,h}$ [V]'); ylabel('$V_a$ [m]');
|
||||
|
||||
ax2 = subplot(1, 2, 2);
|
||||
hold on;
|
||||
plot(uv.Unv, uv.Va);
|
||||
plot(Unvm, Vavm)
|
||||
hold off;
|
||||
xlabel('$V_{n,v}$ [V]'); ylabel('$V_a$ [m]');
|
||||
|
||||
linkaxes([ax1,ax2],'xy');
|
||||
|
||||
|
||||
|
||||
% #+NAME: fig:repeat_plot_raw
|
||||
% #+CAPTION: Repeatability of the measurement ([[./figs/repeat_plot_raw.png][png]], [[./figs/repeat_plot_raw.pdf][pdf]])
|
||||
% [[file:figs/repeat_plot_raw.png]]
|
||||
|
||||
|
||||
|
||||
figure;
|
||||
ax1 = subplot(1, 2, 1);
|
||||
hold on;
|
||||
plot(uh.Unh, 1e9*(uh.Va - repmat(Vahm, length(uh.t)/length(Vahm),1)));
|
||||
hold off;
|
||||
xlabel('$V_{n,h}$ [V]'); ylabel('$V_a$ [nm]');
|
||||
|
||||
ax2 = subplot(1, 2, 2);
|
||||
hold on;
|
||||
plot(uv.Unv, 1e9*(uv.Va - repmat(Vavm, length(uv.t)/length(Vavm),1)));
|
||||
hold off;
|
||||
xlabel('$V_{n,v}$ [V]'); ylabel('$V_a$ [nm]');
|
||||
|
||||
linkaxes([ax1,ax2],'xy');
|
||||
ylim([-100 100]);
|
||||
|
||||
% Analysis of the non-repeatable contributions
|
||||
% Let's know try to determine where does the non-repeatability comes from.
|
||||
|
||||
% From the 4QD signal, we can compute the angle error of the beam and thus determine the corresponding displacement measured by the attocube.
|
||||
|
||||
% We then take the non-repeatable part of this displacement and we compare that with the total non-repeatability.
|
||||
|
||||
% We also plot the displacement measured during the huddle test.
|
||||
|
||||
% All the signals are shown on Fig. [[]].
|
||||
|
||||
|
||||
Vphm = mean(reshape(uh.Vph/freqresp(Gd(1,1), 0), [fs floor(length(uh.t)/fs)]),2);
|
||||
Unhm = mean(reshape(uh.Unh, [fs floor(length(uh.t)/fs)]),2);
|
||||
|
||||
Vpvm = mean(reshape(uv.Vpv/freqresp(Gd(2,2), 0), [fs floor(length(uv.t)/fs)]),2);
|
||||
Unvm = mean(reshape(uv.Unv, [fs floor(length(uv.t)/fs)]),2);
|
||||
|
||||
% =Vaheq= is the equivalent measurement error in [m] due to error angle of the Sercalo.
|
||||
Vaheq = uh.Vph/freqresp(Gd(1,1), 0) - repmat(Vphm, length(uh.t)/length(Vphm),1);
|
||||
Vaveq = uv.Vpv/freqresp(Gd(2,2), 0) - repmat(Vpvm, length(uv.t)/length(Vpvm),1);
|
||||
|
||||
Vaheq = sign(Vaheq).*Vaheq.^2;
|
||||
Vaveq = sign(Vaveq).*Vaveq.^2;
|
||||
|
||||
ht = load('./mat/data_huddle_test_3.mat', 't', 'Va');
|
||||
|
||||
htm = 1e9*ht.Va(1:length(Vaheq)) - repmat(mean(1e9*ht.Va(1:length(Vaheq))), length(uh.t)/length(Vaheq),1);
|
||||
|
||||
figure;
|
||||
ax1 = subplot(1, 2, 1);
|
||||
hold on;
|
||||
plot(uh.Unh, 1e9*(uh.Va - repmat(Vahm, length(uh.t)/length(Vahm),1)));
|
||||
plot(uh.Unh, 1e9*ht.Va(1:length(Vaheq))-mean(1e9*ht.Va(1:length(Vaheq))));
|
||||
plot(uh.Unh, 1e9*Vaheq);
|
||||
hold off;
|
||||
xlabel('$V_{n,h}$ [V]'); ylabel('$V_a$ [nm]');
|
||||
|
||||
ax2 = subplot(1, 2, 2);
|
||||
hold on;
|
||||
plot(uv.Unv, 1e9*(uv.Va - repmat(Vavm, length(uv.t)/length(Vavm),1)), 'DisplayName', 'Measured Non-Repeatability');
|
||||
plot(uv.Unv, 1e9*ht.Va(1:length(Vaveq))-mean(1e9*ht.Va(1:length(Vaveq))), 'DisplayName', 'Huddle Test');
|
||||
plot(uv.Unv, 1e9*Vaveq, 'DisplayName', 'Due to Sercalo Angle Error');
|
||||
hold off;
|
||||
xlabel('$V_{n,v}$ [V]'); ylabel('$V_a$ [nm]');
|
||||
legend('location', 'northeast');
|
||||
|
||||
linkaxes([ax1,ax2],'xy');
|
||||
ylim([-100 100]);
|
||||
|
180
matlab/huddle_test.m
Normal file
180
matlab/huddle_test.m
Normal file
@ -0,0 +1,180 @@
|
||||
%% Clear Workspace and Close figures
|
||||
clear; close all; clc;
|
||||
|
||||
%% Intialize Laplace variable
|
||||
s = zpk('s');
|
||||
|
||||
% Load Data
|
||||
|
||||
ht_1 = load('./mat/data_huddle_test_1.mat', 't', 'Vph', 'Vpv', 'Va');
|
||||
ht_2 = load('./mat/data_huddle_test_2.mat', 't', 'Vph', 'Vpv', 'Va');
|
||||
ht_3 = load('./mat/data_huddle_test_3.mat', 't', 'Uch', 'Ucv', 'Vph', 'Vpv', 'Va');
|
||||
ht_4 = load('./mat/data_huddle_test_4.mat', 't', 'Vph', 'Vpv', 'Va');
|
||||
% ht_5 = load('./mat/data_huddle_test_5.mat', 't', 'Uch', 'Ucv', 'Vph', 'Vpv', 'Va');
|
||||
|
||||
fs = 1e4;
|
||||
|
||||
% Pre-processing
|
||||
|
||||
t0 = 1; % [s]
|
||||
|
||||
tend = 100; % [s]
|
||||
|
||||
ht_s = {ht_1 ht_2 ht_3 ht_4}
|
||||
|
||||
for i = 1:length(ht_s)
|
||||
ht_s{i}.Vph(ht_s{i}.t<t0) = [];
|
||||
ht_s{i}.Vpv(ht_s{i}.t<t0) = [];
|
||||
ht_s{i}.Va(ht_s{i}.t<t0) = [];
|
||||
ht_s{i}.t(ht_s{i}.t<t0) = [];
|
||||
|
||||
ht_s{i}.t = ht_s{i}.t - ht_s{i}.t(1); % We start at t=0
|
||||
|
||||
ht_s{i}.Vph(tend*fs+1:end) = [];
|
||||
ht_s{i}.Vpv(tend*fs+1:end) = [];
|
||||
ht_s{i}.Va(tend*fs+1:end) = [];
|
||||
ht_s{i}.t(tend*fs+1:end) = [];
|
||||
|
||||
ht_s{i}.Va = ht_s{i}.Va - mean(ht_s{i}.Va);
|
||||
end
|
||||
|
||||
ht_1 = ht_s{1};
|
||||
ht_2 = ht_s{2};
|
||||
ht_3 = ht_s{3};
|
||||
ht_4 = ht_s{4};
|
||||
|
||||
% Time domain plots
|
||||
|
||||
figure;
|
||||
ax1 = subaxis(2, 2, 1)
|
||||
hold on;
|
||||
plot(ht_1.t, 1e9*ht_1.Va);
|
||||
hold off;
|
||||
ylabel('Displacement [nm]');
|
||||
set(gca, 'XTickLabel',[]);
|
||||
title('OL');
|
||||
|
||||
ax2 = subaxis(2, 2, 2)
|
||||
hold on;
|
||||
plot(ht_2.t, 1e9*ht_2.Va);
|
||||
hold off;
|
||||
set(gca, 'XTickLabel',[]);
|
||||
set(gca, 'YTickLabel',[]);
|
||||
title('OL + CU');
|
||||
|
||||
ax3 = subaxis(2, 2, 3)
|
||||
hold on;
|
||||
plot(ht_3.t, 1e9*ht_3.Va);
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Displacement [nm]');
|
||||
title('CL + CU');
|
||||
|
||||
ax4 = subaxis(2, 2, 4)
|
||||
hold on;
|
||||
plot(ht_4.t, 1e9*ht_4.Va);
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
set(gca, 'YTickLabel',[]);
|
||||
title('OL + CU + AL');
|
||||
|
||||
linkaxes([ax1 ax2 ax3 ax4], 'xy');
|
||||
|
||||
|
||||
|
||||
% #+NAME: fig:huddle_test_Va
|
||||
% #+CAPTION: Measurement of the Attocube during Huddle Test ([[./figs/huddle_test_Va.png][png]], [[./figs/huddle_test_Va.pdf][pdf]])
|
||||
% [[file:figs/huddle_test_Va.png]]
|
||||
|
||||
|
||||
figure;
|
||||
ax1 = subaxis(2, 2, 1)
|
||||
hold on;
|
||||
plot(ht_1.t, ht_1.Vph);
|
||||
plot(ht_1.t, ht_1.Vpv);
|
||||
hold off;
|
||||
ylabel('Voltage [V]');
|
||||
set(gca, 'XTickLabel',[]);
|
||||
title('OL');
|
||||
|
||||
ax2 = subaxis(2, 2, 2)
|
||||
hold on;
|
||||
plot(ht_2.t, ht_2.Vph);
|
||||
plot(ht_2.t, ht_2.Vpv);
|
||||
hold off;
|
||||
set(gca, 'XTickLabel',[]);
|
||||
set(gca, 'YTickLabel',[]);
|
||||
title('OL + CU');
|
||||
|
||||
ax3 = subaxis(2, 2, 3)
|
||||
hold on;
|
||||
plot(ht_3.t, ht_3.Vph);
|
||||
plot(ht_3.t, ht_3.Vpv);
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
ylabel('Voltage [V]');
|
||||
title('CL + CU');
|
||||
|
||||
ax4 = subaxis(2, 2, 4)
|
||||
hold on;
|
||||
plot(ht_4.t, ht_4.Vph);
|
||||
plot(ht_4.t, ht_4.Vpv);
|
||||
hold off;
|
||||
xlabel('Time [s]');
|
||||
set(gca, 'YTickLabel',[]);
|
||||
title('OL + CU + AL');
|
||||
|
||||
linkaxes([ax1 ax2 ax3 ax4], 'xy');
|
||||
|
||||
% Power Spectral Density
|
||||
|
||||
win = hanning(ceil(1*fs));
|
||||
|
||||
[psd_Va1, f] = pwelch(ht_1.Va, win, [], [], fs);
|
||||
[psd_Va2, ~] = pwelch(ht_2.Va, win, [], [], fs);
|
||||
[psd_Va3, ~] = pwelch(ht_3.Va, win, [], [], fs);
|
||||
[psd_Va4, ~] = pwelch(ht_4.Va, win, [], [], fs);
|
||||
|
||||
[psd_Vph1, ~] = pwelch(ht_1.Vph, win, [], [], fs);
|
||||
[psd_Vph2, ~] = pwelch(ht_2.Vph, win, [], [], fs);
|
||||
[psd_Vph3, ~] = pwelch(ht_3.Vph, win, [], [], fs);
|
||||
[psd_Vph4, ~] = pwelch(ht_4.Vph, win, [], [], fs);
|
||||
|
||||
[psd_Vpv1, ~] = pwelch(ht_1.Vpv, win, [], [], fs);
|
||||
[psd_Vpv2, ~] = pwelch(ht_2.Vpv, win, [], [], fs);
|
||||
[psd_Vpv3, ~] = pwelch(ht_3.Vpv, win, [], [], fs);
|
||||
[psd_Vpv4, ~] = pwelch(ht_4.Vpv, win, [], [], fs);
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(psd_Va1), 'DisplayName', 'OL');
|
||||
plot(f, sqrt(psd_Va2), 'DisplayName', 'OL + CU');
|
||||
plot(f, sqrt(psd_Va3), 'DisplayName', 'CL + CU');
|
||||
plot(f, sqrt(psd_Va4), 'DisplayName', 'OL + CU + AL');
|
||||
hold off;
|
||||
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
|
||||
xlabel('Frequency [Hz]');
|
||||
ylabel('ASD $\left[\frac{m}{\sqrt{Hz}}\right]$');
|
||||
legend('location', 'northeast');
|
||||
xlim([1, 1000]);
|
||||
|
||||
|
||||
|
||||
% #+NAME: fig:huddle_test_psd_va
|
||||
% #+CAPTION: PSD of the Interferometer measurement during Huddle tests ([[./figs/huddle_test_psd_va.png][png]], [[./figs/huddle_test_psd_va.pdf][pdf]])
|
||||
% [[file:figs/huddle_test_psd_va.png]]
|
||||
|
||||
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, sqrt(psd_Vph1), 'DisplayName', 'OL');
|
||||
plot(f, sqrt(psd_Vph2), 'DisplayName', 'OL + CU');
|
||||
plot(f, sqrt(psd_Vph3), 'DisplayName', 'CL + CU');
|
||||
plot(f, sqrt(psd_Vph4), 'DisplayName', 'OL + CU + AL');
|
||||
hold off;
|
||||
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
|
||||
xlabel('Frequency [Hz]');
|
||||
ylabel('ASD $\left[\frac{1}{\sqrt{Hz}}\right]$');
|
||||
legend('location', 'northeast');
|
||||
xlim([1, 1000]);
|
@ -4,7 +4,7 @@ tg = slrt;
|
||||
if tg.Connected == "Yes"
|
||||
if tg.Status == "stopped"
|
||||
%% Load the application
|
||||
tg.load('test_cercalo');
|
||||
tg.load('test_sercalo');
|
||||
|
||||
%% Run the application
|
||||
tg.start;
|
||||
|
@ -16,7 +16,7 @@ uv = load('mat/data_cal_pd_v.mat', 't', 'Vph', 'Vpv', 'Vnv');
|
||||
|
||||
|
||||
|
||||
% We remove the first seconds where the Cercalo is turned on.
|
||||
% We remove the first seconds where the Sercalo is turned on.
|
||||
|
||||
t0 = 1;
|
||||
|
||||
@ -220,7 +220,7 @@ uv = load('mat/data_ucv.mat', 't', 'Ucv', 'Vcv');
|
||||
|
||||
|
||||
|
||||
% We remove the first seconds where the Cercalo is turned on.
|
||||
% We remove the first seconds where the Sercalo is turned on.
|
||||
|
||||
t0 = 1;
|
||||
|
||||
@ -273,7 +273,7 @@ xlim([1, 2000]);
|
||||
% #+CAPTION: Identified and Theoretical Transfer Function $G_a G_i$ ([[./figs/current_amplifier_comp_theory_id.png][png]], [[./figs/current_amplifier_comp_theory_id.pdf][pdf]])
|
||||
% [[file:figs/current_amplifier_comp_theory_id.png]]
|
||||
|
||||
% There is a gain mismatch, that is probably due to bad identification of the inductance and resistance measurement of the cercalo inductors.
|
||||
% There is a gain mismatch, that is probably due to bad identification of the inductance and resistance measurement of the sercalo inductors.
|
||||
% Thus, we suppose $G_a$ is perfectly known (the gain and cut-off frequency of the voltage amplifier is very accurate) and that $G_i$ is also well determined as it mainly depends on the resistor used in the amplifier that is well measured.
|
||||
|
||||
Gi_resp_h = abs(GaZcGi_h)./squeeze(abs(freqresp(Ga(1,1)*Zc(1,1), f, 'Hz')));
|
||||
@ -325,7 +325,7 @@ uv = load('mat/data_ucv.mat', 't', 'Ucv', 'Vph', 'Vpv');
|
||||
|
||||
|
||||
|
||||
% We remove the first seconds where the Cercalo is turned on.
|
||||
% We remove the first seconds where the Sercalo is turned on.
|
||||
|
||||
t0 = 1;
|
||||
|
||||
@ -481,9 +481,9 @@ xlim([10, 1000]); ylim([1e-2, 1e3]);
|
||||
|
||||
|
||||
|
||||
% #+NAME: fig:frf_cercalo_gain
|
||||
% #+CAPTION: Frequency Response Matrix ([[./figs/frf_cercalo_gain.png][png]], [[./figs/frf_cercalo_gain.pdf][pdf]])
|
||||
% [[file:figs/frf_cercalo_gain.png]]
|
||||
% #+NAME: fig:frf_sercalo_gain
|
||||
% #+CAPTION: Frequency Response Matrix ([[./figs/frf_sercalo_gain.png][png]], [[./figs/frf_sercalo_gain.pdf][pdf]])
|
||||
% [[file:figs/frf_sercalo_gain.png]]
|
||||
|
||||
|
||||
figure;
|
||||
@ -588,7 +588,7 @@ weight_Ucv_Vpv(f>1000) = 0;
|
||||
|
||||
|
||||
|
||||
% The weights are shown in Fig. [[fig:weights_cercalo]].
|
||||
% The weights are shown in Fig. [[fig:weights_sercalo]].
|
||||
|
||||
|
||||
figure;
|
||||
@ -605,9 +605,9 @@ legend('location', 'northwest');
|
||||
|
||||
|
||||
|
||||
% #+NAME: fig:weights_cercalo
|
||||
% #+CAPTION: Weights amplitude ([[./figs/weights_cercalo.png][png]], [[./figs/weights_cercalo.pdf][pdf]])
|
||||
% [[file:figs/weights_cercalo.png]]
|
||||
% #+NAME: fig:weights_sercalo
|
||||
% #+CAPTION: Weights amplitude ([[./figs/weights_sercalo.png][png]], [[./figs/weights_sercalo.pdf][pdf]])
|
||||
% [[file:figs/weights_sercalo.png]]
|
||||
|
||||
% When we set some options for =vfit3=.
|
||||
|
||||
@ -762,7 +762,7 @@ uv = load('mat/data_unv.mat', 't', 'Unv', 'Vph', 'Vpv');
|
||||
|
||||
|
||||
|
||||
% We remove the first seconds where the Cercalo is turned on.
|
||||
% We remove the first seconds where the Sercalo is turned on.
|
||||
|
||||
t0 = 3;
|
||||
|
||||
@ -1034,6 +1034,36 @@ Gn = blkdiag(tf(mean(abs(tf_Unh_Vph(f>10 & f<100)))), tf(mean(abs(tf_Unv_Vpv(f>1
|
||||
% - $G_n$
|
||||
% - $G_d$
|
||||
|
||||
% We name the input and output of each transfer function:
|
||||
|
||||
Gi.InputName = {'Uch', 'Ucv'};
|
||||
Gi.OutputName = {'Ich', 'Icv'};
|
||||
|
||||
Zc.InputName = {'Ich', 'Icv'};
|
||||
Zc.OutputName = {'Vtch', 'Vtcv'};
|
||||
|
||||
Ga.InputName = {'Vtch', 'Vtcv'};
|
||||
Ga.OutputName = {'Vch', 'Vcv'};
|
||||
|
||||
Gc.InputName = {'Ich', 'Icv'};
|
||||
Gc.OutputName = {'Vpch', 'Vpcv'};
|
||||
|
||||
Gn.InputName = {'Unh', 'Unv'};
|
||||
Gn.OutputName = {'Vpnh', 'Vpnv'};
|
||||
|
||||
Gd.InputName = {'Rh', 'Rv'};
|
||||
Gd.OutputName = {'Vph', 'Vpv'};
|
||||
|
||||
Sh = sumblk('Vph = Vpch + Vpnh');
|
||||
Sv = sumblk('Vpv = Vpcv + Vpnv');
|
||||
|
||||
inputs = {'Uch', 'Ucv', 'Unh', 'Unv'};
|
||||
outputs = {'Vch', 'Vcv', 'Ich', 'Icv', 'Rh', 'Rv', 'Vph', 'Vpv'};
|
||||
|
||||
sys = connect(Gi, Zc, Ga, Gc, Gn, inv(Gd), Sh, Sv, inputs, outputs);
|
||||
|
||||
|
||||
|
||||
% The file =mat/plant.mat= is accessible [[./mat/plant.mat][here]].
|
||||
|
||||
save('mat/plant.mat', 'Gi', 'Zc', 'Ga', 'Gc', 'Gn', 'Gd');
|
||||
save('mat/plant.mat', 'sys', 'Gi', 'Zc', 'Ga', 'Gc', 'Gn', 'Gd');
|
Loading…
Reference in New Issue
Block a user