Error in the cross coupling terms (switched)

This commit is contained in:
Thomas Dehaeze 2019-09-11 09:11:05 +02:00
parent f5bccf5f61
commit ee7cf958ca
7 changed files with 51 additions and 49 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 186 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-10 mar. 18:18 --> <!-- 2019-09-11 mer. 09:10 -->
<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,27 +276,27 @@ 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="#org093ae95">1. Identification</a> <li><a href="#org7d7af99">1. Identification</a>
<ul> <ul>
<li><a href="#org32d4734">1.1. Excitation Data</a></li> <li><a href="#org720ab4f">1.1. Excitation Data</a></li>
<li><a href="#org6dddc31">1.2. Input / Output data</a></li> <li><a href="#org2335cee">1.2. Input / Output data</a></li>
<li><a href="#org9c832b5">1.3. Estimation of the Frequency Response Function Matrix</a></li> <li><a href="#orgddaeb4a">1.3. Estimation of the Frequency Response Function Matrix</a></li>
<li><a href="#org1036771">1.4. Coherence</a></li> <li><a href="#org3d15257">1.4. Coherence</a></li>
<li><a href="#org9c60833">1.5. Extraction of a transfer function matrix</a></li> <li><a href="#org891ffe6">1.5. Extraction of a transfer function matrix</a></li>
</ul> </ul>
</li> </li>
<li><a href="#orge7533a6">2. Plant Analysis</a></li> <li><a href="#orgbb47804">2. Plant Analysis</a></li>
<li><a href="#org7b636db">3. Control</a></li> <li><a href="#org7348e54">3. Control</a></li>
</ul> </ul>
</div> </div>
</div> </div>
<div id="outline-container-org093ae95" class="outline-2"> <div id="outline-container-org7d7af99" class="outline-2">
<h2 id="org093ae95"><span class="section-number-2">1</span> Identification</h2> <h2 id="org7d7af99"><span class="section-number-2">1</span> Identification</h2>
<div class="outline-text-2" id="text-1"> <div class="outline-text-2" id="text-1">
<p> <p>
<a id="orgbba62c8"></a> <a id="org57da1c6"></a>
</p> </p>
<div class="note"> <div class="note">
<p> <p>
@ -306,8 +306,8 @@ All the files (data and Matlab scripts) are accessible <a href="data/plant_ident
</div> </div>
</div> </div>
<div id="outline-container-org32d4734" class="outline-3"> <div id="outline-container-org720ab4f" class="outline-3">
<h3 id="org32d4734"><span class="section-number-3">1.1</span> Excitation Data</h3> <h3 id="org720ab4f"><span class="section-number-3">1.1</span> Excitation Data</h3>
<div class="outline-text-3" id="text-1-1"> <div class="outline-text-3" id="text-1-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>;
@ -344,8 +344,8 @@ Discrete-time zero/pole/gain model.
</div> </div>
</div> </div>
<div id="outline-container-org6dddc31" class="outline-3"> <div id="outline-container-org2335cee" class="outline-3">
<h3 id="org6dddc31"><span class="section-number-3">1.2</span> Input / Output data</h3> <h3 id="org2335cee"><span class="section-number-3">1.2</span> Input / Output data</h3>
<div class="outline-text-3" id="text-1-2"> <div class="outline-text-3" id="text-1-2">
<p> <p>
The identification data is loaded The identification data is loaded
@ -388,7 +388,7 @@ uy.yy = uy.yy<span class="org-type">-</span>mean<span class="org-rainbow-delimit
</div> </div>
<div id="orgb6e7f69" class="figure"> <div id="orgfbb461b" class="figure">
<p><img src="figs/identification_ux.png" alt="identification_ux.png" /> <p><img src="figs/identification_ux.png" alt="identification_ux.png" />
</p> </p>
<p><span class="figure-number">Figure 1: </span>Identification signals when exciting the \(x\) axis (<a href="./figs/identification_ux.png">png</a>, <a href="./figs/identification_ux.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 1: </span>Identification signals when exciting the \(x\) axis (<a href="./figs/identification_ux.png">png</a>, <a href="./figs/identification_ux.pdf">pdf</a>)</p>
@ -396,7 +396,7 @@ uy.yy = uy.yy<span class="org-type">-</span>mean<span class="org-rainbow-delimit
<div id="org51c507d" class="figure"> <div id="orgdfdfab9" class="figure">
<p><img src="figs/identification_uy.png" alt="identification_uy.png" /> <p><img src="figs/identification_uy.png" alt="identification_uy.png" />
</p> </p>
<p><span class="figure-number">Figure 2: </span>Identification signals when exciting the \(y\) axis (<a href="./figs/identification_uy.png">png</a>, <a href="./figs/identification_uy.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 2: </span>Identification signals when exciting the \(y\) axis (<a href="./figs/identification_uy.png">png</a>, <a href="./figs/identification_uy.pdf">pdf</a>)</p>
@ -404,8 +404,8 @@ uy.yy = uy.yy<span class="org-type">-</span>mean<span class="org-rainbow-delimit
</div> </div>
</div> </div>
<div id="outline-container-org9c832b5" class="outline-3"> <div id="outline-container-orgddaeb4a" class="outline-3">
<h3 id="org9c832b5"><span class="section-number-3">1.3</span> Estimation of the Frequency Response Function Matrix</h3> <h3 id="orgddaeb4a"><span class="section-number-3">1.3</span> Estimation of the Frequency Response Function Matrix</h3>
<div class="outline-text-3" id="text-1-3"> <div class="outline-text-3" id="text-1-3">
<p> <p>
We compute an estimate of the transfer functions. We compute an estimate of the transfer functions.
@ -419,7 +419,7 @@ We compute an estimate of the transfer functions.
</div> </div>
<div id="org7a99c35" class="figure"> <div id="orga43b16c" 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 3: </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 3: </span>Frequency Response Matrix (<a href="./figs/frequency_response_matrix.png">png</a>, <a href="./figs/frequency_response_matrix.pdf">pdf</a>)</p>
@ -427,8 +427,8 @@ We compute an estimate of the transfer functions.
</div> </div>
</div> </div>
<div id="outline-container-org1036771" class="outline-3"> <div id="outline-container-org3d15257" class="outline-3">
<h3 id="org1036771"><span class="section-number-3">1.4</span> Coherence</h3> <h3 id="org3d15257"><span class="section-number-3">1.4</span> Coherence</h3>
<div class="outline-text-3" id="text-1-4"> <div class="outline-text-3" id="text-1-4">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab"><span class="org-rainbow-delimiters-depth-1">[</span>coh_ux_yx, f<span class="org-rainbow-delimiters-depth-1">]</span> = mscohere<span class="org-rainbow-delimiters-depth-1">(</span>ux.ux, ux.yx, hanning<span class="org-rainbow-delimiters-depth-2">(</span>ceil<span class="org-rainbow-delimiters-depth-3">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">*</span>fs<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-rainbow-delimiters-depth-2">)</span>, <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_ux_yx, f<span class="org-rainbow-delimiters-depth-1">]</span> = mscohere<span class="org-rainbow-delimiters-depth-1">(</span>ux.ux, ux.yx, hanning<span class="org-rainbow-delimiters-depth-2">(</span>ceil<span class="org-rainbow-delimiters-depth-3">(</span><span class="org-highlight-numbers-number">1</span><span class="org-type">*</span>fs<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-rainbow-delimiters-depth-2">)</span>, <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>;
@ -439,7 +439,7 @@ We compute an estimate of the transfer functions.
</div> </div>
<div id="org7a92029" class="figure"> <div id="org02b2d5b" 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 4: </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 4: </span>Coherence (<a href="./figs/identification_coherence.png">png</a>, <a href="./figs/identification_coherence.pdf">pdf</a>)</p>
@ -448,8 +448,8 @@ We compute an estimate of the transfer functions.
</div> </div>
<div id="outline-container-org9c60833" class="outline-3"> <div id="outline-container-org891ffe6" class="outline-3">
<h3 id="org9c60833"><span class="section-number-3">1.5</span> Extraction of a transfer function matrix</h3> <h3 id="org891ffe6"><span class="section-number-3">1.5</span> Extraction of a transfer function matrix</h3>
<div class="outline-text-3" id="text-1-5"> <div class="outline-text-3" id="text-1-5">
<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.
@ -503,7 +503,7 @@ Ignore data above some frequency.
</div> </div>
<div id="orgec6c005" class="figure"> <div id="orga5e5efc" 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 5: </span>Weights amplitude (<a href="./figs/weights.png">png</a>, <a href="./figs/weights.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 5: </span>Weights amplitude (<a href="./figs/weights.png">png</a>, <a href="./figs/weights.pdf">pdf</a>)</p>
@ -555,7 +555,7 @@ An we run the <code>vectfit3</code> algorithm.
</div> </div>
<div id="orgc0f4949" class="figure"> <div id="org690224b" 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 6: </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 6: </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>
@ -582,16 +582,17 @@ G = <span class="org-rainbow-delimiters-depth-1">[</span>G_ux_yx, G_uy_yx;
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-orge7533a6" class="outline-2">
<h2 id="orge7533a6"><span class="section-number-2">2</span> Plant Analysis</h2> <div id="outline-container-orgbb47804" class="outline-2">
<h2 id="orgbb47804"><span class="section-number-2">2</span> Plant Analysis</h2>
</div> </div>
<div id="outline-container-org7b636db" class="outline-2"> <div id="outline-container-org7348e54" class="outline-2">
<h2 id="org7b636db"><span class="section-number-2">3</span> Control</h2> <h2 id="org7348e54"><span class="section-number-2">3</span> Control</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-10 mar. 18:18</p> <p class="date">Created: 2019-09-11 mer. 09:10</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>

View File

@ -203,14 +203,14 @@ We compute an estimate of the transfer functions.
ax12 = subplot(2, 2, 2); ax12 = subplot(2, 2, 2);
hold on; hold on;
plot(f, abs(tf_ux_yy)) plot(f, abs(tf_uy_yx))
title('Frequency Response Function $\frac{y_x}{u_y}$') title('Frequency Response Function $\frac{y_x}{u_y}$')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
hold off; hold off;
ax21 = subplot(2, 2, 3); ax21 = subplot(2, 2, 3);
hold on; hold on;
plot(f, abs(tf_uy_yx)) plot(f, abs(tf_ux_yy))
title('Frequency Response Function $\frac{y_y}{u_x}$') title('Frequency Response Function $\frac{y_y}{u_x}$')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
ylabel('Amplitude') ylabel('Amplitude')
@ -260,14 +260,14 @@ We compute an estimate of the transfer functions.
ax12 = subplot(2, 2, 2); ax12 = subplot(2, 2, 2);
hold on; hold on;
plot(f, coh_ux_yy) plot(f, coh_uy_yx)
set(gca, 'Xscale', 'log'); set(gca, 'Xscale', 'log');
title('Coherence $\frac{y_x}{u_y}$') title('Coherence $\frac{y_x}{u_y}$')
hold off; hold off;
ax21 = subplot(2, 2, 3); ax21 = subplot(2, 2, 3);
hold on; hold on;
plot(f, coh_uy_yx) plot(f, coh_ux_yy)
set(gca, 'Xscale', 'log'); set(gca, 'Xscale', 'log');
title('Coherence $\frac{y_y}{u_x}$') title('Coherence $\frac{y_y}{u_x}$')
ylabel('Coherence') ylabel('Coherence')
@ -405,16 +405,16 @@ An we run the =vectfit3= algorithm.
ax12 = subplot(2, 2, 2); ax12 = subplot(2, 2, 2);
hold on; hold on;
plot(f, abs(tf_ux_yy)) plot(f, abs(tf_uy_yx))
plot(f, abs(fit_ux_yy)) plot(f, abs(fit_uy_yx))
title('Frequency Response Function $\frac{y_x}{u_y}$') title('Frequency Response Function $\frac{y_x}{u_y}$')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
hold off; hold off;
ax21 = subplot(2, 2, 3); ax21 = subplot(2, 2, 3);
hold on; hold on;
plot(f, abs(tf_uy_yx)) plot(f, abs(tf_ux_yy))
plot(f, abs(fit_uy_yx)) plot(f, abs(fit_ux_yy))
title('Frequency Response Function $\frac{y_y}{u_x}$') title('Frequency Response Function $\frac{y_y}{u_x}$')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
ylabel('Amplitude') ylabel('Amplitude')
@ -459,5 +459,6 @@ And finally, we create the identified state space model:
#+begin_src matlab #+begin_src matlab
save('mat/plant.mat', 'G'); save('mat/plant.mat', 'G');
#+end_src #+end_src
* Plant Analysis * Plant Analysis
* Control * Control

Binary file not shown.

View File

@ -115,14 +115,14 @@ hold off;
ax12 = subplot(2, 2, 2); ax12 = subplot(2, 2, 2);
hold on; hold on;
plot(f, abs(tf_ux_yy)) plot(f, abs(tf_uy_yx))
title('Frequency Response Function $\frac{y_x}{u_y}$') title('Frequency Response Function $\frac{y_x}{u_y}$')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
hold off; hold off;
ax21 = subplot(2, 2, 3); ax21 = subplot(2, 2, 3);
hold on; hold on;
plot(f, abs(tf_uy_yx)) plot(f, abs(tf_ux_yy))
title('Frequency Response Function $\frac{y_y}{u_x}$') title('Frequency Response Function $\frac{y_y}{u_x}$')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
ylabel('Amplitude') ylabel('Amplitude')
@ -160,14 +160,14 @@ hold off;
ax12 = subplot(2, 2, 2); ax12 = subplot(2, 2, 2);
hold on; hold on;
plot(f, coh_ux_yy) plot(f, coh_uy_yx)
set(gca, 'Xscale', 'log'); set(gca, 'Xscale', 'log');
title('Coherence $\frac{y_x}{u_y}$') title('Coherence $\frac{y_x}{u_y}$')
hold off; hold off;
ax21 = subplot(2, 2, 3); ax21 = subplot(2, 2, 3);
hold on; hold on;
plot(f, coh_uy_yx) plot(f, coh_ux_yy)
set(gca, 'Xscale', 'log'); set(gca, 'Xscale', 'log');
title('Coherence $\frac{y_y}{u_x}$') title('Coherence $\frac{y_y}{u_x}$')
ylabel('Coherence') ylabel('Coherence')
@ -292,16 +292,16 @@ hold off;
ax12 = subplot(2, 2, 2); ax12 = subplot(2, 2, 2);
hold on; hold on;
plot(f, abs(tf_ux_yy)) plot(f, abs(tf_uy_yx))
plot(f, abs(fit_ux_yy)) plot(f, abs(fit_uy_yx))
title('Frequency Response Function $\frac{y_x}{u_y}$') title('Frequency Response Function $\frac{y_x}{u_y}$')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
hold off; hold off;
ax21 = subplot(2, 2, 3); ax21 = subplot(2, 2, 3);
hold on; hold on;
plot(f, abs(tf_uy_yx)) plot(f, abs(tf_ux_yy))
plot(f, abs(fit_uy_yx)) plot(f, abs(fit_ux_yy))
title('Frequency Response Function $\frac{y_y}{u_x}$') title('Frequency Response Function $\frac{y_y}{u_x}$')
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log'); set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
ylabel('Amplitude') ylabel('Amplitude')