Add identification of Newport dynamics and 4QD gain

This commit is contained in:
Thomas Dehaeze 2019-09-16 18:14:44 +02:00
parent 7ec253af25
commit 69a382d52a
21 changed files with 1121 additions and 442 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
figs/id_newport_phase.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

BIN
figs/identification_unh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

BIN
figs/identification_unv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 54 KiB

BIN
figs/newport_doc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

BIN
figs/newport_gain.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
figs/time_delay_newport.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 77 KiB

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<!-- 2019-09-16 lun. 11:59 --> <!-- 2019-09-16 lun. 15:21 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Cercalo Test Bench</title> <title>Cercalo Test Bench</title>
@ -276,271 +276,92 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2> <h2>Table of Contents</h2>
<div id="text-table-of-contents"> <div id="text-table-of-contents">
<ul> <ul>
<li><a href="#org754474f">1. Introduction</a> <li><a href="#org56fbace">1. Introduction</a>
<ul> <ul>
<li><a href="#org5c645da">1.1. Signals</a></li> <li><a href="#orgc71c3a8">1.1. Block Diagram</a></li>
<li><a href="#org0aa0ee3">1.2. Cercalo</a></li> <li><a href="#org6dd135b">1.2. Amplifier for the Cercalo</a></li>
<li><a href="#org002d4fa">1.3. Optical Setup</a></li> <li><a href="#org3f4c55a">1.3. Cercalo</a></li>
<li><a href="#org39881ce">1.4. 4 quadrant Diode</a></li> <li><a href="#org8cf1cba">1.4. Optical Setup</a></li>
<li><a href="#orgd6654c5">1.5. ADC/DAC</a></li> <li><a href="#org6d8a72e">1.5. Newport</a></li>
<li><a href="#org6c0b30a">1.6. Amplifier for the Cercalo</a></li> <li><a href="#orgcf9e532">1.6. 4 quadrant Diode</a></li>
<li><a href="#org4f39adb">1.7. Block Diagram</a></li> <li><a href="#orgbfa25c0">1.7. ADC/DAC</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org84958b2">2. Identification</a> <li><a href="#org549f783">2. Identification</a>
<ul> <ul>
<li><a href="#orgd0268b2">2.1. Excitation Data</a></li> <li><a href="#orga174838">2.1. Excitation Data</a></li>
<li><a href="#orgeac50db">2.2. Signals</a></li> <li><a href="#org4707d35">2.2. Signals</a></li>
<li><a href="#org5dc4e7d">2.3. Huddle Test</a></li> <li><a href="#org96d4dae">2.3. Huddle Test</a></li>
<li><a href="#org2028261">2.4. Input / Output data</a></li> <li><a href="#org5b29539">2.4. Input / Output data</a></li>
<li><a href="#org15893d8">2.5. Estimation of the Frequency Response Function Matrix</a></li> <li><a href="#org0556947">2.5. Estimation of the Frequency Response Function Matrix</a></li>
<li><a href="#org48cc1e6">2.6. Coherence</a></li> <li><a href="#org6c025b6">2.6. Coherence</a></li>
<li><a href="#org3c28674">2.7. Extraction of a transfer function matrix</a></li> <li><a href="#org74eeb16">2.7. Extraction of a transfer function matrix</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org14b4ee4">3. Sensor Noise</a></li> <li><a href="#orge157b63">3. Calibration of the 4 Quadrant Diode</a></li>
<li><a href="#org7fd124d">4. Plant Analysis</a> <li><a href="#orgc276bb8">4. Plant Scaling</a></li>
<li><a href="#orgffff224">5. Plant Analysis</a>
<ul> <ul>
<li><a href="#org0fae2b8">4.1. Load Plant</a></li> <li><a href="#orge9e5454">5.1. Load Plant</a></li>
<li><a href="#orgfeb824b">4.2. RGA-Number</a></li> <li><a href="#org425e4e2">5.2. RGA-Number</a></li>
<li><a href="#org1704d2b">4.3. Rotation Matrix</a></li> <li><a href="#orge80bcc0">5.3. Rotation Matrix</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org6ec2576">5. Control Objective</a></li> <li><a href="#orgfd824b0">6. Control Objective</a></li>
<li><a href="#org41cbf8b">6. Plant Scaling</a></li> <li><a href="#orgc7afa66">7. Control Design</a></li>
<li><a href="#org0103d04">7. Control Design</a></li> <li><a href="#org5791267">8. Measurement of the non-repeatability</a></li>
</ul> </ul>
</div> </div>
</div> </div>
<div id="outline-container-org754474f" class="outline-2"> <div id="outline-container-org56fbace" class="outline-2">
<h2 id="org754474f"><span class="section-number-2">1</span> Introduction</h2> <h2 id="org56fbace"><span class="section-number-2">1</span> Introduction</h2>
<div class="outline-text-2" id="text-1"> <div class="outline-text-2" id="text-1">
</div> </div>
<div id="outline-container-org5c645da" class="outline-3"> <div id="outline-container-orgc71c3a8" class="outline-3">
<h3 id="org5c645da"><span class="section-number-3">1.1</span> Signals</h3> <h3 id="orgc71c3a8"><span class="section-number-3">1.1</span> Block Diagram</h3>
<div class="outline-text-3" id="text-1-1"> <div class="outline-text-3" id="text-1-1">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> <p>
The block diagram of the setup to be controlled is shown in Fig. <a href="#orgc07f042">1</a>.
</p>
<colgroup> <div id="orgc07f042" class="figure">
<col class="org-left" /> <p><img src="figs/cercalo_diagram_simplify.png" alt="cercalo_diagram_simplify.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Block Diagram of the Experimental Setup</p>
</div>
<col class="org-left" /> <p>
The transfer functions in the system are:
</p>
<ul class="org-ul">
<li><b>Current Amplifier</b>: from the voltage set by the DAC to the voltage across the Cercalo inductors
\[ G_i = \begin{bmatrix} G_{i,h} & 0 \\ 0 & G_{i,v} \end{bmatrix} \]</li>
<li><b>Voltage Amplifier</b>: from the voltage across the Cercalo inductors to the measured voltage
\[ G_a = \begin{bmatrix} G_{a,h} & 0 \\ 0 & G_{a,v} \end{bmatrix} \]</li>
<li><b>Cercalo</b>: Transfer function from the Voltage across the cercalo 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} \]</li>
<li><b>Newport</b> Transfer function from the command signal of the Newport to the 4 quadrant measurement
\[ G_n = \begin{bmatrix} G_{\frac{V_{p,h}}{U_{n,h}}} & G_{\frac{V_{p,h}}{U_{n,v}}} \\ G_{\frac{V_{p,v}}{U_{n,h}}} & G_{\frac{V_{n,v}}{U_{n,v}}} \end{bmatrix} \]</li>
</ul>
<col class="org-left" /> <p>
The block diagram with each transfer function is shown in Fig. <a href="#orgc0fd79e">2</a>.
</p>
<col class="org-right" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">Signal</th>
<th scope="col" class="org-left">Name</th>
<th scope="col" class="org-left">Unit</th>
<th scope="col" class="org-right">Number</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">Voltage Sent to Cercalo - Horizontal</td>
<td class="org-left"><code>Uch</code></td>
<td class="org-left">[V]</td>
<td class="org-right">1</td>
</tr>
<tr> <div id="orgc0fd79e" class="figure">
<td class="org-left">Voltage Sent to Cercalo - Vertical</td> <p><img src="figs/cercalo_diagram.png" alt="cercalo_diagram.png" />
<td class="org-left"><code>Ucv</code></td> </p>
<td class="org-left">[V]</td> <p><span class="figure-number">Figure 2: </span>Block Diagram of the Experimental Setup with detailed dynamics</p>
<td class="org-right">2</td> </div>
</tr>
<tr>
<td class="org-left">Voltage Sent to Newport - Horizontal</td>
<td class="org-left"><code>Unh</code></td>
<td class="org-left">[V]</td>
<td class="org-right">3</td>
</tr>
<tr>
<td class="org-left">Voltage Sent to Newport - Vertical</td>
<td class="org-left"><code>Unv</code></td>
<td class="org-left">[V]</td>
<td class="org-right">4</td>
</tr>
</tbody>
<tbody>
<tr>
<td class="org-left">4Q Photodiode Measurement - Horizontal</td>
<td class="org-left"><code>Vph</code></td>
<td class="org-left">[V]</td>
<td class="org-right">5</td>
</tr>
<tr>
<td class="org-left">4Q Photodiode Measurement - Vertical</td>
<td class="org-left"><code>Vpv</code></td>
<td class="org-left">[V]</td>
<td class="org-right">6</td>
</tr>
<tr>
<td class="org-left">Measured Voltage across the Inductance - Horizontal</td>
<td class="org-left"><code>Vch</code></td>
<td class="org-left">[V]</td>
<td class="org-right">7</td>
</tr>
<tr>
<td class="org-left">Measured Voltage across the Inductance - Vertical</td>
<td class="org-left"><code>Vcv</code></td>
<td class="org-left">[V]</td>
<td class="org-right">8</td>
</tr>
<tr>
<td class="org-left">Newport Metrology - Horizontal</td>
<td class="org-left"><code>Vnh</code></td>
<td class="org-left">[V]</td>
<td class="org-right">9</td>
</tr>
<tr>
<td class="org-left">Newport Metrology - Vertical</td>
<td class="org-left"><code>Vnv</code></td>
<td class="org-left">[V]</td>
<td class="org-right">10</td>
</tr>
</tbody>
<tbody>
<tr>
<td class="org-left">Attocube Measurement</td>
<td class="org-left"><code>Va</code></td>
<td class="org-left">[m]</td>
<td class="org-right">11</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
<div id="outline-container-org0aa0ee3" class="outline-3"> <div id="outline-container-org6dd135b" class="outline-3">
<h3 id="org0aa0ee3"><span class="section-number-3">1.2</span> Cercalo</h3> <h3 id="org6dd135b"><span class="section-number-3">1.2</span> Amplifier for the Cercalo</h3>
<div class="outline-text-3" id="text-1-2"> <div class="outline-text-3" id="text-1-2">
<table id="orga3759f1" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 1:</span> Cercalo Parameters</caption>
<colgroup>
<col class="org-left" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">&#xa0;</th>
<th scope="col" class="org-right">Maximum Stroke [deg]</th>
<th scope="col" class="org-right">Resonance Frequency [Hz]</th>
<th scope="col" class="org-right">DC Gain [mA/deg]</th>
<th scope="col" class="org-right">Gain at resonance [deg/V]</th>
<th scope="col" class="org-right">RC Resistance [Ohm]</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">AX1</td>
<td class="org-right">5</td>
<td class="org-right">411.13</td>
<td class="org-right">28.4</td>
<td class="org-right">382.9</td>
<td class="org-right">9.41</td>
</tr>
<tr>
<td class="org-left">AX2</td>
<td class="org-right">5</td>
<td class="org-right">252.5</td>
<td class="org-right">35.2</td>
<td class="org-right">350.4</td>
<td class="org-right">&#xa0;</td>
</tr>
</tbody>
</table>
<p>
L = 0.1mH on both directions
</p>
<p>
Resistance= 41 Ohm
</p>
<p>
Ax2 = 8.3
Ax1 = 9.3
</p>
</div>
</div>
<div id="outline-container-org002d4fa" class="outline-3">
<h3 id="org002d4fa"><span class="section-number-3">1.3</span> Optical Setup</h3>
</div>
<div id="outline-container-org39881ce" class="outline-3">
<h3 id="org39881ce"><span class="section-number-3">1.4</span> 4 quadrant Diode</h3>
<div class="outline-text-3" id="text-1-4">
<p>
Front view of the photodiode.
</p>
<div class="figure">
<p><img src="figs/4qd_naming.png" alt="4qd_naming.png" />
</p>
</div>
<p>
Signals going to the amplifier on the board. The amplifier is located on the bottom right of the board.
</p>
<div class="figure">
<p><img src="figs/4qd_amplifier.png" alt="4qd_amplifier.png" />
</p>
</div>
</div>
</div>
<div id="outline-container-orgd6654c5" class="outline-3">
<h3 id="orgd6654c5"><span class="section-number-3">1.5</span> ADC/DAC</h3>
<div class="outline-text-3" id="text-1-5">
<p>
Let's compute the theoretical noise of the ADC/DAC.
</p>
\begin{align*}
\Delta V &= 20 V \\
n &= 16bits \\
q &= \Delta V/2^n = 305 \mu V \\
f_N &= 10kHz \\
\Gamma_n &= \frac{q^2}{12 f_N} = 7.76 \cdot 10^{-13} \frac{V^2}{Hz}
\end{align*}
<p>
with \(\Delta V\) the total range of the ADC, \(n\) its number of bits, \(q\) the quantization, \(f_N\) the sampling frequency and \(\Gamma_n\) its theoretical Power Spectral Density.
</p>
</div>
</div>
<div id="outline-container-org6c0b30a" class="outline-3">
<h3 id="org6c0b30a"><span class="section-number-3">1.6</span> Amplifier for the Cercalo</h3>
<div class="outline-text-3" id="text-1-6">
<div class="figure"> <div class="figure">
<p><img src="figs/cercalo_amplifier.png" alt="cercalo_amplifier.png" /> <p><img src="figs/cercalo_amplifier.png" alt="cercalo_amplifier.png" />
@ -548,13 +369,12 @@ with \(\Delta V\) the total range of the ADC, \(n\) its number of bits, \(q\) th
</div> </div>
<p> <p>
The values of the parameters are: The value of the resistor in series with the buffer have been measured for both axis.
</p> </p>
<ul class="org-ul"> <ul class="org-ul">
<li>\(R_h = 41 \Omega\)</li> <li>\(R_h = 41 \Omega\)</li>
<li>\(L_{c,h} = 0.1 mH\)</li> <li>\(L_{c,h} = 0.1 mH\)</li>
<li>\(R_{c,h} = 9.3 \Omega\)</li> <li>\(R_{c,h} = 9.3 \Omega\)</li>
<li>\(R_v = 41 \Omega\)</li> <li>\(R_v = 41 \Omega\)</li>
<li>\(L_{c,v} = 0.1 mH\)</li> <li>\(L_{c,v} = 0.1 mH\)</li>
<li>\(R_{c,v} = 8.3 \Omega\)</li> <li>\(R_{c,v} = 8.3 \Omega\)</li>
@ -603,6 +423,10 @@ with
<li>\(\omega_0 = \frac{R + R_c}{L_c}\)</li> <li>\(\omega_0 = \frac{R + R_c}{L_c}\)</li>
</ul> </ul>
<p>
Let's verify that the electrical circuit behaves as a constant current amplifier in the frequency band of interest.
</p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">Rh = <span class="org-highlight-numbers-number">41</span>; <span class="org-comment">% [Ohm]</span> <pre class="src src-matlab">Rh = <span class="org-highlight-numbers-number">41</span>; <span class="org-comment">% [Ohm]</span>
Lch = <span class="org-highlight-numbers-number">0</span>.<span class="org-highlight-numbers-number">1e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">3</span>; <span class="org-comment">% [H]</span> Lch = <span class="org-highlight-numbers-number">0</span>.<span class="org-highlight-numbers-number">1e</span><span class="org-type">-</span><span class="org-highlight-numbers-number">3</span>; <span class="org-comment">% [H]</span>
@ -623,13 +447,6 @@ Gvv = <span class="org-rainbow-delimiters-depth-1">(</span>Rcv <span class="org-
</pre> </pre>
</div> </div>
<div class="important">
<p>
The current amplifier has a constant gain over all the frequency band of interest.
</p>
</div>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">Gih0 = freqresp<span class="org-rainbow-delimiters-depth-1">(</span>Gih, <span class="org-highlight-numbers-number">0</span><span class="org-rainbow-delimiters-depth-1">)</span>; <pre class="src src-matlab">Gih0 = freqresp<span class="org-rainbow-delimiters-depth-1">(</span>Gih, <span class="org-highlight-numbers-number">0</span><span class="org-rainbow-delimiters-depth-1">)</span>;
Gvh0 = freqresp<span class="org-rainbow-delimiters-depth-1">(</span>Gvh, <span class="org-highlight-numbers-number">0</span><span class="org-rainbow-delimiters-depth-1">)</span>; Gvh0 = freqresp<span class="org-rainbow-delimiters-depth-1">(</span>Gvh, <span class="org-highlight-numbers-number">0</span><span class="org-rainbow-delimiters-depth-1">)</span>;
@ -637,101 +454,285 @@ Giv0 = freqresp<span class="org-rainbow-delimiters-depth-1">(</span>Giv, <span c
Gvv0 = freqresp<span class="org-rainbow-delimiters-depth-1">(</span>Gvv, <span class="org-highlight-numbers-number">0</span><span class="org-rainbow-delimiters-depth-1">)</span>; Gvv0 = freqresp<span class="org-rainbow-delimiters-depth-1">(</span>Gvv, <span class="org-highlight-numbers-number">0</span><span class="org-rainbow-delimiters-depth-1">)</span>;
</pre> </pre>
</div> </div>
</div>
</div>
<div id="outline-container-org4f39adb" class="outline-3">
<h3 id="org4f39adb"><span class="section-number-3">1.7</span> Block Diagram</h3>
<div class="outline-text-3" id="text-1-7">
<div class="org-src-container">
<pre class="src src-latex"><span class="org-font-latex-sedate"><span class="org-keyword">\begin</span></span>{<span class="org-function-name">tikzpicture</span>}
<span class="org-font-latex-sedate">\node</span>[DAC] (dac) at (0, 0) {};
<span class="org-font-latex-sedate">\node</span>[block, right=1.2 of dac] (Gi) {<span class="org-font-latex-math">$G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_i</span></span><span class="org-font-latex-math">$</span>};
<span class="org-font-latex-sedate">\node</span>[block, right=1.5 of Gi] (Gc) {<span class="org-font-latex-math">$G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_c</span></span><span class="org-font-latex-math">$</span>};
<span class="org-font-latex-sedate">\node</span>[addb, right=0.5 of Gc] (add) {};
<span class="org-font-latex-sedate">\node</span>[block, above= of add] (Gn) {<span class="org-font-latex-math">$G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_n</span></span><span class="org-font-latex-math">$</span>};
<span class="org-font-latex-sedate">\node</span>[ADC, right=1.2 of add] (adc) {};
<span class="org-font-latex-sedate">\coordinate</span> (GiGc) at (<span class="org-font-latex-math">$0.8*(Gi.east) + 0.2*(Gc.west)$</span>);
<span class="org-font-latex-sedate">\node</span>[block] (Amp) at (GiGc|-Gn) {<span class="org-font-latex-math">$G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_a</span></span><span class="org-font-latex-math">$</span>};
<span class="org-font-latex-sedate">\node</span>[above, align=center] at (Gi.north) {Current<span class="org-font-latex-warning">\\</span>Amplifier};
<span class="org-font-latex-sedate">\node</span>[above, align=center] at (Gc.north) {Cercalo};
<span class="org-font-latex-sedate">\node</span>[left, align=right] at (Gn.west) {Newport};
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (<span class="org-font-latex-math">$(dac.west) + (-1, 0)$</span>) --node[midway, sloped]{<span class="org-font-latex-math">$/$</span>} (dac.west);
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (dac.east) -- (Gi.west) node[above left]{<span class="org-font-latex-math">$</span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\begin</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}U</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{c,h}</span></span><span class="org-font-latex-math"> \\ U</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{c,v}</span></span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\end</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}$</span>};
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (Gi.east) -- (Gc.west) node[above left]{<span class="org-font-latex-math">$</span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\begin</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}</span><span class="org-font-latex-sedate"><span class="org-font-latex-math">\tilde</span></span><span class="org-font-latex-math">{U}</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{c,h}</span></span><span class="org-font-latex-math"> \\ </span><span class="org-font-latex-sedate"><span class="org-font-latex-math">\tilde</span></span><span class="org-font-latex-math">{U}</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{c,v}</span></span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\end</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}$</span>};
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (Gc.east) -- (add.west);
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (Gn.south) -- (add.north);
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (GiGc)node[branch]{} -- (Amp.south);
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (Amp.north) -- ++(0, 1.5) node[below right]{<span class="org-font-latex-math">$</span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\begin</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}V</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{c,h}</span></span><span class="org-font-latex-math"> \\ V</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{c,v}</span></span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\end</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}$</span>};
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (<span class="org-font-latex-math">$(Gn.north) + (0, 1.5)$</span>) -- (Gn.north) node[above right]{<span class="org-font-latex-math">$</span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\begin</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}U</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{n,h}</span></span><span class="org-font-latex-math"> \\ U</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{n,v}</span></span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\end</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}$</span>};
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (add.east) -- (adc.west) node[above left]{<span class="org-font-latex-math">$</span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\begin</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}V</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{p,h}</span></span><span class="org-font-latex-math"> \\ V</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{p,v}</span></span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\end</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}$</span>};
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (adc.east) --node[midway, sloped]{<span class="org-font-latex-math">$/$</span>} ++(1, 0);
<span class="org-font-latex-sedate"><span class="org-keyword">\end</span></span>{<span class="org-function-name">tikzpicture</span>}
</pre>
</div>
<div class="figure"> <div id="orgfec4858" class="figure">
<p><img src="figs/cercalo_diagram_simplify.png" alt="cercalo_diagram_simplify.png" /> <p><img src="figs/current_amplifier_tf.png" alt="current_amplifier_tf.png" />
</p> </p>
<p><span class="figure-number">Figure 4: </span>Transfer function for the current amplifier (<a href="./figs/current_amplifier_tf.png">png</a>, <a href="./figs/current_amplifier_tf.pdf">pdf</a>)</p>
</div> </div>
<div class="important">
<p>
The current amplifier has a constant gain over all the frequency band of interest.
\[ G_i(s) = \begin{bmatrix} 0.02 & 0 \\ 0 & 0.02 \end{bmatrix}\quad \left[\frac{A}{V}\right] \]
\[ G_a(s) = \begin{bmatrix} 0.185 & 0 \\ 0 & 0.168 \end{bmatrix} \left[\frac{V}{V}\right] \]
</p>
</div>
</div>
</div>
<div id="outline-container-org3f4c55a" class="outline-3">
<h3 id="org3f4c55a"><span class="section-number-3">1.3</span> Cercalo</h3>
<div class="outline-text-3" id="text-1-3">
<p>
From the Cercalo documentation, we have the parameters shown on table <a href="#orgfb4a003">1</a>.
</p>
<table id="orgfb4a003" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 1:</span> Cercalo Parameters</caption>
<colgroup>
<col class="org-left" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">&#xa0;</th>
<th scope="col" class="org-right">Maximum Stroke [deg]</th>
<th scope="col" class="org-right">Resonance Frequency [Hz]</th>
<th scope="col" class="org-right">DC Gain [mA/deg]</th>
<th scope="col" class="org-right">Gain at resonance [deg/V]</th>
<th scope="col" class="org-right">RC Resistance [Ohm]</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">AX1 (Horizontal)</td>
<td class="org-right">5</td>
<td class="org-right">411.13</td>
<td class="org-right">28.4</td>
<td class="org-right">382.9</td>
<td class="org-right">9.41</td>
</tr>
<tr>
<td class="org-left">AX2 (Vertical)</td>
<td class="org-right">5</td>
<td class="org-right">252.5</td>
<td class="org-right">35.2</td>
<td class="org-right">350.4</td>
<td class="org-right">&#xa0;</td>
</tr>
</tbody>
</table>
<p>
The Inductance and DC resistance of the two axis of the Cercalo have been measured:
</p>
<ul class="org-ul"> <ul class="org-ul">
<li>Transfer function for the <b>Current Amplifier</b>: <li>\(L_{c,h} = 0.1\ \text{mH}\)</li>
\[ G_i = \begin{bmatrix} G_{i,h} & 0 \\ 0 & G_{i,v} \end{bmatrix} \]</li> <li>\(L_{c,v} = 0.1\ \text{mH}\)</li>
<li>Transfer function for the <b>Voltage Amplifier</b>: <li>\(R_{c,h} = 9.3\ \Omega\)</li>
\[ G_a = \begin{bmatrix} G_{a,h} & 0 \\ 0 & G_{a,v} \end{bmatrix} \]</li> <li>\(R_{c,v} = 8.3\ \Omega\)</li>
<li>Transfer function from the Voltage across the <b>Cercalo</b> 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} \]</li>
<li>Transfer function from the <b>Newport</b> command signal to the 4 quadrant measurement
\[ G_n = \begin{bmatrix} G_{\frac{V_{p,h}}{U_{n,h}}} & G_{\frac{V_{p,h}}{U_{n,v}}} \\ G_{\frac{V_{p,v}}{U_{n,h}}} & G_{\frac{V_{n,v}}{U_{n,v}}} \end{bmatrix} \]</li>
</ul> </ul>
<div class="org-src-container"> <p>
<pre class="src src-latex"><span class="org-font-latex-sedate"><span class="org-keyword">\begin</span></span>{<span class="org-function-name">tikzpicture</span>} Let's first consider the <b>horizontal direction</b> and we try to model the Cercalo by a spring/mass/damper system (Fig. <a href="#orgd829094">5</a>).
<span class="org-font-latex-sedate">\node</span>[DAC] (dac) at (0, 0) {}; </p>
<span class="org-font-latex-sedate">\node</span>[block, right=1.5 of dac] (Gi) {<span class="org-font-latex-math">$</span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\begin</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">} G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{i,h}</span></span><span class="org-font-latex-math"> &amp; 0 \\ 0 &amp; G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{i,v}</span></span><span class="org-font-latex-math"> </span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\end</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}$</span>};
<span class="org-font-latex-sedate">\node</span>[block, right=1.8 of Gi] (Gc) {<span class="org-font-latex-math">$</span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\begin</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">} G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{\frac{V_{p,h}}{\tilde{U}_{c,h}}}</span></span><span class="org-font-latex-math"> &amp; G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{\frac{V_{p,h}}{\tilde{U}_{c,v}}}</span></span><span class="org-font-latex-math"> \\ G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{\frac{V_{p,v}}{\tilde{U}_{c,h}}}</span></span><span class="org-font-latex-math"> &amp; G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{\frac{V_{p,v}}{\tilde{U}_{c,v}}}</span></span><span class="org-font-latex-math"> </span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\end</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}$</span>};
<span class="org-font-latex-sedate">\node</span>[addb, right= of Gc] (add) {};
<span class="org-font-latex-sedate">\node</span>[block, above= of add] (Gn) {<span class="org-font-latex-math">$</span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\begin</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">} G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{\frac{V_{p,h}}{U_{n,h}}}</span></span><span class="org-font-latex-math"> &amp; G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{\frac{V_{p,h}}{U_{n,v}}}</span></span><span class="org-font-latex-math"> \\ G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{\frac{V_{p,v}}{U_{n,h}}}</span></span><span class="org-font-latex-math"> &amp; G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{\frac{V_{n,v}}{U_{n,v}}}</span></span><span class="org-font-latex-math"> </span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\end</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}$</span>};
<span class="org-font-latex-sedate">\node</span>[ADC, right = 1.5 of add] (adc) {};
<span class="org-font-latex-sedate">\coordinate</span> (GiGc) at (<span class="org-font-latex-math">$0.7*(Gi.east) + 0.3*(Gc.west)$</span>);
<span class="org-font-latex-sedate">\node</span>[block] (Amp) at (GiGc|-Gn) {<span class="org-font-latex-math">$</span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\begin</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">} G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{a,h}</span></span><span class="org-font-latex-math"> &amp; 0 \\ 0 &amp; G</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{a,v}</span></span><span class="org-font-latex-math"> </span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\end</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}$</span>};
<span class="org-font-latex-sedate">\node</span>[above, align=center] at (Gi.north) {Current<span class="org-font-latex-warning">\\</span>Amplifier};
<span class="org-font-latex-sedate">\node</span>[above, align=center] at (Gc.north) {Cercalo};
<span class="org-font-latex-sedate">\node</span>[left, align=right] at (Gn.west) {Newport};
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (<span class="org-font-latex-math">$(dac.west) + (-1, 0)$</span>) --node[midway, sloped]{<span class="org-font-latex-math">$/$</span>} (dac.west); <div id="orgd829094" class="figure">
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (dac.east) -- (Gi.west) node[above left]{<span class="org-font-latex-math">$</span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\begin</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}U</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{c,h}</span></span><span class="org-font-latex-math"> \\ U</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{c,v}</span></span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\end</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}$</span>}; <p><img src="figs/mech_cercalo.png" alt="mech_cercalo.png" />
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (Gi.east) -- (Gc.west) node[above left]{<span class="org-font-latex-math">$</span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\begin</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}</span><span class="org-font-latex-sedate"><span class="org-font-latex-math">\tilde</span></span><span class="org-font-latex-math">{U}</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{c,h}</span></span><span class="org-font-latex-math"> \\ </span><span class="org-font-latex-sedate"><span class="org-font-latex-math">\tilde</span></span><span class="org-font-latex-math">{U}</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{c,v}</span></span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\end</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}$</span>}; </p>
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (Gc.east) -- (add.west); <p><span class="figure-number">Figure 5: </span>1 degree-of-freedom model of the Cercalo</p>
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (Gn.south) -- (add.north);
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (GiGc)node[branch]{} -- (Amp.south);
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (Amp.north) -- ++(0, 1.5) node[below right]{<span class="org-font-latex-math">$</span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\begin</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}V</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{c,h}</span></span><span class="org-font-latex-math"> \\ V</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{c,v}</span></span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\end</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}$</span>};
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (<span class="org-font-latex-math">$(Gn.north) + (0, 1.5)$</span>) -- (Gn.north) node[above right]{<span class="org-font-latex-math">$</span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\begin</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}U</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{n,h}</span></span><span class="org-font-latex-math"> \\ U</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{n,v}</span></span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\end</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}$</span>};
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (add.east) -- (adc.west) node[above left]{<span class="org-font-latex-math">$</span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\begin</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}V</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{p,h}</span></span><span class="org-font-latex-math"> \\ V</span><span class="org-font-latex-math"><span class="org-font-latex-script-char">_{p,v}</span></span><span class="org-font-latex-sedate"><span class="org-keyword"><span class="org-font-latex-math">\end</span></span></span><span class="org-font-latex-math">{</span><span class="org-function-name"><span class="org-font-latex-math">bmatrix</span></span><span class="org-font-latex-math">}$</span>};
<span class="org-font-latex-sedate">\draw</span>[-&gt;] (adc.east) --node[midway, sloped]{<span class="org-font-latex-math">$/$</span>} ++(1, 0);
<span class="org-font-latex-sedate"><span class="org-keyword">\end</span></span>{<span class="org-function-name">tikzpicture</span>}
</pre>
</div> </div>
<div class="figure"> <p>
<p><img src="figs/cercalo_diagram.png" alt="cercalo_diagram.png" /> The equation of motion is:
</p>
\begin{align*}
\frac{x}{F} &= \frac{1}{k + c s + m s^2} \\
&= \frac{G_0}{1 + 2 \xi \frac{s}{\omega_0} + \frac{s^2}{\omega_0^2}}
\end{align*}
<p>
with:
</p>
<ul class="org-ul">
<li>\(G_0 = 1/k\) is the gain at DC in rad/N</li>
<li>\(\xi = \frac{c}{2 \sqrt{km}}\) is the damping ratio of the system</li>
<li>\(\omega_0 = \sqrt{\frac{k}{m}}\) is the resonance frequency in rad</li>
</ul>
<p>
The force \(F\) applied to the mass is proportional to the current \(I\) flowing through the voice coils:
\[ \frac{F}{I} = \alpha \]
with \(\alpha\) is in \(N/A\) and is to be determined.
</p>
<p>
The current \(I\) is also proportional to the voltage at the output of the buffer:
</p>
\begin{align*}
\frac{I_c}{U_c} &= \frac{1}{(R + R_c) + L_c s} \\
&\approx 0.02 \left[ \frac{A}{V} \right]
\end{align*}
<p>
Let's try to determine the equivalent mass and spring values.
From table <a href="#orgfb4a003">1</a>, 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} \]
</p>
<p>
So:
\[ \alpha \frac{1}{k} = 1.63 \Longleftrightarrow k = \frac{\alpha}{1.63} \left[\frac{N}{rad}\right] \]
</p>
<p>
We also know the resonance frequency:
\[ \omega_0 = 411.1\ \text{Hz} = 2583\ \frac{rad}{s} \]
</p>
<p>
And the gain at resonance:
</p>
\begin{align*}
\left| \frac{x}{U_c} \right|(j\omega_0) &= \left| 0.02 \frac{x}{I_c} \right| (j\omega_0) \\
&= \left| 0.02 \alpha \frac{x}{F} \right| (j\omega_0) \\
&= 0.02 \alpha \frac{1/k}{2\xi} \\
&= 282.9\ \left[\frac{deg}{V}\right] \\
&= 4.938\ \left[\frac{rad}{V}\right]
\end{align*}
<p>
Thus:
</p>
\begin{align*}
& \frac{\alpha}{2 \xi k} = 245 \\
\Leftrightarrow & \frac{1.63}{2 \xi} = 245 \\
\Leftrightarrow & \xi = 0.0033 \\
\Leftrightarrow & \xi = 0.33 \%
\end{align*}
<div class="important">
\begin{align*}
G_0 &= \frac{1.63}{\alpha}\ \frac{rad}{N} \\
\xi &= 0.0033 \\
\omega_0 &= 2583\ \frac{rad}{s}
\end{align*}
<p>
and in terms of the physical properties:
</p>
\begin{align*}
k &= \frac{\alpha}{1.63}\ \frac{N}{rad} \\
\xi &= 0.0033 \\
m &= \frac{\alpha}{1.1 \cdot 10^7}\ \frac{kg}{m^2}
\end{align*}
<p>
Thus, we have to determine \(\alpha\).
This can be done experimentally by determining the gain at DC or at resonance of the system.
For that, we need to know the angle of the mirror, thus we need to <b>calibrate</b> the photo-diodes.
This will be done using the Newport.
</p>
</div>
</div>
</div>
<div id="outline-container-org8cf1cba" class="outline-3">
<h3 id="org8cf1cba"><span class="section-number-3">1.4</span> Optical Setup</h3>
</div>
<div id="outline-container-org6d8a72e" class="outline-3">
<h3 id="org6d8a72e"><span class="section-number-3">1.5</span> Newport</h3>
<div class="outline-text-3" id="text-1-5">
<p>
Parameters of the Newport are shown in Fig. <a href="#org893d45e">6</a>.
</p>
<p>
It's dynamics for small angle excitation is shown in Fig. <a href="#org4e41b71">7</a>.
</p>
<p>
And we have:
</p>
\begin{align*}
G_{n, h}(0) &= 2.62 \cdot 10^{-3}\ \frac{rad}{V} \\
G_{n, v}(0) &= 2.62 \cdot 10^{-3}\ \frac{rad}{V}
\end{align*}
<div id="org893d45e" class="figure">
<p><img src="figs/newport_doc.png" alt="newport_doc.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Documentation of the Newport</p>
</div>
<div id="org4e41b71" class="figure">
<p><img src="figs/newport_gain.png" alt="newport_gain.png" />
</p>
<p><span class="figure-number">Figure 7: </span>Transfer function of the Newport</p>
</div>
</div>
</div>
<div id="outline-container-orgcf9e532" class="outline-3">
<h3 id="orgcf9e532"><span class="section-number-3">1.6</span> 4 quadrant Diode</h3>
<div class="outline-text-3" id="text-1-6">
<p>
The front view of the 4 quadrant photo-diode is shown in Fig. <a href="#org279009d">8</a>.
</p>
<div id="org279009d" class="figure">
<p><img src="figs/4qd_naming.png" alt="4qd_naming.png" />
</p>
<p><span class="figure-number">Figure 8: </span>Front view of the 4QD</p>
</div>
<p>
Each of the photo-diode is amplified using a 4-channel amplifier as shown in Fig. <a href="#org7f931ef">9</a>.
</p>
<div id="org7f931ef" class="figure">
<p><img src="figs/4qd_amplifier.png" alt="4qd_amplifier.png" />
</p>
<p><span class="figure-number">Figure 9: </span>Wiring of the amplifier. The amplifier is located on the bottom right of the board</p>
</div>
</div>
</div>
<div id="outline-container-orgbfa25c0" class="outline-3">
<h3 id="orgbfa25c0"><span class="section-number-3">1.7</span> ADC/DAC</h3>
<div class="outline-text-3" id="text-1-7">
<p>
Let's compute the theoretical noise of the ADC/DAC.
</p>
\begin{align*}
\Delta V &= 20 V \\
n &= 16bits \\
q &= \Delta V/2^n = 305 \mu V \\
f_N &= 10kHz \\
\Gamma_n &= \frac{q^2}{12 f_N} = 7.76 \cdot 10^{-13} \frac{V^2}{Hz}
\end{align*}
<p>
with \(\Delta V\) the total range of the ADC, \(n\) its number of bits, \(q\) the quantization, \(f_N\) the sampling frequency and \(\Gamma_n\) its theoretical Power Spectral Density.
</p> </p>
</div> </div>
</div> </div>
</div> </div>
</div>
<div id="outline-container-org84958b2" class="outline-2"> <div id="outline-container-org549f783" class="outline-2">
<h2 id="org84958b2"><span class="section-number-2">2</span> Identification</h2> <h2 id="org549f783"><span class="section-number-2">2</span> Identification</h2>
<div class="outline-text-2" id="text-2"> <div class="outline-text-2" id="text-2">
<p> <p>
<a id="orgf9e9ac3"></a> <a id="orgaf96e37"></a>
</p> </p>
<div class="note"> <div class="note">
<p> <p>
@ -740,8 +741,8 @@ All the files (data and Matlab scripts) are accessible <a href="data/plant_ident
</div> </div>
</div> </div>
<div id="outline-container-orgd0268b2" class="outline-3"> <div id="outline-container-orga174838" class="outline-3">
<h3 id="orgd0268b2"><span class="section-number-3">2.1</span> Excitation Data</h3> <h3 id="orga174838"><span class="section-number-3">2.1</span> Excitation Data</h3>
<div class="outline-text-3" id="text-2-1"> <div class="outline-text-3" id="text-2-1">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">fs = <span class="org-highlight-numbers-number">1e4</span>; <pre class="src src-matlab">fs = <span class="org-highlight-numbers-number">1e4</span>;
@ -778,8 +779,8 @@ Discrete-time zero/pole/gain model.
</div> </div>
</div> </div>
<div id="outline-container-orgeac50db" class="outline-3"> <div id="outline-container-org4707d35" class="outline-3">
<h3 id="orgeac50db"><span class="section-number-3">2.2</span> Signals</h3> <h3 id="org4707d35"><span class="section-number-3">2.2</span> Signals</h3>
<div class="outline-text-3" id="text-2-2"> <div class="outline-text-3" id="text-2-2">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
@ -871,8 +872,8 @@ Discrete-time zero/pole/gain model.
</div> </div>
</div> </div>
<div id="outline-container-org5dc4e7d" class="outline-3"> <div id="outline-container-org96d4dae" class="outline-3">
<h3 id="org5dc4e7d"><span class="section-number-3">2.3</span> Huddle Test</h3> <h3 id="org96d4dae"><span class="section-number-3">2.3</span> Huddle Test</h3>
<div class="outline-text-3" id="text-2-3"> <div class="outline-text-3" id="text-2-3">
<p> <p>
We load the data taken during the Huddle Test. We load the data taken during the Huddle Test.
@ -957,8 +958,8 @@ xlim<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-rainbo
</div> </div>
</div> </div>
<div id="outline-container-org2028261" class="outline-3"> <div id="outline-container-org5b29539" class="outline-3">
<h3 id="org2028261"><span class="section-number-3">2.4</span> Input / Output data</h3> <h3 id="org5b29539"><span class="section-number-3">2.4</span> Input / Output data</h3>
<div class="outline-text-3" id="text-2-4"> <div class="outline-text-3" id="text-2-4">
<p> <p>
The identification data is loaded The identification data is loaded
@ -1023,24 +1024,24 @@ uv.t = uv.t <span class="org-type">-</span> uv.t<span class="org-rainbow-delimit
</div> </div>
<div id="orgeb45e59" class="figure"> <div id="orga6bc5e6" class="figure">
<p><img src="figs/identification_uh.png" alt="identification_uh.png" /> <p><img src="figs/identification_uh.png" alt="identification_uh.png" />
</p> </p>
<p><span class="figure-number">Figure 6: </span>Identification signals when exciting the horizontal direction (<a href="./figs/identification_uh.png">png</a>, <a href="./figs/identification_uh.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 10: </span>Identification signals when exciting the horizontal direction (<a href="./figs/identification_uh.png">png</a>, <a href="./figs/identification_uh.pdf">pdf</a>)</p>
</div> </div>
<div id="org37217b5" class="figure"> <div id="org82bc95e" class="figure">
<p><img src="figs/identification_uv.png" alt="identification_uv.png" /> <p><img src="figs/identification_uv.png" alt="identification_uv.png" />
</p> </p>
<p><span class="figure-number">Figure 7: </span>Identification signals when exciting in the vertical direction (<a href="./figs/identification_uv.png">png</a>, <a href="./figs/identification_uv.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 11: </span>Identification signals when exciting in the vertical direction (<a href="./figs/identification_uv.png">png</a>, <a href="./figs/identification_uv.pdf">pdf</a>)</p>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org15893d8" class="outline-3"> <div id="outline-container-org0556947" class="outline-3">
<h3 id="org15893d8"><span class="section-number-3">2.5</span> Estimation of the Frequency Response Function Matrix</h3> <h3 id="org0556947"><span class="section-number-3">2.5</span> Estimation of the Frequency Response Function Matrix</h3>
<div class="outline-text-3" id="text-2-5"> <div class="outline-text-3" id="text-2-5">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">win = hanning<span class="org-rainbow-delimiters-depth-1">(</span>ceil<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">*</span>fs<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>; <pre class="src src-matlab">win = hanning<span class="org-rainbow-delimiters-depth-1">(</span>ceil<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">*</span>fs<span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>;
@ -1059,16 +1060,16 @@ We compute an estimate of the transfer functions.
</div> </div>
<div id="org6ee4e7c" class="figure"> <div id="org171e666" class="figure">
<p><img src="figs/frequency_response_matrix.png" alt="frequency_response_matrix.png" /> <p><img src="figs/frequency_response_matrix.png" alt="frequency_response_matrix.png" />
</p> </p>
<p><span class="figure-number">Figure 8: </span>Frequency Response Matrix (<a href="./figs/frequency_response_matrix.png">png</a>, <a href="./figs/frequency_response_matrix.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 12: </span>Frequency Response Matrix (<a href="./figs/frequency_response_matrix.png">png</a>, <a href="./figs/frequency_response_matrix.pdf">pdf</a>)</p>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org48cc1e6" class="outline-3"> <div id="outline-container-org6c025b6" class="outline-3">
<h3 id="org48cc1e6"><span class="section-number-3">2.6</span> Coherence</h3> <h3 id="org6c025b6"><span class="section-number-3">2.6</span> Coherence</h3>
<div class="outline-text-3" id="text-2-6"> <div class="outline-text-3" id="text-2-6">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab"><span class="org-rainbow-delimiters-depth-1">[</span>coh_Uch_Vph, f<span class="org-rainbow-delimiters-depth-1">]</span> = mscohere<span class="org-rainbow-delimiters-depth-1">(</span>uh.Uch, uh.Vph, win, <span class="org-rainbow-delimiters-depth-2">[]</span>, <span class="org-rainbow-delimiters-depth-2">[]</span>, fs<span class="org-rainbow-delimiters-depth-1">)</span>; <pre class="src src-matlab"><span class="org-rainbow-delimiters-depth-1">[</span>coh_Uch_Vph, f<span class="org-rainbow-delimiters-depth-1">]</span> = mscohere<span class="org-rainbow-delimiters-depth-1">(</span>uh.Uch, uh.Vph, win, <span class="org-rainbow-delimiters-depth-2">[]</span>, <span class="org-rainbow-delimiters-depth-2">[]</span>, fs<span class="org-rainbow-delimiters-depth-1">)</span>;
@ -1079,17 +1080,17 @@ We compute an estimate of the transfer functions.
</div> </div>
<div id="org3ec05cb" class="figure"> <div id="orgd207281" class="figure">
<p><img src="figs/identification_coherence.png" alt="identification_coherence.png" /> <p><img src="figs/identification_coherence.png" alt="identification_coherence.png" />
</p> </p>
<p><span class="figure-number">Figure 9: </span>Coherence (<a href="./figs/identification_coherence.png">png</a>, <a href="./figs/identification_coherence.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 13: </span>Coherence (<a href="./figs/identification_coherence.png">png</a>, <a href="./figs/identification_coherence.pdf">pdf</a>)</p>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org3c28674" class="outline-3"> <div id="outline-container-org74eeb16" class="outline-3">
<h3 id="org3c28674"><span class="section-number-3">2.7</span> Extraction of a transfer function matrix</h3> <h3 id="org74eeb16"><span class="section-number-3">2.7</span> Extraction of a transfer function matrix</h3>
<div class="outline-text-3" id="text-2-7"> <div class="outline-text-3" id="text-2-7">
<p> <p>
First we define the initial guess for the resonance frequencies and the weights associated. First we define the initial guess for the resonance frequencies and the weights associated.
@ -1152,10 +1153,10 @@ weight_Ucv_Vpv<span class="org-rainbow-delimiters-depth-1">(</span>f<span class=
</div> </div>
<div id="org60f2a97" class="figure"> <div id="org9848359" class="figure">
<p><img src="figs/weights.png" alt="weights.png" /> <p><img src="figs/weights.png" alt="weights.png" />
</p> </p>
<p><span class="figure-number">Figure 10: </span>Weights amplitude (<a href="./figs/weights.png">png</a>, <a href="./figs/weights.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 14: </span>Weights amplitude (<a href="./figs/weights.png">png</a>, <a href="./figs/weights.pdf">pdf</a>)</p>
</div> </div>
<p> <p>
@ -1204,18 +1205,18 @@ An we run the <code>vectfit3</code> algorithm.
</div> </div>
<div id="org74c7619" class="figure"> <div id="org61a8901" class="figure">
<p><img src="figs/identification_matrix_fit.png" alt="identification_matrix_fit.png" /> <p><img src="figs/identification_matrix_fit.png" alt="identification_matrix_fit.png" />
</p> </p>
<p><span class="figure-number">Figure 11: </span>Transfer Function Extraction of the FRF matrix (<a href="./figs/identification_matrix_fit.png">png</a>, <a href="./figs/identification_matrix_fit.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 15: </span>Transfer Function Extraction of the FRF matrix (<a href="./figs/identification_matrix_fit.png">png</a>, <a href="./figs/identification_matrix_fit.pdf">pdf</a>)</p>
</div> </div>
<div id="org82ac5fe" class="figure"> <div id="org05ccf64" class="figure">
<p><img src="figs/identification_matrix_fit_phase.png" alt="identification_matrix_fit_phase.png" /> <p><img src="figs/identification_matrix_fit_phase.png" alt="identification_matrix_fit_phase.png" />
</p> </p>
<p><span class="figure-number">Figure 12: </span>Transfer Function Extraction of the FRF matrix (<a href="./figs/identification_matrix_fit_phase.png">png</a>, <a href="./figs/identification_matrix_fit_phase.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 16: </span>Transfer Function Extraction of the FRF matrix (<a href="./figs/identification_matrix_fit_phase.png">png</a>, <a href="./figs/identification_matrix_fit_phase.pdf">pdf</a>)</p>
</div> </div>
<p> <p>
@ -1240,16 +1241,28 @@ G = <span class="org-rainbow-delimiters-depth-1">[</span>G_uh_xh, G_uv_xh;
</div> </div>
</div> </div>
<div id="outline-container-org14b4ee4" class="outline-2"> <div id="outline-container-orge157b63" class="outline-2">
<h2 id="org14b4ee4"><span class="section-number-2">3</span> Sensor Noise</h2> <h2 id="orge157b63"><span class="section-number-2">3</span> Calibration of the 4 Quadrant Diode</h2>
</div> </div>
<div id="outline-container-org7fd124d" class="outline-2"> <div id="outline-container-orgc276bb8" class="outline-2">
<h2 id="org7fd124d"><span class="section-number-2">4</span> Plant Analysis</h2> <h2 id="orgc276bb8"><span class="section-number-2">4</span> Plant Scaling</h2>
<div class="outline-text-2" id="text-4"> <div class="outline-text-2" id="text-4">
<ul class="org-ul">
<li>measured noise</li>
<li>expected perturbations</li>
<li>maximum input usage</li>
<li>maximum wanted error</li>
</ul>
</div> </div>
<div id="outline-container-org0fae2b8" class="outline-3"> </div>
<h3 id="org0fae2b8"><span class="section-number-3">4.1</span> Load Plant</h3>
<div class="outline-text-3" id="text-4-1"> <div id="outline-container-orgffff224" class="outline-2">
<h2 id="orgffff224"><span class="section-number-2">5</span> Plant Analysis</h2>
<div class="outline-text-2" id="text-5">
</div>
<div id="outline-container-orge9e5454" class="outline-3">
<h3 id="orge9e5454"><span class="section-number-3">5.1</span> Load Plant</h3>
<div class="outline-text-3" id="text-5-1">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">load<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-string">'mat/plant.mat', 'G'</span><span class="org-rainbow-delimiters-depth-1">)</span>; <pre class="src src-matlab">load<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-string">'mat/plant.mat', 'G'</span><span class="org-rainbow-delimiters-depth-1">)</span>;
</pre> </pre>
@ -1257,9 +1270,9 @@ G = <span class="org-rainbow-delimiters-depth-1">[</span>G_uh_xh, G_uv_xh;
</div> </div>
</div> </div>
<div id="outline-container-orgfeb824b" class="outline-3"> <div id="outline-container-org425e4e2" class="outline-3">
<h3 id="orgfeb824b"><span class="section-number-3">4.2</span> RGA-Number</h3> <h3 id="org425e4e2"><span class="section-number-3">5.2</span> RGA-Number</h3>
<div class="outline-text-3" id="text-4-2"> <div class="outline-text-3" id="text-5-2">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">freqs = logspace<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">2</span>, <span class="org-highlight-numbers-number">4</span>, <span class="org-highlight-numbers-number">1000</span><span class="org-rainbow-delimiters-depth-1">)</span>; <pre class="src src-matlab">freqs = logspace<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-highlight-numbers-number">2</span>, <span class="org-highlight-numbers-number">4</span>, <span class="org-highlight-numbers-number">1000</span><span class="org-rainbow-delimiters-depth-1">)</span>;
G_resp = freqresp<span class="org-rainbow-delimiters-depth-1">(</span>G, freqs, <span class="org-string">'Hz'</span><span class="org-rainbow-delimiters-depth-1">)</span>; G_resp = freqresp<span class="org-rainbow-delimiters-depth-1">(</span>G, freqs, <span class="org-string">'Hz'</span><span class="org-rainbow-delimiters-depth-1">)</span>;
@ -1297,9 +1310,9 @@ V = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-h
</div> </div>
</div> </div>
<div id="outline-container-org1704d2b" class="outline-3"> <div id="outline-container-orge80bcc0" class="outline-3">
<h3 id="org1704d2b"><span class="section-number-3">4.3</span> Rotation Matrix</h3> <h3 id="orge80bcc0"><span class="section-number-3">5.3</span> Rotation Matrix</h3>
<div class="outline-text-3" id="text-4-3"> <div class="outline-text-3" id="text-5-3">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">G0 = freqresp<span class="org-rainbow-delimiters-depth-1">(</span>G, <span class="org-highlight-numbers-number">0</span><span class="org-rainbow-delimiters-depth-1">)</span>; <pre class="src src-matlab">G0 = freqresp<span class="org-rainbow-delimiters-depth-1">(</span>G, <span class="org-highlight-numbers-number">0</span><span class="org-rainbow-delimiters-depth-1">)</span>;
</pre> </pre>
@ -1308,9 +1321,9 @@ V = zeros<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-h
</div> </div>
</div> </div>
<div id="outline-container-org6ec2576" class="outline-2"> <div id="outline-container-orgfd824b0" class="outline-2">
<h2 id="org6ec2576"><span class="section-number-2">5</span> Control Objective</h2> <h2 id="orgfd824b0"><span class="section-number-2">6</span> Control Objective</h2>
<div class="outline-text-2" id="text-5"> <div class="outline-text-2" id="text-6">
<p> <p>
The maximum expected stroke is \(y_\text{max} = 3mm \approx 5e^{-2} rad\) at \(1Hz\). The maximum expected stroke is \(y_\text{max} = 3mm \approx 5e^{-2} rad\) at \(1Hz\).
The maximum wanted error is \(e_\text{max} = 10 \mu rad\). The maximum wanted error is \(e_\text{max} = 10 \mu rad\).
@ -1331,25 +1344,16 @@ In terms of loop gain, this is equivalent to:
</div> </div>
</div> </div>
<div id="outline-container-org41cbf8b" class="outline-2"> <div id="outline-container-orgc7afa66" class="outline-2">
<h2 id="org41cbf8b"><span class="section-number-2">6</span> Plant Scaling</h2> <h2 id="orgc7afa66"><span class="section-number-2">7</span> Control Design</h2>
<div class="outline-text-2" id="text-6">
<ul class="org-ul">
<li>measured noise</li>
<li>expected perturbations</li>
<li>maximum input usage</li>
<li>maximum wanted error</li>
</ul>
</div> </div>
</div> <div id="outline-container-org5791267" class="outline-2">
<h2 id="org5791267"><span class="section-number-2">8</span> Measurement of the non-repeatability</h2>
<div id="outline-container-org0103d04" class="outline-2">
<h2 id="org0103d04"><span class="section-number-2">7</span> Control Design</h2>
</div> </div>
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p> <p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2019-09-16 lun. 11:59</p> <p class="date">Created: 2019-09-16 lun. 15:21</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p> <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div> </div>
</body> </body>

795
index.org
View File

@ -358,6 +358,25 @@ This will be done using the Newport.
#+end_important #+end_important
** Optical Setup ** Optical Setup
** Newport
Parameters of the Newport are shown in Fig. [[fig:Newport_doc]].
It's dynamics for small angle excitation is shown in Fig. [[fig:Newport_gain]].
And we have:
\begin{align*}
G_{n, h}(0) &= 2.62 \cdot 10^{-3}\ \frac{rad}{V} \\
G_{n, v}(0) &= 2.62 \cdot 10^{-3}\ \frac{rad}{V}
\end{align*}
#+name: fig:Newport_doc
#+caption: Documentation of the Newport
[[file:figs/Newport_doc.png]]
#+name: fig:Newport_gain
#+caption: Transfer function of the Newport
[[file:figs/Newport_gain.png]]
** 4 quadrant Diode ** 4 quadrant Diode
The front view of the 4 quadrant photo-diode is shown in Fig. [[fig:4qd_naming]]. The front view of the 4 quadrant photo-diode is shown in Fig. [[fig:4qd_naming]].
@ -406,7 +425,7 @@ Let's compute the theoretical noise of the ADC/DAC.
\end{align*} \end{align*}
with $\Delta V$ the total range of the ADC, $n$ its number of bits, $q$ the quantization, $f_N$ the sampling frequency and $\Gamma_n$ its theoretical Power Spectral Density. with $\Delta V$ the total range of the ADC, $n$ its number of bits, $q$ the quantization, $f_N$ the sampling frequency and $\Gamma_n$ its theoretical Power Spectral Density.
* Identification * Identification of the Cercalo Dynamics
:PROPERTIES: :PROPERTIES:
:header-args:matlab+: :tangle matlab/plant_identification.m :header-args:matlab+: :tangle matlab/plant_identification.m
:header-args:matlab+: :comments org :mkdirp yes :header-args:matlab+: :comments org :mkdirp yes
@ -439,12 +458,13 @@ with $\Delta V$ the total range of the ADC, $n$ its number of bits, $q$ the quan
<<matlab-init>> <<matlab-init>>
#+end_src #+end_src
** Excitation Data
#+begin_src matlab #+begin_src matlab
fs = 1e4; fs = 1e4;
Ts = 1/fs; Ts = 1/fs;
freqs = logspace(1, 3, 1000);
#+end_src #+end_src
** Excitation Data
We generate white noise with the "random number" simulink block, and we filter that noise. We generate white noise with the "random number" simulink block, and we filter that noise.
#+begin_src matlab #+begin_src matlab
@ -489,7 +509,7 @@ Discrete-time zero/pole/gain model.
** Huddle Test ** Huddle Test
We load the data taken during the Huddle Test. We load the data taken during the Huddle Test.
#+begin_src matlab #+begin_src matlab
load('mat/data_test.mat', ... load('mat/data_huddle_test.mat', ...
't', 'Uch', 'Ucv', ... 't', 'Uch', 'Ucv', ...
'Unh', 'Unv', ... 'Unh', 'Unv', ...
'Vph', 'Vpv', ... 'Vph', 'Vpv', ...
@ -581,7 +601,7 @@ We compute the Power Spectral Density of the voltage across the inductance used
** Input / Output data ** Input / Output data
The identification data is loaded The identification data is loaded
#+begin_src matlab #+begin_src matlab
uh = load('mat/data_uh.mat', ... uh = load('mat/data_uch.mat', ...
't', 'Uch', 'Ucv', ... 't', 'Uch', 'Ucv', ...
'Unh', 'Unv', ... 'Unh', 'Unv', ...
'Vph', 'Vpv', ... 'Vph', 'Vpv', ...
@ -589,7 +609,7 @@ The identification data is loaded
'Vnh', 'Vnv', ... 'Vnh', 'Vnv', ...
'Va'); 'Va');
uv = load('mat/data_uh.mat', ... uv = load('mat/data_ucv.mat', ...
't', 'Uch', 'Ucv', ... 't', 'Uch', 'Ucv', ...
'Unh', 'Unv', ... 'Unh', 'Unv', ...
'Vph', 'Vpv', ... 'Vph', 'Vpv', ...
@ -602,35 +622,35 @@ We remove the first seconds where the Cercalo is turned on.
#+begin_src matlab #+begin_src matlab
t0 = 1; t0 = 1;
uh.Uch(t<t0) = []; uh.Uch(uh.t<t0) = [];
uh.Ucv(t<t0) = []; uh.Ucv(uh.t<t0) = [];
uh.Unh(t<t0) = []; uh.Unh(uh.t<t0) = [];
uh.Unv(t<t0) = []; uh.Unv(uh.t<t0) = [];
uh.Vph(t<t0) = []; uh.Vph(uh.t<t0) = [];
uh.Vpv(t<t0) = []; uh.Vpv(uh.t<t0) = [];
uh.Vch(t<t0) = []; uh.Vch(uh.t<t0) = [];
uh.Vcv(t<t0) = []; uh.Vcv(uh.t<t0) = [];
uh.Vnh(t<t0) = []; uh.Vnh(uh.t<t0) = [];
uh.Vnv(t<t0) = []; uh.Vnv(uh.t<t0) = [];
uh.Va(t<t0) = []; uh.Va(uh.t<t0) = [];
uh.t(t<t0) = []; uh.t(uh.t<t0) = [];
uh.t = uh.t - uh.t(1); % We start at t=0 uh.t = uh.t - uh.t(1); % We start at t=0
t0 = 1; t0 = 1;
uv.Uch(t<t0) = []; uv.Uch(uv.t<t0) = [];
uv.Ucv(t<t0) = []; uv.Ucv(uv.t<t0) = [];
uv.Unh(t<t0) = []; uv.Unh(uv.t<t0) = [];
uv.Unv(t<t0) = []; uv.Unv(uv.t<t0) = [];
uv.Vph(t<t0) = []; uv.Vph(uv.t<t0) = [];
uv.Vpv(t<t0) = []; uv.Vpv(uv.t<t0) = [];
uv.Vch(t<t0) = []; uv.Vch(uv.t<t0) = [];
uv.Vcv(t<t0) = []; uv.Vcv(uv.t<t0) = [];
uv.Vnh(t<t0) = []; uv.Vnh(uv.t<t0) = [];
uv.Vnv(t<t0) = []; uv.Vnv(uv.t<t0) = [];
uv.Va(t<t0) = []; uv.Va(uv.t<t0) = [];
uv.t(t<t0) = []; uv.t(uv.t<t0) = [];
uv.t = uv.t - uv.t(1); % We start at t=0 uv.t = uv.t - uv.t(1); % We start at t=0
#+end_src #+end_src
@ -695,11 +715,67 @@ We remove the first seconds where the Cercalo is turned on.
#+CAPTION: Identification signals when exciting in the vertical direction ([[./figs/identification_uv.png][png]], [[./figs/identification_uv.pdf][pdf]]) #+CAPTION: Identification signals when exciting in the vertical direction ([[./figs/identification_uv.png][png]], [[./figs/identification_uv.pdf][pdf]])
[[file:figs/identification_uv.png]] [[file:figs/identification_uv.png]]
** Estimation of the Frequency Response Function Matrix ** Coherence
The window used for the spectral analysis is an =hanning= windows with temporal size equal to 1 second.
#+begin_src matlab #+begin_src matlab
win = hanning(ceil(1*fs)); win = hanning(ceil(1*fs));
#+end_src #+end_src
#+begin_src matlab
[coh_Uch_Vph, f] = mscohere(uh.Uch, uh.Vph, win, [], [], fs);
[coh_Uch_Vpv, ~] = mscohere(uh.Uch, uh.Vpv, win, [], [], fs);
[coh_Ucv_Vph, ~] = mscohere(uv.Ucv, uv.Vph, win, [], [], fs);
[coh_Ucv_Vpv, ~] = mscohere(uv.Ucv, uv.Vpv, win, [], [], fs);
#+end_src
#+begin_src matlab :exports none
figure;
ax11 = subplot(2, 2, 1);
hold on;
plot(f, coh_Uch_Vph)
set(gca, 'Xscale', 'log');
title('Coherence $\frac{Vp_h}{Uc_h}$')
ylabel('Coherence')
hold off;
ax12 = subplot(2, 2, 2);
hold on;
plot(f, coh_Ucv_Vph)
set(gca, 'Xscale', 'log');
title('Coherence $\frac{Vp_h}{Uc_v}$')
hold off;
ax21 = subplot(2, 2, 3);
hold on;
plot(f, coh_Uch_Vpv)
set(gca, 'Xscale', 'log');
title('Coherence $\frac{Vp_v}{Uc_h}$')
ylabel('Coherence')
xlabel('Frequency [Hz]')
hold off;
ax22 = subplot(2, 2, 4);
hold on;
plot(f, coh_Ucv_Vpv)
set(gca, 'Xscale', 'log');
title('Coherence $\frac{Vp_v}{Uc_v}$')
xlabel('Frequency [Hz]')
hold off;
linkaxes([ax11,ax12,ax21,ax22],'xy');
xlim([10, 1000]); ylim([0, 1]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/identification_coherence.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:identification_coherence
#+CAPTION: Coherence ([[./figs/identification_coherence.png][png]], [[./figs/identification_coherence.pdf][pdf]])
[[file:figs/identification_coherence.png]]
** Estimation of the Frequency Response Function Matrix
We compute an estimate of the transfer functions. We compute an estimate of the transfer functions.
#+begin_src matlab #+begin_src matlab
[tf_Uch_Vph, f] = tfestimate(uh.Uch, uh.Vph, win, [], [], fs); [tf_Uch_Vph, f] = tfestimate(uh.Uch, uh.Vph, win, [], [], fs);
@ -755,61 +831,76 @@ We compute an estimate of the transfer functions.
#+CAPTION: Frequency Response Matrix ([[./figs/frequency_response_matrix.png][png]], [[./figs/frequency_response_matrix.pdf][pdf]]) #+CAPTION: Frequency Response Matrix ([[./figs/frequency_response_matrix.png][png]], [[./figs/frequency_response_matrix.pdf][pdf]])
[[file:figs/frequency_response_matrix.png]] [[file:figs/frequency_response_matrix.png]]
** Coherence
#+begin_src matlab
[coh_Uch_Vph, f] = mscohere(uh.Uch, uh.Vph, win, [], [], fs);
[coh_Uch_Vpv, ~] = mscohere(uh.Uch, uh.Vpv, win, [], [], fs);
[coh_Ucv_Vph, ~] = mscohere(uv.Ucv, uv.Vph, win, [], [], fs);
[coh_Ucv_Vpv, ~] = mscohere(uv.Ucv, uv.Vpv, win, [], [], fs);
#+end_src
#+begin_src matlab :exports none #+begin_src matlab :exports none
figure; figure;
ax11 = subplot(2, 2, 1); ax11 = subplot(2, 2, 1);
hold on; hold on;
plot(f, coh_Uch_Vph) plot(f, 180/pi*unwrap(angle(tf_Uch_Vph)))
title('Frequency Response Function $\frac{Vp_h}{Uc_h}$')
set(gca, 'Xscale', 'log'); set(gca, 'Xscale', 'log');
title('Coherence $\frac{Vp_h}{Uc_h}$') ylabel('Phase [deg]')
ylabel('Coherence') yticks([-180:90:180]);
hold off; hold off;
ax12 = subplot(2, 2, 2); ax12 = subplot(2, 2, 2);
hold on; hold on;
plot(f, coh_Ucv_Vph) plot(f, 180/pi*unwrap(angle(tf_Ucv_Vph)))
title('Frequency Response Function $\frac{Vp_h}{Uc_v}$')
set(gca, 'Xscale', 'log'); set(gca, 'Xscale', 'log');
title('Coherence $\frac{Vp_h}{Uc_v}$') yticks([-180:90:180]);
hold off; hold off;
ax21 = subplot(2, 2, 3); ax21 = subplot(2, 2, 3);
hold on; hold on;
plot(f, coh_Uch_Vpv) plot(f, 180/pi*unwrap(angle(tf_Uch_Vpv)))
title('Frequency Response Function $\frac{Vp_v}{Uc_h}$')
set(gca, 'Xscale', 'log'); set(gca, 'Xscale', 'log');
title('Coherence $\frac{Vp_v}{Uc_h}$') ylabel('Phase [deg]')
ylabel('Coherence')
xlabel('Frequency [Hz]') xlabel('Frequency [Hz]')
yticks([-180:90:180]);
hold off; hold off;
ax22 = subplot(2, 2, 4); ax22 = subplot(2, 2, 4);
hold on; hold on;
plot(f, coh_Ucv_Vpv) plot(f, 180/pi*unwrap(angle(tf_Ucv_Vpv)))
title('Frequency Response Function $\frac{Vp_v}{Uc_v}$')
set(gca, 'Xscale', 'log'); set(gca, 'Xscale', 'log');
title('Coherence $\frac{Vp_v}{Uc_v}$')
xlabel('Frequency [Hz]') xlabel('Frequency [Hz]')
yticks([-180:90:180]);
hold off; hold off;
linkaxes([ax11,ax12,ax21,ax22],'xy'); linkaxes([ax11,ax12,ax21,ax22],'xy');
xlim([10, 1000]); ylim([0, 1]); xlim([10, 1000]); ylim([-200, 200]);
#+end_src #+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes #+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/identification_coherence.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png") #+begin_src matlab :var filepath="figs/frequency_response_matrix_phase.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>> <<plt-matlab>>
#+end_src #+end_src
#+NAME: fig:identification_coherence #+NAME: fig:frequency_response_matrix_phase
#+CAPTION: Coherence ([[./figs/identification_coherence.png][png]], [[./figs/identification_coherence.pdf][pdf]]) #+CAPTION: Frequency Response Matrix_Phase ([[./figs/frequency_response_matrix_phase.png][png]], [[./figs/frequency_response_matrix_phase.pdf][pdf]])
[[file:figs/identification_coherence.png]] [[file:figs/frequency_response_matrix_phase.png]]
** Time Delay
Now, we would like to remove the time delay included in the FRF prior to the model extraction.
Estimation of the time delay:
#+begin_src matlab
Ts_delay = Ts; % [s]
G_delay = tf(1, 1, 'InputDelay', Ts_delay);
G_delay_resp = squeeze(freqresp(G_delay, f, 'Hz'));
#+end_src
We then remove the time delay from the frequency response function.
#+begin_src matlab
tf_Uch_Vph = tf_Uch_Vph./G_delay_resp;
tf_Uch_Vpv = tf_Uch_Vpv./G_delay_resp;
tf_Ucv_Vph = tf_Ucv_Vph./G_delay_resp;
tf_Ucv_Vpv = tf_Ucv_Vpv./G_delay_resp;
#+end_src
** Extraction of a transfer function matrix ** Extraction of a transfer function matrix
First we define the initial guess for the resonance frequencies and the weights associated. First we define the initial guess for the resonance frequencies and the weights associated.
@ -1025,19 +1116,603 @@ An we run the =vectfit3= algorithm.
And finally, we create the identified state space model: And finally, we create the identified state space model:
#+begin_src matlab #+begin_src matlab
G_uh_xh = minreal(ss(full(SER_uh_xh.A),SER_uh_xh.B,SER_uh_xh.C,SER_uh_xh.D)); G_Uch_Vph = minreal(ss(full(SER_Uch_Vph.A),SER_Uch_Vph.B,SER_Uch_Vph.C,SER_Uch_Vph.D));
G_uv_xh = minreal(ss(full(SER_uv_xh.A),SER_uv_xh.B,SER_uv_xh.C,SER_uv_xh.D)); G_Ucv_Vph = minreal(ss(full(SER_Ucv_Vph.A),SER_Ucv_Vph.B,SER_Ucv_Vph.C,SER_Ucv_Vph.D));
G_uh_xv = minreal(ss(full(SER_uh_xv.A),SER_uh_xv.B,SER_uh_xv.C,SER_uh_xv.D)); G_Uch_Vpv = minreal(ss(full(SER_Uch_Vpv.A),SER_Uch_Vpv.B,SER_Uch_Vpv.C,SER_Uch_Vpv.D));
G_uv_xv = minreal(ss(full(SER_uv_xv.A),SER_uv_xv.B,SER_uv_xv.C,SER_uv_xv.D)); G_Ucv_Vpv = minreal(ss(full(SER_Ucv_Vpv.A),SER_Ucv_Vpv.B,SER_Ucv_Vpv.C,SER_Ucv_Vpv.D));
G = [G_uh_xh, G_uv_xh; Gc = [G_Uch_Vph, G_Ucv_Vph;
G_uh_xv, G_uv_xv]; G_Uch_Vpv, G_Ucv_Vpv];
#+end_src #+end_src
#+begin_src matlab #+begin_src matlab
save('mat/plant.mat', 'G'); save('mat/plant.mat', 'Gc');
#+end_src #+end_src
** Parameter extraction
#+begin_src matlab
[Gz, Gp, Gk] = zpkdata(G_Uch_Vph);
G_Uch_Vph = zpk([], Gp, -prod(Gz{:})*Gk);
[Gz, Gp, Gk] = zpkdata(G_Ucv_Vph);
G_Ucv_Vph = zpk([], Gp, -prod(Gz{:})*Gk);
[Gz, Gp, Gk] = zpkdata(G_Uch_Vpv);
G_Uch_Vpv = zpk([], Gp, -prod(Gz{:})*Gk);
[Gz, Gp, Gk] = zpkdata(G_Ucv_Vpv);
G_Ucv_Vpv = zpk([], Gp, -prod(Gz{:})*Gk);
% Plant without the Zero
Gb = [G_Uch_Vph, G_Ucv_Vph;
G_Uch_Vpv, G_Ucv_Vpv];
#+end_src
* Identification of the Newport Dynamics
** 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
#+begin_src matlab
fs = 1e4;
Ts = 1/fs;
freqs = logspace(1, 3, 1000);
#+end_src
** Input / Output data
The identification data is loaded
#+begin_src matlab
uh = load('mat/data_unh.mat', ...
't', 'Uch', 'Ucv', ...
'Unh', 'Unv', ...
'Vph', 'Vpv', ...
'Vch', 'Vcv', ...
'Vnh', 'Vnv', ...
'Va');
uv = load('mat/data_unv.mat', ...
't', 'Uch', 'Ucv', ...
'Unh', 'Unv', ...
'Vph', 'Vpv', ...
'Vch', 'Vcv', ...
'Vnh', 'Vnv', ...
'Va');
#+end_src
We remove the first seconds where the Cercalo is turned on.
#+begin_src matlab
t0 = 3;
uh.Uch(uh.t<t0) = [];
uh.Ucv(uh.t<t0) = [];
uh.Unh(uh.t<t0) = [];
uh.Unv(uh.t<t0) = [];
uh.Vph(uh.t<t0) = [];
uh.Vpv(uh.t<t0) = [];
uh.Vch(uh.t<t0) = [];
uh.Vcv(uh.t<t0) = [];
uh.Vnh(uh.t<t0) = [];
uh.Vnv(uh.t<t0) = [];
uh.Va(uh.t<t0) = [];
uh.t(uh.t<t0) = [];
uh.t = uh.t - uh.t(1); % We start at t=0
t0 = 1.5;
uv.Uch(uv.t<t0) = [];
uv.Ucv(uv.t<t0) = [];
uv.Unh(uv.t<t0) = [];
uv.Unv(uv.t<t0) = [];
uv.Vph(uv.t<t0) = [];
uv.Vpv(uv.t<t0) = [];
uv.Vch(uv.t<t0) = [];
uv.Vcv(uv.t<t0) = [];
uv.Vnh(uv.t<t0) = [];
uv.Vnv(uv.t<t0) = [];
uv.Va(uv.t<t0) = [];
uv.t(uv.t<t0) = [];
uv.t = uv.t - uv.t(1); % We start at t=0
#+end_src
#+begin_src matlab :exports none
figure;
ax1 = subplot(1, 2, 1);
plot(uh.t, uh.Unh, 'DisplayName', '$Un_h$');
xlabel('Time [s]');
ylabel('Amplitude [V]');
legend();
ax2 = subplot(1, 2, 2);
hold on;
plot(uh.t, uh.Vph, 'DisplayName', '$Vp_h$');
plot(uh.t, uh.Vpv, 'DisplayName', '$Vp_v$');
hold off;
xlabel('Time [s]');
ylabel('Amplitude [V]');
legend();
linkaxes([ax1,ax2],'x');
xlim([uh.t(1), uh.t(end)]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/identification_unh.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:identification_unh
#+CAPTION: Identification signals when exciting the horizontal direction ([[./figs/identification_unh.png][png]], [[./figs/identification_unh.pdf][pdf]])
[[file:figs/identification_unh.png]]
#+begin_src matlab :exports none
figure;
ax1 = subplot(1, 2, 1);
plot(uv.t, uv.Unv, 'DisplayName', '$Uc_v$');
xlabel('Time [s]');
ylabel('Amplitude [V]');
ax2 = subplot(1, 2, 2);
hold on;
plot(uv.t, uv.Vpv, 'DisplayName', '$Vp_v$');
plot(uv.t, uv.Vph, 'DisplayName', '$Vp_h$');
hold off;
xlabel('Time [s]');
ylabel('Amplitude [V]');
legend();
linkaxes([ax1,ax2],'x');
xlim([uv.t(1), uv.t(end)]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/identification_unv.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:identification_unv
#+CAPTION: Identification signals when exciting in the vertical direction ([[./figs/identification_unv.png][png]], [[./figs/identification_unv.pdf][pdf]])
[[file:figs/identification_unv.png]]
** Coherence
The window used for the spectral analysis is an =hanning= windows with temporal size equal to 1 second.
#+begin_src matlab
win = hanning(ceil(1*fs));
#+end_src
#+begin_src matlab
[coh_Unh_Vph, f] = mscohere(uh.Unh, uh.Vph, win, [], [], fs);
[coh_Unh_Vpv, ~] = mscohere(uh.Unh, uh.Vpv, win, [], [], fs);
[coh_Unv_Vph, ~] = mscohere(uv.Unv, uv.Vph, win, [], [], fs);
[coh_Unv_Vpv, ~] = mscohere(uv.Unv, uv.Vpv, win, [], [], fs);
#+end_src
#+begin_src matlab :exports none
figure;
ax11 = subplot(2, 2, 1);
hold on;
plot(f, coh_Unh_Vph)
set(gca, 'Xscale', 'log');
title('Coherence $\frac{Vp_h}{Un_h}$')
ylabel('Coherence')
hold off;
ax12 = subplot(2, 2, 2);
hold on;
plot(f, coh_Unv_Vph)
set(gca, 'Xscale', 'log');
title('Coherence $\frac{Vp_h}{Un_v}$')
hold off;
ax21 = subplot(2, 2, 3);
hold on;
plot(f, coh_Unh_Vpv)
set(gca, 'Xscale', 'log');
title('Coherence $\frac{Vp_v}{Un_h}$')
ylabel('Coherence')
xlabel('Frequency [Hz]')
hold off;
ax22 = subplot(2, 2, 4);
hold on;
plot(f, coh_Unv_Vpv)
set(gca, 'Xscale', 'log');
title('Coherence $\frac{Vp_v}{Un_v}$')
xlabel('Frequency [Hz]')
hold off;
linkaxes([ax11,ax12,ax21,ax22],'xy');
xlim([10, 1000]); ylim([0, 1]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/id_Newport_coherence.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:id_Newport_coherence
#+CAPTION: Coherence ([[./figs/id_Newport_coherence.png][png]], [[./figs/id_Newport_coherence.pdf][pdf]])
[[file:figs/id_Newport_coherence.png]]
** Estimation of the Frequency Response Function Matrix
We compute an estimate of the transfer functions.
#+begin_src matlab
[tf_Unh_Vph, f] = tfestimate(uh.Unh, uh.Vph, win, [], [], fs);
[tf_Unh_Vpv, ~] = tfestimate(uh.Unh, uh.Vpv, win, [], [], fs);
[tf_Unv_Vph, ~] = tfestimate(uv.Unv, uv.Vph, win, [], [], fs);
[tf_Unv_Vpv, ~] = tfestimate(uv.Unv, uv.Vpv, win, [], [], fs);
#+end_src
#+begin_src matlab :exports none
figure;
ax11 = subplot(2, 2, 1);
hold on;
plot(f, abs(tf_Unh_Vph))
title('Frequency Response Function $\frac{Vp_h}{Un_h}$')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
ylabel('Amplitude')
hold off;
ax12 = subplot(2, 2, 2);
hold on;
plot(f, abs(tf_Unv_Vph))
title('Frequency Response Function $\frac{Vp_h}{Un_v}$')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
hold off;
ax21 = subplot(2, 2, 3);
hold on;
plot(f, abs(tf_Unh_Vpv))
title('Frequency Response Function $\frac{Vp_v}{Un_h}$')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
ylabel('Amplitude')
xlabel('Frequency [Hz]')
hold off;
ax22 = subplot(2, 2, 4);
hold on;
plot(f, abs(tf_Unv_Vpv))
title('Frequency Response Function $\frac{Vp_v}{Un_v}$')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
xlabel('Frequency [Hz]')
hold off;
linkaxes([ax11,ax12,ax21,ax22],'xy');
xlim([10, 1000]); ylim([1e-4, 1e1]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/frequency_response_matrix.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:frequency_response_matrix
#+CAPTION: Frequency Response Matrix ([[./figs/frequency_response_matrix.png][png]], [[./figs/frequency_response_matrix.pdf][pdf]])
[[file:figs/frequency_response_matrix.png]]
#+begin_src matlab :exports none
figure;
ax11 = subplot(2, 2, 1);
hold on;
plot(f, 180/pi*unwrap(angle(tf_Unh_Vph)))
title('Frequency Response Function $\frac{Vp_h}{Un_h}$')
set(gca, 'Xscale', 'log');
ylabel('Phase [deg]')
yticks([-180:90:180]);
hold off;
ax12 = subplot(2, 2, 2);
hold on;
plot(f, 180/pi*unwrap(angle(tf_Unv_Vph)))
title('Frequency Response Function $\frac{Vp_h}{Un_v}$')
set(gca, 'Xscale', 'log');
yticks([-180:90:180]);
hold off;
ax21 = subplot(2, 2, 3);
hold on;
plot(f, 180/pi*unwrap(angle(tf_Unh_Vpv)))
title('Frequency Response Function $\frac{Vp_v}{Un_h}$')
set(gca, 'Xscale', 'log');
ylabel('Phase [deg]')
xlabel('Frequency [Hz]')
yticks([-180:90:180]);
hold off;
ax22 = subplot(2, 2, 4);
hold on;
plot(f, 180/pi*unwrap(angle(tf_Unv_Vpv)))
title('Frequency Response Function $\frac{Vp_v}{Un_v}$')
set(gca, 'Xscale', 'log');
xlabel('Frequency [Hz]')
yticks([-180:90:180]);
hold off;
linkaxes([ax11,ax12,ax21,ax22],'xy');
xlim([10, 1000]); ylim([-200, 200]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/id_Newport_phase.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:id_Newport_phase
#+CAPTION: Frequency Response Matrix_Phase ([[./figs/id_Newport_phase.png][png]], [[./figs/id_Newport_phase.pdf][pdf]])
[[file:figs/id_Newport_phase.png]]
** Time Delay
Now, we would like to remove the time delay included in the FRF prior to the model extraction.
Estimation of the time delay:
#+begin_src matlab
Ts_delay = 0.0005; % [s]
G_delay = tf(1, 1, 'InputDelay', Ts_delay);
G_delay_resp = squeeze(freqresp(G_delay, f, 'Hz'));
#+end_src
We then remove the time delay from the frequency response function.
#+begin_src matlab :exports none
figure;
ax11 = subplot(2, 2, 1);
hold on;
plot(f, 180/pi*unwrap(angle(tf_Unh_Vph)))
plot(f, 180/pi*unwrap(angle(tf_Unh_Vph./G_delay_resp)))
title('Frequency Response Function $\frac{Vp_h}{Un_h}$')
set(gca, 'Xscale', 'log');
ylabel('Phase [deg]')
yticks([-180:90:180]);
hold off;
ax12 = subplot(2, 2, 2);
hold on;
plot(f, 180/pi*unwrap(angle(tf_Unv_Vph)))
plot(f, 180/pi*unwrap(angle(tf_Unv_Vph./G_delay_resp)))
title('Frequency Response Function $\frac{Vp_h}{Un_v}$')
set(gca, 'Xscale', 'log');
yticks([-180:90:180]);
hold off;
ax21 = subplot(2, 2, 3);
hold on;
plot(f, 180/pi*unwrap(angle(tf_Unh_Vpv)))
plot(f, 180/pi*unwrap(angle(tf_Unh_Vpv./G_delay_resp)))
title('Frequency Response Function $\frac{Vp_v}{Un_h}$')
set(gca, 'Xscale', 'log');
ylabel('Phase [deg]')
xlabel('Frequency [Hz]')
yticks([-180:90:180]);
hold off;
ax22 = subplot(2, 2, 4);
hold on;
plot(f, 180/pi*unwrap(angle(tf_Unv_Vpv)))
plot(f, 180/pi*unwrap(angle(tf_Unv_Vpv./G_delay_resp)))
title('Frequency Response Function $\frac{Vp_v}{Un_v}$')
set(gca, 'Xscale', 'log');
xlabel('Frequency [Hz]')
yticks([-180:90:180]);
hold off;
linkaxes([ax11,ax12,ax21,ax22],'xy');
xlim([10, 1000]); ylim([-200, 200]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/time_delay_Newport.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:time_delay_Newport
#+CAPTION: Phase change due to time-delay in the Newport dynamics ([[./figs/time_delay_Newport.png][png]], [[./figs/time_delay_Newport.pdf][pdf]])
[[file:figs/time_delay_Newport.png]]
** Extraction of a transfer function matrix
From Fig. [[fig:frequency_response_matrix]], it seems reasonable to model the Newport dynamics as a constant.
#+begin_src matlab
Gnh0 = tf(mean(abs(tf_Unh_Vph(f>10 & f<100))));
Gnv0 = tf(mean(abs(tf_Unv_Vpv(f>10 & f<100))));
Gn = [Gnh0, 0;
0, Gnv0];
#+end_src
* Calibration of the 4 Quadrant Diode
** Introduction :ignore:
We know precisely the Newport angle thanks to its metrology included.
Thus, we can choose precisely the angle of the Newport mirror and see what is the value measured by the 4 Quadrant Diode.
The goal is to obtain the "gain" of the 4QD in [V/rad].
** Input / Output data
The identification data is loaded
#+begin_src matlab
uh = load('mat/data_cal_pd_h.mat', ...
't', 'Uch', 'Ucv', ...
'Unh', 'Unv', ...
'Vph', 'Vpv', ...
'Vch', 'Vcv', ...
'Vnh', 'Vnv', ...
'Va');
uv = load('mat/data_cal_pd_v.mat', ...
't', 'Uch', 'Ucv', ...
'Unh', 'Unv', ...
'Vph', 'Vpv', ...
'Vch', 'Vcv', ...
'Vnh', 'Vnv', ...
'Va');
#+end_src
We remove the first seconds where the Cercalo is turned on.
#+begin_src matlab
t0 = 1;
uh.Uch(uh.t<t0) = [];
uh.Ucv(uh.t<t0) = [];
uh.Unh(uh.t<t0) = [];
uh.Unv(uh.t<t0) = [];
uh.Vph(uh.t<t0) = [];
uh.Vpv(uh.t<t0) = [];
uh.Vch(uh.t<t0) = [];
uh.Vcv(uh.t<t0) = [];
uh.Vnh(uh.t<t0) = [];
uh.Vnv(uh.t<t0) = [];
uh.Va(uh.t<t0) = [];
uh.t(uh.t<t0) = [];
uh.t = uh.t - uh.t(1); % We start at t=0
t0 = 1;
uv.Uch(uv.t<t0) = [];
uv.Ucv(uv.t<t0) = [];
uv.Unh(uv.t<t0) = [];
uv.Unv(uv.t<t0) = [];
uv.Vph(uv.t<t0) = [];
uv.Vpv(uv.t<t0) = [];
uv.Vch(uv.t<t0) = [];
uv.Vcv(uv.t<t0) = [];
uv.Vnh(uv.t<t0) = [];
uv.Vnv(uv.t<t0) = [];
uv.Va(uv.t<t0) = [];
uv.t(uv.t<t0) = [];
uv.t = uv.t - uv.t(1); % We start at t=0
#+end_src
#+begin_src matlab :exports none
figure;
ax1 = subplot(1, 2, 1);
plot(uh.t, uh.Unh, 'DisplayName', '$Un_h$');
xlabel('Time [s]');
ylabel('Amplitude [V]');
legend();
ax2 = subplot(1, 2, 2);
hold on;
plot(uh.t, uh.Vph, 'DisplayName', '$Vp_h$');
plot(uh.t, uh.Vpv, 'DisplayName', '$Vp_v$');
hold off;
xlabel('Time [s]');
ylabel('Amplitude [V]');
legend();
linkaxes([ax1,ax2],'x');
xlim([uh.t(1), uh.t(end)]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/calib_4qd_h.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:calib_4qd_h
#+CAPTION: Identification signals when exciting the horizontal direction ([[./figs/calib_4qd_h.png][png]], [[./figs/calib_4qd_h.pdf][pdf]])
[[file:figs/calib_4qd_h.png]]
#+begin_src matlab :exports none
figure;
ax1 = subplot(1, 2, 1);
plot(uv.t, uv.Unv, 'DisplayName', '$Uc_v$');
xlabel('Time [s]');
ylabel('Amplitude [V]');
ax2 = subplot(1, 2, 2);
hold on;
plot(uv.t, uv.Vpv, 'DisplayName', '$Vp_v$');
plot(uv.t, uv.Vph, 'DisplayName', '$Vp_h$');
hold off;
xlabel('Time [s]');
ylabel('Amplitude [V]');
legend();
linkaxes([ax1,ax2],'x');
xlim([uv.t(1), uv.t(end)]);
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/calib_4qd_v.pdf" :var figsize="full-normal" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:calib_4qd_v
#+CAPTION: Identification signals when exciting in the vertical direction ([[./figs/calib_4qd_v.png][png]], [[./figs/calib_4qd_v.pdf][pdf]])
[[file:figs/calib_4qd_v.png]]
** Linear Regression
#+begin_src matlab
bh = [ones(size(uh.Unh)) uh.Unh]\uh.Vph;
bv = [ones(size(uv.Unv)) uv.Unv]\uv.Vpv;
#+end_src
#+begin_src matlab :exports none
figure;
ax1 = subplot(1, 2, 1);
hold on;
plot(uh.Unh, uh.Vph, 'o', 'DisplayName', 'Exp. data');
plot([min(uh.Unh) max(uh.Unh)], [min(uh.Unh) max(uh.Unh)].*bh(2) + bh(1), 'k--', 'DisplayName', sprintf('%.1e x + %.1e', bh(2), bh(1)))
hold off;
xlabel('$Un_h$ [V]'); ylabel('$Vp_h$ [V]');
legend();
ax2 = subplot(1, 2, 2);
hold on;
plot(uv.Unv, uv.Vpv, 'o', 'DisplayName', 'Exp. data');
plot([min(uv.Unv) max(uv.Unv)], [min(uv.Unv) max(uv.Unv)].*bv(2) + bv(1), 'k--', 'DisplayName', sprintf('%.1e x + %.1e', bv(2), bv(1)))
hold off;
xlabel('$Un_v$ [V]');
ylabel('$Vp_v$ [V]');
legend();
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/4qd_linear_reg.pdf" :var figsize="full-tall" :post pdf2svg(file=*this*, ext="png")
<<plt-matlab>>
#+end_src
#+NAME: fig:4qd_linear_reg
#+CAPTION: Linear Regression ([[./figs/4qd_linear_reg.png][png]], [[./figs/4qd_linear_reg.pdf][pdf]])
[[file:figs/4qd_linear_reg.png]]
** Gain of the photodiodes
If we note:
- $\alpha_o$ the angular displacement of the beam
- $\alpha_m$ the angular displacement of the mirror
- $V_{qd}$ the voltage measured by the 4QD
- $V_n$ the voltage input of the Newport
The angular displacement of the beam is twice the mechanical angular displacement of the Newport mirror (supposing here that the mirror is flat and not concave):
\[ \alpha_o = 2 \alpha_m \]
We want to determine $\frac{V_{qd}}{\alpha_o}$:
\begin{align*}
\frac{V_{qd}}{\alpha_o} &= \frac{1}{2} \frac{V_{qd}}{\frac{1}{2} \alpha_o} \\
&= \frac{1}{2} \frac{V_{qd}}{V_n} \frac{V_n}{\alpha_m}
\end{align*}
with:
- $\frac{V_n}{\alpha_m} = \frac{1}{2.62 \cdot 10^{-3}}\ \left[\frac{V}{rad}\right]$ is the inverse of the gain of the Newport
- $\frac{V_{qd}}{V_n} = 0.185\ \left[\frac{V}{V}\right]$ is the identified DC gain of the transfer function from a voltage applied to the Newport to the 4QD measurement
Thus:
#+begin_src matlab
Gqd = 0.5 * mean(diag(dcgain(Gn))) * 1/(2.62*10^-3);
#+end_src
We obtain:
\[ \frac{\alpha_0}{V_{qd}} \approx 35.2\ \left[ \frac{V}{rad} \right] \]
\[ \frac{\alpha_0}{V_{qd}} \approx 0.35\ \left[ \frac{mV}{\mu rad} \right] \]
* Plant Scaling * Plant Scaling
- measured noise - measured noise
- expected perturbations - expected perturbations

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.