Update conclusion

This commit is contained in:
Thomas Dehaeze 2020-01-30 15:24:24 +01:00
parent 06cf168fab
commit 8ee080811f
2 changed files with 162 additions and 26 deletions

View File

@ -4,7 +4,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>
<!-- 2020-01-30 jeu. 15:07 --> <!-- 2020-01-30 jeu. 15:24 -->
<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>Gravity with Simscape Models</title> <title>Gravity with Simscape Models</title>
@ -269,12 +269,12 @@ 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="#org7dc51cd">1. Simulink</a></li> <li><a href="#org0f80193">1. Simulink</a></li>
<li><a href="#org8d21a55">2. Initial Simulation</a></li> <li><a href="#org79741d0">2. Initial Simulation</a></li>
<li><a href="#org308b7c9">3. Change the equilibrium position</a></li> <li><a href="#orgd01c539">3. Change the equilibrium position</a></li>
<li><a href="#orgf4b9c9b">4. Add external force</a></li> <li><a href="#orgb51ac59">4. Add external force</a></li>
<li><a href="#org93c1a6d">5. Change initial position</a></li> <li><a href="#orgfff3605">5. Change initial position</a></li>
<li><a href="#org4f1210f">6. Conclusion</a></li> <li><a href="#orge503273">6. Conclusion</a></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -303,8 +303,15 @@ Then, the simulation will start at equilibrium, but all the elements will be &ld
The three solutions are tested below. The three solutions are tested below.
</p> </p>
<div id="outline-container-org7dc51cd" class="outline-2"> <div class="note">
<h2 id="org7dc51cd"><span class="section-number-2">1</span> Simulink</h2> <p>
All the files (data and Matlab scripts) are accessible <a href="data/simscape_gravity.zip">here</a>.
</p>
</div>
<div id="outline-container-org0f80193" class="outline-2">
<h2 id="org0f80193"><span class="section-number-2">1</span> Simulink</h2>
<div class="outline-text-2" id="text-1"> <div class="outline-text-2" id="text-1">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">open <span class="org-string">'gravity_test.slx'</span> <pre class="src src-matlab">open <span class="org-string">'gravity_test.slx'</span>
@ -312,7 +319,7 @@ The three solutions are tested below.
</div> </div>
<div id="org3b3589c" class="figure"> <div id="org89497ce" class="figure">
<p><img src="figs/simscape_model.png" alt="simscape_model.png" /> <p><img src="figs/simscape_model.png" alt="simscape_model.png" />
</p> </p>
<p><span class="figure-number">Figure 1: </span>Simscape model used for the simulations</p> <p><span class="figure-number">Figure 1: </span>Simscape model used for the simulations</p>
@ -320,8 +327,8 @@ The three solutions are tested below.
</div> </div>
</div> </div>
<div id="outline-container-org8d21a55" class="outline-2"> <div id="outline-container-org79741d0" class="outline-2">
<h2 id="org8d21a55"><span class="section-number-2">2</span> Initial Simulation</h2> <h2 id="org79741d0"><span class="section-number-2">2</span> Initial Simulation</h2>
<div class="outline-text-2" id="text-2"> <div class="outline-text-2" id="text-2">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">g = <span class="org-type">-</span>10; <span class="org-comment">% [m/s^2]</span> <pre class="src src-matlab">g = <span class="org-type">-</span>10; <span class="org-comment">% [m/s^2]</span>
@ -337,8 +344,32 @@ F_act = 0; <span class="org-comment">% Actuator force [N]</span>
</pre> </pre>
</div> </div>
<div class="org-src-container">
<pre class="src src-matlab">out_init = <span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'gravity_test.slx'</span>)
<div id="org8a4e1c7" class="figure"> out_init.d.Name = <span class="org-string">'Displacement'</span>;
out_init.Fm.Name = <span class="org-string">'Force Sensor'</span>;
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">figure</span>;
subplot(1,2,1)
plot(out_init.d)
title(<span class="org-string">''</span>);
subplot(1,2,2)
plot(out_init.Fm)
title(<span class="org-string">''</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">&lt;&lt;</span>plt<span class="org-type">-</span>matlab<span class="org-type">&gt;&gt;</span>
</pre>
</div>
<div id="org1f8faec" class="figure">
<p><img src="figs/sim_init.png" alt="sim_init.png" /> <p><img src="figs/sim_init.png" alt="sim_init.png" />
</p> </p>
<p><span class="figure-number">Figure 2: </span>Initial Simulation (<a href="./figs/sim_init.png">png</a>, <a href="./figs/sim_init.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 2: </span>Initial Simulation (<a href="./figs/sim_init.png">png</a>, <a href="./figs/sim_init.pdf">pdf</a>)</p>
@ -346,8 +377,8 @@ F_act = 0; <span class="org-comment">% Actuator force [N]</span>
</div> </div>
</div> </div>
<div id="outline-container-org308b7c9" class="outline-2"> <div id="outline-container-orgd01c539" class="outline-2">
<h2 id="org308b7c9"><span class="section-number-2">3</span> Change the equilibrium position</h2> <h2 id="orgd01c539"><span class="section-number-2">3</span> Change the equilibrium position</h2>
<div class="outline-text-2" id="text-3"> <div class="outline-text-2" id="text-3">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">l0 = 0; <span class="org-comment">% Initial wanted position [m]</span> <pre class="src src-matlab">l0 = 0; <span class="org-comment">% Initial wanted position [m]</span>
@ -358,8 +389,32 @@ F_act = 0; <span class="org-comment">% Actuator force [N]</span>
</pre> </pre>
</div> </div>
<div class="org-src-container">
<pre class="src src-matlab">out = <span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'gravity_test.slx'</span>);
<div id="orgace9d61" class="figure"> out.d.Name = <span class="org-string">'Displacement'</span>;
out.Fm.Name = <span class="org-string">'Force Sensor'</span>;
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">figure</span>;
subplot(1,2,1)
plot(out.d)
title(<span class="org-string">''</span>);
subplot(1,2,2)
plot(out.Fm)
title(<span class="org-string">''</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">&lt;&lt;</span>plt<span class="org-type">-</span>matlab<span class="org-type">&gt;&gt;</span>
</pre>
</div>
<div id="org2b821ff" class="figure">
<p><img src="figs/sim_change_eq_position.png" alt="sim_change_eq_position.png" /> <p><img src="figs/sim_change_eq_position.png" alt="sim_change_eq_position.png" />
</p> </p>
<p><span class="figure-number">Figure 3: </span>Simulation after changing the equilibrium position of the joint (<a href="./figs/sim_change_eq_position.png">png</a>, <a href="./figs/sim_change_eq_position.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 3: </span>Simulation after changing the equilibrium position of the joint (<a href="./figs/sim_change_eq_position.png">png</a>, <a href="./figs/sim_change_eq_position.pdf">pdf</a>)</p>
@ -367,8 +422,8 @@ F_act = 0; <span class="org-comment">% Actuator force [N]</span>
</div> </div>
</div> </div>
<div id="outline-container-orgf4b9c9b" class="outline-2"> <div id="outline-container-orgb51ac59" class="outline-2">
<h2 id="orgf4b9c9b"><span class="section-number-2">4</span> Add external force</h2> <h2 id="orgb51ac59"><span class="section-number-2">4</span> Add external force</h2>
<div class="outline-text-2" id="text-4"> <div class="outline-text-2" id="text-4">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">l0 = 0; <span class="org-comment">% Initial wanted position [m]</span> <pre class="src src-matlab">l0 = 0; <span class="org-comment">% Initial wanted position [m]</span>
@ -379,16 +434,40 @@ F_act = 0; <span class="org-comment">% Actuator force [N]</span>
</pre> </pre>
</div> </div>
<div class="org-src-container">
<pre class="src src-matlab">out = <span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'gravity_test.slx'</span>);
<div id="orge24bd38" class="figure"> out.d.Name = <span class="org-string">'Displacement'</span>;
out.Fm.Name = <span class="org-string">'Force Sensor'</span>;
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">figure</span>;
subplot(1,2,1)
plot(out.d)
title(<span class="org-string">''</span>);
subplot(1,2,2)
plot(out.Fm)
title(<span class="org-string">''</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">&lt;&lt;</span>plt<span class="org-type">-</span>matlab<span class="org-type">&gt;&gt;</span>
</pre>
</div>
<div id="org3a624ff" class="figure">
<p><img src="figs/sim_add_external_force.png" alt="sim_add_external_force.png" /> <p><img src="figs/sim_add_external_force.png" alt="sim_add_external_force.png" />
</p> </p>
<p><span class="figure-number">Figure 4: </span>Simulater after adding an external force applied to the solid (<a href="./figs/sim_add_external_force.png">png</a>, <a href="./figs/sim_add_external_force.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 4: </span>Simulater after adding an external force applied to the solid (<a href="./figs/sim_add_external_force.png">png</a>, <a href="./figs/sim_add_external_force.pdf">pdf</a>)</p>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org93c1a6d" class="outline-2"> <div id="outline-container-orgfff3605" class="outline-2">
<h2 id="org93c1a6d"><span class="section-number-2">5</span> Change initial position</h2> <h2 id="orgfff3605"><span class="section-number-2">5</span> Change initial position</h2>
<div class="outline-text-2" id="text-5"> <div class="outline-text-2" id="text-5">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">l0 = out_init.d.Data(end); <span class="org-comment">% Initial wanted position [m]</span> <pre class="src src-matlab">l0 = out_init.d.Data(end); <span class="org-comment">% Initial wanted position [m]</span>
@ -399,26 +478,72 @@ F_act = 0; <span class="org-comment">% Actuator force [N]</span>
</pre> </pre>
</div> </div>
<div class="org-src-container">
<pre class="src src-matlab">out = <span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'gravity_test.slx'</span>);
<div id="orgdedf3a7" class="figure"> out.d.Name = <span class="org-string">'Displacement'</span>;
out.Fm.Name = <span class="org-string">'Force Sensor'</span>;
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">figure</span>;
subplot(1,2,1)
plot(out.d)
title(<span class="org-string">''</span>);
subplot(1,2,2)
plot(out.Fm)
title(<span class="org-string">''</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-type">&lt;&lt;</span>plt<span class="org-type">-</span>matlab<span class="org-type">&gt;&gt;</span>
</pre>
</div>
<div id="org0dd1b26" class="figure">
<p><img src="figs/sim_change_initial_position.png" alt="sim_change_initial_position.png" /> <p><img src="figs/sim_change_initial_position.png" alt="sim_change_initial_position.png" />
</p> </p>
<p><span class="figure-number">Figure 5: </span>Simulation after changing the initial position of the joint (<a href="./figs/sim_change_initial_position.png">png</a>, <a href="./figs/sim_change_initial_position.pdf">pdf</a>)</p> <p><span class="figure-number">Figure 5: </span>Simulation after changing the initial position of the joint (<a href="./figs/sim_change_initial_position.png">png</a>, <a href="./figs/sim_change_initial_position.pdf">pdf</a>)</p>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org4f1210f" class="outline-2"> <div id="outline-container-orge503273" class="outline-2">
<h2 id="org4f1210f"><span class="section-number-2">6</span> Conclusion</h2> <h2 id="orge503273"><span class="section-number-2">6</span> Conclusion</h2>
<div class="outline-text-2" id="text-6"> <div class="outline-text-2" id="text-6">
<p> <p>
Three techniques:
</p>
<ul class="org-ul">
<li>Change the equilibrium position
<ul class="org-ul">
<li>This does not change the equilibrium position of the system</li>
</ul></li>
<li>Add external force
<ul class="org-ul">
<li>May not be physical</li>
</ul></li>
<li>Change the initial position
<ul class="org-ul">
<li>The static position is not the same as the static position without gravity</li>
<li>Very easy to implement</li>
</ul></li>
</ul>
<div class="important">
<p>
Changing the equilibrium position of each joint seem the most practical solution. Changing the equilibrium position of each joint seem the most practical solution.
</p> </p>
</div>
</div> </div>
</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: 2020-01-30 jeu. 15:07</p> <p class="date">Created: 2020-01-30 jeu. 15:24</p>
</div> </div>
</body> </body>
</html> </html>

View File

@ -221,4 +221,15 @@ All the files (data and Matlab scripts) are accessible [[file:data/simscape_grav
#+CAPTION: Simulation after changing the initial position of the joint ([[./figs/sim_change_initial_position.png][png]], [[./figs/sim_change_initial_position.pdf][pdf]]) #+CAPTION: Simulation after changing the initial position of the joint ([[./figs/sim_change_initial_position.png][png]], [[./figs/sim_change_initial_position.pdf][pdf]])
[[file:figs/sim_change_initial_position.png]] [[file:figs/sim_change_initial_position.png]]
* Conclusion * Conclusion
Three techniques:
- Change the equilibrium position
- This does not change the equilibrium position of the system
- Add external force
- May not be physical
- Change the initial position
- The static position is not the same as the static position without gravity
- Very easy to implement
#+begin_important
Changing the equilibrium position of each joint seem the most practical solution. Changing the equilibrium position of each joint seem the most practical solution.
#+end_important