Add functions to add platforms at .STEP files

This commit is contained in:
Thomas Dehaeze 2020-11-03 08:50:54 +01:00
parent 58cd2026dc
commit 32330b92f0
23 changed files with 95501 additions and 99 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 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>
<!-- 2020-09-01 mar. 13:18 --> <!-- 2020-09-07 lun. 23:16 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Stewart Platform with Flexible Elements</title> <title>Stewart Platform with Flexible Elements</title>
<meta name="generator" content="Org mode" /> <meta name="generator" content="Org mode" />
@ -28,48 +28,48 @@
<ul> <ul>
<li><a href="#orgbdb2a68">1. Simscape Model</a> <li><a href="#orgbdb2a68">1. Simscape Model</a>
<ul> <ul>
<li><a href="#org1a0f3d5">1.1. Flexible APA</a></li> <li><a href="#org17a6e21">1.1. Flexible APA</a></li>
<li><a href="#org3650a90">1.2. Flexible Joint</a></li> <li><a href="#org3650a90">1.2. Flexible Joint</a></li>
<li><a href="#org75c496c">1.3. Identification</a></li> <li><a href="#org1a49c82">1.3. Identification</a></li>
<li><a href="#org52d500c">1.4. No Flexible Elements</a></li> <li><a href="#org52d500c">1.4. No Flexible Elements</a></li>
<li><a href="#org6800cf5">1.5. Flexible joints</a></li> <li><a href="#org6800cf5">1.5. Flexible joints</a></li>
<li><a href="#org17a6e21">1.6. Flexible APA</a></li> <li><a href="#org896571b">1.6. Flexible APA</a></li>
<li><a href="#org1609aa1">1.7. Flexible Joints and APA</a></li> <li><a href="#org1609aa1">1.7. Flexible Joints and APA</a></li>
<li><a href="#org238cd25">1.8. Save</a></li> <li><a href="#org238cd25">1.8. Save</a></li>
<li><a href="#orge9b9e81">1.9. Direct Velocity Feedback</a></li> <li><a href="#orge9b9e81">1.9. Direct Velocity Feedback</a></li>
<li><a href="#org265a0a3">1.10. Integral Force Feedback</a></li> <li><a href="#org265a0a3">1.10. Integral Force Feedback</a></li>
<li><a href="#org15aa3b2">1.11. Procedure to include flexible elements into Simscape</a></li> <li><a href="#org15aa3b2">1.11. Procedure to include flexible elements into Simscape</a></li>
<li><a href="#org0b65066">1.12. Conclusion</a></li> <li><a href="#orgbddb83e">1.12. Conclusion</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org90432f4">2. Control with flexible elements</a> <li><a href="#org90432f4">2. Control with flexible elements</a>
<ul> <ul>
<li><a href="#org1697b6a">2.1. Flexible APA and Flexible Joint</a></li> <li><a href="#org1697b6a">2.1. Flexible APA and Flexible Joint</a></li>
<li><a href="#org1a49c82">2.2. Identification</a></li> <li><a href="#orgeebd547">2.2. Identification</a></li>
<li><a href="#org353e7e4">2.3. Decentralized Direct Velocity Feedback</a></li> <li><a href="#org353e7e4">2.3. Decentralized Direct Velocity Feedback</a></li>
<li><a href="#orgf84ea43">2.4. HAC</a></li> <li><a href="#orgf84ea43">2.4. HAC</a></li>
</ul> </ul>
</li> </li>
<li><a href="#orge8b5f65">3. Flexible Joint Specifications</a> <li><a href="#orge8b5f65">3. Flexible Joint Specifications</a>
<ul> <ul>
<li><a href="#orgfb150a0">3.1. Stewart Platform Initialization</a></li> <li><a href="#org36b0a8e">3.1. Stewart Platform Initialization</a></li>
<li><a href="#orga01758c">3.2. Effect of the Bending Stiffness</a></li> <li><a href="#orga01758c">3.2. Effect of the Bending Stiffness</a></li>
<li><a href="#orga98637e">3.3. Effect of the Torsion Stiffness</a></li> <li><a href="#orga98637e">3.3. Effect of the Torsion Stiffness</a></li>
<li><a href="#org4f5ee79">3.4. Effect of the Axial Stiffness</a></li> <li><a href="#org4f5ee79">3.4. Effect of the Axial Stiffness</a></li>
<li><a href="#org4a85ef8">3.5. Effect of the Radial (Shear) Stiffness</a></li> <li><a href="#org4a85ef8">3.5. Effect of the Radial (Shear) Stiffness</a></li>
<li><a href="#orgd0fd2ec">3.6. Comparison of perfect joint and worst specified joint</a></li> <li><a href="#orgcb2d2af">3.6. Comparison of perfect joint and worst specified joint</a></li>
<li><a href="#orgbddb83e">3.7. Conclusion</a></li> <li><a href="#orgbeb611a">3.7. Conclusion</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org0017658">4. Flexible Joint Specifications with the APA300ML</a> <li><a href="#org0017658">4. Flexible Joint Specifications with the APA300ML</a>
<ul> <ul>
<li><a href="#org96b5fde">4.1. Stewart Platform Initialization</a></li> <li><a href="#orgbd1d5a4">4.1. Stewart Platform Initialization</a></li>
<li><a href="#orgcb2d2af">4.2. Comparison of perfect joint and worst specified joint</a></li> <li><a href="#org512c6e0">4.2. Comparison of perfect joint and worst specified joint</a></li>
</ul> </ul>
</li> </li>
<li><a href="#org649a6c9">5. Relative Motion Sensors</a> <li><a href="#org649a6c9">5. Relative Motion Sensors</a>
<ul> <ul>
<li><a href="#org36b0a8e">5.1. Stewart Platform Initialization</a></li> <li><a href="#org9530a70">5.1. Stewart Platform Initialization</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -80,8 +80,8 @@
<h2 id="orgbdb2a68"><span class="section-number-2">1</span> Simscape Model</h2> <h2 id="orgbdb2a68"><span class="section-number-2">1</span> Simscape Model</h2>
<div class="outline-text-2" id="text-1"> <div class="outline-text-2" id="text-1">
</div> </div>
<div id="outline-container-org1a0f3d5" class="outline-3"> <div id="outline-container-org17a6e21" class="outline-3">
<h3 id="org1a0f3d5"><span class="section-number-3">1.1</span> Flexible APA</h3> <h3 id="org17a6e21"><span class="section-number-3">1.1</span> Flexible APA</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">apa = load('./mat/APA300ML.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K'); <pre class="src src-matlab">apa = load('./mat/APA300ML.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K');
@ -323,8 +323,8 @@
</div> </div>
</div> </div>
<div id="outline-container-org75c496c" class="outline-3"> <div id="outline-container-org1a49c82" class="outline-3">
<h3 id="org75c496c"><span class="section-number-3">1.3</span> Identification</h3> <h3 id="org1a49c82"><span class="section-number-3">1.3</span> Identification</h3>
<div class="outline-text-3" id="text-1-3"> <div class="outline-text-3" id="text-1-3">
<p> <p>
And we identify the dynamics from force actuators to force sensors. And we identify the dynamics from force actuators to force sensors.
@ -433,8 +433,8 @@ Gj.OutputName = {'Dm1', 'Dm2', 'Dm3', 'Dm4', 'Dm5', 'Dm6', 'Fm1', 'Fm2', 'Fm3',
</div> </div>
</div> </div>
<div id="outline-container-org17a6e21" class="outline-3"> <div id="outline-container-org896571b" class="outline-3">
<h3 id="org17a6e21"><span class="section-number-3">1.6</span> Flexible APA</h3> <h3 id="org896571b"><span class="section-number-3">1.6</span> Flexible APA</h3>
<div class="outline-text-3" id="text-1-6"> <div class="outline-text-3" id="text-1-6">
<div id="org774a034" class="figure"> <div id="org774a034" class="figure">
@ -564,8 +564,8 @@ In order to model a flexible element with only few mass-spring-damper elements:
</div> </div>
</div> </div>
<div id="outline-container-org0b65066" class="outline-3"> <div id="outline-container-orgbddb83e" class="outline-3">
<h3 id="org0b65066"><span class="section-number-3">1.12</span> Conclusion</h3> <h3 id="orgbddb83e"><span class="section-number-3">1.12</span> Conclusion</h3>
<div class="outline-text-3" id="text-1-12"> <div class="outline-text-3" id="text-1-12">
<div class="important"> <div class="important">
<p> <p>
@ -621,8 +621,8 @@ references = initializeReferences(stewart);
</div> </div>
</div> </div>
<div id="outline-container-org1a49c82" class="outline-3"> <div id="outline-container-orgeebd547" class="outline-3">
<h3 id="org1a49c82"><span class="section-number-3">2.2</span> Identification</h3> <h3 id="orgeebd547"><span class="section-number-3">2.2</span> Identification</h3>
<div class="outline-text-3" id="text-2-2"> <div class="outline-text-3" id="text-2-2">
<p> <p>
And we identify the dynamics from force actuators to force sensors. And we identify the dynamics from force actuators to force sensors.
@ -718,8 +718,8 @@ Kl = diag(1./diag(abs(freqresp(Gl, wc)))) * wc/s * 1/(1 + s/3/wc);
<h2 id="orge8b5f65"><span class="section-number-2">3</span> Flexible Joint Specifications</h2> <h2 id="orge8b5f65"><span class="section-number-2">3</span> Flexible Joint Specifications</h2>
<div class="outline-text-2" id="text-3"> <div class="outline-text-2" id="text-3">
</div> </div>
<div id="outline-container-orgfb150a0" class="outline-3"> <div id="outline-container-org36b0a8e" class="outline-3">
<h3 id="orgfb150a0"><span class="section-number-3">3.1</span> Stewart Platform Initialization</h3> <h3 id="org36b0a8e"><span class="section-number-3">3.1</span> Stewart Platform Initialization</h3>
<div class="outline-text-3" id="text-3-1"> <div class="outline-text-3" id="text-3-1">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">stewart = initializeStewartPlatform(); <pre class="src src-matlab">stewart = initializeStewartPlatform();
@ -796,11 +796,11 @@ controller = initializeController('type', 'open-loop');
</div> </div>
</div> </div>
<div id="outline-container-orgd0fd2ec" class="outline-3"> <div id="outline-container-orgcb2d2af" class="outline-3">
<h3 id="orgd0fd2ec"><span class="section-number-3">3.6</span> Comparison of perfect joint and worst specified joint</h3> <h3 id="orgcb2d2af"><span class="section-number-3">3.6</span> Comparison of perfect joint and worst specified joint</h3>
</div> </div>
<div id="outline-container-orgbddb83e" class="outline-3"> <div id="outline-container-orgbeb611a" class="outline-3">
<h3 id="orgbddb83e"><span class="section-number-3">3.7</span> Conclusion</h3> <h3 id="orgbeb611a"><span class="section-number-3">3.7</span> Conclusion</h3>
<div class="outline-text-3" id="text-3-7"> <div class="outline-text-3" id="text-3-7">
<p> <p>
Qualitatively: Qualitatively:
@ -889,8 +889,8 @@ Quantitatively:
<h2 id="org0017658"><span class="section-number-2">4</span> Flexible Joint Specifications with the APA300ML</h2> <h2 id="org0017658"><span class="section-number-2">4</span> Flexible Joint Specifications with the APA300ML</h2>
<div class="outline-text-2" id="text-4"> <div class="outline-text-2" id="text-4">
</div> </div>
<div id="outline-container-org96b5fde" class="outline-3"> <div id="outline-container-orgbd1d5a4" class="outline-3">
<h3 id="org96b5fde"><span class="section-number-3">4.1</span> Stewart Platform Initialization</h3> <h3 id="orgbd1d5a4"><span class="section-number-3">4.1</span> Stewart Platform Initialization</h3>
<div class="outline-text-3" id="text-4-1"> <div class="outline-text-3" id="text-4-1">
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">apa = load('./mat/APA300ML.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K'); <pre class="src src-matlab">apa = load('./mat/APA300ML.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K');
@ -932,22 +932,17 @@ controller = initializeController('type', 'open-loop');
</div> </div>
</div> </div>
<div id="outline-container-orgcb2d2af" class="outline-3"> <div id="outline-container-org512c6e0" class="outline-3">
<h3 id="orgcb2d2af"><span class="section-number-3">4.2</span> Comparison of perfect joint and worst specified joint</h3> <h3 id="org512c6e0"><span class="section-number-3">4.2</span> Comparison of perfect joint and worst specified joint</h3>
</div> </div>
</div> </div>
<div id="outline-container-org649a6c9" class="outline-2"> <div id="outline-container-org649a6c9" class="outline-2">
<h2 id="org649a6c9"><span class="section-number-2">5</span> Relative Motion Sensors</h2> <h2 id="org649a6c9"><span class="section-number-2">5</span> Relative Motion Sensors</h2>
<div class="outline-text-2" id="text-5"> <div class="outline-text-2" id="text-5">
</div> </div>
<div id="outline-container-org36b0a8e" class="outline-3"> <div id="outline-container-org9530a70" class="outline-3">
<h3 id="org36b0a8e"><span class="section-number-3">5.1</span> Stewart Platform Initialization</h3> <h3 id="org9530a70"><span class="section-number-3">5.1</span> Stewart Platform Initialization</h3>
<div class="outline-text-3" id="text-5-1"> <div class="outline-text-3" id="text-5-1">
<div class="org-src-container">
<pre class="src src-matlab">apa = load('./mat/APA300ML.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K');
</pre>
</div>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">stewart = initializeStewartPlatform(); <pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart); stewart = initializeFramesPositions(stewart);
@ -957,33 +952,24 @@ stewart = computeJointsPose(stewart);
</div> </div>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">stewart = initializeAmplifiedStrutDynamics(stewart, 'Ke', 1.5e6*ones(6,1), 'Ka', 43e6*ones(6,1), 'K1', 0.4e6*ones(6,1), 'C1', 10*ones(6,1)); <pre class="src src-matlab">apa = load('./mat/APA300ML.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K');
stewart = initializeAmplifiedStrutDynamics(stewart, 'Ke', 1.5e6*ones(6,1), 'Ka', 40.5e6*ones(6,1), 'K1', 0.4e6*ones(6,1));
% stewart = initializeFlexibleStrutDynamics(stewart, 'H', 0.03, 'K', apa.K, 'M', apa.M, 'n_xyz', apa.n_xyz, 'xi', 0.1, 'step_file', 'mat/APA300ML.STEP'); % stewart = initializeFlexibleStrutDynamics(stewart, 'H', 0.03, 'K', apa.K, 'M', apa.M, 'n_xyz', apa.n_xyz, 'xi', 0.1, 'step_file', 'mat/APA300ML.STEP');
</pre> </pre>
</div> </div>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">stewart = initializeJointDynamics(stewart, 'type_F', 'universal_3dof', ... <pre class="src src-matlab">flex_joint = load('./mat/flexor_025.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K');
'type_M', 'spherical_3dof', ... stewart = initializeJointDynamics(stewart, 'type_M', 'spherical_3dof', ...
'Kf_M', 100*ones(6,1), ... 'Kr_M', flex_joint.K(1,1)*ones(6,1), ...
'Kt_M', 500*ones(6,1), ... 'Ka_M', flex_joint.K(3,3)*ones(6,1), ...
'Kf_F', 100*ones(6,1), ... 'Kf_M', flex_joint.K(4,4)*ones(6,1), ...
'Kt_F', 500*ones(6,1), ... 'Kt_M', flex_joint.K(6,6)*ones(6,1), ...
'Ka_M', 200e6*ones(6,1), ... 'type_F', 'universal_3dof', ...
'Kr_M', 1e6*ones(6,1), ... 'Kr_F', flex_joint.K(1,1)*ones(6,1), ...
'Ka_F', 200e6*ones(6,1), ... 'Ka_F', flex_joint.K(3,3)*ones(6,1), ...
'Kr_F', 1e6*ones(6,1)); 'Kf_F', flex_joint.K(4,4)*ones(6,1), ...
% stewart = initializeJointDynamics(stewart, 'type_F', 'universal_3dof', ... 'Kt_F', flex_joint.K(6,6)*ones(6,1));
% 'type_M', 'spherical_3dof', ...
% 'Kf_M', 100*ones(6,1), ...
% 'Kt_M', 500*ones(6,1), ...
% 'Kf_F', 100*ones(6,1), ...
% 'Kt_F', 500*ones(6,1), ...
% 'Ka_M', 1e6*ones(6,1), ...
% 'Kr_M', 1e6*ones(6,1), ...
% 'Ka_F', 1e6*ones(6,1), ...
% 'Kr_F', 1e6*ones(6,1));
% stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
</pre> </pre>
</div> </div>
@ -994,7 +980,6 @@ stewart = computeJointsPose(stewart);
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-matlab">stewart = initializeCylindricalStruts(stewart); <pre class="src src-matlab">stewart = initializeCylindricalStruts(stewart);
% stewart = initializeCylindricalStruts(stewart, 'type_F', 'none', 'type_M', 'none');
</pre> </pre>
</div> </div>
@ -1018,18 +1003,13 @@ controller = initializeController('type', 'open-loop');
<pre class="src src-matlab">disturbances = initializeDisturbances(); <pre class="src src-matlab">disturbances = initializeDisturbances();
</pre> </pre>
</div> </div>
<div class="org-src-container">
<pre class="src src-matlab">open('stewart_platform_model.slx')
</pre>
</div>
</div> </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-09-01 mar. 13:18</p> <p class="date">Created: 2020-09-07 lun. 23:16</p>
</div> </div>
</body> </body>
</html> </html>

Binary file not shown.

12918
mat/base_plate.STEP Normal file

File diff suppressed because it is too large Load Diff

BIN
mat/flexor_025.mat Normal file

Binary file not shown.

4118
mat/flexor_025.step Executable file

File diff suppressed because it is too large Load Diff

BIN
mat/motion_error_ol.mat Normal file

Binary file not shown.

BIN
mat/strut_encoder.mat Normal file

Binary file not shown.

63197
mat/strut_encoder.step Normal file

File diff suppressed because it is too large Load Diff

11895
mat/top_plate.STEP Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1450,11 +1450,11 @@ Quantitatively:
simulinkproject('../'); simulinkproject('../');
#+end_src #+end_src
** Stewart Platform Initialization
#+begin_src matlab #+begin_src matlab
apa = load('./mat/APA300ML.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K'); open('stewart_platform_model.slx')
#+end_src #+end_src
** Stewart Platform Initialization
#+begin_src matlab #+begin_src matlab
stewart = initializeStewartPlatform(); stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart); stewart = initializeFramesPositions(stewart);
@ -1463,32 +1463,23 @@ Quantitatively:
#+end_src #+end_src
#+begin_src matlab #+begin_src matlab
stewart = initializeAmplifiedStrutDynamics(stewart, 'Ke', 1.5e6*ones(6,1), 'Ka', 43e6*ones(6,1), 'K1', 0.4e6*ones(6,1), 'C1', 10*ones(6,1)); apa = load('./mat/APA300ML.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K');
stewart = initializeAmplifiedStrutDynamics(stewart, 'Ke', 1.5e6*ones(6,1), 'Ka', 40.5e6*ones(6,1), 'K1', 0.4e6*ones(6,1));
% stewart = initializeFlexibleStrutDynamics(stewart, 'H', 0.03, 'K', apa.K, 'M', apa.M, 'n_xyz', apa.n_xyz, 'xi', 0.1, 'step_file', 'mat/APA300ML.STEP'); % stewart = initializeFlexibleStrutDynamics(stewart, 'H', 0.03, 'K', apa.K, 'M', apa.M, 'n_xyz', apa.n_xyz, 'xi', 0.1, 'step_file', 'mat/APA300ML.STEP');
#+end_src #+end_src
#+begin_src matlab #+begin_src matlab
stewart = initializeJointDynamics(stewart, 'type_F', 'universal_3dof', ... flex_joint = load('./mat/flexor_025.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K');
'type_M', 'spherical_3dof', ... stewart = initializeJointDynamics(stewart, 'type_M', 'spherical_3dof', ...
'Kf_M', 100*ones(6,1), ... 'Kr_M', flex_joint.K(1,1)*ones(6,1), ...
'Kt_M', 500*ones(6,1), ... 'Ka_M', flex_joint.K(3,3)*ones(6,1), ...
'Kf_F', 100*ones(6,1), ... 'Kf_M', flex_joint.K(4,4)*ones(6,1), ...
'Kt_F', 500*ones(6,1), ... 'Kt_M', flex_joint.K(6,6)*ones(6,1), ...
'Ka_M', 200e6*ones(6,1), ... 'type_F', 'universal_3dof', ...
'Kr_M', 1e6*ones(6,1), ... 'Kr_F', flex_joint.K(1,1)*ones(6,1), ...
'Ka_F', 200e6*ones(6,1), ... 'Ka_F', flex_joint.K(3,3)*ones(6,1), ...
'Kr_F', 1e6*ones(6,1)); 'Kf_F', flex_joint.K(4,4)*ones(6,1), ...
% stewart = initializeJointDynamics(stewart, 'type_F', 'universal_3dof', ... 'Kt_F', flex_joint.K(6,6)*ones(6,1));
% 'type_M', 'spherical_3dof', ...
% 'Kf_M', 100*ones(6,1), ...
% 'Kt_M', 500*ones(6,1), ...
% 'Kf_F', 100*ones(6,1), ...
% 'Kt_F', 500*ones(6,1), ...
% 'Ka_M', 1e6*ones(6,1), ...
% 'Kr_M', 1e6*ones(6,1), ...
% 'Ka_F', 1e6*ones(6,1), ...
% 'Kr_F', 1e6*ones(6,1));
% stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
#+end_src #+end_src
#+begin_src matlab #+begin_src matlab
@ -1497,7 +1488,6 @@ Quantitatively:
#+begin_src matlab #+begin_src matlab
stewart = initializeCylindricalStruts(stewart); stewart = initializeCylindricalStruts(stewart);
% stewart = initializeCylindricalStruts(stewart, 'type_F', 'none', 'type_M', 'none');
#+end_src #+end_src
#+begin_src matlab #+begin_src matlab
@ -1518,10 +1508,6 @@ Quantitatively:
disturbances = initializeDisturbances(); disturbances = initializeDisturbances();
#+end_src #+end_src
#+begin_src matlab
open('stewart_platform_model.slx')
#+end_src
** Initialization :noexport: ** Initialization :noexport:
#+begin_src matlab #+begin_src matlab
%% Options for Linearized %% Options for Linearized
@ -1581,3 +1567,156 @@ Quantitatively:
linkaxes([ax1,ax2],'x'); linkaxes([ax1,ax2],'x');
#+end_src #+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/comp_relative_motion_sensor_act_leg.pdf', 'width', 'full', 'height', 'full');
#+end_src
#+name: fig:comp_relative_motion_sensor_act_leg
#+caption: Comparison of the dynamique from actuator to relative motion sensor located in parallel with the actuator or with the leg (flexible joints included)
#+RESULTS:
[[file:figs/comp_relative_motion_sensor_act_leg.png]]
* Struts with Encoders
** 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 :results none :exports none
simulinkproject('../');
#+end_src
** Flexible Strut
#+begin_src matlab
apa = load('./mat/strut_encoder.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K');
#+end_src
#+begin_src matlab :exports results :results value table replace :tangle no
data2orgtable([length(apa.n_i); length(apa.int_i); size(apa.M,1) - 6*length(apa.int_i); size(apa.M,1)], {'Total number of Nodes', 'Number of interface Nodes', 'Number of Modes', 'Size of M and K matrices'}, {}, ' %.0f ');
#+end_src
#+RESULTS:
| Total number of Nodes | 8 |
| Number of interface Nodes | 8 |
| Number of Modes | 6 |
| Size of M and K matrices | 54 |
#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
data2orgtable([[1:length(apa.int_i)]', apa.int_i, apa.int_xyz], {}, {'Node i', 'Node Number', 'x [m]', 'y [m]', 'z [m]'}, ' %f ');
#+end_src
#+caption: Coordinates of the interface nodes
#+RESULTS:
| Node i | Node Number | x [m] | y [m] | z [m] |
|--------+-------------+---------+--------+----------|
| 1.0 | 504411.0 | 0.0 | 0.0 | 0.0405 |
| 2.0 | 504412.0 | 0.0 | 0.0 | -0.0405 |
| 3.0 | 504413.0 | -0.0325 | 0.0 | 0.0 |
| 4.0 | 504414.0 | -0.0125 | 0.0 | 0.0 |
| 5.0 | 504415.0 | -0.0075 | 0.0 | 0.0 |
| 6.0 | 504416.0 | 0.0325 | 0.0 | 0.0 |
| 7.0 | 504417.0 | 0.004 | 0.0145 | -0.00175 |
| 8.0 | 504418.0 | 0.004 | 0.0166 | -0.00175 |
** Stewart Platform
#+begin_src matlab
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 95e-3, 'MO_B', 220e-3);
stewart = generateGeneralConfiguration(stewart, 'FH', 22.5e-3, 'FR', 114e-3, 'FTh', [ -11, 11, 120-11, 120+11, 240-11, 240+11]*(pi/180), ...
'MH', 22.5e-3, 'MR', 110e-3, 'MTh', [-60+15, 60-15, 60+15, 180-15, 180+15, -60-15]*(pi/180));
stewart = computeJointsPose(stewart);
stewart = initializeFlexibleStrutAndJointDynamics(stewart, 'H', (apa.int_xyz(1,3) - apa.int_xyz(2,3)), ...
'K', apa.K, ...
'M', apa.M, ...
'n_xyz', apa.n_xyz, ...
'xi', 0.1, ...
'Gf', -2.65e7, ...
'step_file', 'mat/APA300ML.STEP');
stewart = initializeSolidPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart, 'type_F', 'none', 'type_M', 'none');
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
#+end_src
#+begin_src matlab
disturbances = initializeDisturbances();
ground = initializeGround('type', 'none');
payload = initializePayload('type', 'rigid', 'm', 1);
controller = initializeController('type', 'open-loop');
references = initializeReferences(stewart);
#+end_src
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Force Inputs [N]
io(io_i) = linio([mdl, '/Stewart Platform'], 1, 'openoutput', [], 'dLm'); io_i = io_i + 1; % Relative Displacement Outputs [m]
io(io_i) = linio([mdl, '/Stewart Platform'], 1, 'openoutput', [], 'Lm'); io_i = io_i + 1; % Force Sensors [N]
#+end_src
#+begin_src matlab
%% Run the linearization
G = linearize(mdl, io, options);
G.InputName = {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
G.OutputName = {'Dm1', 'Dm2', 'Dm3', 'Dm4', 'Dm5', 'Dm6', ...
'D1', 'D2', 'D3', 'D4', 'D5', 'D6'};
#+end_src
#+begin_src matlab :exports none
freqs = logspace(0, 3, 1000);
figure;
ax1 = subplot(2, 1, 1);
hold on;
for i = 1:6
plot(freqs, abs(squeeze(freqresp(G(i,i), freqs, 'Hz'))), 'color', [0 0.4470 0.7410 0.2]);
end
for i = 1:6
plot(freqs, abs(squeeze(freqresp(G(6+i,i), freqs, 'Hz'))), 'color', [0.8500 0.3250 0.0980 0.2]);
end
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
hold on;
for i = 1:6
plot(freqs, 180/pi*angle(squeeze(freqresp(G(i,i), freqs, 'Hz'))), 'color', [0 0.4470 0.7410 0.2]);
end
for i = 1:6
plot(freqs, 180/pi*angle(squeeze(freqresp(G(6+i,i), freqs, 'Hz'))), 'color', [0.8500 0.3250 0.0980 0.2]);
end
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
linkaxes([ax1,ax2],'x');
#+end_src
#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/comp_relative_motion_sensor_act_leg_encoder.pdf', 'width', 'full', 'height', 'full');
#+end_src
#+name: fig:comp_relative_motion_sensor_act_leg_encoder
#+caption:
#+RESULTS:
[[file:figs/comp_relative_motion_sensor_act_leg_encoder.png]]

File diff suppressed because it is too large Load Diff

View File

@ -926,6 +926,66 @@ This Matlab function is accessible [[file:../src/initializeCylindricalPlatforms.
stewart.platform_M.H = args.Mph; stewart.platform_M.H = args.Mph;
#+end_src #+end_src
** =initializeSolidPlatforms=: Initialize the geometry of the Fixed and Mobile Platforms
:PROPERTIES:
:header-args:matlab+: :tangle ../src/initializeSolidPlatforms.m
:header-args:matlab+: :comments none :mkdirp yes :eval no
:END:
<<sec:initializeSolidPlatforms>>
This Matlab function is accessible [[file:../src/initializeSolidPlatforms.m][here]].
*** Function description
:PROPERTIES:
:UNNUMBERED: t
:END:
#+begin_src matlab
function [stewart] = initializeSolidPlatforms(stewart, args)
% initializeSolidPlatforms - Initialize the geometry of the Fixed and Mobile Platforms
%
% Syntax: [stewart] = initializeSolidPlatforms(args)
%
% Inputs:
% - args - Structure with the following fields:
% - density [1x1] - Density of the platforms [kg]
%
% Outputs:
% - stewart - updated Stewart structure with the added fields:
% - platform_F [struct] - structure with the following fields:
% - type = 2
% - M [1x1] - Fixed Platform Density [kg/m^3]
% - platform_M [struct] - structure with the following fields:
% - type = 2
% - M [1x1] - Mobile Platform Density [kg/m^3]
#+end_src
*** Optional Parameters
:PROPERTIES:
:UNNUMBERED: t
:END:
#+begin_src matlab
arguments
stewart
args.density (1,1) double {mustBeNumeric, mustBePositive} = 7800
end
#+end_src
*** Populate the =stewart= structure
:PROPERTIES:
:UNNUMBERED: t
:END:
#+begin_src matlab
stewart.platform_F.type = 2;
stewart.platform_F.density = args.density;
#+end_src
#+begin_src matlab
stewart.platform_M.type = 2;
stewart.platform_M.density = args.density;
#+end_src
** =initializeCylindricalStruts=: Define the inertia of cylindrical struts ** =initializeCylindricalStruts=: Define the inertia of cylindrical struts
:PROPERTIES: :PROPERTIES:
:header-args:matlab+: :tangle ../src/initializeCylindricalStruts.m :header-args:matlab+: :tangle ../src/initializeCylindricalStruts.m
@ -1513,6 +1573,96 @@ Rotational Damping
stewart.joints_M.step_file = args.step_file_M; stewart.joints_M.step_file = args.step_file_M;
#+end_src #+end_src
** TODO =initializeFlexibleStrutAndJointDynamics=: Model each strut with a flexible element
:PROPERTIES:
:header-args:matlab+: :tangle ../src/initializeFlexibleStrutAndJointDynamics.m
:header-args:matlab+: :comments none :mkdirp yes :eval no
:END:
<<sec:initializeFlexibleStrutAndJointDynamics>>
This Matlab function is accessible [[file:../src/initializeFlexibleStrutAndJointDynamics.m][here]].
*** Function description
:PROPERTIES:
:UNNUMBERED: t
:END:
#+begin_src matlab
function [stewart] = initializeFlexibleStrutAndJointDynamics(stewart, args)
% initializeFlexibleStrutAndJointDynamics - Add Stiffness and Damping properties of each strut
%
% Syntax: [stewart] = initializeFlexibleStrutAndJointDynamics(args)
%
% Inputs:
% - args - Structure with the following fields:
% - K [nxn] - Vertical stiffness contribution of the piezoelectric stack [N/m]
% - M [nxn] - Vertical damping contribution of the piezoelectric stack [N/(m/s)]
% - xi [1x1] - Vertical (residual) stiffness when the piezoelectric stack is removed [N/m]
% - step_file [6x1] - Vertical (residual) damping when the piezoelectric stack is removed [N/(m/s)]
% - Gf [6x1] - Gain from strain in [m] to measured [N] such that it matches
%
% Outputs:
% - stewart - updated Stewart structure with the added fields:
#+end_src
*** Optional Parameters
:PROPERTIES:
:UNNUMBERED: t
:END:
#+begin_src matlab
arguments
stewart
args.K double {mustBeNumeric} = zeros(6,6)
args.M double {mustBeNumeric} = zeros(6,6)
args.H double {mustBeNumeric} = 0
args.n_xyz double {mustBeNumeric} = zeros(2,3)
args.xi double {mustBeNumeric} = 0.1
args.Gf double {mustBeNumeric} = 1
args.step_file char {} = ''
end
#+end_src
*** Compute the axial offset
:PROPERTIES:
:UNNUMBERED: t
:END:
#+begin_src matlab
stewart.actuators.ax_off = (stewart.geometry.l(1) - args.H)/2; % Axial Offset at the ends of the actuator
#+end_src
*** Populate the =stewart= structure
:PROPERTIES:
:UNNUMBERED: t
:END:
No discrete joints:
#+begin_src matlab
stewart.joints_F.type = 10;
stewart.joints_M.type = 10;
#+end_src
No discrete struts:
#+begin_src matlab
stewart.struts_F.type = 3;
stewart.struts_M.type = 3;
#+end_src
#+begin_src matlab
stewart.actuators.type = 4;
stewart.actuators.Km = args.K;
stewart.actuators.Mm = args.M;
stewart.actuators.n_xyz = args.n_xyz;
stewart.actuators.xi = args.xi;
stewart.actuators.step_file = args.step_file;
stewart.actuators.K = args.K(3,3); % Axial Stiffness
stewart.actuators.Gf = args.Gf;
#+end_src
** =initializeInertialSensor=: Initialize the inertial sensor in each strut ** =initializeInertialSensor=: Initialize the inertial sensor in each strut
:PROPERTIES: :PROPERTIES:
:header-args:matlab+: :tangle ../src/initializeInertialSensor.m :header-args:matlab+: :tangle ../src/initializeInertialSensor.m

Binary file not shown.

View File

@ -0,0 +1,48 @@
function [stewart] = initializeFlexibleStrutAndJointDynamics(stewart, args)
% initializeFlexibleStrutAndJointDynamics - Add Stiffness and Damping properties of each strut
%
% Syntax: [stewart] = initializeFlexibleStrutAndJointDynamics(args)
%
% Inputs:
% - args - Structure with the following fields:
% - K [nxn] - Vertical stiffness contribution of the piezoelectric stack [N/m]
% - M [nxn] - Vertical damping contribution of the piezoelectric stack [N/(m/s)]
% - xi [1x1] - Vertical (residual) stiffness when the piezoelectric stack is removed [N/m]
% - step_file [6x1] - Vertical (residual) damping when the piezoelectric stack is removed [N/(m/s)]
% - Gf [6x1] - Gain from strain in [m] to measured [N] such that it matches
%
% Outputs:
% - stewart - updated Stewart structure with the added fields:
arguments
stewart
args.K double {mustBeNumeric} = zeros(6,6)
args.M double {mustBeNumeric} = zeros(6,6)
args.H double {mustBeNumeric} = 0
args.n_xyz double {mustBeNumeric} = zeros(2,3)
args.xi double {mustBeNumeric} = 0.1
args.Gf double {mustBeNumeric} = 1
args.step_file char {} = ''
end
stewart.actuators.ax_off = (stewart.geometry.l(1) - args.H)/2; % Axial Offset at the ends of the actuator
stewart.joints_F.type = 10;
stewart.joints_M.type = 10;
stewart.struts_F.type = 3;
stewart.struts_M.type = 3;
stewart.actuators.type = 4;
stewart.actuators.Km = args.K;
stewart.actuators.Mm = args.M;
stewart.actuators.n_xyz = args.n_xyz;
stewart.actuators.xi = args.xi;
stewart.actuators.step_file = args.step_file;
stewart.actuators.K = args.K(3,3); % Axial Stiffness
stewart.actuators.Gf = args.Gf;

View File

@ -0,0 +1,30 @@
function [stewart] = initializeSolidPlatforms(stewart, args)
% initializeSolidPlatforms - Initialize the geometry of the Fixed and Mobile Platforms
%
% Syntax: [stewart] = initializeSolidPlatforms(args)
%
% Inputs:
% - args - Structure with the following fields:
% - density [1x1] - Density of the platforms [kg]
%
% Outputs:
% - stewart - updated Stewart structure with the added fields:
% - platform_F [struct] - structure with the following fields:
% - type = 2
% - M [1x1] - Fixed Platform Density [kg/m^3]
% - platform_M [struct] - structure with the following fields:
% - type = 2
% - M [1x1] - Mobile Platform Density [kg/m^3]
arguments
stewart
args.density (1,1) double {mustBeNumeric, mustBePositive} = 7800
end
stewart.platform_F.type = 2;
stewart.platform_F.density = args.density;
stewart.platform_M.type = 2;
stewart.platform_M.density = args.density;