Change the controller tuning for Stewart platform

This commit is contained in:
Thomas Dehaeze 2020-11-06 18:00:30 +01:00
parent 028102a43a
commit c0ea426854
7 changed files with 1143 additions and 1613 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 KiB

After

Width:  |  Height:  |  Size: 212 KiB

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2020-11-06 ven. 17:02 -->
<!-- 2020-11-06 ven. 18:00 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>SVD Control</title>
<meta name="generator" content="Org mode" />
@ -35,57 +35,57 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgee1c82c">1. Gravimeter - Simscape Model</a>
<li><a href="#orgd4f57eb">1. Gravimeter - Simscape Model</a>
<ul>
<li><a href="#orgf2cd19a">1.1. Introduction</a></li>
<li><a href="#org41b1652">1.2. Simscape Model - Parameters</a></li>
<li><a href="#orgcae3523">1.3. System Identification - Without Gravity</a></li>
<li><a href="#org2c50851">1.4. System Identification - With Gravity</a></li>
<li><a href="#org4efc2fa">1.5. Analytical Model</a>
<li><a href="#orgc3f8949">1.1. Introduction</a></li>
<li><a href="#org6c5d169">1.2. Simscape Model - Parameters</a></li>
<li><a href="#org7e18748">1.3. System Identification - Without Gravity</a></li>
<li><a href="#org5189820">1.4. System Identification - With Gravity</a></li>
<li><a href="#org8cf64d7">1.5. Analytical Model</a>
<ul>
<li><a href="#org1481013">1.5.1. Parameters</a></li>
<li><a href="#orgb47bf30">1.5.2. Generation of the State Space Model</a></li>
<li><a href="#org78ffab8">1.5.3. Comparison with the Simscape Model</a></li>
<li><a href="#org8915e6c">1.5.4. Analysis</a></li>
<li><a href="#orgdb49da5">1.5.5. Control Section</a></li>
<li><a href="#org5018f25">1.5.6. Greshgorin radius</a></li>
<li><a href="#org99d33a1">1.5.7. Injecting ground motion in the system to have the output</a></li>
<li><a href="#orgacebdae">1.5.1. Parameters</a></li>
<li><a href="#org97adc82">1.5.2. Generation of the State Space Model</a></li>
<li><a href="#orgd73f86d">1.5.3. Comparison with the Simscape Model</a></li>
<li><a href="#orge5bb971">1.5.4. Analysis</a></li>
<li><a href="#org07a7699">1.5.5. Control Section</a></li>
<li><a href="#org51fab0b">1.5.6. Greshgorin radius</a></li>
<li><a href="#org701f7d2">1.5.7. Injecting ground motion in the system to have the output</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org9129ccf">2. Gravimeter - Functions</a>
<li><a href="#org1e26df7">2. Gravimeter - Functions</a>
<ul>
<li><a href="#orgd9a6812">2.1. <code>align</code></a></li>
<li><a href="#org0217aee">2.2. <code>pzmap_testCL</code></a></li>
<li><a href="#org6031c90">2.1. <code>align</code></a></li>
<li><a href="#orgc125440">2.2. <code>pzmap_testCL</code></a></li>
</ul>
</li>
<li><a href="#org666b9ed">3. Stewart Platform - Simscape Model</a>
<li><a href="#org8703136">3. Stewart Platform - Simscape Model</a>
<ul>
<li><a href="#orga9bf8b4">3.1. Simscape Model - Parameters</a></li>
<li><a href="#orgd0ddc2b">3.2. Identification of the plant</a></li>
<li><a href="#org80362ed">3.3. Physical Decoupling using the Jacobian</a></li>
<li><a href="#org7ae30f6">3.4. Real Approximation of \(G\) at the decoupling frequency</a></li>
<li><a href="#org47bfee1">3.5. SVD Decoupling</a></li>
<li><a href="#orgb300235">3.6. Verification of the decoupling using the &ldquo;Gershgorin Radii&rdquo;</a></li>
<li><a href="#org2b6a490">3.7. Obtained Decoupled Plants</a></li>
<li><a href="#org6def0be">3.8. Diagonal Controller</a></li>
<li><a href="#org6fc3ee5">3.9. Closed-Loop system Performances</a></li>
<li><a href="#org127c82b">3.1. Simscape Model - Parameters</a></li>
<li><a href="#orge4ff887">3.2. Identification of the plant</a></li>
<li><a href="#orgd431ce1">3.3. Physical Decoupling using the Jacobian</a></li>
<li><a href="#org6307a12">3.4. Real Approximation of \(G\) at the decoupling frequency</a></li>
<li><a href="#org49a3a86">3.5. SVD Decoupling</a></li>
<li><a href="#org6a89852">3.6. Verification of the decoupling using the &ldquo;Gershgorin Radii&rdquo;</a></li>
<li><a href="#orga66b9bd">3.7. Obtained Decoupled Plants</a></li>
<li><a href="#org1e51449">3.8. Diagonal Controller</a></li>
<li><a href="#org04e4046">3.9. Closed-Loop system Performances</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-orgee1c82c" class="outline-2">
<h2 id="orgee1c82c"><span class="section-number-2">1</span> Gravimeter - Simscape Model</h2>
<div id="outline-container-orgd4f57eb" class="outline-2">
<h2 id="orgd4f57eb"><span class="section-number-2">1</span> Gravimeter - Simscape Model</h2>
<div class="outline-text-2" id="text-1">
</div>
<div id="outline-container-orgf2cd19a" class="outline-3">
<h3 id="orgf2cd19a"><span class="section-number-3">1.1</span> Introduction</h3>
<div id="outline-container-orgc3f8949" class="outline-3">
<h3 id="orgc3f8949"><span class="section-number-3">1.1</span> Introduction</h3>
<div class="outline-text-3" id="text-1-1">
<div id="org778144a" class="figure">
<div id="orge935281" class="figure">
<p><img src="figs/gravimeter_model.png" alt="gravimeter_model.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Model of the gravimeter</p>
@ -93,8 +93,8 @@
</div>
</div>
<div id="outline-container-org41b1652" class="outline-3">
<h3 id="org41b1652"><span class="section-number-3">1.2</span> Simscape Model - Parameters</h3>
<div id="outline-container-org6c5d169" class="outline-3">
<h3 id="org6c5d169"><span class="section-number-3">1.2</span> Simscape Model - Parameters</h3>
<div class="outline-text-3" id="text-1-2">
<div class="org-src-container">
<pre class="src src-matlab">open(<span class="org-string">'gravimeter.slx'</span>)
@ -125,8 +125,8 @@ g = 0; <span class="org-comment">% Gravity [m/s2]</span>
</div>
</div>
<div id="outline-container-orgcae3523" class="outline-3">
<h3 id="orgcae3523"><span class="section-number-3">1.3</span> System Identification - Without Gravity</h3>
<div id="outline-container-org7e18748" class="outline-3">
<h3 id="org7e18748"><span class="section-number-3">1.3</span> System Identification - Without Gravity</h3>
<div class="outline-text-3" id="text-1-3">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
@ -148,7 +148,7 @@ G.OutputName = {<span class="org-string">'Ax1'</span>, <span class="org-string">
</pre>
</div>
<pre class="example" id="orgaf409ff">
<pre class="example" id="org7c143f5">
pole(G)
ans =
-0.000473481142385795 + 21.7596190728632i
@ -173,7 +173,7 @@ State-space model with 4 outputs, 3 inputs, and 6 states.
<div id="org98589ef" class="figure">
<div id="org97fa7c0" class="figure">
<p><img src="figs/open_loop_tf.png" alt="open_loop_tf.png" />
</p>
<p><span class="figure-number">Figure 2: </span>Open Loop Transfer Function from 3 Actuators to 4 Accelerometers</p>
@ -181,8 +181,8 @@ State-space model with 4 outputs, 3 inputs, and 6 states.
</div>
</div>
<div id="outline-container-org2c50851" class="outline-3">
<h3 id="org2c50851"><span class="section-number-3">1.4</span> System Identification - With Gravity</h3>
<div id="outline-container-org5189820" class="outline-3">
<h3 id="org5189820"><span class="section-number-3">1.4</span> System Identification - With Gravity</h3>
<div class="outline-text-3" id="text-1-4">
<div class="org-src-container">
<pre class="src src-matlab">g = 9.80665; <span class="org-comment">% Gravity [m/s2]</span>
@ -199,7 +199,7 @@ Gg.OutputName = {<span class="org-string">'Ax1'</span>, <span class="org-string"
<p>
We can now see that the system is unstable due to gravity.
</p>
<pre class="example" id="org114b67a">
<pre class="example" id="org76d030b">
pole(Gg)
ans =
-10.9848275341252 + 0i
@ -211,7 +211,7 @@ ans =
</pre>
<div id="orge7aaefa" class="figure">
<div id="orgbff0c0e" class="figure">
<p><img src="figs/open_loop_tf_g.png" alt="open_loop_tf_g.png" />
</p>
<p><span class="figure-number">Figure 3: </span>Open Loop Transfer Function from 3 Actuators to 4 Accelerometers with an without gravity</p>
@ -219,12 +219,12 @@ ans =
</div>
</div>
<div id="outline-container-org4efc2fa" class="outline-3">
<h3 id="org4efc2fa"><span class="section-number-3">1.5</span> Analytical Model</h3>
<div id="outline-container-org8cf64d7" class="outline-3">
<h3 id="org8cf64d7"><span class="section-number-3">1.5</span> Analytical Model</h3>
<div class="outline-text-3" id="text-1-5">
</div>
<div id="outline-container-org1481013" class="outline-4">
<h4 id="org1481013"><span class="section-number-4">1.5.1</span> Parameters</h4>
<div id="outline-container-orgacebdae" class="outline-4">
<h4 id="orgacebdae"><span class="section-number-4">1.5.1</span> Parameters</h4>
<div class="outline-text-4" id="text-1-5-1">
<p>
Bode options.
@ -256,8 +256,8 @@ Frequency vector.
</div>
</div>
<div id="outline-container-orgb47bf30" class="outline-4">
<h4 id="orgb47bf30"><span class="section-number-4">1.5.2</span> Generation of the State Space Model</h4>
<div id="outline-container-org97adc82" class="outline-4">
<h4 id="org97adc82"><span class="section-number-4">1.5.2</span> Generation of the State Space Model</h4>
<div class="outline-text-4" id="text-1-5-2">
<p>
Mass matrix
@ -358,11 +358,11 @@ State-space model with 12 outputs, 6 inputs, and 6 states.
</div>
</div>
<div id="outline-container-org78ffab8" class="outline-4">
<h4 id="org78ffab8"><span class="section-number-4">1.5.3</span> Comparison with the Simscape Model</h4>
<div id="outline-container-orgd73f86d" class="outline-4">
<h4 id="orgd73f86d"><span class="section-number-4">1.5.3</span> Comparison with the Simscape Model</h4>
<div class="outline-text-4" id="text-1-5-3">
<div id="orgd1ca9ed" class="figure">
<div id="orgb3ebfdc" class="figure">
<p><img src="figs/gravimeter_analytical_system_open_loop_models.png" alt="gravimeter_analytical_system_open_loop_models.png" />
</p>
<p><span class="figure-number">Figure 4: </span>Comparison of the analytical and the Simscape models</p>
@ -370,8 +370,8 @@ State-space model with 12 outputs, 6 inputs, and 6 states.
</div>
</div>
<div id="outline-container-org8915e6c" class="outline-4">
<h4 id="org8915e6c"><span class="section-number-4">1.5.4</span> Analysis</h4>
<div id="outline-container-orge5bb971" class="outline-4">
<h4 id="orge5bb971"><span class="section-number-4">1.5.4</span> Analysis</h4>
<div class="outline-text-4" id="text-1-5-4">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-comment">% figure</span>
@ -439,8 +439,8 @@ State-space model with 12 outputs, 6 inputs, and 6 states.
</div>
</div>
<div id="outline-container-orgdb49da5" class="outline-4">
<h4 id="orgdb49da5"><span class="section-number-4">1.5.5</span> Control Section</h4>
<div id="outline-container-org07a7699" class="outline-4">
<h4 id="org07a7699"><span class="section-number-4">1.5.5</span> Control Section</h4>
<div class="outline-text-4" id="text-1-5-5">
<div class="org-src-container">
<pre class="src src-matlab">system_dec_10Hz = freqresp(system_dec,2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>10);
@ -580,8 +580,8 @@ legend(<span class="org-string">'Control OFF'</span>,<span class="org-string">'D
</div>
</div>
<div id="outline-container-org5018f25" class="outline-4">
<h4 id="org5018f25"><span class="section-number-4">1.5.6</span> Greshgorin radius</h4>
<div id="outline-container-org51fab0b" class="outline-4">
<h4 id="org51fab0b"><span class="section-number-4">1.5.6</span> Greshgorin radius</h4>
<div class="outline-text-4" id="text-1-5-6">
<div class="org-src-container">
<pre class="src src-matlab">system_dec_freq = freqresp(system_dec,w);
@ -627,8 +627,8 @@ ylabel(<span class="org-string">'Greshgorin radius [-]'</span>);
</div>
</div>
<div id="outline-container-org99d33a1" class="outline-4">
<h4 id="org99d33a1"><span class="section-number-4">1.5.7</span> Injecting ground motion in the system to have the output</h4>
<div id="outline-container-org701f7d2" class="outline-4">
<h4 id="org701f7d2"><span class="section-number-4">1.5.7</span> Injecting ground motion in the system to have the output</h4>
<div class="outline-text-4" id="text-1-5-7">
<div class="org-src-container">
<pre class="src src-matlab">Fr = logspace(<span class="org-type">-</span>2,3,1e3);
@ -684,15 +684,15 @@ rot = PHI(<span class="org-type">:</span>,11,11);
</div>
</div>
<div id="outline-container-org9129ccf" class="outline-2">
<h2 id="org9129ccf"><span class="section-number-2">2</span> Gravimeter - Functions</h2>
<div id="outline-container-org1e26df7" class="outline-2">
<h2 id="org1e26df7"><span class="section-number-2">2</span> Gravimeter - Functions</h2>
<div class="outline-text-2" id="text-2">
</div>
<div id="outline-container-orgd9a6812" class="outline-3">
<h3 id="orgd9a6812"><span class="section-number-3">2.1</span> <code>align</code></h3>
<div id="outline-container-org6031c90" class="outline-3">
<h3 id="org6031c90"><span class="section-number-3">2.1</span> <code>align</code></h3>
<div class="outline-text-3" id="text-2-1">
<p>
<a id="orgf4114bb"></a>
<a id="orgb2af2b1"></a>
</p>
<p>
@ -721,11 +721,11 @@ This Matlab function is accessible <a href="gravimeter/align.m">here</a>.
</div>
<div id="outline-container-org0217aee" class="outline-3">
<h3 id="org0217aee"><span class="section-number-3">2.2</span> <code>pzmap_testCL</code></h3>
<div id="outline-container-orgc125440" class="outline-3">
<h3 id="orgc125440"><span class="section-number-3">2.2</span> <code>pzmap_testCL</code></h3>
<div class="outline-text-3" id="text-2-2">
<p>
<a id="org82762af"></a>
<a id="orgb46f751"></a>
</p>
<p>
@ -774,11 +774,11 @@ This Matlab function is accessible <a href="gravimeter/pzmap_testCL.m">here</a>.
</div>
</div>
<div id="outline-container-org666b9ed" class="outline-2">
<h2 id="org666b9ed"><span class="section-number-2">3</span> Stewart Platform - Simscape Model</h2>
<div id="outline-container-org8703136" class="outline-2">
<h2 id="org8703136"><span class="section-number-2">3</span> Stewart Platform - Simscape Model</h2>
<div class="outline-text-2" id="text-3">
<p>
In this analysis, we wish to applied SVD control to the Stewart Platform shown in Figure <a href="#orgd648239">5</a>.
In this analysis, we wish to applied SVD control to the Stewart Platform shown in Figure <a href="#org37cd276">5</a>.
</p>
<p>
@ -791,7 +791,7 @@ Some notes about the system:
</ul>
<div id="orgd648239" class="figure">
<div id="org37cd276" class="figure">
<p><img src="figs/SP_assembly.png" alt="SP_assembly.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Stewart Platform CAD View</p>
@ -801,22 +801,22 @@ Some notes about the system:
The analysis of the SVD control applied to the Stewart platform is performed in the following sections:
</p>
<ul class="org-ul">
<li>Section <a href="#org3dfaa0e">3.1</a>: The parameters of the Simscape model of the Stewart platform are defined</li>
<li>Section <a href="#org6b269e9">3.2</a>: The plant is identified from the Simscape model and the system coupling is shown</li>
<li>Section <a href="#orgfe37f1c">3.3</a>: The plant is first decoupled using the Jacobian</li>
<li>Section <a href="#org8498a04">3.4</a>: A real approximation of the plant is computed for further decoupling using the Singular Value Decomposition (SVD)</li>
<li>Section <a href="#org86fc807">3.5</a>: The decoupling is performed thanks to the SVD</li>
<li>Section <a href="#org8960953">3.6</a>: The effectiveness of the decoupling with the Jacobian and SVD are compared using the Gershorin Radii</li>
<li>Section <a href="#org5bf9cb3">3.7</a>: The dynamics of the decoupled plants are shown</li>
<li>Section <a href="#org3c1b771">3.8</a>: A diagonal controller is defined to control the decoupled plant</li>
<li>Section <a href="#org6911362">3.9</a>: Finally, the closed loop system properties are studied</li>
<li>Section <a href="#orgcde5bf4">3.1</a>: The parameters of the Simscape model of the Stewart platform are defined</li>
<li>Section <a href="#org4bce400">3.2</a>: The plant is identified from the Simscape model and the system coupling is shown</li>
<li>Section <a href="#orge7e2e66">3.3</a>: The plant is first decoupled using the Jacobian</li>
<li>Section <a href="#orgac80a6a">3.4</a>: A real approximation of the plant is computed for further decoupling using the Singular Value Decomposition (SVD)</li>
<li>Section <a href="#org80ad263">3.5</a>: The decoupling is performed thanks to the SVD</li>
<li>Section <a href="#org2b9f7fd">3.6</a>: The effectiveness of the decoupling with the Jacobian and SVD are compared using the Gershorin Radii</li>
<li>Section <a href="#org4af6fa8">3.7</a>: The dynamics of the decoupled plants are shown</li>
<li>Section <a href="#orga4a60ea">3.8</a>: A diagonal controller is defined to control the decoupled plant</li>
<li>Section <a href="#org1dbe630">3.9</a>: Finally, the closed loop system properties are studied</li>
</ul>
</div>
<div id="outline-container-orga9bf8b4" class="outline-3">
<h3 id="orga9bf8b4"><span class="section-number-3">3.1</span> Simscape Model - Parameters</h3>
<div id="outline-container-org127c82b" class="outline-3">
<h3 id="org127c82b"><span class="section-number-3">3.1</span> Simscape Model - Parameters</h3>
<div class="outline-text-3" id="text-3-1">
<p>
<a id="org3dfaa0e"></a>
<a id="orgcde5bf4"></a>
</p>
<div class="org-src-container">
<pre class="src src-matlab">open(<span class="org-string">'drone_platform.slx'</span>);
@ -864,14 +864,14 @@ Kc = tf(zeros(6));
</div>
<div id="orge8100b9" class="figure">
<div id="org177e20b" class="figure">
<p><img src="figs/stewart_simscape.png" alt="stewart_simscape.png" />
</p>
<p><span class="figure-number">Figure 6: </span>General view of the Simscape Model</p>
</div>
<div id="orga1f9dd1" class="figure">
<div id="org8eba626" class="figure">
<p><img src="figs/stewart_platform_details.png" alt="stewart_platform_details.png" />
</p>
<p><span class="figure-number">Figure 7: </span>Simscape model of the Stewart platform</p>
@ -879,15 +879,15 @@ Kc = tf(zeros(6));
</div>
</div>
<div id="outline-container-orgd0ddc2b" class="outline-3">
<h3 id="orgd0ddc2b"><span class="section-number-3">3.2</span> Identification of the plant</h3>
<div id="outline-container-orge4ff887" class="outline-3">
<h3 id="orge4ff887"><span class="section-number-3">3.2</span> Identification of the plant</h3>
<div class="outline-text-3" id="text-3-2">
<p>
<a id="org6b269e9"></a>
<a id="org4bce400"></a>
</p>
<p>
The plant shown in Figure <a href="#orgbb8eb66">8</a> is identified from the Simscape model.
The plant shown in Figure <a href="#orge039e62">8</a> is identified from the Simscape model.
</p>
<p>
@ -903,7 +903,7 @@ The outputs are the 6 accelerations measured by the inertial unit.
</p>
<div id="orgbb8eb66" class="figure">
<div id="orge039e62" class="figure">
<p><img src="figs/stewart_platform_plant.png" alt="stewart_platform_plant.png" />
</p>
<p><span class="figure-number">Figure 8: </span>Considered plant \(\bm{G} = \begin{bmatrix}G_d\\G\end{bmatrix}\). \(D_w\) is the translation/rotation of the support, \(\tau\) the actuator forces, \(a\) the acceleration/angular acceleration of the top platform</p>
@ -940,7 +940,7 @@ State-space model with 6 outputs, 12 inputs, and 24 states.
<p>
The elements of the transfer matrix \(\bm{G}\) corresponding to the transfer function from actuator forces \(\tau\) to the measured acceleration \(a\) are shown in Figure <a href="#orgf863735">9</a>.
The elements of the transfer matrix \(\bm{G}\) corresponding to the transfer function from actuator forces \(\tau\) to the measured acceleration \(a\) are shown in Figure <a href="#orga3a04de">9</a>.
</p>
<p>
@ -948,7 +948,7 @@ One can easily see that the system is strongly coupled.
</p>
<div id="orgf863735" class="figure">
<div id="orga3a04de" class="figure">
<p><img src="figs/stewart_platform_coupled_plant.png" alt="stewart_platform_coupled_plant.png" />
</p>
<p><span class="figure-number">Figure 9: </span>Magnitude of all 36 elements of the transfer function matrix \(\bm{G}\)</p>
@ -956,17 +956,17 @@ One can easily see that the system is strongly coupled.
</div>
</div>
<div id="outline-container-org80362ed" class="outline-3">
<h3 id="org80362ed"><span class="section-number-3">3.3</span> Physical Decoupling using the Jacobian</h3>
<div id="outline-container-orgd431ce1" class="outline-3">
<h3 id="orgd431ce1"><span class="section-number-3">3.3</span> Physical Decoupling using the Jacobian</h3>
<div class="outline-text-3" id="text-3-3">
<p>
<a id="orgfe37f1c"></a>
Consider the control architecture shown in Figure <a href="#org8259e2c">10</a>.
<a id="orge7e2e66"></a>
Consider the control architecture shown in Figure <a href="#org487f931">10</a>.
The Jacobian matrix is used to transform forces/torques applied on the top platform to the equivalent forces applied by each actuator.
</p>
<div id="org8259e2c" class="figure">
<div id="org487f931" class="figure">
<p><img src="figs/plant_decouple_jacobian.png" alt="plant_decouple_jacobian.png" />
</p>
<p><span class="figure-number">Figure 10: </span>Decoupled plant \(\bm{G}_x\) using the Jacobian matrix \(J\)</p>
@ -990,11 +990,11 @@ Gx.InputName = {<span class="org-string">'Dwx'</span>, <span class="org-string"
</div>
</div>
<div id="outline-container-org7ae30f6" class="outline-3">
<h3 id="org7ae30f6"><span class="section-number-3">3.4</span> Real Approximation of \(G\) at the decoupling frequency</h3>
<div id="outline-container-org6307a12" class="outline-3">
<h3 id="org6307a12"><span class="section-number-3">3.4</span> Real Approximation of \(G\) at the decoupling frequency</h3>
<div class="outline-text-3" id="text-3-4">
<p>
<a id="org8498a04"></a>
<a id="orgac80a6a"></a>
</p>
<p>
@ -1174,11 +1174,11 @@ This can be verified below where only the real value of \(G(\omega_c)\) is shown
</div>
</div>
<div id="outline-container-org47bfee1" class="outline-3">
<h3 id="org47bfee1"><span class="section-number-3">3.5</span> SVD Decoupling</h3>
<div id="outline-container-org49a3a86" class="outline-3">
<h3 id="org49a3a86"><span class="section-number-3">3.5</span> SVD Decoupling</h3>
<div class="outline-text-3" id="text-3-5">
<p>
<a id="org86fc807"></a>
<a id="org80ad263"></a>
</p>
<p>
@ -1192,11 +1192,11 @@ First, the Singular Value Decomposition of \(H_1\) is performed:
</div>
<p>
The obtained matrices \(U\) and \(V\) are used to decouple the system as shown in Figure <a href="#orgd4c3d12">11</a>.
The obtained matrices \(U\) and \(V\) are used to decouple the system as shown in Figure <a href="#orgbd9fb38">11</a>.
</p>
<div id="orgd4c3d12" class="figure">
<div id="orgbd9fb38" class="figure">
<p><img src="figs/plant_decouple_svd.png" alt="plant_decouple_svd.png" />
</p>
<p><span class="figure-number">Figure 11: </span>Decoupled plant \(\bm{G}_{SVD}\) using the Singular Value Decomposition</p>
@ -1209,11 +1209,11 @@ The decoupled plant is then:
</div>
</div>
<div id="outline-container-orgb300235" class="outline-3">
<h3 id="orgb300235"><span class="section-number-3">3.6</span> Verification of the decoupling using the &ldquo;Gershgorin Radii&rdquo;</h3>
<div id="outline-container-org6a89852" class="outline-3">
<h3 id="org6a89852"><span class="section-number-3">3.6</span> Verification of the decoupling using the &ldquo;Gershgorin Radii&rdquo;</h3>
<div class="outline-text-3" id="text-3-6">
<p>
<a id="org8960953"></a>
<a id="org2b9f7fd"></a>
</p>
<p>
@ -1229,7 +1229,7 @@ This is computed over the following frequencies.
</div>
<div id="org5f9e358" class="figure">
<div id="orgf1a40d6" class="figure">
<p><img src="figs/simscape_model_gershgorin_radii.png" alt="simscape_model_gershgorin_radii.png" />
</p>
<p><span class="figure-number">Figure 12: </span>Gershgorin Radii of the Coupled and Decoupled plants</p>
@ -1237,30 +1237,30 @@ This is computed over the following frequencies.
</div>
</div>
<div id="outline-container-org2b6a490" class="outline-3">
<h3 id="org2b6a490"><span class="section-number-3">3.7</span> Obtained Decoupled Plants</h3>
<div id="outline-container-orga66b9bd" class="outline-3">
<h3 id="orga66b9bd"><span class="section-number-3">3.7</span> Obtained Decoupled Plants</h3>
<div class="outline-text-3" id="text-3-7">
<p>
<a id="org5bf9cb3"></a>
<a id="org4af6fa8"></a>
</p>
<p>
The bode plot of the diagonal and off-diagonal elements of \(G_{SVD}\) are shown in Figure <a href="#org66fa7e3">13</a>.
The bode plot of the diagonal and off-diagonal elements of \(G_{SVD}\) are shown in Figure <a href="#org1da9d63">13</a>.
</p>
<div id="org66fa7e3" class="figure">
<div id="org1da9d63" class="figure">
<p><img src="figs/simscape_model_decoupled_plant_svd.png" alt="simscape_model_decoupled_plant_svd.png" />
</p>
<p><span class="figure-number">Figure 13: </span>Decoupled Plant using SVD</p>
</div>
<p>
Similarly, the bode plots of the diagonal elements and off-diagonal elements of the decoupled plant \(G_x(s)\) using the Jacobian are shown in Figure <a href="#orge89ac95">14</a>.
Similarly, the bode plots of the diagonal elements and off-diagonal elements of the decoupled plant \(G_x(s)\) using the Jacobian are shown in Figure <a href="#org6a3b055">14</a>.
</p>
<div id="orge89ac95" class="figure">
<div id="org6a3b055" class="figure">
<p><img src="figs/simscape_model_decoupled_plant_jacobian.png" alt="simscape_model_decoupled_plant_jacobian.png" />
</p>
<p><span class="figure-number">Figure 14: </span>Stewart Platform Plant from forces (resp. torques) applied by the legs to the acceleration (resp. angular acceleration) of the platform as well as all the coupling terms between the two (non-diagonal terms of the transfer function matrix)</p>
@ -1268,27 +1268,15 @@ Similarly, the bode plots of the diagonal elements and off-diagonal elements of
</div>
</div>
<div id="outline-container-org6def0be" class="outline-3">
<h3 id="org6def0be"><span class="section-number-3">3.8</span> Diagonal Controller</h3>
<div id="outline-container-org1e51449" class="outline-3">
<h3 id="org1e51449"><span class="section-number-3">3.8</span> Diagonal Controller</h3>
<div class="outline-text-3" id="text-3-8">
<p>
<a id="org3c1b771"></a>
<a id="orga4a60ea"></a>
</p>
<p>
The controller \(K_c\) is a diagonal controller consisting a low pass filters with a crossover frequency \(\omega_c\) and a DC gain \(C_g\).
</p>
<div class="org-src-container">
<pre class="src src-matlab">wc = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>0.1; <span class="org-comment">% Crossover Frequency [rad/s]</span>
C_g = 50; <span class="org-comment">% DC Gain</span>
Kc = eye(6)<span class="org-type">*</span>C_g<span class="org-type">/</span>(s<span class="org-type">+</span>wc);
</pre>
</div>
<p>
The control diagram for the centralized control is shown in Figure <a href="#org4d44798">15</a>.
The control diagram for the centralized control is shown in Figure <a href="#org9b7dbb5">15</a>.
</p>
<p>
@ -1297,55 +1285,71 @@ The Jacobian is used to convert forces in the cartesian frame to forces applied
</p>
<div id="org4d44798" class="figure">
<div id="org9b7dbb5" class="figure">
<p><img src="figs/centralized_control.png" alt="centralized_control.png" />
</p>
<p><span class="figure-number">Figure 15: </span>Control Diagram for the Centralized control</p>
</div>
<p>
The feedback system is computed as shown below.
</p>
<div class="org-src-container">
<pre class="src src-matlab">G_cen = feedback(G, inv(J<span class="org-type">'</span>)<span class="org-type">*</span>Kc, [7<span class="org-type">:</span>12], [1<span class="org-type">:</span>6]);
</pre>
</div>
<p>
The SVD control architecture is shown in Figure <a href="#orga1c44b4">16</a>.
The SVD control architecture is shown in Figure <a href="#orgd1f20f7">16</a>.
The matrices \(U\) and \(V\) are used to decoupled the plant \(G\).
</p>
<div id="orga1c44b4" class="figure">
<div id="orgd1f20f7" class="figure">
<p><img src="figs/svd_control.png" alt="svd_control.png" />
</p>
<p><span class="figure-number">Figure 16: </span>Control Diagram for the SVD control</p>
</div>
<p>
The feedback system is computed as shown below.
We choose the controller to be a low pass filter:
\[ K_c(s) = \frac{G_0}{1 + \frac{s}{\omega_0}} \]
</p>
<p>
\(G_0\) is tuned such that the crossover frequency corresponding to the diagonal terms of the loop gain is equal to \(\omega_c\)
</p>
<div class="org-src-container">
<pre class="src src-matlab">G_svd = feedback(G, pinv(V<span class="org-type">'</span>)<span class="org-type">*</span>Kc<span class="org-type">*</span>pinv(U), [7<span class="org-type">:</span>12], [1<span class="org-type">:</span>6]);
<pre class="src src-matlab">wc = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>80;
w0 = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>0.1;
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">K_cen = diag(1<span class="org-type">./</span>diag(abs(evalfr(Gx, <span class="org-constant">j</span><span class="org-type">*</span>wc))))<span class="org-type">*</span>(1<span class="org-type">/</span>abs(evalfr(1<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>w0), <span class="org-constant">j</span><span class="org-type">*</span>wc)))<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>w0);
L_cen = K_cen<span class="org-type">*</span>Gx;
G_cen = feedback(G, pinv(J<span class="org-type">'</span>)<span class="org-type">*</span>K_cen, [7<span class="org-type">:</span>12], [1<span class="org-type">:</span>6]);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab">K_svd = diag(1<span class="org-type">./</span>diag(abs(evalfr(Gd, <span class="org-constant">j</span><span class="org-type">*</span>wc))))<span class="org-type">*</span>(1<span class="org-type">/</span>abs(evalfr(1<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>w0), <span class="org-constant">j</span><span class="org-type">*</span>wc)))<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>w0);
L_svd = K_svd<span class="org-type">*</span>Gd;
G_svd = feedback(G, pinv(V<span class="org-type">'</span>)<span class="org-type">*</span>K_svd<span class="org-type">*</span>pinv(U), [7<span class="org-type">:</span>12], [1<span class="org-type">:</span>6]);
</pre>
</div>
<p>
Let&rsquo;s look at the Loop Gains.
The obtained diagonal elements of the loop gains are shown in Figure <a href="#orgdb72b98">17</a>.
</p>
<div class="org-src-container">
<pre class="src src-matlab">L_svd =
</pre>
<div id="orgdb72b98" class="figure">
<p><img src="figs/stewart_comp_loop_gain_diagonal.png" alt="stewart_comp_loop_gain_diagonal.png" />
</p>
<p><span class="figure-number">Figure 17: </span>Comparison of the diagonal elements of the loop gains for the SVD control architecture and the Jacobian one</p>
</div>
</div>
</div>
<div id="outline-container-org6fc3ee5" class="outline-3">
<h3 id="org6fc3ee5"><span class="section-number-3">3.9</span> Closed-Loop system Performances</h3>
<div id="outline-container-org04e4046" class="outline-3">
<h3 id="org04e4046"><span class="section-number-3">3.9</span> Closed-Loop system Performances</h3>
<div class="outline-text-3" id="text-3-9">
<p>
<a id="org6911362"></a>
<a id="org1dbe630"></a>
</p>
<p>
@ -1376,14 +1380,14 @@ ans =
<p>
The obtained transmissibility in Open-loop, for the centralized control as well as for the SVD control are shown in Figure <a href="#org0452b6a">17</a>.
The obtained transmissibility in Open-loop, for the centralized control as well as for the SVD control are shown in Figure <a href="#org39a5926">18</a>.
</p>
<div id="org0452b6a" class="figure">
<div id="org39a5926" class="figure">
<p><img src="figs/stewart_platform_simscape_cl_transmissibility.png" alt="stewart_platform_simscape_cl_transmissibility.png" />
</p>
<p><span class="figure-number">Figure 17: </span>Obtained Transmissibility</p>
<p><span class="figure-number">Figure 18: </span>Obtained Transmissibility</p>
</div>
</div>
</div>
@ -1391,7 +1395,7 @@ The obtained transmissibility in Open-loop, for the centralized control as well
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2020-11-06 ven. 17:02</p>
<p class="date">Created: 2020-11-06 ven. 18:00</p>
</div>
</body>
</html>

View File

@ -1229,9 +1229,7 @@ Similarly, the bode plots of the diagonal elements and off-diagonal elements of
** Diagonal Controller
<<sec:stewart_diagonal_control>>
The controller $K_c$ is a diagonal controller consisting a low pass filters with a crossover frequency $\omega_c$ and a DC gain $C_g$.
#+begin_src matlab
#+begin_src matlab :exports none :tangle no
wc = 2*pi*0.1; % Crossover Frequency [rad/s]
C_g = 50; % DC Gain
@ -1268,11 +1266,6 @@ The Jacobian is used to convert forces in the cartesian frame to forces applied
#+RESULTS:
[[file:figs/centralized_control.png]]
The feedback system is computed as shown below.
#+begin_src matlab
G_cen = feedback(G, inv(J')*Kc, [7:12], [1:6]);
#+end_src
The SVD control architecture is shown in Figure [[fig:svd_control]].
The matrices $U$ and $V$ are used to decoupled the plant $G$.
#+begin_src latex :file svd_control.pdf :tangle no :exports results
@ -1301,17 +1294,89 @@ The matrices $U$ and $V$ are used to decoupled the plant $G$.
#+RESULTS:
[[file:figs/svd_control.png]]
The feedback system is computed as shown below.
#+begin_src matlab
G_svd = feedback(G, pinv(V')*Kc*pinv(U), [7:12], [1:6]);
#+end_src
Let's look at the Loop Gains.
We choose the controller to be a low pass filter:
\[ K_c(s) = \frac{G_0}{1 + \frac{s}{\omega_0}} \]
$G_0$ is tuned such that the crossover frequency corresponding to the diagonal terms of the loop gain is equal to $\omega_c$
#+begin_src matlab
L_svd =
wc = 2*pi*80;
w0 = 2*pi*0.1;
#+end_src
#+begin_src matlab
K_cen = diag(1./diag(abs(evalfr(Gx, j*wc))))*(1/abs(evalfr(1/(1 + s/w0), j*wc)))/(1 + s/w0);
L_cen = K_cen*Gx;
G_cen = feedback(G, pinv(J')*K_cen, [7:12], [1:6]);
#+end_src
#+begin_src matlab
K_svd = diag(1./diag(abs(evalfr(Gd, j*wc))))*(1/abs(evalfr(1/(1 + s/w0), j*wc)))/(1 + s/w0);
L_svd = K_svd*Gd;
G_svd = feedback(G, pinv(V')*K_svd*pinv(U), [7:12], [1:6]);
#+end_src
The obtained diagonal elements of the loop gains are shown in Figure [[fig:stewart_comp_loop_gain_diagonal]].
#+begin_src matlab :exports none
freqs = logspace(-1, 2, 1000);
figure;
tiledlayout(3, 1, 'TileSpacing', 'None', 'Padding', 'None');
% Magnitude
ax1 = nexttile([2, 1]);
hold on;
plot(freqs, abs(squeeze(freqresp(L_svd(1, 1), freqs, 'Hz'))), 'DisplayName', '$L_{SVD}(i,i)$');
for i_in_out = 2:6
set(gca,'ColorOrderIndex',1)
plot(freqs, abs(squeeze(freqresp(L_svd(i_in_out, i_in_out), freqs, 'Hz'))), 'HandleVisibility', 'off');
end
set(gca,'ColorOrderIndex',2)
plot(freqs, abs(squeeze(freqresp(L_cen(1, 1), freqs, 'Hz'))), ...
'DisplayName', '$L_{J}(i,i)$');
for i_in_out = 2:6
set(gca,'ColorOrderIndex',2)
plot(freqs, abs(squeeze(freqresp(L_cen(i_in_out, i_in_out), freqs, 'Hz'))), 'HandleVisibility', 'off');
end
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Magnitude'); set(gca, 'XTickLabel',[]);
legend('location', 'northwest');
ylim([5e-2, 2e3])
% Phase
ax2 = nexttile;
hold on;
for i_in_out = 1:6
set(gca,'ColorOrderIndex',1)
plot(freqs, 180/pi*angle(squeeze(freqresp(L_svd(i_in_out, i_in_out), freqs, 'Hz'))));
end
set(gca,'ColorOrderIndex',2)
for i_in_out = 1:6
set(gca,'ColorOrderIndex',2)
plot(freqs, 180/pi*angle(squeeze(freqresp(L_cen(i_in_out, i_in_out), freqs, 'Hz'))));
end
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180:90:360]);
linkaxes([ax1,ax2],'x');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/stewart_comp_loop_gain_diagonal.pdf', 'width', 'wide', 'height', 'tall');
#+end_src
#+name: fig:stewart_comp_loop_gain_diagonal
#+caption: Comparison of the diagonal elements of the loop gains for the SVD control architecture and the Jacobian one
#+RESULTS:
[[file:figs/stewart_comp_loop_gain_diagonal.png]]
** Closed-Loop system Performances
<<sec:stewart_closed_loop_results>>
@ -1389,7 +1454,7 @@ The obtained transmissibility in Open-loop, for the centralized control as well
linkaxes([ax1,ax2,ax3,ax4],'xy');
xlim([freqs(1), freqs(end)]);
ylim([1e-5, 1e2]);
ylim([1e-3, 1e2]);
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace