stewart-simscape/docs/stewart-architecture.html

2933 lines
142 KiB
HTML
Raw Permalink Normal View History

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
2021-01-08 15:54:58 +01:00
<!-- 2021-01-08 ven. 15:52 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Stewart Platform - Definition of the Architecture</title>
<meta name="generator" content="Org mode" />
<meta name="author" content="Dehaeze Thomas" />
2021-01-08 15:34:53 +01:00
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
<script>
MathJax = {
svg: {
scale: 1,
fontCache: "global"
},
tex: {
tags: "ams",
multlineWidth: "%MULTLINEWIDTH",
tagSide: "right",
macros: {bm: ["\\boldsymbol{#1}",1],},
tagIndent: ".8em"
}
};
</script>
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
</head>
<body>
<div id="org-div-home-and-up">
<a accesskey="h" href="./index.html"> UP </a>
|
<a accesskey="H" href="./index.html"> HOME </a>
</div><div id="content">
<h1 class="title">Stewart Platform - Definition of the Architecture</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
2021-01-08 15:34:53 +01:00
<li><a href="#org66eb6f3">1. Definition of the Stewart Platform Geometry</a>
<ul>
2021-01-08 15:34:53 +01:00
<li><a href="#org77ddd8a">1.1. Frames Definition</a></li>
<li><a href="#orgd5fc2b4">1.2. Location of the Spherical Joints</a></li>
<li><a href="#org80e97a5">1.3. Length and orientation of the struts</a></li>
<li><a href="#orgfb2bbfa">1.4. Rest Position of the Stewart platform</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#orgb91e8d2">2. Definition of the Inertia and geometry of the Fixed base, Mobile platform and Struts</a>
<ul>
2021-01-08 15:34:53 +01:00
<li><a href="#org12ee2cf">2.1. Inertia and Geometry of the Fixed and Mobile platforms</a></li>
<li><a href="#orgf5bc935">2.2. Inertia and Geometry of the struts</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#orgdb5d038">3. Definition of the stiffness and damping of the joints</a>
<ul>
2021-01-08 15:34:53 +01:00
<li><a href="#org3b9ead4">3.1. Stiffness and Damping of the Actuator</a></li>
<li><a href="#orgaf5b761">3.2. Stiffness and Damping of the Spherical Joints</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#org0d823ef">4. Summary of the Initialization Procedure and Matlab Example</a>
<ul>
2021-01-08 15:34:53 +01:00
<li><a href="#org64b43bc">4.1. Example of the initialization of a Stewart Platform</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#org6feaead">5. Functions</a>
<ul>
2021-01-08 15:34:53 +01:00
<li><a href="#orgb54aa6c">5.1. <code>initializeStewartPlatform</code>: Initialize the Stewart Platform structure</a>
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#org74e4b19">Documentation</a></li>
<li><a href="#org4c43493">Function description</a></li>
2021-01-08 15:34:53 +01:00
<li><a href="#orgc4197aa">Initialize the Stewart structure</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#org1a8cfde">5.2. <code>initializeFramesPositions</code>: Initialize the positions of frames {A}, {B}, {F} and {M}</a>
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#org330eb42">Documentation</a></li>
<li><a href="#orgff06721">Function description</a></li>
<li><a href="#org55b09bc">Optional Parameters</a></li>
2021-01-08 15:34:53 +01:00
<li><a href="#orgf345222">Compute the position of each frame</a></li>
2021-01-08 15:54:58 +01:00
<li><a href="#orgc8f8c81">Populate the <code>stewart</code> structure</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#org33634da">5.3. <code>generateGeneralConfiguration</code>: Generate a Very General Configuration</a>
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#org1bdb691">Documentation</a></li>
<li><a href="#orgf228191">Function description</a></li>
<li><a href="#org1649de8">Optional Parameters</a></li>
2021-01-08 15:34:53 +01:00
<li><a href="#orgac7b186">Compute the pose</a></li>
2021-01-08 15:54:58 +01:00
<li><a href="#org8e5b4b1">Populate the <code>stewart</code> structure</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#orga24b055">5.4. <code>computeJointsPose</code>: Compute the Pose of the Joints</a>
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#orge8578cb">Documentation</a></li>
<li><a href="#orge186927">Function description</a></li>
<li><a href="#orgc451919">Optional Parameters</a></li>
<li><a href="#org8f74792">Check the <code>stewart</code> structure elements</a></li>
2021-01-08 15:34:53 +01:00
<li><a href="#org6fa7255">Compute the position of the Joints</a></li>
<li><a href="#org775652f">Compute the strut length and orientation</a></li>
<li><a href="#org343f9a2">Compute the orientation of the Joints</a></li>
2021-01-08 15:54:58 +01:00
<li><a href="#org53f7eca">Populate the <code>stewart</code> structure</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#org9068596">5.5. <code>initializeStewartPose</code>: Determine the initial stroke in each leg to have the wanted pose</a>
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#org7dee2e6">Function description</a></li>
<li><a href="#orgb42495c">Optional Parameters</a></li>
2021-01-08 15:34:53 +01:00
<li><a href="#org2b0bd7e">Use the Inverse Kinematic function</a></li>
2021-01-08 15:54:58 +01:00
<li><a href="#org4e369d0">Populate the <code>stewart</code> structure</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#org7298863">5.6. <code>initializeCylindricalPlatforms</code>: Initialize the geometry of the Fixed and Mobile Platforms</a>
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#orgebd268a">Function description</a></li>
<li><a href="#org09ca288">Optional Parameters</a></li>
2021-01-08 15:34:53 +01:00
<li><a href="#orgca11714">Compute the Inertia matrices of platforms</a></li>
2021-01-08 15:54:58 +01:00
<li><a href="#org6da802f">Populate the <code>stewart</code> structure</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#orgca778d6">5.7. <code>initializeSolidPlatforms</code>: Initialize the geometry of the Fixed and Mobile Platforms</a>
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#org86c0034">Function description</a></li>
<li><a href="#orgc33373b">Optional Parameters</a></li>
<li><a href="#org77f8572">Populate the <code>stewart</code> structure</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#orgc775d7a">5.8. <code>initializeCylindricalStruts</code>: Define the inertia of cylindrical struts</a>
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#orgb76c373">Function description</a></li>
<li><a href="#orge43ae28">Optional Parameters</a></li>
2021-01-08 15:34:53 +01:00
<li><a href="#orge60177a">Compute the properties of the cylindrical struts</a></li>
2021-01-08 15:54:58 +01:00
<li><a href="#org641f40c">Populate the <code>stewart</code> structure</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#org3ceb0b1">5.9. <code>initializeStrutDynamics</code>: Add Stiffness and Damping properties of each strut</a>
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#org8da738a">Documentation</a></li>
<li><a href="#org24695e2">Function description</a></li>
<li><a href="#orgee73c8b">Optional Parameters</a></li>
2021-01-08 15:34:53 +01:00
<li><a href="#org815b218">Add Stiffness and Damping properties of each strut</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#org1d017e8">5.10. <code>initializeAmplifiedStrutDynamics</code>: Add Stiffness and Damping properties of each strut for an amplified piezoelectric actuator</a>
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#org3d661bf">Documentation</a></li>
<li><a href="#org9b51ec8">Function description</a></li>
<li><a href="#org9492e15">Optional Parameters</a></li>
2021-01-08 15:34:53 +01:00
<li><a href="#org52a586e">Compute the total stiffness and damping</a></li>
2021-01-08 15:54:58 +01:00
<li><a href="#org80eb3e9">Populate the <code>stewart</code> structure</a></li>
2020-08-05 13:28:14 +02:00
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#org0d2f9e2">5.11. <code>initializeFlexibleStrutDynamics</code>: Model each strut with a flexible element</a>
2020-08-05 13:28:14 +02:00
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#org8f7f4f7">Function description</a></li>
<li><a href="#org2d4eac7">Optional Parameters</a></li>
<li><a href="#org67ae6f5">Compute the axial offset</a></li>
<li><a href="#org82e5db9">Populate the <code>stewart</code> structure</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#org7666a0d">5.12. <code>initializeJointDynamics</code>: Add Stiffness and Damping properties for spherical joints</a>
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#orgf5c4b43">Function description</a></li>
<li><a href="#org380cbf5">Optional Parameters</a></li>
2021-01-08 15:34:53 +01:00
<li><a href="#org1c44749">Add Actuator Type</a></li>
<li><a href="#org8a45695">Add Stiffness and Damping in Translation of each strut</a></li>
<li><a href="#orgcba9dbe">Add Stiffness and Damping in Rotation of each strut</a></li>
<li><a href="#orge78c1bc">Stiffness and Mass matrices for flexible joint</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#org995e0ff">5.13. <code>initializeFlexibleStrutAndJointDynamics</code>: Model each strut with a flexible element</a>
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#org56a8d9a">Function description</a></li>
<li><a href="#orgac6a1c2">Optional Parameters</a></li>
<li><a href="#org578ef24">Compute the axial offset</a></li>
<li><a href="#org3587761">Populate the <code>stewart</code> structure</a></li>
</ul>
</li>
2021-01-08 15:34:53 +01:00
<li><a href="#org0873774">5.14. <code>initializeInertialSensor</code>: Initialize the inertial sensor in each strut</a>
<ul>
2021-01-08 15:34:53 +01:00
<li><a href="#org8521d8c">Geophone - Working Principle</a></li>
<li><a href="#org66673a3">Accelerometer - Working Principle</a></li>
2021-01-08 15:54:58 +01:00
<li><a href="#org024b1d8">Function description</a></li>
<li><a href="#org6d8876b">Optional Parameters</a></li>
2021-01-08 15:34:53 +01:00
<li><a href="#org96a29e4">Compute the properties of the sensor</a></li>
2021-01-08 15:54:58 +01:00
<li><a href="#org06a22a8">Populate the <code>stewart</code> structure</a></li>
2021-01-08 15:34:53 +01:00
</ul>
</li>
<li><a href="#org5a66d3a">5.15. <code>displayArchitecture</code>: 3D plot of the Stewart platform architecture</a>
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#org5b54876">Function description</a></li>
<li><a href="#org2650173">Optional Parameters</a></li>
<li><a href="#orgab71ceb">Check the <code>stewart</code> structure elements</a></li>
2021-01-08 15:34:53 +01:00
<li><a href="#orgb7e5d05">Figure Creation, Frames and Homogeneous transformations</a></li>
<li><a href="#orge26b777">Fixed Base elements</a></li>
<li><a href="#org8dd54b6">Mobile Platform elements</a></li>
<li><a href="#org3569efd">Legs</a></li>
<li><a href="#orgcb42b83">5.15.1. Figure parameters</a></li>
<li><a href="#org06467e9">5.15.2. Subplots</a></li>
</ul>
</li>
<li><a href="#org02e6772">5.16. <code>describeStewartPlatform</code>: Display some text describing the current defined Stewart Platform</a>
<ul>
2021-01-08 15:54:58 +01:00
<li><a href="#orgdd06785">Function description</a></li>
<li><a href="#org6e383c9">Optional Parameters</a></li>
2021-01-08 15:34:53 +01:00
<li><a href="#orge43c89a">5.16.1. Geometry</a></li>
<li><a href="#org41beea5">5.16.2. Actuators</a></li>
<li><a href="#org293e123">5.16.3. Joints</a></li>
<li><a href="#org94283a1">5.16.4. Kinematics</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<p>
In this document is explained how the Stewart Platform architecture is defined.
</p>
<p>
Some efforts has been made such that the procedure for the definition of the Stewart Platform architecture is as logical and clear as possible.
</p>
<p>
2020-08-05 13:28:14 +02:00
When possible, the notations are compatible with the one used in (<a href="#citeproc_bib_item_1">Taghirad 2013</a>).
</p>
<p>
The definition of the Stewart platform is done in three main parts:
</p>
<ul class="org-ul">
2021-01-08 15:34:53 +01:00
<li>First, the geometry if defined (Section <a href="#orgff0f4ef">1</a>)</li>
<li>Then, the inertia of the mechanical elements are defined (Section <a href="#orgb20dd00">2</a>)</li>
<li>Finally, the Stiffness and Damping characteristics of the elements are defined (Section <a href="#orgbc31729">3</a>)</li>
</ul>
<p>
2021-01-08 15:34:53 +01:00
In section <a href="#orge881ef0">4</a>, the procedure the initialize the Stewart platform is summarize and the associated Matlab code is shown.
</p>
<p>
2021-01-08 15:34:53 +01:00
Finally, all the Matlab function used to initialize the Stewart platform are described in section <a href="#orgc1976a8">5</a>.
</p>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org66eb6f3" class="outline-2">
<h2 id="org66eb6f3"><span class="section-number-2">1</span> Definition of the Stewart Platform Geometry</h2>
2020-02-11 15:50:52 +01:00
<div class="outline-text-2" id="text-1">
<p>
2021-01-08 15:34:53 +01:00
<a id="orgff0f4ef"></a>
</p>
<p>
Stewart platforms are generated in multiple steps:
</p>
<ul class="org-ul">
<li>Definition of the frames</li>
<li>Definition of the location of the joints</li>
<li>Computation of the length and orientation of the struts</li>
<li>Choice of the rest position of the mobile platform</li>
</ul>
<p>
This steps are detailed below.
</p>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org77ddd8a" class="outline-3">
<h3 id="org77ddd8a"><span class="section-number-3">1.1</span> Frames Definition</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-1-1">
<p>
2021-01-08 15:34:53 +01:00
We define 4 important <b>frames</b> (see Figure <a href="#orgc2b1371">1</a>):
</p>
<ul class="org-ul">
<li>\(\{F\}\): Frame fixed to the <b>Fixed</b> base and located at the center of its bottom surface.
This is used to fix the Stewart platform to some support.</li>
<li>\(\{M\}\): Frame fixed to the <b>Moving</b> platform and located at the center of its top surface.
This is used to place things on top of the Stewart platform.</li>
<li>\(\{A\}\): Frame fixed to the fixed base.</li>
<li>\(\{B\}\): Frame fixed to the moving platform.</li>
</ul>
<p>
Even though frames \(\{A\}\) and \(\{B\}\) don&rsquo;t usually correspond to physical elements, they are of primary importance.
Firstly, they are used for the definition of the motion of the Mobile platform with respect to the fixed frame:
</p>
<ul class="org-ul">
<li>In position: \({}^A\bm{P}_{B}\) (read: Position of frame \(\{B\}\) expressed in frame \(\{A\}\))</li>
<li>In rotation: \({}^A\bm{R}_{B}\) (read: The rotation matrix that express the orientation of frame \(\{B\}\) expressed in frame \(\{A\}\))</li>
</ul>
<p>
The frames \(\{A\}\) and \(\{B\}\) are used for all the kinematic analysis (Jacobian, Stiffness matrix, &#x2026;).
</p>
<p>
Typical choice of \(\{A\}\) and \(\{B\}\) are:
</p>
<ul class="org-ul">
<li>Center of mass of the payload</li>
<li>Location where external forces are applied to the mobile platform (for instance when the mobile platform is in contact with a stiff environment)</li>
<li>Center of the cube for the cubic configuration</li>
</ul>
<p>
2021-01-08 15:34:53 +01:00
The definition of the frames is done with the <code>initializeFramesPositions</code> function (<a href="#org937f0f9">link</a>);
</p>
2021-01-08 15:34:53 +01:00
<div id="orgc2b1371" class="figure">
<p><img src="figs/frame_definition.png" alt="frame_definition.png" width="500px" />
</p>
<p><span class="figure-number">Figure 1: </span>Definition of the Frames for the Stewart Platform</p>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgd5fc2b4" class="outline-3">
<h3 id="orgd5fc2b4"><span class="section-number-3">1.2</span> Location of the Spherical Joints</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-1-2">
<p>
2021-01-08 15:34:53 +01:00
Then, we define the <b>location of the spherical joints</b> (see Figure <a href="#orgcfe34cf">2</a>):
</p>
<ul class="org-ul">
<li>\(\bm{a}_{i}\) are the position of the spherical joints fixed to the fixed base</li>
<li>\(\bm{b}_{i}\) are the position of the spherical joints fixed to the moving platform</li>
</ul>
<p>
The location of the joints will define the Geometry of the Stewart platform.
Many characteristics of the platform depend on the location of the joints.
</p>
<p>
The location of the joints can be set to arbitrary positions or it can be computed to obtain specific configurations such as:
</p>
<ul class="org-ul">
<li>A cubic configuration: function <code>generateCubicConfiguration</code> (described in <a href="cubic-configuration.html">this</a> file)</li>
<li>A symmetrical configuration</li>
</ul>
<p>
2021-01-08 15:34:53 +01:00
A function (<code>generateGeneralConfiguration</code>) to set the position of the joints on a circle is described <a href="#orge6afa82">here</a>.
</p>
<p>
The location of the spherical joints are then given by \({}^{F}\bm{a}_{i}\) and \({}^{M}\bm{b}_{i}\).
</p>
2021-01-08 15:34:53 +01:00
<div id="orgcfe34cf" class="figure">
<p><img src="figs/joint_location.png" alt="joint_location.png" width="500px" />
</p>
<p><span class="figure-number">Figure 2: </span>Position of the Spherical/Universal joints for the Stewart Platform</p>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org80e97a5" class="outline-3">
<h3 id="org80e97a5"><span class="section-number-3">1.3</span> Length and orientation of the struts</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-1-3">
<p>
From the location of the joints (\({}^{F}\bm{a}_{i}\) and \({}^{M}\bm{b}_{i}\)), we compute the length \(l_i\) and orientation of each strut \(\hat{\bm{s}}_i\) (unit vector aligned with the strut).
2021-01-08 15:34:53 +01:00
The length and orientation of each strut is represented in figure <a href="#org36b0cca">3</a>.
</p>
<p>
2021-01-08 15:34:53 +01:00
This is done with the <code>computeJointsPose</code> function (<a href="#org1ea8332">link</a>).
</p>
2021-01-08 15:34:53 +01:00
<div id="org36b0cca" class="figure">
<p><img src="figs/length_orientation_struts.png" alt="length_orientation_struts.png" width="500px" />
</p>
<p><span class="figure-number">Figure 3: </span>Length \(l_i\) and orientation \(\hat{\bm{s}}_i\) of the Stewart platform struts</p>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgfb2bbfa" class="outline-3">
<h3 id="orgfb2bbfa"><span class="section-number-3">1.4</span> Rest Position of the Stewart platform</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-1-4">
<p>
We may want to initialize the Stewart platform in some position and orientation that corresponds to its rest position.
</p>
<p>
To do so, we choose:
</p>
<ul class="org-ul">
2020-01-28 17:18:10 +01:00
<li>the position of \(\bm{O}_B\) expressed in \(\{A\}\) using \({}^A\bm{P}\)</li>
<li>the orientation of \(\{B\}\) expressed in \(\{A\}\) using a rotation matrix \({}^{A}\bm{R}_{B}\)</li>
</ul>
<p>
2021-01-08 15:34:53 +01:00
Then, the function <code>initializeStewartPose</code> (<a href="#orgae6d775">link</a>) compute the corresponding initial and rest position of each of the strut.
</p>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgb91e8d2" class="outline-2">
<h2 id="orgb91e8d2"><span class="section-number-2">2</span> Definition of the Inertia and geometry of the Fixed base, Mobile platform and Struts</h2>
2020-02-11 15:50:52 +01:00
<div class="outline-text-2" id="text-2">
<p>
2021-01-08 15:34:53 +01:00
<a id="orgb20dd00"></a>
</p>
<p>
Now that the geometry of the Stewart platform has been defined, we have to choose the inertia of:
</p>
<ul class="org-ul">
<li>The Fixed base</li>
<li>The Mobile platform</li>
<li>The two parts of the struts</li>
</ul>
<p>
The inertia of these elements will modify the dynamics of the systems.
It is thus important to set them properly.
</p>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org12ee2cf" class="outline-3">
<h3 id="org12ee2cf"><span class="section-number-3">2.1</span> Inertia and Geometry of the Fixed and Mobile platforms</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-2-1">
<p>
In order to set the inertia of the fixed and mobile platforms, we can use the following function that assume that both platforms are cylindrical:
</p>
<ul class="org-ul">
2021-01-08 15:34:53 +01:00
<li><code>initializeCylindricalPlatforms</code> (<a href="#org7858fd0">link</a>): by choosing the height, radius and mass of the platforms, it computes the inertia matrix that will be used for simulation</li>
</ul>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgf5bc935" class="outline-3">
<h3 id="orgf5bc935"><span class="section-number-3">2.2</span> Inertia and Geometry of the struts</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-2-2">
<p>
Similarly for the struts, we suppose here that they have a cylindrical shape.
They are initialize with the following function:
</p>
<ul class="org-ul">
2021-01-08 15:34:53 +01:00
<li><code>initializeCylindricalStruts</code> (<a href="#org92cf424">link</a>): the two parts of each strut are supposed to by cylindrical. We can set the mass and geometry of both strut parts.</li>
</ul>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgdb5d038" class="outline-2">
<h2 id="orgdb5d038"><span class="section-number-2">3</span> Definition of the stiffness and damping of the joints</h2>
2020-02-11 15:50:52 +01:00
<div class="outline-text-2" id="text-3">
<p>
2021-01-08 15:34:53 +01:00
<a id="orgbc31729"></a>
</p>
<p>
The global stiffness and damping of the Stewart platform depends on its geometry but also on the stiffness and damping of:
</p>
<ul class="org-ul">
<li>the actuator because of the finite stiffness of the actuator / linear guide</li>
<li>the spherical joints</li>
</ul>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org3b9ead4" class="outline-3">
<h3 id="org3b9ead4"><span class="section-number-3">3.1</span> Stiffness and Damping of the Actuator</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-3-1">
<p>
2021-01-08 15:34:53 +01:00
Each Actuator is modeled by 3 elements in parallel (Figure <a href="#org1ccacc2">4</a>):
</p>
<ul class="org-ul">
<li>A spring with a stiffness \(k_{i}\)</li>
<li>A dashpot with a damping \(c_{i}\)</li>
<li>An ideal force actuator generating a force \(\tau_i\)</li>
</ul>
2021-01-08 15:34:53 +01:00
<div id="org1ccacc2" class="figure">
<p><img src="figs/stewart_platform_actuator.png" alt="stewart_platform_actuator.png" />
</p>
<p><span class="figure-number">Figure 4: </span>Model of the Stewart platform actuator</p>
</div>
<p>
2021-01-08 15:34:53 +01:00
The initialization of the stiffness and damping properties of the actuators is done with the <code>initializeStrutDynamics</code> (<a href="#org7b87b53">link</a>).
</p>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgaf5b761" class="outline-3">
<h3 id="orgaf5b761"><span class="section-number-3">3.2</span> Stiffness and Damping of the Spherical Joints</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-3-2">
<p>
Even though we often suppose that the spherical joint are perfect in the sense that we neglect its stiffness and damping, we can set some rotation stiffness and damping of each of the spherical/universal joints.
</p>
<p>
2021-01-08 15:34:53 +01:00
This is done with the <code>initializeJointDynamics</code> function (<a href="#org60f3527">link</a>).
</p>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org0d823ef" class="outline-2">
<h2 id="org0d823ef"><span class="section-number-2">4</span> Summary of the Initialization Procedure and Matlab Example</h2>
2020-02-11 15:50:52 +01:00
<div class="outline-text-2" id="text-4">
<p>
2021-01-08 15:34:53 +01:00
<a id="orge881ef0"></a>
</p>
<p>
The procedure to define the Stewart platform is the following:
</p>
<ol class="org-ol">
2020-01-28 17:18:10 +01:00
<li>Define the initial position of frames \(\{A\}\), \(\{B\}\), \(\{F\}\) and \(\{M\}\).
We do that using the <code>initializeFramesPositions</code> function.
2020-01-28 17:18:10 +01:00
We have to specify the total height of the Stewart platform \(H\) and the position \({}^{M}\bm{O}_{B}\) of \(\{B\}\) with respect to \(\{M\}\).</li>
<li>Compute the positions of joints \({}^{F}\bm{a}_{i}\) and \({}^{M}\bm{b}_{i}\).
We can do that using various methods depending on the wanted architecture:
<ul class="org-ul">
<li><code>generateCubicConfiguration</code> permits to generate a cubic configuration</li>
</ul></li>
<li>Compute the position and orientation of the joints with respect to the fixed base and the moving platform.
This is done with the <code>computeJointsPose</code> function.
If wanted, compute the rest position of each strut to have the wanted pose of the mobile platform with the function <code>initializeStewartPose</code>.</li>
<li>Define the mass and inertia of each element of the Stewart platform with the <code>initializeCylindricalPlatforms</code> and <code>initializeCylindricalStruts</code></li>
<li>Define the dynamical properties of the Stewart platform by setting the stiffness and damping of the actuators and joints.</li>
</ol>
<p>
By following this procedure, we obtain a Matlab structure <code>stewart</code> that contains all the information for the Simscape model and for further analysis.
</p>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org64b43bc" class="outline-3">
<h3 id="org64b43bc"><span class="section-number-3">4.1</span> Example of the initialization of a Stewart Platform</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-4-1">
<p>
Let&rsquo;s first define the Stewart Platform Geometry.
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStewartPose(stewart, <span class="org-string">'AP'</span>, [0;0;0], <span class="org-string">'ARB'</span>, eye(3));
</pre>
</div>
<p>
Then, define the inertia and geometry of the fixed base, mobile platform and struts.
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
</pre>
</div>
<p>
We initialize the strut stiffness and damping properties.
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, 1e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'C'</span>, 1e2<span class="org-type">*</span>ones(6,1));
stewart = initializeAmplifiedStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart);
</pre>
</div>
<p>
And finally the inertial sensors included in each strut.
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
</pre>
</div>
<p>
The obtained <code>stewart</code> Matlab structure contains all the information for analysis of the Stewart platform and for simulations using Simscape.
</p>
<p>
The function <code>displayArchitecture</code> can be used to display the current Stewart configuration:
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">displayArchitecture(stewart, <span class="org-string">'views'</span>, <span class="org-string">'all'</span>);
</pre>
</div>
2021-01-08 15:34:53 +01:00
<div id="org6237552" class="figure">
<p><img src="figs/stewart_architecture_example.png" alt="stewart_architecture_example.png" />
</p>
<p><span class="figure-number">Figure 5: </span>Display of the current Stewart platform architecture (<a href="./figs/stewart_architecture_example.png">png</a>, <a href="./figs/stewart_architecture_example.pdf">pdf</a>)</p>
</div>
<p>
There are many options to show or hides elements such as labels and frames.
2021-01-08 15:34:53 +01:00
The documentation of the function is available <a href="#org2878132">here</a>.
</p>
<p>
Let&rsquo;s now move a little bit the top platform and re-display the configuration:
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">tx = 0.1; <span class="org-comment">% [rad]</span>
ty = 0.2; <span class="org-comment">% [rad]</span>
tz = 0.05; <span class="org-comment">% [rad]</span>
2021-01-08 15:54:58 +01:00
Rx = [1 0 0;
0 cos(tx) <span class="org-type">-</span>sin(tx);
0 sin(tx) cos(tx)];
2021-01-08 15:54:58 +01:00
Ry = [ cos(ty) 0 sin(ty);
0 1 0;
<span class="org-type">-</span>sin(ty) 0 cos(ty)];
2021-01-08 15:54:58 +01:00
Rz = [cos(tz) <span class="org-type">-</span>sin(tz) 0;
sin(tz) cos(tz) 0;
0 0 1];
2021-01-08 15:54:58 +01:00
ARB = Rz<span class="org-type">*</span>Ry<span class="org-type">*</span>Rx;
AP = [0.08; 0; 0]; <span class="org-comment">% [m]</span>
2021-01-08 15:54:58 +01:00
displayArchitecture(stewart, <span class="org-string">'AP'</span>, AP, <span class="org-string">'ARB'</span>, ARB);
view([0 <span class="org-type">-</span>1 0]);
</pre>
</div>
2021-01-08 15:34:53 +01:00
<div id="org3cc8e21" class="figure">
<p><img src="figs/stewart_architecture_example_pose.png" alt="stewart_architecture_example_pose.png" />
</p>
<p><span class="figure-number">Figure 6: </span>Display of the Stewart platform architecture at some defined pose (<a href="./figs/stewart_architecture_example_pose.png">png</a>, <a href="./figs/stewart_architecture_example_pose.pdf">pdf</a>)</p>
</div>
<p>
One can also use the <code>describeStewartPlatform</code> function to have a description of the current Stewart platform&rsquo;s state.
</p>
2021-01-08 15:54:58 +01:00
<pre class="example" id="orgafa099e">
describeStewartPlatform(stewart)
GEOMETRY:
- The height between the fixed based and the top platform is 90 [mm].
- Frame {A} is located 45 [mm] above the top platform.
- The initial length of the struts are:
95.2, 95.2, 95.2, 95.2, 95.2, 95.2 [mm]
ACTUATORS:
- The actuators are mechanicaly amplified.
- The vertical stiffness and damping contribution of the piezoelectric stack is:
ka = 2e+07 [N/m] ca = 1e+01 [N/(m/s)]
- Vertical stiffness when the piezoelectric stack is removed is:
kr = 5e+06 [N/m] cr = 1e+01 [N/(m/s)]
JOINTS:
- The joints on the fixed based are universal joints
- The joints on the mobile based are spherical joints
- The position of the joints on the fixed based with respect to {F} are (in [mm]):
113 -20 15
113 20 15
-39.3 108 15
-73.9 88.1 15
-73.9 -88.1 15
-39.3 -108 15
- The position of the joints on the mobile based with respect to {M} are (in [mm]):
57.9 -68.9 -15
57.9 68.9 -15
30.8 84.6 -15
-88.6 15.6 -15
-88.6 -15.6 -15
30.8 -84.6 -15
KINEMATICS:
'org_babel_eoe'
ans =
'org_babel_eoe'
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org6feaead" class="outline-2">
<h2 id="org6feaead"><span class="section-number-2">5</span> Functions</h2>
2020-02-11 15:50:52 +01:00
<div class="outline-text-2" id="text-5">
<p>
2021-01-08 15:34:53 +01:00
<a id="orgc1976a8"></a>
</p>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgb54aa6c" class="outline-3">
<h3 id="orgb54aa6c"><span class="section-number-3">5.1</span> <code>initializeStewartPlatform</code>: Initialize the Stewart Platform structure</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-5-1">
<p>
2021-01-08 15:34:53 +01:00
<a id="orgc3463e5"></a>
</p>
<p>
2020-02-11 18:04:45 +01:00
This Matlab function is accessible <a href="../src/initializeStewartPlatform.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org74e4b19" class="outline-4">
<h4 id="org74e4b19">Documentation</h4>
<div class="outline-text-4" id="text-org74e4b19">
2021-01-08 15:54:58 +01:00
<div id="orgf30011a" class="figure">
<p><img src="figs/stewart-frames-position.png" alt="stewart-frames-position.png" />
</p>
<p><span class="figure-number">Figure 7: </span>Definition of the position of the frames</p>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org4c43493" class="outline-4">
<h4 id="org4c43493">Function description</h4>
<div class="outline-text-4" id="text-org4c43493">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeStewartPlatform</span>()
<span class="org-comment">% initializeStewartPlatform - Initialize the stewart structure</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [stewart] = initializeStewartPlatform(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - stewart - A structure with the following sub-structures:</span>
<span class="org-comment">% - platform_F -</span>
<span class="org-comment">% - platform_M -</span>
<span class="org-comment">% - joints_F -</span>
<span class="org-comment">% - joints_M -</span>
<span class="org-comment">% - struts_F -</span>
<span class="org-comment">% - struts_M -</span>
<span class="org-comment">% - actuators -</span>
<span class="org-comment">% - geometry -</span>
<span class="org-comment">% - properties -</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgc4197aa" class="outline-4">
<h4 id="orgc4197aa">Initialize the Stewart structure</h4>
<div class="outline-text-4" id="text-orgc4197aa">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart = struct();
stewart.platform_F = struct();
stewart.platform_M = struct();
stewart.joints_F = struct();
stewart.joints_M = struct();
stewart.struts_F = struct();
stewart.struts_M = struct();
stewart.actuators = struct();
stewart.sensors = struct();
stewart.sensors.inertial = struct();
stewart.sensors.force = struct();
stewart.sensors.relative = struct();
stewart.geometry = struct();
stewart.kinematics = struct();
</pre>
</div>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org1a8cfde" class="outline-3">
<h3 id="org1a8cfde"><span class="section-number-3">5.2</span> <code>initializeFramesPositions</code>: Initialize the positions of frames {A}, {B}, {F} and {M}</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-5-2">
<p>
2021-01-08 15:34:53 +01:00
<a id="org937f0f9"></a>
</p>
<p>
2020-02-11 18:04:45 +01:00
This Matlab function is accessible <a href="../src/initializeFramesPositions.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org330eb42" class="outline-4">
<h4 id="org330eb42">Documentation</h4>
<div class="outline-text-4" id="text-org330eb42">
2021-01-08 15:54:58 +01:00
<div id="org6ed01c7" class="figure">
<p><img src="figs/stewart-frames-position.png" alt="stewart-frames-position.png" />
</p>
<p><span class="figure-number">Figure 8: </span>Definition of the position of the frames</p>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orgff06721" class="outline-4">
<h4 id="orgff06721">Function description</h4>
<div class="outline-text-4" id="text-orgff06721">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeFramesPositions</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% initializeFramesPositions - Initialize the positions of frames {A}, {B}, {F} and {M}</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [stewart] = initializeFramesPositions(stewart, args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - args - Can have the following fields:</span>
<span class="org-comment">% - H [1x1] - Total Height of the Stewart Platform (height from {F} to {M}) [m]</span>
<span class="org-comment">% - MO_B [1x1] - Height of the frame {B} with respect to {M} [m]</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - stewart - A structure with the following fields:</span>
<span class="org-comment">% - geometry.H [1x1] - Total Height of the Stewart Platform [m]</span>
<span class="org-comment">% - geometry.FO_M [3x1] - Position of {M} with respect to {F} [m]</span>
<span class="org-comment">% - platform_M.MO_B [3x1] - Position of {B} with respect to {M} [m]</span>
<span class="org-comment">% - platform_F.FO_A [3x1] - Position of {A} with respect to {F} [m]</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org55b09bc" class="outline-4">
<h4 id="org55b09bc">Optional Parameters</h4>
<div class="outline-text-4" id="text-org55b09bc">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-variable-name">args</span>.H (1,1) double {mustBeNumeric, mustBePositive} = 90e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.MO_B (1,1) double {mustBeNumeric} = 50e<span class="org-type">-</span>3
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgf345222" class="outline-4">
<h4 id="orgf345222">Compute the position of each frame</h4>
<div class="outline-text-4" id="text-orgf345222">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">H = args.H; <span class="org-comment">% Total Height of the Stewart Platform [m]</span>
2021-01-08 15:54:58 +01:00
FO_M = [0; 0; H]; <span class="org-comment">% Position of {M} with respect to {F} [m]</span>
2021-01-08 15:54:58 +01:00
MO_B = [0; 0; args.MO_B]; <span class="org-comment">% Position of {B} with respect to {M} [m]</span>
2021-01-08 15:54:58 +01:00
FO_A = MO_B <span class="org-type">+</span> FO_M; <span class="org-comment">% Position of {A} with respect to {F} [m]</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orgc8f8c81" class="outline-4">
<h4 id="orgc8f8c81">Populate the <code>stewart</code> structure</h4>
<div class="outline-text-4" id="text-orgc8f8c81">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.geometry.H = H;
stewart.geometry.FO_M = FO_M;
stewart.platform_M.MO_B = MO_B;
stewart.platform_F.FO_A = FO_A;
</pre>
</div>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org33634da" class="outline-3">
<h3 id="org33634da"><span class="section-number-3">5.3</span> <code>generateGeneralConfiguration</code>: Generate a Very General Configuration</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-5-3">
<p>
2021-01-08 15:34:53 +01:00
<a id="orge6afa82"></a>
</p>
<p>
2020-02-11 18:04:45 +01:00
This Matlab function is accessible <a href="../src/generateGeneralConfiguration.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org1bdb691" class="outline-4">
<h4 id="org1bdb691">Documentation</h4>
<div class="outline-text-4" id="text-org1bdb691">
<p>
Joints are positions on a circle centered with the Z axis of {F} and {M} and at a chosen distance from {F} and {M}.
2021-01-08 15:34:53 +01:00
The radius of the circles can be chosen as well as the angles where the joints are located (see Figure <a href="#orgc69617b">9</a>).
</p>
2021-01-08 15:34:53 +01:00
<div id="orgc69617b" class="figure">
<p><img src="figs/stewart_bottom_plate.png" alt="stewart_bottom_plate.png" />
</p>
<p><span class="figure-number">Figure 9: </span>Position of the joints</p>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orgf228191" class="outline-4">
<h4 id="orgf228191">Function description</h4>
<div class="outline-text-4" id="text-orgf228191">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">generateGeneralConfiguration</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% generateGeneralConfiguration - Generate a Very General Configuration</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [stewart] = generateGeneralConfiguration(stewart, args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - args - Can have the following fields:</span>
<span class="org-comment">% - FH [1x1] - Height of the position of the fixed joints with respect to the frame {F} [m]</span>
<span class="org-comment">% - FR [1x1] - Radius of the position of the fixed joints in the X-Y [m]</span>
<span class="org-comment">% - FTh [6x1] - Angles of the fixed joints in the X-Y plane with respect to the X axis [rad]</span>
<span class="org-comment">% - MH [1x1] - Height of the position of the mobile joints with respect to the frame {M} [m]</span>
<span class="org-comment">% - FR [1x1] - Radius of the position of the mobile joints in the X-Y [m]</span>
<span class="org-comment">% - MTh [6x1] - Angles of the mobile joints in the X-Y plane with respect to the X axis [rad]</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
<span class="org-comment">% - platform_F.Fa [3x6] - Its i'th column is the position vector of joint ai with respect to {F}</span>
<span class="org-comment">% - platform_M.Mb [3x6] - Its i'th column is the position vector of joint bi with respect to {M}</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org1649de8" class="outline-4">
<h4 id="org1649de8">Optional Parameters</h4>
<div class="outline-text-4" id="text-org1649de8">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-variable-name">args</span>.FH (1,1) double {mustBeNumeric, mustBePositive} = 15e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.FR (1,1) double {mustBeNumeric, mustBePositive} = 115e<span class="org-type">-</span>3;
<span class="org-variable-name">args</span>.FTh (6,1) double {mustBeNumeric} = [<span class="org-type">-</span>10, 10, 120<span class="org-type">-</span>10, 120<span class="org-type">+</span>10, 240<span class="org-type">-</span>10, 240<span class="org-type">+</span>10]<span class="org-type">*</span>(<span class="org-constant">pi</span><span class="org-type">/</span>180);
<span class="org-variable-name">args</span>.MH (1,1) double {mustBeNumeric, mustBePositive} = 15e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.MR (1,1) double {mustBeNumeric, mustBePositive} = 90e<span class="org-type">-</span>3;
<span class="org-variable-name">args</span>.MTh (6,1) double {mustBeNumeric} = [<span class="org-type">-</span>60<span class="org-type">+</span>10, 60<span class="org-type">-</span>10, 60<span class="org-type">+</span>10, 180<span class="org-type">-</span>10, 180<span class="org-type">+</span>10, <span class="org-type">-</span>60<span class="org-type">-</span>10]<span class="org-type">*</span>(<span class="org-constant">pi</span><span class="org-type">/</span>180);
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgac7b186" class="outline-4">
<h4 id="orgac7b186">Compute the pose</h4>
<div class="outline-text-4" id="text-orgac7b186">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">Fa = zeros(3,6);
Mb = zeros(3,6);
</pre>
</div>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
2021-01-08 15:34:53 +01:00
Fa(<span class="org-type">:</span>,<span class="org-constant">i</span>) = [args.FR<span class="org-type">*</span>cos(args.FTh(<span class="org-constant">i</span>)); args.FR<span class="org-type">*</span>sin(args.FTh(<span class="org-constant">i</span>)); args.FH];
Mb(<span class="org-type">:</span>,<span class="org-constant">i</span>) = [args.MR<span class="org-type">*</span>cos(args.MTh(<span class="org-constant">i</span>)); args.MR<span class="org-type">*</span>sin(args.MTh(<span class="org-constant">i</span>)); <span class="org-type">-</span>args.MH];
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org8e5b4b1" class="outline-4">
<h4 id="org8e5b4b1">Populate the <code>stewart</code> structure</h4>
<div class="outline-text-4" id="text-org8e5b4b1">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.platform_F.Fa = Fa;
stewart.platform_M.Mb = Mb;
</pre>
</div>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orga24b055" class="outline-3">
<h3 id="orga24b055"><span class="section-number-3">5.4</span> <code>computeJointsPose</code>: Compute the Pose of the Joints</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-5-4">
<p>
2021-01-08 15:34:53 +01:00
<a id="org1ea8332"></a>
</p>
<p>
2020-02-11 18:04:45 +01:00
This Matlab function is accessible <a href="../src/computeJointsPose.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orge8578cb" class="outline-4">
<h4 id="orge8578cb">Documentation</h4>
<div class="outline-text-4" id="text-orge8578cb">
2021-01-08 15:34:53 +01:00
<div id="org0364bc3" class="figure">
<p><img src="figs/stewart-struts.png" alt="stewart-struts.png" />
</p>
<p><span class="figure-number">Figure 10: </span>Position and orientation of the struts</p>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orge186927" class="outline-4">
<h4 id="orge186927">Function description</h4>
<div class="outline-text-4" id="text-orge186927">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">computeJointsPose</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% computeJointsPose -</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [stewart] = computeJointsPose(stewart, args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - stewart - A structure with the following fields</span>
<span class="org-comment">% - platform_F.Fa [3x6] - Its i'th column is the position vector of joint ai with respect to {F}</span>
<span class="org-comment">% - platform_M.Mb [3x6] - Its i'th column is the position vector of joint bi with respect to {M}</span>
<span class="org-comment">% - platform_F.FO_A [3x1] - Position of {A} with respect to {F}</span>
<span class="org-comment">% - platform_M.MO_B [3x1] - Position of {B} with respect to {M}</span>
<span class="org-comment">% - geometry.FO_M [3x1] - Position of {M} with respect to {F}</span>
<span class="org-comment">% - args - Can have the following fields:</span>
<span class="org-comment">% - AP [3x1] - The wanted position of {B} with respect to {A}</span>
<span class="org-comment">% - ARB [3x3] - The rotation matrix that gives the wanted orientation of {B} with respect to {A}</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - stewart - A structure with the following added fields</span>
<span class="org-comment">% - geometry.Aa [3x6] - The i'th column is the position of ai with respect to {A}</span>
<span class="org-comment">% - geometry.Ab [3x6] - The i'th column is the position of bi with respect to {A}</span>
<span class="org-comment">% - geometry.Ba [3x6] - The i'th column is the position of ai with respect to {B}</span>
<span class="org-comment">% - geometry.Bb [3x6] - The i'th column is the position of bi with respect to {B}</span>
<span class="org-comment">% - geometry.l [6x1] - The i'th element is the initial length of strut i</span>
<span class="org-comment">% - geometry.As [3x6] - The i'th column is the unit vector of strut i expressed in {A}</span>
<span class="org-comment">% - geometry.Bs [3x6] - The i'th column is the unit vector of strut i expressed in {B}</span>
<span class="org-comment">% - struts_F.l [6x1] - Length of the Fixed part of the i'th strut</span>
<span class="org-comment">% - struts_M.l [6x1] - Length of the Mobile part of the i'th strut</span>
<span class="org-comment">% - platform_F.FRa [3x3x6] - The i'th 3x3 array is the rotation matrix to orientate the bottom of the i'th strut from {F}</span>
<span class="org-comment">% - platform_M.MRb [3x3x6] - The i'th 3x3 array is the rotation matrix to orientate the top of the i'th strut from {M}</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orgc451919" class="outline-4">
<h4 id="orgc451919">Optional Parameters</h4>
<div class="outline-text-4" id="text-orgc451919">
2020-08-05 16:23:11 +02:00
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-variable-name">args</span>.AP (3,1) double {mustBeNumeric} = zeros(3,1)
<span class="org-variable-name">args</span>.ARB (3,3) double {mustBeNumeric} = eye(3)
<span class="org-keyword">end</span>
2020-08-05 16:23:11 +02:00
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org8f74792" class="outline-4">
<h4 id="org8f74792">Check the <code>stewart</code> structure elements</h4>
<div class="outline-text-4" id="text-org8f74792">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">assert(isfield(stewart.platform_F, <span class="org-string">'Fa'</span>), <span class="org-string">'stewart.platform_F should have attribute Fa'</span>)
Fa = stewart.platform_F.Fa;
2021-01-08 15:54:58 +01:00
assert(isfield(stewart.platform_M, <span class="org-string">'Mb'</span>), <span class="org-string">'stewart.platform_M should have attribute Mb'</span>)
Mb = stewart.platform_M.Mb;
2021-01-08 15:54:58 +01:00
assert(isfield(stewart.platform_F, <span class="org-string">'FO_A'</span>), <span class="org-string">'stewart.platform_F should have attribute FO_A'</span>)
FO_A = stewart.platform_F.FO_A;
2021-01-08 15:54:58 +01:00
assert(isfield(stewart.platform_M, <span class="org-string">'MO_B'</span>), <span class="org-string">'stewart.platform_M should have attribute MO_B'</span>)
MO_B = stewart.platform_M.MO_B;
2021-01-08 15:54:58 +01:00
assert(isfield(stewart.geometry, <span class="org-string">'FO_M'</span>), <span class="org-string">'stewart.geometry should have attribute FO_M'</span>)
FO_M = stewart.geometry.FO_M;
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org6fa7255" class="outline-4">
<h4 id="org6fa7255">Compute the position of the Joints</h4>
<div class="outline-text-4" id="text-org6fa7255">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">Aa = Fa <span class="org-type">-</span> repmat(FO_A, [1, 6]);
Bb = Mb <span class="org-type">-</span> repmat(MO_B, [1, 6]);
2020-08-05 16:23:11 +02:00
</pre>
</div>
2020-08-05 16:23:11 +02:00
<p>
Original:
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">Ab = Bb <span class="org-type">-</span> repmat(<span class="org-type">-</span>MO_B<span class="org-type">-</span>FO_M<span class="org-type">+</span>FO_A, [1, 6]);
Ba = Aa <span class="org-type">-</span> repmat( MO_B<span class="org-type">+</span>FO_M<span class="org-type">-</span>FO_A, [1, 6]);
</pre>
</div>
2020-08-05 16:23:11 +02:00
<p>
Translation &amp; Rotation: (Rotation and then translation)
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">Ab = args.ARB <span class="org-type">*</span>Bb <span class="org-type">-</span> repmat(<span class="org-type">-</span>args.AP, [1, 6]);
Ba = args.ARB<span class="org-type">'*</span>Aa <span class="org-type">-</span> repmat( args.AP, [1, 6]);
2020-08-05 16:23:11 +02:00
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org775652f" class="outline-4">
<h4 id="org775652f">Compute the strut length and orientation</h4>
<div class="outline-text-4" id="text-org775652f">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">As = (Ab <span class="org-type">-</span> Aa)<span class="org-type">./</span>vecnorm(Ab <span class="org-type">-</span> Aa); <span class="org-comment">% As_i is the i'th vector of As</span>
2021-01-08 15:54:58 +01:00
l = vecnorm(Ab <span class="org-type">-</span> Aa)<span class="org-type">'</span>;
</pre>
</div>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">Bs = (Bb <span class="org-type">-</span> Ba)<span class="org-type">./</span>vecnorm(Bb <span class="org-type">-</span> Ba);
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org343f9a2" class="outline-4">
<h4 id="org343f9a2">Compute the orientation of the Joints</h4>
<div class="outline-text-4" id="text-org343f9a2">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">FRa = zeros(3,3,6);
MRb = zeros(3,3,6);
2021-01-08 15:54:58 +01:00
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
2021-01-08 15:34:53 +01:00
FRa(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = [cross([0;1;0], As(<span class="org-type">:</span>,<span class="org-constant">i</span>)) , cross(As(<span class="org-type">:</span>,<span class="org-constant">i</span>), cross([0;1;0], As(<span class="org-type">:</span>,<span class="org-constant">i</span>))) , As(<span class="org-type">:</span>,<span class="org-constant">i</span>)];
FRa(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = FRa(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>)<span class="org-type">./</span>vecnorm(FRa(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>));
2021-01-08 15:34:53 +01:00
MRb(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = [cross([0;1;0], Bs(<span class="org-type">:</span>,<span class="org-constant">i</span>)) , cross(Bs(<span class="org-type">:</span>,<span class="org-constant">i</span>), cross([0;1;0], Bs(<span class="org-type">:</span>,<span class="org-constant">i</span>))) , Bs(<span class="org-type">:</span>,<span class="org-constant">i</span>)];
MRb(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = MRb(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>)<span class="org-type">./</span>vecnorm(MRb(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>));
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org53f7eca" class="outline-4">
<h4 id="org53f7eca">Populate the <code>stewart</code> structure</h4>
<div class="outline-text-4" id="text-org53f7eca">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.geometry.Aa = Aa;
stewart.geometry.Ab = Ab;
stewart.geometry.Ba = Ba;
stewart.geometry.Bb = Bb;
stewart.geometry.As = As;
stewart.geometry.Bs = Bs;
stewart.geometry.l = l;
2021-01-08 15:54:58 +01:00
stewart.struts_F.l = l<span class="org-type">/</span>2;
stewart.struts_M.l = l<span class="org-type">/</span>2;
2021-01-08 15:54:58 +01:00
stewart.platform_F.FRa = FRa;
stewart.platform_M.MRb = MRb;
</pre>
</div>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org9068596" class="outline-3">
<h3 id="org9068596"><span class="section-number-3">5.5</span> <code>initializeStewartPose</code>: Determine the initial stroke in each leg to have the wanted pose</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-5-5">
<p>
2021-01-08 15:34:53 +01:00
<a id="orgae6d775"></a>
</p>
<p>
2020-02-11 18:04:45 +01:00
This Matlab function is accessible <a href="../src/initializeStewartPose.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org7dee2e6" class="outline-4">
<h4 id="org7dee2e6">Function description</h4>
<div class="outline-text-4" id="text-org7dee2e6">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeStewartPose</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% initializeStewartPose - Determine the initial stroke in each leg to have the wanted pose</span>
<span class="org-comment">% It uses the inverse kinematic</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [stewart] = initializeStewartPose(stewart, args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - stewart - A structure with the following fields</span>
<span class="org-comment">% - Aa [3x6] - The positions ai expressed in {A}</span>
<span class="org-comment">% - Bb [3x6] - The positions bi expressed in {B}</span>
<span class="org-comment">% - args - Can have the following fields:</span>
<span class="org-comment">% - AP [3x1] - The wanted position of {B} with respect to {A}</span>
<span class="org-comment">% - ARB [3x3] - The rotation matrix that gives the wanted orientation of {B} with respect to {A}</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
<span class="org-comment">% - actuators.Leq [6x1] - The 6 needed displacement of the struts from the initial position in [m] to have the wanted pose of {B} w.r.t. {A}</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orgb42495c" class="outline-4">
<h4 id="orgb42495c">Optional Parameters</h4>
<div class="outline-text-4" id="text-orgb42495c">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-variable-name">args</span>.AP (3,1) double {mustBeNumeric} = zeros(3,1)
<span class="org-variable-name">args</span>.ARB (3,3) double {mustBeNumeric} = eye(3)
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org2b0bd7e" class="outline-4">
<h4 id="org2b0bd7e">Use the Inverse Kinematic function</h4>
<div class="outline-text-4" id="text-org2b0bd7e">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">[Li, dLi] = inverseKinematics(stewart, <span class="org-string">'AP'</span>, args.AP, <span class="org-string">'ARB'</span>, args.ARB);
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org4e369d0" class="outline-4">
<h4 id="org4e369d0">Populate the <code>stewart</code> structure</h4>
<div class="outline-text-4" id="text-org4e369d0">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.actuators.Leq = dLi;
</pre>
</div>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org7298863" class="outline-3">
<h3 id="org7298863"><span class="section-number-3">5.6</span> <code>initializeCylindricalPlatforms</code>: Initialize the geometry of the Fixed and Mobile Platforms</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-5-6">
<p>
2021-01-08 15:34:53 +01:00
<a id="org7858fd0"></a>
</p>
<p>
2020-02-11 18:04:45 +01:00
This Matlab function is accessible <a href="../src/initializeCylindricalPlatforms.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orgebd268a" class="outline-4">
<h4 id="orgebd268a">Function description</h4>
<div class="outline-text-4" id="text-orgebd268a">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeCylindricalPlatforms</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% initializeCylindricalPlatforms - Initialize the geometry of the Fixed and Mobile Platforms</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [stewart] = initializeCylindricalPlatforms(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - args - Structure with the following fields:</span>
<span class="org-comment">% - Fpm [1x1] - Fixed Platform Mass [kg]</span>
<span class="org-comment">% - Fph [1x1] - Fixed Platform Height [m]</span>
<span class="org-comment">% - Fpr [1x1] - Fixed Platform Radius [m]</span>
<span class="org-comment">% - Mpm [1x1] - Mobile Platform Mass [kg]</span>
<span class="org-comment">% - Mph [1x1] - Mobile Platform Height [m]</span>
<span class="org-comment">% - Mpr [1x1] - Mobile Platform Radius [m]</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
<span class="org-comment">% - platform_F [struct] - structure with the following fields:</span>
<span class="org-comment">% - type = 1</span>
<span class="org-comment">% - M [1x1] - Fixed Platform Mass [kg]</span>
<span class="org-comment">% - I [3x3] - Fixed Platform Inertia matrix [kg*m^2]</span>
<span class="org-comment">% - H [1x1] - Fixed Platform Height [m]</span>
<span class="org-comment">% - R [1x1] - Fixed Platform Radius [m]</span>
<span class="org-comment">% - platform_M [struct] - structure with the following fields:</span>
<span class="org-comment">% - M [1x1] - Mobile Platform Mass [kg]</span>
<span class="org-comment">% - I [3x3] - Mobile Platform Inertia matrix [kg*m^2]</span>
<span class="org-comment">% - H [1x1] - Mobile Platform Height [m]</span>
<span class="org-comment">% - R [1x1] - Mobile Platform Radius [m]</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org09ca288" class="outline-4">
<h4 id="org09ca288">Optional Parameters</h4>
<div class="outline-text-4" id="text-org09ca288">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-variable-name">args</span>.Fpm (1,1) double {mustBeNumeric, mustBePositive} = 1
<span class="org-variable-name">args</span>.Fph (1,1) double {mustBeNumeric, mustBePositive} = 10e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.Fpr (1,1) double {mustBeNumeric, mustBePositive} = 125e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.Mpm (1,1) double {mustBeNumeric, mustBePositive} = 1
<span class="org-variable-name">args</span>.Mph (1,1) double {mustBeNumeric, mustBePositive} = 10e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.Mpr (1,1) double {mustBeNumeric, mustBePositive} = 100e<span class="org-type">-</span>3
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgca11714" class="outline-4">
<h4 id="orgca11714">Compute the Inertia matrices of platforms</h4>
<div class="outline-text-4" id="text-orgca11714">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">I_F = diag([1<span class="org-type">/</span>12<span class="org-type">*</span>args.Fpm <span class="org-type">*</span> (3<span class="org-type">*</span>args.Fpr<span class="org-type">^</span>2 <span class="org-type">+</span> args.Fph<span class="org-type">^</span>2), ...
1<span class="org-type">/</span>12<span class="org-type">*</span>args.Fpm <span class="org-type">*</span> (3<span class="org-type">*</span>args.Fpr<span class="org-type">^</span>2 <span class="org-type">+</span> args.Fph<span class="org-type">^</span>2), ...
1<span class="org-type">/</span>2 <span class="org-type">*</span>args.Fpm <span class="org-type">*</span> args.Fpr<span class="org-type">^</span>2]);
</pre>
</div>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">I_M = diag([1<span class="org-type">/</span>12<span class="org-type">*</span>args.Mpm <span class="org-type">*</span> (3<span class="org-type">*</span>args.Mpr<span class="org-type">^</span>2 <span class="org-type">+</span> args.Mph<span class="org-type">^</span>2), ...
1<span class="org-type">/</span>12<span class="org-type">*</span>args.Mpm <span class="org-type">*</span> (3<span class="org-type">*</span>args.Mpr<span class="org-type">^</span>2 <span class="org-type">+</span> args.Mph<span class="org-type">^</span>2), ...
1<span class="org-type">/</span>2 <span class="org-type">*</span>args.Mpm <span class="org-type">*</span> args.Mpr<span class="org-type">^</span>2]);
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org6da802f" class="outline-4">
<h4 id="org6da802f">Populate the <code>stewart</code> structure</h4>
<div class="outline-text-4" id="text-org6da802f">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.platform_F.type = 1;
2021-01-08 15:54:58 +01:00
stewart.platform_F.I = I_F;
stewart.platform_F.M = args.Fpm;
stewart.platform_F.R = args.Fpr;
stewart.platform_F.H = args.Fph;
</pre>
</div>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.platform_M.type = 1;
2021-01-08 15:54:58 +01:00
stewart.platform_M.I = I_M;
stewart.platform_M.M = args.Mpm;
stewart.platform_M.R = args.Mpr;
stewart.platform_M.H = args.Mph;
</pre>
</div>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgca778d6" class="outline-3">
<h3 id="orgca778d6"><span class="section-number-3">5.7</span> <code>initializeSolidPlatforms</code>: Initialize the geometry of the Fixed and Mobile Platforms</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-5-7">
<p>
2021-01-08 15:34:53 +01:00
<a id="orgcbd5aad"></a>
</p>
<p>
This Matlab function is accessible <a href="../src/initializeSolidPlatforms.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org86c0034" class="outline-4">
<h4 id="org86c0034">Function description</h4>
<div class="outline-text-4" id="text-org86c0034">
2021-01-08 15:34:53 +01:00
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeSolidPlatforms</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% initializeSolidPlatforms - Initialize the geometry of the Fixed and Mobile Platforms</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [stewart] = initializeSolidPlatforms(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - args - Structure with the following fields:</span>
<span class="org-comment">% - density [1x1] - Density of the platforms [kg]</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
<span class="org-comment">% - platform_F [struct] - structure with the following fields:</span>
<span class="org-comment">% - type = 2</span>
<span class="org-comment">% - M [1x1] - Fixed Platform Density [kg/m^3]</span>
<span class="org-comment">% - platform_M [struct] - structure with the following fields:</span>
<span class="org-comment">% - type = 2</span>
<span class="org-comment">% - M [1x1] - Mobile Platform Density [kg/m^3]</span>
2021-01-08 15:34:53 +01:00
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orgc33373b" class="outline-4">
<h4 id="orgc33373b">Optional Parameters</h4>
<div class="outline-text-4" id="text-orgc33373b">
2021-01-08 15:34:53 +01:00
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-variable-name">args</span>.density (1,1) double {mustBeNumeric, mustBePositive} = 7800
<span class="org-keyword">end</span>
2021-01-08 15:34:53 +01:00
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org77f8572" class="outline-4">
<h4 id="org77f8572">Populate the <code>stewart</code> structure</h4>
<div class="outline-text-4" id="text-org77f8572">
2021-01-08 15:34:53 +01:00
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.platform_F.type = 2;
2021-01-08 15:34:53 +01:00
2021-01-08 15:54:58 +01:00
stewart.platform_F.density = args.density;
2021-01-08 15:34:53 +01:00
</pre>
</div>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.platform_M.type = 2;
2021-01-08 15:34:53 +01:00
2021-01-08 15:54:58 +01:00
stewart.platform_M.density = args.density;
2021-01-08 15:34:53 +01:00
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgc775d7a" class="outline-3">
<h3 id="orgc775d7a"><span class="section-number-3">5.8</span> <code>initializeCylindricalStruts</code>: Define the inertia of cylindrical struts</h3>
<div class="outline-text-3" id="text-5-8">
<p>
<a id="org92cf424"></a>
</p>
<p>
2020-02-11 18:04:45 +01:00
This Matlab function is accessible <a href="../src/initializeCylindricalStruts.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orgb76c373" class="outline-4">
<h4 id="orgb76c373">Function description</h4>
<div class="outline-text-4" id="text-orgb76c373">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeCylindricalStruts</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% initializeCylindricalStruts - Define the mass and moment of inertia of cylindrical struts</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [stewart] = initializeCylindricalStruts(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - args - Structure with the following fields:</span>
<span class="org-comment">% - Fsm [1x1] - Mass of the Fixed part of the struts [kg]</span>
<span class="org-comment">% - Fsh [1x1] - Height of cylinder for the Fixed part of the struts [m]</span>
<span class="org-comment">% - Fsr [1x1] - Radius of cylinder for the Fixed part of the struts [m]</span>
<span class="org-comment">% - Msm [1x1] - Mass of the Mobile part of the struts [kg]</span>
<span class="org-comment">% - Msh [1x1] - Height of cylinder for the Mobile part of the struts [m]</span>
<span class="org-comment">% - Msr [1x1] - Radius of cylinder for the Mobile part of the struts [m]</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
<span class="org-comment">% - struts_F [struct] - structure with the following fields:</span>
<span class="org-comment">% - M [6x1] - Mass of the Fixed part of the struts [kg]</span>
<span class="org-comment">% - I [3x3x6] - Moment of Inertia for the Fixed part of the struts [kg*m^2]</span>
<span class="org-comment">% - H [6x1] - Height of cylinder for the Fixed part of the struts [m]</span>
<span class="org-comment">% - R [6x1] - Radius of cylinder for the Fixed part of the struts [m]</span>
<span class="org-comment">% - struts_M [struct] - structure with the following fields:</span>
<span class="org-comment">% - M [6x1] - Mass of the Mobile part of the struts [kg]</span>
<span class="org-comment">% - I [3x3x6] - Moment of Inertia for the Mobile part of the struts [kg*m^2]</span>
<span class="org-comment">% - H [6x1] - Height of cylinder for the Mobile part of the struts [m]</span>
<span class="org-comment">% - R [6x1] - Radius of cylinder for the Mobile part of the struts [m]</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orge43ae28" class="outline-4">
<h4 id="orge43ae28">Optional Parameters</h4>
<div class="outline-text-4" id="text-orge43ae28">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-variable-name">args</span>.type_F char {mustBeMember(args.type_F,{<span class="org-string">'cylindrical'</span>, <span class="org-string">'none'</span>})} = <span class="org-string">'cylindrical'</span>
<span class="org-variable-name">args</span>.type_M char {mustBeMember(args.type_M,{<span class="org-string">'cylindrical'</span>, <span class="org-string">'none'</span>})} = <span class="org-string">'cylindrical'</span>
<span class="org-variable-name">args</span>.Fsm (1,1) double {mustBeNumeric, mustBePositive} = 0.1
<span class="org-variable-name">args</span>.Fsh (1,1) double {mustBeNumeric, mustBePositive} = 50e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.Fsr (1,1) double {mustBeNumeric, mustBePositive} = 5e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.Msm (1,1) double {mustBeNumeric, mustBePositive} = 0.1
<span class="org-variable-name">args</span>.Msh (1,1) double {mustBeNumeric, mustBePositive} = 50e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.Msr (1,1) double {mustBeNumeric, mustBePositive} = 5e<span class="org-type">-</span>3
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orge60177a" class="outline-4">
<h4 id="orge60177a">Compute the properties of the cylindrical struts</h4>
<div class="outline-text-4" id="text-orge60177a">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">Fsm = ones(6,1)<span class="org-type">.*</span>args.Fsm;
Fsh = ones(6,1)<span class="org-type">.*</span>args.Fsh;
Fsr = ones(6,1)<span class="org-type">.*</span>args.Fsr;
2021-01-08 15:54:58 +01:00
Msm = ones(6,1)<span class="org-type">.*</span>args.Msm;
Msh = ones(6,1)<span class="org-type">.*</span>args.Msh;
Msr = ones(6,1)<span class="org-type">.*</span>args.Msr;
</pre>
</div>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">I_F = zeros(3, 3, 6); <span class="org-comment">% Inertia of the "fixed" part of the strut</span>
I_M = zeros(3, 3, 6); <span class="org-comment">% Inertia of the "mobile" part of the strut</span>
2021-01-08 15:54:58 +01:00
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
2021-01-08 15:34:53 +01:00
I_F(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = diag([1<span class="org-type">/</span>12 <span class="org-type">*</span> Fsm(<span class="org-constant">i</span>) <span class="org-type">*</span> (3<span class="org-type">*</span>Fsr(<span class="org-constant">i</span>)<span class="org-type">^</span>2 <span class="org-type">+</span> Fsh(<span class="org-constant">i</span>)<span class="org-type">^</span>2), ...
1<span class="org-type">/</span>12 <span class="org-type">*</span> Fsm(<span class="org-constant">i</span>) <span class="org-type">*</span> (3<span class="org-type">*</span>Fsr(<span class="org-constant">i</span>)<span class="org-type">^</span>2 <span class="org-type">+</span> Fsh(<span class="org-constant">i</span>)<span class="org-type">^</span>2), ...
1<span class="org-type">/</span>2 <span class="org-type">*</span> Fsm(<span class="org-constant">i</span>) <span class="org-type">*</span> Fsr(<span class="org-constant">i</span>)<span class="org-type">^</span>2]);
2021-01-08 15:34:53 +01:00
I_M(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = diag([1<span class="org-type">/</span>12 <span class="org-type">*</span> Msm(<span class="org-constant">i</span>) <span class="org-type">*</span> (3<span class="org-type">*</span>Msr(<span class="org-constant">i</span>)<span class="org-type">^</span>2 <span class="org-type">+</span> Msh(<span class="org-constant">i</span>)<span class="org-type">^</span>2), ...
1<span class="org-type">/</span>12 <span class="org-type">*</span> Msm(<span class="org-constant">i</span>) <span class="org-type">*</span> (3<span class="org-type">*</span>Msr(<span class="org-constant">i</span>)<span class="org-type">^</span>2 <span class="org-type">+</span> Msh(<span class="org-constant">i</span>)<span class="org-type">^</span>2), ...
1<span class="org-type">/</span>2 <span class="org-type">*</span> Msm(<span class="org-constant">i</span>) <span class="org-type">*</span> Msr(<span class="org-constant">i</span>)<span class="org-type">^</span>2]);
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org641f40c" class="outline-4">
<h4 id="org641f40c">Populate the <code>stewart</code> structure</h4>
<div class="outline-text-4" id="text-org641f40c">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">switch</span> <span class="org-constant">args.type_M</span>
<span class="org-keyword">case</span> <span class="org-string">'cylindrical'</span>
stewart.struts_M.type = 1;
<span class="org-keyword">case</span> <span class="org-string">'none'</span>
stewart.struts_M.type = 2;
<span class="org-keyword">end</span>
2021-01-08 15:54:58 +01:00
stewart.struts_M.I = I_M;
stewart.struts_M.M = Msm;
stewart.struts_M.R = Msr;
stewart.struts_M.H = Msh;
</pre>
</div>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">switch</span> <span class="org-constant">args.type_F</span>
<span class="org-keyword">case</span> <span class="org-string">'cylindrical'</span>
stewart.struts_F.type = 1;
<span class="org-keyword">case</span> <span class="org-string">'none'</span>
stewart.struts_F.type = 2;
<span class="org-keyword">end</span>
2021-01-08 15:54:58 +01:00
stewart.struts_F.I = I_F;
stewart.struts_F.M = Fsm;
stewart.struts_F.R = Fsr;
stewart.struts_F.H = Fsh;
</pre>
</div>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org3ceb0b1" class="outline-3">
<h3 id="org3ceb0b1"><span class="section-number-3">5.9</span> <code>initializeStrutDynamics</code>: Add Stiffness and Damping properties of each strut</h3>
<div class="outline-text-3" id="text-5-9">
<p>
2021-01-08 15:34:53 +01:00
<a id="org7b87b53"></a>
</p>
<p>
2020-02-11 18:04:45 +01:00
This Matlab function is accessible <a href="../src/initializeStrutDynamics.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org8da738a" class="outline-4">
<h4 id="org8da738a">Documentation</h4>
<div class="outline-text-4" id="text-org8da738a">
2021-01-08 15:34:53 +01:00
<div id="org2ee3f84" class="figure">
<p><img src="figs/piezoelectric_stack.jpg" alt="piezoelectric_stack.jpg" width="500px" />
</p>
<p><span class="figure-number">Figure 11: </span>Example of a piezoelectric stach actuator (PI)</p>
</div>
<p>
2021-01-08 15:34:53 +01:00
A simplistic model of such amplified actuator is shown in Figure <a href="#orgabab6cd">12</a> where:
</p>
<ul class="org-ul">
<li>\(K\) represent the vertical stiffness of the actuator</li>
<li>\(C\) represent the vertical damping of the actuator</li>
<li>\(F\) represents the force applied by the actuator</li>
<li>\(F_{m}\) represents the total measured force</li>
<li>\(v_{m}\) represents the absolute velocity of the top part of the actuator</li>
<li>\(d_{m}\) represents the total relative displacement of the actuator</li>
</ul>
2021-01-08 15:34:53 +01:00
<div id="orgabab6cd" class="figure">
<p><img src="figs/actuator_model_simple.png" alt="actuator_model_simple.png" />
</p>
<p><span class="figure-number">Figure 12: </span>Simple model of an Actuator</p>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org24695e2" class="outline-4">
<h4 id="org24695e2">Function description</h4>
<div class="outline-text-4" id="text-org24695e2">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeStrutDynamics</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% initializeStrutDynamics - Add Stiffness and Damping properties of each strut</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [stewart] = initializeStrutDynamics(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - args - Structure with the following fields:</span>
<span class="org-comment">% - K [6x1] - Stiffness of each strut [N/m]</span>
<span class="org-comment">% - C [6x1] - Damping of each strut [N/(m/s)]</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
<span class="org-comment">% - actuators.type = 1</span>
<span class="org-comment">% - actuators.K [6x1] - Stiffness of each strut [N/m]</span>
<span class="org-comment">% - actuators.C [6x1] - Damping of each strut [N/(m/s)]</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orgee73c8b" class="outline-4">
<h4 id="orgee73c8b">Optional Parameters</h4>
<div class="outline-text-4" id="text-orgee73c8b">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-variable-name">args</span>.K (6,1) double {mustBeNumeric, mustBeNonnegative} = 20e6<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.C (6,1) double {mustBeNumeric, mustBeNonnegative} = 2e1<span class="org-type">*</span>ones(6,1)
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org815b218" class="outline-4">
<h4 id="org815b218">Add Stiffness and Damping properties of each strut</h4>
<div class="outline-text-4" id="text-org815b218">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.actuators.type = 1;
2021-01-08 15:54:58 +01:00
stewart.actuators.K = args.K;
stewart.actuators.C = args.C;
</pre>
</div>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org1d017e8" class="outline-3">
<h3 id="org1d017e8"><span class="section-number-3">5.10</span> <code>initializeAmplifiedStrutDynamics</code>: Add Stiffness and Damping properties of each strut for an amplified piezoelectric actuator</h3>
<div class="outline-text-3" id="text-5-10">
<p>
2021-01-08 15:34:53 +01:00
<a id="org541b338"></a>
</p>
<p>
2020-02-11 18:04:45 +01:00
This Matlab function is accessible <a href="../src/initializeAmplifiedStrutDynamics.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org3d661bf" class="outline-4">
<h4 id="org3d661bf">Documentation</h4>
<div class="outline-text-4" id="text-org3d661bf">
<p>
2021-01-08 15:34:53 +01:00
An amplified piezoelectric actuator is shown in Figure <a href="#org2da63e7">13</a>.
</p>
2021-01-08 15:34:53 +01:00
<div id="org2da63e7" class="figure">
<p><img src="figs/amplified_piezo_with_displacement_sensor.jpg" alt="amplified_piezo_with_displacement_sensor.jpg" width="500px" />
</p>
<p><span class="figure-number">Figure 13: </span>Example of an Amplified piezoelectric actuator with an integrated displacement sensor (Cedrat Technologies)</p>
</div>
<p>
2021-01-08 15:34:53 +01:00
A simplistic model of such amplified actuator is shown in Figure <a href="#orgdfe7f38">14</a> where the parameters are described in Table <a href="#org863ee8b">1</a>.
</p>
2021-01-08 15:34:53 +01:00
<table id="org863ee8b" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
2020-09-01 13:19:26 +02:00
<caption class="t-above"><span class="table-number">Table 1:</span> Parameters used for the model of the APA 100M</caption>
<colgroup>
<col class="org-left" />
2020-09-01 13:19:26 +02:00
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">&#xa0;</th>
<th scope="col" class="org-left">Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">\(k_e\)</td>
<td class="org-left">Stiffness used to adjust the pole of the isolator</td>
</tr>
<tr>
<td class="org-left">\(k_1\)</td>
<td class="org-left">Stiffness of the metallic suspension when the stack is removed</td>
</tr>
<tr>
<td class="org-left">\(k_a\)</td>
<td class="org-left">Stiffness of the actuator</td>
</tr>
<tr>
<td class="org-left">\(c_1\)</td>
<td class="org-left">Added viscous damping</td>
</tr>
</tbody>
</table>
2021-01-08 15:34:53 +01:00
<div id="orgdfe7f38" class="figure">
2020-09-01 13:19:26 +02:00
<p><img src="./figs/souleille18_model_piezo.png" alt="souleille18_model_piezo.png" />
</p>
2020-09-01 13:19:26 +02:00
<p><span class="figure-number">Figure 14: </span>Picture of an APA100M from Cedrat Technologies. Simplified model of a one DoF payload mounted on such isolator</p>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org9b51ec8" class="outline-4">
<h4 id="org9b51ec8">Function description</h4>
<div class="outline-text-4" id="text-org9b51ec8">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeAmplifiedStrutDynamics</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% initializeAmplifiedStrutDynamics - Add Stiffness and Damping properties of each strut</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [stewart] = initializeAmplifiedStrutDynamics(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - args - Structure with the following fields:</span>
<span class="org-comment">% - Ka [6x1] - Stiffness of the actuator [N/m]</span>
<span class="org-comment">% - Ke [6x1] - Stiffness used to adjust the pole of the isolator [N/m]</span>
<span class="org-comment">% - K1 [6x1] - Stiffness of the metallic suspension when the stack is removed [N/m]</span>
<span class="org-comment">% - C1 [6x1] - Added viscous damping [N/(m/s)]</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
<span class="org-comment">% - actuators.type = 2</span>
<span class="org-comment">% - actuators.K [6x1] - Total Stiffness of each strut [N/m]</span>
<span class="org-comment">% - actuators.C [6x1] - Total Damping of each strut [N/(m/s)]</span>
<span class="org-comment">% - actuators.Ka [6x1] - Stiffness of the actuator [N/m]</span>
<span class="org-comment">% - actuators.Ke [6x1] - Stiffness used to adjust the pole of the isolator [N/m]</span>
<span class="org-comment">% - actuators.K1 [6x1] - Stiffness of the metallic suspension when the stack is removed [N/m]</span>
<span class="org-comment">% - actuators.C1 [6x1] - Added viscous damping [N/(m/s)]</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org9492e15" class="outline-4">
<h4 id="org9492e15">Optional Parameters</h4>
<div class="outline-text-4" id="text-org9492e15">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-variable-name">args</span>.Ke (6,1) double {mustBeNumeric, mustBeNonnegative} = 1.5e6<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Ka (6,1) double {mustBeNumeric, mustBeNonnegative} = 43e6<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.K1 (6,1) double {mustBeNumeric, mustBeNonnegative} = 0.4e6<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.C1 (6,1) double {mustBeNumeric, mustBeNonnegative} = 10<span class="org-type">*</span>ones(6,1)
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org52a586e" class="outline-4">
<h4 id="org52a586e">Compute the total stiffness and damping</h4>
<div class="outline-text-4" id="text-org52a586e">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">K = args.K1 <span class="org-type">+</span> args.Ka<span class="org-type">.*</span>args.Ke<span class="org-type">./</span>(args.Ka <span class="org-type">+</span> args.Ke);
C = args.C1;
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org80eb3e9" class="outline-4">
<h4 id="org80eb3e9">Populate the <code>stewart</code> structure</h4>
<div class="outline-text-4" id="text-org80eb3e9">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.actuators.type = 2;
2021-01-08 15:54:58 +01:00
stewart.actuators.Ka = args.Ka;
stewart.actuators.Ke = args.Ke;
stewart.actuators.K1 = args.K1;
stewart.actuators.C1 = args.C1;
2021-01-08 15:54:58 +01:00
stewart.actuators.K = K;
stewart.actuators.C = C;
</pre>
</div>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org0d2f9e2" class="outline-3">
<h3 id="org0d2f9e2"><span class="section-number-3">5.11</span> <code>initializeFlexibleStrutDynamics</code>: Model each strut with a flexible element</h3>
<div class="outline-text-3" id="text-5-11">
<p>
2021-01-08 15:34:53 +01:00
<a id="org7a2a8a0"></a>
2020-08-05 13:28:14 +02:00
</p>
<p>
This Matlab function is accessible <a href="../src/initializeFlexibleStrutDynamics.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org8f7f4f7" class="outline-4">
<h4 id="org8f7f4f7">Function description</h4>
<div class="outline-text-4" id="text-org8f7f4f7">
2020-08-05 13:28:14 +02:00
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeFlexibleStrutDynamics</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% initializeFlexibleStrutDynamics - Add Stiffness and Damping properties of each strut</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [stewart] = initializeFlexibleStrutDynamics(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - args - Structure with the following fields:</span>
<span class="org-comment">% - K [nxn] - Vertical stiffness contribution of the piezoelectric stack [N/m]</span>
<span class="org-comment">% - M [nxn] - Vertical damping contribution of the piezoelectric stack [N/(m/s)]</span>
<span class="org-comment">% - xi [1x1] - Vertical (residual) stiffness when the piezoelectric stack is removed [N/m]</span>
<span class="org-comment">% - step_file [6x1] - Vertical (residual) damping when the piezoelectric stack is removed [N/(m/s)]</span>
<span class="org-comment">% - Gf [6x1] - Gain from strain in [m] to measured [N] such that it matches</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
2020-08-05 13:28:14 +02:00
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org2d4eac7" class="outline-4">
<h4 id="org2d4eac7">Optional Parameters</h4>
<div class="outline-text-4" id="text-org2d4eac7">
2020-08-05 13:28:14 +02:00
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-variable-name">args</span>.K double {mustBeNumeric} = zeros(6,6)
<span class="org-variable-name">args</span>.M double {mustBeNumeric} = zeros(6,6)
<span class="org-variable-name">args</span>.H double {mustBeNumeric} = 0
<span class="org-variable-name">args</span>.n_xyz double {mustBeNumeric} = zeros(2,3)
<span class="org-variable-name">args</span>.xi double {mustBeNumeric} = 0.1
<span class="org-variable-name">args</span>.Gf double {mustBeNumeric} = 1
<span class="org-variable-name">args</span>.step_file char {} = <span class="org-string">''</span>
<span class="org-keyword">end</span>
2020-08-05 13:28:14 +02:00
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org67ae6f5" class="outline-4">
<h4 id="org67ae6f5">Compute the axial offset</h4>
<div class="outline-text-4" id="text-org67ae6f5">
2020-08-05 13:28:14 +02:00
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.actuators.ax_off = (stewart.geometry.l(1) <span class="org-type">-</span> args.H)<span class="org-type">/</span>2; <span class="org-comment">% Axial Offset at the ends of the actuator</span>
2020-08-05 13:28:14 +02:00
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org82e5db9" class="outline-4">
<h4 id="org82e5db9">Populate the <code>stewart</code> structure</h4>
<div class="outline-text-4" id="text-org82e5db9">
2020-08-05 13:28:14 +02:00
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.actuators.type = 3;
2020-08-05 13:28:14 +02:00
2021-01-08 15:54:58 +01:00
stewart.actuators.Km = args.K;
stewart.actuators.Mm = args.M;
2020-08-05 13:28:14 +02:00
2021-01-08 15:54:58 +01:00
stewart.actuators.n_xyz = args.n_xyz;
stewart.actuators.xi = args.xi;
2020-08-05 13:28:14 +02:00
2021-01-08 15:54:58 +01:00
stewart.actuators.step_file = args.step_file;
2020-08-05 13:28:14 +02:00
2021-01-08 15:54:58 +01:00
stewart.actuators.K = args.K(3,3); <span class="org-comment">% Axial Stiffness</span>
2020-09-01 13:19:26 +02:00
2021-01-08 15:54:58 +01:00
stewart.actuators.Gf = args.Gf;
2020-08-05 13:28:14 +02:00
</pre>
</div>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org7666a0d" class="outline-3">
<h3 id="org7666a0d"><span class="section-number-3">5.12</span> <code>initializeJointDynamics</code>: Add Stiffness and Damping properties for spherical joints</h3>
<div class="outline-text-3" id="text-5-12">
2020-08-05 13:28:14 +02:00
<p>
2021-01-08 15:34:53 +01:00
<a id="org60f3527"></a>
</p>
<p>
2020-02-11 18:04:45 +01:00
This Matlab function is accessible <a href="../src/initializeJointDynamics.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orgf5c4b43" class="outline-4">
<h4 id="orgf5c4b43">Function description</h4>
<div class="outline-text-4" id="text-orgf5c4b43">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeJointDynamics</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% initializeJointDynamics - Add Stiffness and Damping properties for the spherical joints</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [stewart] = initializeJointDynamics(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - args - Structure with the following fields:</span>
<span class="org-comment">% - type_F - 'universal', 'spherical', 'universal_p', 'spherical_p'</span>
<span class="org-comment">% - type_M - 'universal', 'spherical', 'universal_p', 'spherical_p'</span>
<span class="org-comment">% - Kf_M [6x1] - Bending (Rx, Ry) Stiffness for each top joints [(N.m)/rad]</span>
<span class="org-comment">% - Kt_M [6x1] - Torsion (Rz) Stiffness for each top joints [(N.m)/rad]</span>
<span class="org-comment">% - Cf_M [6x1] - Bending (Rx, Ry) Damping of each top joint [(N.m)/(rad/s)]</span>
<span class="org-comment">% - Ct_M [6x1] - Torsion (Rz) Damping of each top joint [(N.m)/(rad/s)]</span>
<span class="org-comment">% - Kf_F [6x1] - Bending (Rx, Ry) Stiffness for each bottom joints [(N.m)/rad]</span>
<span class="org-comment">% - Kt_F [6x1] - Torsion (Rz) Stiffness for each bottom joints [(N.m)/rad]</span>
<span class="org-comment">% - Cf_F [6x1] - Bending (Rx, Ry) Damping of each bottom joint [(N.m)/(rad/s)]</span>
<span class="org-comment">% - Cf_F [6x1] - Torsion (Rz) Damping of each bottom joint [(N.m)/(rad/s)]</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
<span class="org-comment">% - stewart.joints_F and stewart.joints_M:</span>
<span class="org-comment">% - type - 1 (universal), 2 (spherical), 3 (universal perfect), 4 (spherical perfect)</span>
<span class="org-comment">% - Kx, Ky, Kz [6x1] - Translation (Tx, Ty, Tz) Stiffness [N/m]</span>
<span class="org-comment">% - Kf [6x1] - Flexion (Rx, Ry) Stiffness [(N.m)/rad]</span>
<span class="org-comment">% - Kt [6x1] - Torsion (Rz) Stiffness [(N.m)/rad]</span>
<span class="org-comment">% - Cx, Cy, Cz [6x1] - Translation (Rx, Ry) Damping [N/(m/s)]</span>
<span class="org-comment">% - Cf [6x1] - Flexion (Rx, Ry) Damping [(N.m)/(rad/s)]</span>
<span class="org-comment">% - Cb [6x1] - Torsion (Rz) Damping [(N.m)/(rad/s)]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org380cbf5" class="outline-4">
<h4 id="org380cbf5">Optional Parameters</h4>
<div class="outline-text-4" id="text-org380cbf5">
<div class="org-src-container">
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-variable-name">args</span>.type_F char {mustBeMember(args.type_F,{<span class="org-string">'universal'</span>, <span class="org-string">'spherical'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'spherical_p'</span>, <span class="org-string">'universal_3dof'</span>, <span class="org-string">'spherical_3dof'</span>, <span class="org-string">'flexible'</span>})} = <span class="org-string">'universal'</span>
<span class="org-variable-name">args</span>.type_M char {mustBeMember(args.type_M,{<span class="org-string">'universal'</span>, <span class="org-string">'spherical'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'spherical_p'</span>, <span class="org-string">'universal_3dof'</span>, <span class="org-string">'spherical_3dof'</span>, <span class="org-string">'flexible'</span>})} = <span class="org-string">'spherical'</span>
<span class="org-variable-name">args</span>.Kf_M (6,1) double {mustBeNumeric, mustBeNonnegative} = 33<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Cf_M (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e<span class="org-type">-</span>4<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Kt_M (6,1) double {mustBeNumeric, mustBeNonnegative} = 236<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Ct_M (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e<span class="org-type">-</span>3<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Kf_F (6,1) double {mustBeNumeric, mustBeNonnegative} = 33<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Cf_F (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e<span class="org-type">-</span>4<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Kt_F (6,1) double {mustBeNumeric, mustBeNonnegative} = 236<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Ct_F (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e<span class="org-type">-</span>3<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Ka_F (6,1) double {mustBeNumeric, mustBeNonnegative} = 1.2e8<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Ca_F (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e1<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Kr_F (6,1) double {mustBeNumeric, mustBeNonnegative} = 1.1e7<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Cr_F (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e1<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Ka_M (6,1) double {mustBeNumeric, mustBeNonnegative} = 1.2e8<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Ca_M (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e1<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Kr_M (6,1) double {mustBeNumeric, mustBeNonnegative} = 1.1e7<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.Cr_M (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e1<span class="org-type">*</span>ones(6,1)
<span class="org-variable-name">args</span>.K_M double {mustBeNumeric} = zeros(6,6)
<span class="org-variable-name">args</span>.M_M double {mustBeNumeric} = zeros(6,6)
<span class="org-variable-name">args</span>.n_xyz_M double {mustBeNumeric} = zeros(2,3)
<span class="org-variable-name">args</span>.xi_M double {mustBeNumeric} = 0.1
<span class="org-variable-name">args</span>.step_file_M char {} = <span class="org-string">''</span>
<span class="org-variable-name">args</span>.K_F double {mustBeNumeric} = zeros(6,6)
<span class="org-variable-name">args</span>.M_F double {mustBeNumeric} = zeros(6,6)
<span class="org-variable-name">args</span>.n_xyz_F double {mustBeNumeric} = zeros(2,3)
<span class="org-variable-name">args</span>.xi_F double {mustBeNumeric} = 0.1
<span class="org-variable-name">args</span>.step_file_F char {} = <span class="org-string">''</span>
<span class="org-keyword">end</span>
2021-01-08 15:34:53 +01:00
</pre>
</div>
</div>
</div>
<div id="outline-container-org1c44749" class="outline-4">
<h4 id="org1c44749">Add Actuator Type</h4>
<div class="outline-text-4" id="text-org1c44749">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">switch</span> <span class="org-constant">args.type_F</span>
<span class="org-keyword">case</span> <span class="org-string">'universal'</span>
stewart.joints_F.type = 1;
<span class="org-keyword">case</span> <span class="org-string">'spherical'</span>
stewart.joints_F.type = 2;
<span class="org-keyword">case</span> <span class="org-string">'universal_p'</span>
stewart.joints_F.type = 3;
<span class="org-keyword">case</span> <span class="org-string">'spherical_p'</span>
stewart.joints_F.type = 4;
<span class="org-keyword">case</span> <span class="org-string">'flexible'</span>
stewart.joints_F.type = 5;
<span class="org-keyword">case</span> <span class="org-string">'universal_3dof'</span>
stewart.joints_F.type = 6;
<span class="org-keyword">case</span> <span class="org-string">'spherical_3dof'</span>
stewart.joints_F.type = 7;
<span class="org-keyword">end</span>
<span class="org-keyword">switch</span> <span class="org-constant">args.type_M</span>
<span class="org-keyword">case</span> <span class="org-string">'universal'</span>
stewart.joints_M.type = 1;
<span class="org-keyword">case</span> <span class="org-string">'spherical'</span>
stewart.joints_M.type = 2;
<span class="org-keyword">case</span> <span class="org-string">'universal_p'</span>
stewart.joints_M.type = 3;
<span class="org-keyword">case</span> <span class="org-string">'spherical_p'</span>
stewart.joints_M.type = 4;
<span class="org-keyword">case</span> <span class="org-string">'flexible'</span>
stewart.joints_M.type = 5;
<span class="org-keyword">case</span> <span class="org-string">'universal_3dof'</span>
stewart.joints_M.type = 6;
<span class="org-keyword">case</span> <span class="org-string">'spherical_3dof'</span>
stewart.joints_M.type = 7;
<span class="org-keyword">end</span>
2021-01-08 15:34:53 +01:00
</pre>
</div>
</div>
</div>
<div id="outline-container-org8a45695" class="outline-4">
<h4 id="org8a45695">Add Stiffness and Damping in Translation of each strut</h4>
<div class="outline-text-4" id="text-org8a45695">
<p>
2020-09-01 13:19:26 +02:00
Axial and Radial (shear) Stiffness
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.joints_M.Ka = args.Ka_M;
stewart.joints_M.Kr = args.Kr_M;
2021-01-08 15:54:58 +01:00
stewart.joints_F.Ka = args.Ka_F;
stewart.joints_F.Kr = args.Kr_F;
</pre>
</div>
<p>
Translation Damping
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.joints_M.Ca = args.Ca_M;
stewart.joints_M.Cr = args.Cr_M;
2021-01-08 15:54:58 +01:00
stewart.joints_F.Ca = args.Ca_F;
stewart.joints_F.Cr = args.Cr_F;
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgcba9dbe" class="outline-4">
<h4 id="orgcba9dbe">Add Stiffness and Damping in Rotation of each strut</h4>
<div class="outline-text-4" id="text-orgcba9dbe">
<p>
Rotational Stiffness
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.joints_M.Kf = args.Kf_M;
stewart.joints_M.Kt = args.Kt_M;
2021-01-08 15:54:58 +01:00
stewart.joints_F.Kf = args.Kf_F;
stewart.joints_F.Kt = args.Kt_F;
</pre>
</div>
<p>
Rotational Damping
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.joints_M.Cf = args.Cf_M;
stewart.joints_M.Ct = args.Ct_M;
2021-01-08 15:54:58 +01:00
stewart.joints_F.Cf = args.Cf_F;
stewart.joints_F.Ct = args.Ct_F;
</pre>
</div>
</div>
</div>
2020-08-05 13:28:14 +02:00
2021-01-08 15:34:53 +01:00
<div id="outline-container-orge78c1bc" class="outline-4">
<h4 id="orge78c1bc">Stiffness and Mass matrices for flexible joint</h4>
<div class="outline-text-4" id="text-orge78c1bc">
2020-08-05 13:28:14 +02:00
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.joints_F.M = args.M_F;
stewart.joints_F.K = args.K_F;
stewart.joints_F.n_xyz = args.n_xyz_F;
stewart.joints_F.xi = args.xi_F;
stewart.joints_F.xi = args.xi_F;
stewart.joints_F.step_file = args.step_file_F;
2020-08-05 13:28:14 +02:00
2021-01-08 15:54:58 +01:00
stewart.joints_M.M = args.M_M;
stewart.joints_M.K = args.K_M;
stewart.joints_M.n_xyz = args.n_xyz_M;
stewart.joints_M.xi = args.xi_M;
stewart.joints_M.step_file = args.step_file_M;
2020-08-05 13:28:14 +02:00
</pre>
</div>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org995e0ff" class="outline-3">
<h3 id="org995e0ff"><span class="section-number-3">5.13</span> <code>initializeFlexibleStrutAndJointDynamics</code>: Model each strut with a flexible element</h3>
<div class="outline-text-3" id="text-5-13">
<p>
<a id="orgc4ca382"></a>
</p>
<p>
2021-01-08 15:34:53 +01:00
This Matlab function is accessible <a href="../src/initializeFlexibleStrutAndJointDynamics.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org56a8d9a" class="outline-4">
<h4 id="org56a8d9a">Function description</h4>
<div class="outline-text-4" id="text-org56a8d9a">
2021-01-08 15:34:53 +01:00
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeFlexibleStrutAndJointDynamics</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% initializeFlexibleStrutAndJointDynamics - Add Stiffness and Damping properties of each strut</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [stewart] = initializeFlexibleStrutAndJointDynamics(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - args - Structure with the following fields:</span>
<span class="org-comment">% - K [nxn] - Vertical stiffness contribution of the piezoelectric stack [N/m]</span>
<span class="org-comment">% - M [nxn] - Vertical damping contribution of the piezoelectric stack [N/(m/s)]</span>
<span class="org-comment">% - xi [1x1] - Vertical (residual) stiffness when the piezoelectric stack is removed [N/m]</span>
<span class="org-comment">% - step_file [6x1] - Vertical (residual) damping when the piezoelectric stack is removed [N/(m/s)]</span>
<span class="org-comment">% - Gf [6x1] - Gain from strain in [m] to measured [N] such that it matches</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
2021-01-08 15:34:53 +01:00
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orgac6a1c2" class="outline-4">
<h4 id="orgac6a1c2">Optional Parameters</h4>
<div class="outline-text-4" id="text-orgac6a1c2">
2021-01-08 15:34:53 +01:00
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-variable-name">args</span>.K double {mustBeNumeric} = zeros(6,6)
<span class="org-variable-name">args</span>.M double {mustBeNumeric} = zeros(6,6)
<span class="org-variable-name">args</span>.H double {mustBeNumeric} = 0
<span class="org-variable-name">args</span>.n_xyz double {mustBeNumeric} = zeros(2,3)
<span class="org-variable-name">args</span>.xi double {mustBeNumeric} = 0.1
<span class="org-variable-name">args</span>.Gf double {mustBeNumeric} = 1
<span class="org-variable-name">args</span>.step_file char {} = <span class="org-string">''</span>
<span class="org-keyword">end</span>
2021-01-08 15:34:53 +01:00
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org578ef24" class="outline-4">
<h4 id="org578ef24">Compute the axial offset</h4>
<div class="outline-text-4" id="text-org578ef24">
2021-01-08 15:34:53 +01:00
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.actuators.ax_off = (stewart.geometry.l(1) <span class="org-type">-</span> args.H)<span class="org-type">/</span>2; <span class="org-comment">% Axial Offset at the ends of the actuator</span>
2021-01-08 15:34:53 +01:00
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org3587761" class="outline-4">
<h4 id="org3587761">Populate the <code>stewart</code> structure</h4>
<div class="outline-text-4" id="text-org3587761">
2021-01-08 15:34:53 +01:00
<p>
No discrete joints:
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.joints_F.type = 10;
stewart.joints_M.type = 10;
2021-01-08 15:34:53 +01:00
</pre>
</div>
<p>
No discrete struts:
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.struts_F.type = 3;
stewart.struts_M.type = 3;
2021-01-08 15:34:53 +01:00
</pre>
</div>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.actuators.type = 4;
2021-01-08 15:34:53 +01:00
2021-01-08 15:54:58 +01:00
stewart.actuators.Km = args.K;
stewart.actuators.Mm = args.M;
2021-01-08 15:34:53 +01:00
2021-01-08 15:54:58 +01:00
stewart.actuators.n_xyz = args.n_xyz;
stewart.actuators.xi = args.xi;
2021-01-08 15:34:53 +01:00
2021-01-08 15:54:58 +01:00
stewart.actuators.step_file = args.step_file;
2021-01-08 15:34:53 +01:00
2021-01-08 15:54:58 +01:00
stewart.actuators.K = args.K(3,3); <span class="org-comment">% Axial Stiffness</span>
2021-01-08 15:34:53 +01:00
2021-01-08 15:54:58 +01:00
stewart.actuators.Gf = args.Gf;
2021-01-08 15:34:53 +01:00
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org0873774" class="outline-3">
<h3 id="org0873774"><span class="section-number-3">5.14</span> <code>initializeInertialSensor</code>: Initialize the inertial sensor in each strut</h3>
<div class="outline-text-3" id="text-5-14">
<p>
<a id="orgacc02e7"></a>
</p>
<p>
2020-02-11 18:04:45 +01:00
This Matlab function is accessible <a href="../src/initializeInertialSensor.m">here</a>.
</p>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org8521d8c" class="outline-4">
<h4 id="org8521d8c">Geophone - Working Principle</h4>
<div class="outline-text-4" id="text-org8521d8c">
<p>
2021-01-08 15:34:53 +01:00
From the schematic of the Z-axis geophone shown in Figure <a href="#org2566f07">15</a>, we can write the transfer function from the support velocity \(\dot{w}\) to the relative velocity of the inertial mass \(\dot{d}\):
\[ \frac{\dot{d}}{\dot{w}} = \frac{-\frac{s^2}{{\omega_0}^2}}{\frac{s^2}{{\omega_0}^2} + 2 \xi \frac{s}{\omega_0} + 1} \]
with:
</p>
<ul class="org-ul">
<li>\(\omega_0 = \sqrt{\frac{k}{m}}\)</li>
<li>\(\xi = \frac{1}{2} \sqrt{\frac{m}{k}}\)</li>
</ul>
2021-01-08 15:34:53 +01:00
<div id="org2566f07" class="figure">
<p><img src="figs/inertial_sensor.png" alt="inertial_sensor.png" />
</p>
<p><span class="figure-number">Figure 15: </span>Schematic of a Z-Axis geophone</p>
</div>
<p>
We see that at frequencies above \(\omega_0\):
\[ \frac{\dot{d}}{\dot{w}} \approx -1 \]
</p>
<p>
And thus, the measurement of the relative velocity of the mass with respect to its support gives the absolute velocity of the support.
</p>
<p>
We generally want to have the smallest resonant frequency \(\omega_0\) to measure low frequency absolute velocity, however there is a trade-off between \(\omega_0\) and the mass of the inertial mass.
</p>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org66673a3" class="outline-4">
<h4 id="org66673a3">Accelerometer - Working Principle</h4>
<div class="outline-text-4" id="text-org66673a3">
<p>
2021-01-08 15:34:53 +01:00
From the schematic of the Z-axis accelerometer shown in Figure <a href="#orga1d9095">16</a>, we can write the transfer function from the support acceleration \(\ddot{w}\) to the relative position of the inertial mass \(d\):
\[ \frac{d}{\ddot{w}} = \frac{-\frac{1}{{\omega_0}^2}}{\frac{s^2}{{\omega_0}^2} + 2 \xi \frac{s}{\omega_0} + 1} \]
with:
</p>
<ul class="org-ul">
<li>\(\omega_0 = \sqrt{\frac{k}{m}}\)</li>
<li>\(\xi = \frac{1}{2} \sqrt{\frac{m}{k}}\)</li>
</ul>
2021-01-08 15:34:53 +01:00
<div id="orga1d9095" class="figure">
<p><img src="figs/inertial_sensor.png" alt="inertial_sensor.png" />
</p>
<p><span class="figure-number">Figure 16: </span>Schematic of a Z-Axis geophone</p>
</div>
<p>
We see that at frequencies below \(\omega_0\):
\[ \frac{d}{\ddot{w}} \approx -\frac{1}{{\omega_0}^2} \]
</p>
<p>
And thus, the measurement of the relative displacement of the mass with respect to its support gives the absolute acceleration of the support.
</p>
<p>
Note that there is trade-off between:
</p>
<ul class="org-ul">
<li>the highest measurable acceleration \(\omega_0\)</li>
<li>the sensitivity of the accelerometer which is equal to \(-\frac{1}{{\omega_0}^2}\)</li>
</ul>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org024b1d8" class="outline-4">
<h4 id="org024b1d8">Function description</h4>
<div class="outline-text-4" id="text-org024b1d8">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeInertialSensor</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% initializeInertialSensor - Initialize the inertial sensor in each strut</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [stewart] = initializeInertialSensor(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - args - Structure with the following fields:</span>
<span class="org-comment">% - type - 'geophone', 'accelerometer', 'none'</span>
<span class="org-comment">% - mass [1x1] - Weight of the inertial mass [kg]</span>
<span class="org-comment">% - freq [1x1] - Cutoff frequency [Hz]</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
<span class="org-comment">% - stewart.sensors.inertial</span>
<span class="org-comment">% - type - 1 (geophone), 2 (accelerometer), 3 (none)</span>
<span class="org-comment">% - K [1x1] - Stiffness [N/m]</span>
<span class="org-comment">% - C [1x1] - Damping [N/(m/s)]</span>
<span class="org-comment">% - M [1x1] - Inertial Mass [kg]</span>
<span class="org-comment">% - G [1x1] - Gain</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org6d8876b" class="outline-4">
<h4 id="org6d8876b">Optional Parameters</h4>
<div class="outline-text-4" id="text-org6d8876b">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-variable-name">args</span>.type char {mustBeMember(args.type,{<span class="org-string">'geophone'</span>, <span class="org-string">'accelerometer'</span>, <span class="org-string">'none'</span>})} = <span class="org-string">'none'</span>
<span class="org-variable-name">args</span>.mass (1,1) double {mustBeNumeric, mustBeNonnegative} = 1e<span class="org-type">-</span>2
<span class="org-variable-name">args</span>.freq (1,1) double {mustBeNumeric, mustBeNonnegative} = 1e3
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org96a29e4" class="outline-4">
<h4 id="org96a29e4">Compute the properties of the sensor</h4>
<div class="outline-text-4" id="text-org96a29e4">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">sensor = struct();
2021-01-08 15:54:58 +01:00
<span class="org-keyword">switch</span> <span class="org-constant">args.type</span>
<span class="org-keyword">case</span> <span class="org-string">'geophone'</span>
sensor.type = 1;
2021-01-08 15:54:58 +01:00
sensor.M = args.mass;
sensor.K = sensor.M <span class="org-type">*</span> (2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>args.freq)<span class="org-type">^</span>2;
sensor.C = 2<span class="org-type">*</span>sqrt(sensor.M <span class="org-type">*</span> sensor.K);
<span class="org-keyword">case</span> <span class="org-string">'accelerometer'</span>
sensor.type = 2;
2021-01-08 15:54:58 +01:00
sensor.M = args.mass;
sensor.K = sensor.M <span class="org-type">*</span> (2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>args.freq)<span class="org-type">^</span>2;
sensor.C = 2<span class="org-type">*</span>sqrt(sensor.M <span class="org-type">*</span> sensor.K);
sensor.G = <span class="org-type">-</span>sensor.K<span class="org-type">/</span>sensor.M;
<span class="org-keyword">case</span> <span class="org-string">'none'</span>
sensor.type = 3;
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org06a22a8" class="outline-4">
<h4 id="org06a22a8">Populate the <code>stewart</code> structure</h4>
<div class="outline-text-4" id="text-org06a22a8">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">stewart.sensors.inertial = sensor;
</pre>
</div>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org5a66d3a" class="outline-3">
<h3 id="org5a66d3a"><span class="section-number-3">5.15</span> <code>displayArchitecture</code>: 3D plot of the Stewart platform architecture</h3>
<div class="outline-text-3" id="text-5-15">
<p>
2021-01-08 15:34:53 +01:00
<a id="org2878132"></a>
</p>
<p>
2020-02-11 18:04:45 +01:00
This Matlab function is accessible <a href="../src/displayArchitecture.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org5b54876" class="outline-4">
<h4 id="org5b54876">Function description</h4>
<div class="outline-text-4" id="text-org5b54876">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[]</span> = <span class="org-function-name">displayArchitecture</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
<span class="org-comment">% displayArchitecture - 3D plot of the Stewart platform architecture</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [] = displayArchitecture(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - stewart</span>
<span class="org-comment">% - args - Structure with the following fields:</span>
<span class="org-comment">% - AP [3x1] - The wanted position of {B} with respect to {A}</span>
<span class="org-comment">% - ARB [3x3] - The rotation matrix that gives the wanted orientation of {B} with respect to {A}</span>
<span class="org-comment">% - ARB [3x3] - The rotation matrix that gives the wanted orientation of {B} with respect to {A}</span>
<span class="org-comment">% - F_color [color] - Color used for the Fixed elements</span>
<span class="org-comment">% - M_color [color] - Color used for the Mobile elements</span>
<span class="org-comment">% - L_color [color] - Color used for the Legs elements</span>
<span class="org-comment">% - frames [true/false] - Display the Frames</span>
<span class="org-comment">% - legs [true/false] - Display the Legs</span>
<span class="org-comment">% - joints [true/false] - Display the Joints</span>
<span class="org-comment">% - labels [true/false] - Display the Labels</span>
<span class="org-comment">% - platforms [true/false] - Display the Platforms</span>
<span class="org-comment">% - views ['all', 'xy', 'yz', 'xz', 'default'] -</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org2650173" class="outline-4">
<h4 id="org2650173">Optional Parameters</h4>
<div class="outline-text-4" id="text-org2650173">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-variable-name">args</span>.AP (3,1) double {mustBeNumeric} = zeros(3,1)
<span class="org-variable-name">args</span>.ARB (3,3) double {mustBeNumeric} = eye(3)
<span class="org-variable-name">args</span>.F_color = [0 0.4470 0.7410]
<span class="org-variable-name">args</span>.M_color = [0.8500 0.3250 0.0980]
<span class="org-variable-name">args</span>.L_color = [0 0 0]
<span class="org-variable-name">args</span>.frames logical {mustBeNumericOrLogical} = <span class="org-constant">true</span>
<span class="org-variable-name">args</span>.legs logical {mustBeNumericOrLogical} = <span class="org-constant">true</span>
<span class="org-variable-name">args</span>.joints logical {mustBeNumericOrLogical} = <span class="org-constant">true</span>
<span class="org-variable-name">args</span>.labels logical {mustBeNumericOrLogical} = <span class="org-constant">true</span>
<span class="org-variable-name">args</span>.platforms logical {mustBeNumericOrLogical} = <span class="org-constant">true</span>
<span class="org-variable-name">args</span>.views char {mustBeMember(args.views,{<span class="org-string">'all'</span>, <span class="org-string">'xy'</span>, <span class="org-string">'xz'</span>, <span class="org-string">'yz'</span>, <span class="org-string">'default'</span>})} = <span class="org-string">'default'</span>
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orgab71ceb" class="outline-4">
<h4 id="orgab71ceb">Check the <code>stewart</code> structure elements</h4>
<div class="outline-text-4" id="text-orgab71ceb">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">assert(isfield(stewart.platform_F, <span class="org-string">'FO_A'</span>), <span class="org-string">'stewart.platform_F should have attribute FO_A'</span>)
FO_A = stewart.platform_F.FO_A;
2021-01-08 15:54:58 +01:00
assert(isfield(stewart.platform_M, <span class="org-string">'MO_B'</span>), <span class="org-string">'stewart.platform_M should have attribute MO_B'</span>)
MO_B = stewart.platform_M.MO_B;
2021-01-08 15:54:58 +01:00
assert(isfield(stewart.geometry, <span class="org-string">'H'</span>), <span class="org-string">'stewart.geometry should have attribute H'</span>)
H = stewart.geometry.H;
2021-01-08 15:54:58 +01:00
assert(isfield(stewart.platform_F, <span class="org-string">'Fa'</span>), <span class="org-string">'stewart.platform_F should have attribute Fa'</span>)
Fa = stewart.platform_F.Fa;
2021-01-08 15:54:58 +01:00
assert(isfield(stewart.platform_M, <span class="org-string">'Mb'</span>), <span class="org-string">'stewart.platform_M should have attribute Mb'</span>)
Mb = stewart.platform_M.Mb;
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgb7e5d05" class="outline-4">
<h4 id="orgb7e5d05">Figure Creation, Frames and Homogeneous transformations</h4>
<div class="outline-text-4" id="text-orgb7e5d05">
<p>
The reference frame of the 3d plot corresponds to the frame \(\{F\}\).
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">if</span> <span class="org-type">~</span>strcmp(args.views, <span class="org-string">'all'</span>)
2021-01-08 15:34:53 +01:00
<span class="org-type">figure</span>;
2021-01-08 15:54:58 +01:00
<span class="org-keyword">else</span>
2021-01-08 15:34:53 +01:00
f = <span class="org-type">figure</span>(<span class="org-string">'visible'</span>, <span class="org-string">'off'</span>);
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
2021-01-08 15:54:58 +01:00
hold on;
</pre>
</div>
<p>
We first compute homogeneous matrices that will be useful to position elements on the figure where the reference frame is \(\{F\}\).
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">FTa = [eye(3), FO_A; ...
zeros<span class="org-type">(1,3), 1];</span>
ATb = [args.ARB, args.AP; ...
zeros<span class="org-type">(1,3), 1];</span>
BTm = [eye(3), <span class="org-type">-</span>MO_B; ...
zeros<span class="org-type">(1,3), 1];</span>
2021-01-08 15:54:58 +01:00
FTm = FTa<span class="org-type">*</span>ATb<span class="org-type">*</span>BTm;
</pre>
</div>
<p>
Let&rsquo;s define a parameter that define the length of the unit vectors used to display the frames.
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">d_unit_vector = H<span class="org-type">/</span>4;
</pre>
</div>
<p>
Let&rsquo;s define a parameter used to position the labels with respect to the center of the element.
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">d_label = H<span class="org-type">/</span>20;
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orge26b777" class="outline-4">
<h4 id="orge26b777">Fixed Base elements</h4>
<div class="outline-text-4" id="text-orge26b777">
<p>
Let&rsquo;s first plot the frame \(\{F\}\).
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">Ff = [0, 0, 0];
<span class="org-keyword">if</span> args.frames
2021-01-08 15:34:53 +01:00
quiver3(Ff(1)<span class="org-type">*</span>ones(1,3), Ff(2)<span class="org-type">*</span>ones(1,3), Ff(3)<span class="org-type">*</span>ones(1,3), ...
[d_unit_vector 0 0], [0 d_unit_vector 0], [0 0 d_unit_vector], <span class="org-string">'-'</span>, <span class="org-string">'Color'</span>, args.F_color)
2021-01-08 15:34:53 +01:00
<span class="org-keyword">if</span> args.labels
2021-01-08 15:54:58 +01:00
<span class="org-type">text</span>(Ff(1) <span class="org-type">+</span> d_label, ...
Ff<span class="org-type">(2) + d_label, ...</span>
Ff(3) <span class="org-type">+</span> d_label, <span class="org-string">'$\{F\}$'</span>, <span class="org-string">'Color'</span>, args.F_color);
2021-01-08 15:34:53 +01:00
<span class="org-keyword">end</span>
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
</pre>
</div>
<p>
Now plot the frame \(\{A\}\) fixed to the Base.
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">if</span> args.frames
2021-01-08 15:34:53 +01:00
quiver3(FO_A(1)<span class="org-type">*</span>ones(1,3), FO_A(2)<span class="org-type">*</span>ones(1,3), FO_A(3)<span class="org-type">*</span>ones(1,3), ...
[d_unit_vector 0 0], [0 d_unit_vector 0], [0 0 d_unit_vector], <span class="org-string">'-'</span>, <span class="org-string">'Color'</span>, args.F_color)
2021-01-08 15:34:53 +01:00
<span class="org-keyword">if</span> args.labels
2021-01-08 15:54:58 +01:00
<span class="org-type">text</span>(FO_A(1) <span class="org-type">+</span> d_label, ...
FO_A<span class="org-type">(2) + d_label, ...</span>
FO_A(3) <span class="org-type">+</span> d_label, <span class="org-string">'$\{A\}$'</span>, <span class="org-string">'Color'</span>, args.F_color);
2021-01-08 15:34:53 +01:00
<span class="org-keyword">end</span>
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
</pre>
</div>
<p>
Let&rsquo;s then plot the circle corresponding to the shape of the Fixed base.
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">if</span> args.platforms <span class="org-type">&amp;&amp;</span> stewart.platform_F.type <span class="org-type">==</span> 1
2021-01-08 15:34:53 +01:00
theta = [0<span class="org-type">:</span>0.01<span class="org-type">:</span>2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">+</span>0.01]; <span class="org-comment">% Angles [rad]</span>
v = null([0; 0; 1]<span class="org-type">'</span>); <span class="org-comment">% Two vectors that are perpendicular to the circle normal</span>
center = [0; 0; 0]; <span class="org-comment">% Center of the circle</span>
radius = stewart.platform_F.R; <span class="org-comment">% Radius of the circle [m]</span>
2021-01-08 15:34:53 +01:00
points = center<span class="org-type">*</span>ones(1, length(theta)) <span class="org-type">+</span> radius<span class="org-type">*</span>(v(<span class="org-type">:</span>,1)<span class="org-type">*</span>cos(theta) <span class="org-type">+</span> v(<span class="org-type">:</span>,2)<span class="org-type">*</span>sin(theta));
2021-01-08 15:34:53 +01:00
plot3(points(1,<span class="org-type">:</span>), ...
points<span class="org-type">(2,:), ...</span>
points(3,<span class="org-type">:</span>), <span class="org-string">'-'</span>, <span class="org-string">'Color'</span>, args.F_color);
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
</pre>
</div>
<p>
Let&rsquo;s now plot the position and labels of the Fixed Joints
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">if</span> args.joints
2021-01-08 15:34:53 +01:00
scatter3(Fa(1,<span class="org-type">:</span>), ...
Fa<span class="org-type">(2,:), ...</span>
Fa(3,<span class="org-type">:</span>), <span class="org-string">'MarkerEdgeColor'</span>, args.F_color);
<span class="org-keyword">if</span> args.labels
2021-01-08 15:54:58 +01:00
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:size(Fa,2)</span>
<span class="org-type">text</span>(Fa(1,<span class="org-constant">i</span>) <span class="org-type">+</span> d_label, ...
Fa(2,<span class="org-constant">i</span>), ...
Fa(3,<span class="org-constant">i</span>), sprintf(<span class="org-string">'$a_{%i}$'</span>, <span class="org-constant">i</span>), <span class="org-string">'Color'</span>, args.F_color);
<span class="org-keyword">end</span>
2021-01-08 15:34:53 +01:00
<span class="org-keyword">end</span>
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org8dd54b6" class="outline-4">
<h4 id="org8dd54b6">Mobile Platform elements</h4>
<div class="outline-text-4" id="text-org8dd54b6">
<p>
Plot the frame \(\{M\}\).
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">Fm = FTm<span class="org-type">*</span>[0; 0; 0; 1]; <span class="org-comment">% Get the position of frame {M} w.r.t. {F}</span>
2021-01-08 15:54:58 +01:00
<span class="org-keyword">if</span> args.frames
2021-01-08 15:34:53 +01:00
FM_uv = FTm<span class="org-type">*</span>[d_unit_vector<span class="org-type">*</span>eye(3); zeros(1,3)]; <span class="org-comment">% Rotated Unit vectors</span>
quiver3(Fm(1)<span class="org-type">*</span>ones(1,3), Fm(2)<span class="org-type">*</span>ones(1,3), Fm(3)<span class="org-type">*</span>ones(1,3), ...
FM_uv(1,1<span class="org-type">:</span>3), FM_uv(2,1<span class="org-type">:</span>3), FM_uv(3,1<span class="org-type">:</span>3), <span class="org-string">'-'</span>, <span class="org-string">'Color'</span>, args.M_color)
2021-01-08 15:34:53 +01:00
<span class="org-keyword">if</span> args.labels
2021-01-08 15:54:58 +01:00
<span class="org-type">text</span>(Fm(1) <span class="org-type">+</span> d_label, ...
Fm<span class="org-type">(2) + d_label, ...</span>
Fm(3) <span class="org-type">+</span> d_label, <span class="org-string">'$\{M\}$'</span>, <span class="org-string">'Color'</span>, args.M_color);
2021-01-08 15:34:53 +01:00
<span class="org-keyword">end</span>
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
</pre>
</div>
<p>
Plot the frame \(\{B\}\).
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">FB = FO_A <span class="org-type">+</span> args.AP;
2021-01-08 15:54:58 +01:00
<span class="org-keyword">if</span> args.frames
2021-01-08 15:34:53 +01:00
FB_uv = FTm<span class="org-type">*</span>[d_unit_vector<span class="org-type">*</span>eye(3); zeros(1,3)]; <span class="org-comment">% Rotated Unit vectors</span>
quiver3(FB(1)<span class="org-type">*</span>ones(1,3), FB(2)<span class="org-type">*</span>ones(1,3), FB(3)<span class="org-type">*</span>ones(1,3), ...
FB_uv(1,1<span class="org-type">:</span>3), FB_uv(2,1<span class="org-type">:</span>3), FB_uv(3,1<span class="org-type">:</span>3), <span class="org-string">'-'</span>, <span class="org-string">'Color'</span>, args.M_color)
2021-01-08 15:34:53 +01:00
<span class="org-keyword">if</span> args.labels
2021-01-08 15:54:58 +01:00
<span class="org-type">text</span>(FB(1) <span class="org-type">-</span> d_label, ...
FB<span class="org-type">(2) + d_label, ...</span>
FB(3) <span class="org-type">+</span> d_label, <span class="org-string">'$\{B\}$'</span>, <span class="org-string">'Color'</span>, args.M_color);
2021-01-08 15:34:53 +01:00
<span class="org-keyword">end</span>
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
</pre>
</div>
<p>
Let&rsquo;s then plot the circle corresponding to the shape of the Mobile platform.
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">if</span> args.platforms <span class="org-type">&amp;&amp;</span> stewart.platform_M.type <span class="org-type">==</span> 1
2021-01-08 15:34:53 +01:00
theta = [0<span class="org-type">:</span>0.01<span class="org-type">:</span>2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">+</span>0.01]; <span class="org-comment">% Angles [rad]</span>
v = null((FTm(1<span class="org-type">:</span>3,1<span class="org-type">:</span>3)<span class="org-type">*</span>[0;0;1])<span class="org-type">'</span>); <span class="org-comment">% Two vectors that are perpendicular to the circle normal</span>
center = Fm(1<span class="org-type">:</span>3); <span class="org-comment">% Center of the circle</span>
radius = stewart.platform_M.R; <span class="org-comment">% Radius of the circle [m]</span>
2021-01-08 15:34:53 +01:00
points = center<span class="org-type">*</span>ones(1, length(theta)) <span class="org-type">+</span> radius<span class="org-type">*</span>(v(<span class="org-type">:</span>,1)<span class="org-type">*</span>cos(theta) <span class="org-type">+</span> v(<span class="org-type">:</span>,2)<span class="org-type">*</span>sin(theta));
2021-01-08 15:34:53 +01:00
plot3(points(1,<span class="org-type">:</span>), ...
points<span class="org-type">(2,:), ...</span>
points(3,<span class="org-type">:</span>), <span class="org-string">'-'</span>, <span class="org-string">'Color'</span>, args.M_color);
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
</pre>
</div>
<p>
Plot the position and labels of the rotation joints fixed to the mobile platform.
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">if</span> args.joints
2021-01-08 15:34:53 +01:00
Fb = FTm<span class="org-type">*</span>[Mb;ones(1,6)];
2021-01-08 15:34:53 +01:00
scatter3(Fb(1,<span class="org-type">:</span>), ...
Fb<span class="org-type">(2,:), ...</span>
Fb(3,<span class="org-type">:</span>), <span class="org-string">'MarkerEdgeColor'</span>, args.M_color);
2021-01-08 15:34:53 +01:00
<span class="org-keyword">if</span> args.labels
2021-01-08 15:54:58 +01:00
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:size(Fb,2)</span>
<span class="org-type">text</span>(Fb(1,<span class="org-constant">i</span>) <span class="org-type">+</span> d_label, ...
Fb(2,<span class="org-constant">i</span>), ...
Fb(3,<span class="org-constant">i</span>), sprintf(<span class="org-string">'$b_{%i}$'</span>, <span class="org-constant">i</span>), <span class="org-string">'Color'</span>, args.M_color);
<span class="org-keyword">end</span>
2021-01-08 15:34:53 +01:00
<span class="org-keyword">end</span>
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org3569efd" class="outline-4">
<h4 id="org3569efd">Legs</h4>
<div class="outline-text-4" id="text-org3569efd">
<p>
Plot the legs connecting the joints of the fixed base to the joints of the mobile platform.
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">if</span> args.legs
2021-01-08 15:34:53 +01:00
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
2021-01-08 15:54:58 +01:00
plot3([Fa(1,<span class="org-constant">i</span>), Fb(1,<span class="org-constant">i</span>)], ...
[Fa(2,<span class="org-constant">i</span>), Fb(2,<span class="org-constant">i</span>)], ...
[Fa(3,<span class="org-constant">i</span>), Fb(3,<span class="org-constant">i</span>)], <span class="org-string">'-'</span>, <span class="org-string">'Color'</span>, args.L_color);
<span class="org-keyword">if</span> args.labels
<span class="org-type">text</span>((Fa(1,<span class="org-constant">i</span>)<span class="org-type">+</span>Fb(1,<span class="org-constant">i</span>))<span class="org-type">/</span>2 <span class="org-type">+</span> d_label, ...
(Fa(2,<span class="org-constant">i</span>)<span class="org-type">+</span>Fb(2,<span class="org-constant">i</span>))<span class="org-type">/</span>2, ...
(Fa(3,<span class="org-constant">i</span>)<span class="org-type">+</span>Fb(3,<span class="org-constant">i</span>))<span class="org-type">/</span>2, sprintf(<span class="org-string">'$%i$'</span>, <span class="org-constant">i</span>), <span class="org-string">'Color'</span>, args.L_color);
<span class="org-keyword">end</span>
2021-01-08 15:34:53 +01:00
<span class="org-keyword">end</span>
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orgcb42b83" class="outline-4">
<h4 id="orgcb42b83"><span class="section-number-4">5.15.1</span> Figure parameters</h4>
<div class="outline-text-4" id="text-5-15-1">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">switch</span> <span class="org-constant">args.views</span>
<span class="org-keyword">case</span> <span class="org-string">'default'</span>
view([1 <span class="org-type">-</span>0.6 0.4]);
<span class="org-keyword">case</span> <span class="org-string">'xy'</span>
view([0 0 1]);
<span class="org-keyword">case</span> <span class="org-string">'xz'</span>
view([0 <span class="org-type">-</span>1 0]);
<span class="org-keyword">case</span> <span class="org-string">'yz'</span>
view([1 0 0]);
<span class="org-keyword">end</span>
<span class="org-type">axis</span> equal;
<span class="org-type">axis</span> off;
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org06467e9" class="outline-4">
<h4 id="org06467e9"><span class="section-number-4">5.15.2</span> Subplots</h4>
<div class="outline-text-4" id="text-5-15-2">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">if</span> strcmp(args.views, <span class="org-string">'all'</span>)
2021-01-08 15:34:53 +01:00
hAx = findobj(<span class="org-string">'type'</span>, <span class="org-string">'axes'</span>);
2021-01-08 15:34:53 +01:00
<span class="org-type">figure</span>;
s1 = subplot(2,2,1);
copyobj(<span class="org-type">get</span>(hAx(<span class="org-variable-name">1</span>), <span class="org-string">'Children'</span>), s1);
view([0 0 1]);
<span class="org-type">axis</span> equal;
<span class="org-type">axis</span> off;
title(<span class="org-string">'Top'</span>)
2021-01-08 15:34:53 +01:00
s2 = subplot(2,2,2);
copyobj(<span class="org-type">get</span>(hAx(<span class="org-variable-name">1</span>), <span class="org-string">'Children'</span>), s2);
view([1 <span class="org-type">-</span>0.6 0.4]);
<span class="org-type">axis</span> equal;
<span class="org-type">axis</span> off;
2021-01-08 15:34:53 +01:00
s3 = subplot(2,2,3);
copyobj(<span class="org-type">get</span>(hAx(<span class="org-variable-name">1</span>), <span class="org-string">'Children'</span>), s3);
view([1 0 0]);
<span class="org-type">axis</span> equal;
<span class="org-type">axis</span> off;
title(<span class="org-string">'Front'</span>)
2021-01-08 15:34:53 +01:00
s4 = subplot(2,2,4);
copyobj(<span class="org-type">get</span>(hAx(<span class="org-variable-name">1</span>), <span class="org-string">'Children'</span>), s4);
view([0 <span class="org-type">-</span>1 0]);
<span class="org-type">axis</span> equal;
<span class="org-type">axis</span> off;
title(<span class="org-string">'Side'</span>)
2021-01-08 15:34:53 +01:00
close(f);
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org02e6772" class="outline-3">
<h3 id="org02e6772"><span class="section-number-3">5.16</span> <code>describeStewartPlatform</code>: Display some text describing the current defined Stewart Platform</h3>
<div class="outline-text-3" id="text-5-16">
<p>
2021-01-08 15:34:53 +01:00
<a id="org95559dc"></a>
</p>
<p>
This Matlab function is accessible <a href="../src/describeStewartPlatform.m">here</a>.
</p>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-orgdd06785" class="outline-4">
<h4 id="orgdd06785">Function description</h4>
<div class="outline-text-4" id="text-orgdd06785">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[]</span> = <span class="org-function-name">describeStewartPlatform</span>(<span class="org-variable-name">stewart</span>)
<span class="org-comment">% describeStewartPlatform - Display some text describing the current defined Stewart Platform</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [] = describeStewartPlatform(args)</span>
<span class="org-comment">%</span>
<span class="org-comment">% Inputs:</span>
<span class="org-comment">% - stewart</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:54:58 +01:00
<div id="outline-container-org6e383c9" class="outline-4">
<h4 id="org6e383c9">Optional Parameters</h4>
<div class="outline-text-4" id="text-org6e383c9">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">stewart</span>
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-orge43c89a" class="outline-4">
<h4 id="orge43c89a"><span class="section-number-4">5.16.1</span> Geometry</h4>
<div class="outline-text-4" id="text-5-16-1">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">fprintf(<span class="org-string">'GEOMETRY:\n'</span>)
fprintf(<span class="org-string">'- The height between the fixed based and the top platform is %.3g [mm].\n'</span>, 1e3<span class="org-type">*</span>stewart.geometry.H)
2021-01-08 15:54:58 +01:00
<span class="org-keyword">if</span> stewart.platform_M.MO_B(3) <span class="org-type">&gt;</span> 0
2021-01-08 15:34:53 +01:00
fprintf(<span class="org-string">'- Frame {A} is located %.3g [mm] above the top platform.\n'</span>, 1e3<span class="org-type">*</span>stewart.platform_M.MO_B(3))
2021-01-08 15:54:58 +01:00
<span class="org-keyword">else</span>
2021-01-08 15:34:53 +01:00
fprintf(<span class="org-string">'- Frame {A} is located %.3g [mm] below the top platform.\n'</span>, <span class="org-type">-</span> 1e3<span class="org-type">*</span>stewart.platform_M.MO_B(3))
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
2021-01-08 15:54:58 +01:00
fprintf(<span class="org-string">'- The initial length of the struts are:\n'</span>)
fprintf(<span class="org-string">'\t %.3g, %.3g, %.3g, %.3g, %.3g, %.3g [mm]\n'</span>, 1e3<span class="org-type">*</span>stewart.geometry.l)
fprintf(<span class="org-string">'\n'</span>)
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org41beea5" class="outline-4">
<h4 id="org41beea5"><span class="section-number-4">5.16.2</span> Actuators</h4>
<div class="outline-text-4" id="text-5-16-2">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">fprintf(<span class="org-string">'ACTUATORS:\n'</span>)
<span class="org-keyword">if</span> stewart.actuators.type <span class="org-type">==</span> 1
fprintf(<span class="org-string">'- The actuators are classical.\n'</span>)
fprintf(<span class="org-string">'- The Stiffness and Damping of each actuators is:\n'</span>)
fprintf(<span class="org-string">'\t k = %.0e [N/m] \t c = %.0e [N/(m/s)]\n'</span>, stewart.actuators.K(1), stewart.actuators.C(1))
<span class="org-keyword">elseif</span> stewart.actuators.type <span class="org-type">==</span> 2
fprintf(<span class="org-string">'- The actuators are mechanicaly amplified.\n'</span>)
fprintf(<span class="org-string">'- The vertical stiffness and damping contribution of the piezoelectric stack is:\n'</span>)
fprintf(<span class="org-string">'\t ka = %.0e [N/m] \t ca = %.0e [N/(m/s)]\n'</span>, stewart.actuators.Ka(1), stewart.actuators.Ca(1))
fprintf(<span class="org-string">'- Vertical stiffness when the piezoelectric stack is removed is:\n'</span>)
fprintf(<span class="org-string">'\t kr = %.0e [N/m] \t cr = %.0e [N/(m/s)]\n'</span>, stewart.actuators.Kr(1), stewart.actuators.Cr(1))
<span class="org-keyword">end</span>
fprintf(<span class="org-string">'\n'</span>)
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org293e123" class="outline-4">
<h4 id="org293e123"><span class="section-number-4">5.16.3</span> Joints</h4>
<div class="outline-text-4" id="text-5-16-3">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">fprintf(<span class="org-string">'JOINTS:\n'</span>)
</pre>
</div>
<p>
Type of the joints on the fixed base.
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">switch</span> <span class="org-constant">stewart.joints_F.type</span>
<span class="org-keyword">case</span> <span class="org-constant">1</span>
fprintf(<span class="org-string">'- The joints on the fixed based are universal joints\n'</span>)
<span class="org-keyword">case</span> <span class="org-constant">2</span>
fprintf(<span class="org-string">'- The joints on the fixed based are spherical joints\n'</span>)
<span class="org-keyword">case</span> <span class="org-constant">3</span>
fprintf(<span class="org-string">'- The joints on the fixed based are perfect universal joints\n'</span>)
<span class="org-keyword">case</span> <span class="org-constant">4</span>
fprintf(<span class="org-string">'- The joints on the fixed based are perfect spherical joints\n'</span>)
<span class="org-keyword">end</span>
</pre>
</div>
<p>
Type of the joints on the mobile platform.
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab"><span class="org-keyword">switch</span> <span class="org-constant">stewart.joints_M.type</span>
<span class="org-keyword">case</span> <span class="org-constant">1</span>
fprintf(<span class="org-string">'- The joints on the mobile based are universal joints\n'</span>)
<span class="org-keyword">case</span> <span class="org-constant">2</span>
fprintf(<span class="org-string">'- The joints on the mobile based are spherical joints\n'</span>)
<span class="org-keyword">case</span> <span class="org-constant">3</span>
fprintf(<span class="org-string">'- The joints on the mobile based are perfect universal joints\n'</span>)
<span class="org-keyword">case</span> <span class="org-constant">4</span>
fprintf(<span class="org-string">'- The joints on the mobile based are perfect spherical joints\n'</span>)
<span class="org-keyword">end</span>
</pre>
</div>
<p>
Position of the fixed joints
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">fprintf(<span class="org-string">'- The position of the joints on the fixed based with respect to {F} are (in [mm]):\n'</span>)
fprintf(<span class="org-string">'\t % .3g \t % .3g \t % .3g\n'</span>, 1e3<span class="org-type">*</span>stewart.platform_F.Fa)
</pre>
</div>
<p>
Position of the mobile joints
</p>
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">fprintf(<span class="org-string">'- The position of the joints on the mobile based with respect to {M} are (in [mm]):\n'</span>)
fprintf(<span class="org-string">'\t % .3g \t % .3g \t % .3g\n'</span>, 1e3<span class="org-type">*</span>stewart.platform_M.Mb)
fprintf(<span class="org-string">'\n'</span>)
</pre>
</div>
</div>
</div>
2021-01-08 15:34:53 +01:00
<div id="outline-container-org94283a1" class="outline-4">
<h4 id="org94283a1"><span class="section-number-4">5.16.4</span> Kinematics</h4>
<div class="outline-text-4" id="text-5-16-4">
<div class="org-src-container">
2021-01-08 15:54:58 +01:00
<pre class="src src-matlab">fprintf(<span class="org-string">'KINEMATICS:\n'</span>)
2021-01-08 15:54:58 +01:00
<span class="org-keyword">if</span> isfield(stewart.kinematics, <span class="org-string">'K'</span>)
2021-01-08 15:34:53 +01:00
fprintf(<span class="org-string">'- The Stiffness matrix K is (in [N/m]):\n'</span>)
fprintf(<span class="org-string">'\t % .0e \t % .0e \t % .0e \t % .0e \t % .0e \t % .0e\n'</span>, stewart.kinematics.K)
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
2021-01-08 15:54:58 +01:00
<span class="org-keyword">if</span> isfield(stewart.kinematics, <span class="org-string">'C'</span>)
2021-01-08 15:34:53 +01:00
fprintf(<span class="org-string">'- The Damping matrix C is (in [m/N]):\n'</span>)
fprintf(<span class="org-string">'\t % .0e \t % .0e \t % .0e \t % .0e \t % .0e \t % .0e\n'</span>, stewart.kinematics.C)
2021-01-08 15:54:58 +01:00
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
</div>
</div>
<p>
</p>
2020-08-05 13:28:14 +02:00
<style>.csl-entry{text-indent: -1.5em; margin-left: 1.5em;}</style><h2 class='citeproc-org-bib-h2'>Bibliography</h2>
<div class="csl-bib-body">
<div class="csl-entry"><a name="citeproc_bib_item_1"></a>Taghirad, Hamid. 2013. <i>Parallel Robots : Mechanics and Control</i>. Boca Raton, FL: CRC Press.</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
2021-01-08 15:54:58 +01:00
<p class="date">Created: 2021-01-08 ven. 15:52</p>
</div>
</body>
</html>