1973 lines
95 KiB
HTML
1973 lines
95 KiB
HTML
<?xml version="1.0" encoding="utf-8"?>
|
|
<?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>
|
|
<!-- 2020-02-10 lun. 18:17 -->
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Stewart Platform - Definition of the Architecture</title>
|
|
<meta name="generator" content="Org mode" />
|
|
<meta name="author" content="Dehaeze Thomas" />
|
|
<style type="text/css">
|
|
<!--/*--><![CDATA[/*><!--*/
|
|
.title { text-align: center;
|
|
margin-bottom: .2em; }
|
|
.subtitle { text-align: center;
|
|
font-size: medium;
|
|
font-weight: bold;
|
|
margin-top:0; }
|
|
.todo { font-family: monospace; color: red; }
|
|
.done { font-family: monospace; color: green; }
|
|
.priority { font-family: monospace; color: orange; }
|
|
.tag { background-color: #eee; font-family: monospace;
|
|
padding: 2px; font-size: 80%; font-weight: normal; }
|
|
.timestamp { color: #bebebe; }
|
|
.timestamp-kwd { color: #5f9ea0; }
|
|
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
|
|
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
|
|
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
|
|
.underline { text-decoration: underline; }
|
|
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
|
|
p.verse { margin-left: 3%; }
|
|
pre {
|
|
border: 1px solid #ccc;
|
|
box-shadow: 3px 3px 3px #eee;
|
|
padding: 8pt;
|
|
font-family: monospace;
|
|
overflow: auto;
|
|
margin: 1.2em;
|
|
}
|
|
pre.src {
|
|
position: relative;
|
|
overflow: visible;
|
|
padding-top: 1.2em;
|
|
}
|
|
pre.src:before {
|
|
display: none;
|
|
position: absolute;
|
|
background-color: white;
|
|
top: -10px;
|
|
right: 10px;
|
|
padding: 3px;
|
|
border: 1px solid black;
|
|
}
|
|
pre.src:hover:before { display: inline;}
|
|
/* Languages per Org manual */
|
|
pre.src-asymptote:before { content: 'Asymptote'; }
|
|
pre.src-awk:before { content: 'Awk'; }
|
|
pre.src-C:before { content: 'C'; }
|
|
/* pre.src-C++ doesn't work in CSS */
|
|
pre.src-clojure:before { content: 'Clojure'; }
|
|
pre.src-css:before { content: 'CSS'; }
|
|
pre.src-D:before { content: 'D'; }
|
|
pre.src-ditaa:before { content: 'ditaa'; }
|
|
pre.src-dot:before { content: 'Graphviz'; }
|
|
pre.src-calc:before { content: 'Emacs Calc'; }
|
|
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
|
|
pre.src-fortran:before { content: 'Fortran'; }
|
|
pre.src-gnuplot:before { content: 'gnuplot'; }
|
|
pre.src-haskell:before { content: 'Haskell'; }
|
|
pre.src-hledger:before { content: 'hledger'; }
|
|
pre.src-java:before { content: 'Java'; }
|
|
pre.src-js:before { content: 'Javascript'; }
|
|
pre.src-latex:before { content: 'LaTeX'; }
|
|
pre.src-ledger:before { content: 'Ledger'; }
|
|
pre.src-lisp:before { content: 'Lisp'; }
|
|
pre.src-lilypond:before { content: 'Lilypond'; }
|
|
pre.src-lua:before { content: 'Lua'; }
|
|
pre.src-matlab:before { content: 'MATLAB'; }
|
|
pre.src-mscgen:before { content: 'Mscgen'; }
|
|
pre.src-ocaml:before { content: 'Objective Caml'; }
|
|
pre.src-octave:before { content: 'Octave'; }
|
|
pre.src-org:before { content: 'Org mode'; }
|
|
pre.src-oz:before { content: 'OZ'; }
|
|
pre.src-plantuml:before { content: 'Plantuml'; }
|
|
pre.src-processing:before { content: 'Processing.js'; }
|
|
pre.src-python:before { content: 'Python'; }
|
|
pre.src-R:before { content: 'R'; }
|
|
pre.src-ruby:before { content: 'Ruby'; }
|
|
pre.src-sass:before { content: 'Sass'; }
|
|
pre.src-scheme:before { content: 'Scheme'; }
|
|
pre.src-screen:before { content: 'Gnu Screen'; }
|
|
pre.src-sed:before { content: 'Sed'; }
|
|
pre.src-sh:before { content: 'shell'; }
|
|
pre.src-sql:before { content: 'SQL'; }
|
|
pre.src-sqlite:before { content: 'SQLite'; }
|
|
/* additional languages in org.el's org-babel-load-languages alist */
|
|
pre.src-forth:before { content: 'Forth'; }
|
|
pre.src-io:before { content: 'IO'; }
|
|
pre.src-J:before { content: 'J'; }
|
|
pre.src-makefile:before { content: 'Makefile'; }
|
|
pre.src-maxima:before { content: 'Maxima'; }
|
|
pre.src-perl:before { content: 'Perl'; }
|
|
pre.src-picolisp:before { content: 'Pico Lisp'; }
|
|
pre.src-scala:before { content: 'Scala'; }
|
|
pre.src-shell:before { content: 'Shell Script'; }
|
|
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
|
|
/* additional language identifiers per "defun org-babel-execute"
|
|
in ob-*.el */
|
|
pre.src-cpp:before { content: 'C++'; }
|
|
pre.src-abc:before { content: 'ABC'; }
|
|
pre.src-coq:before { content: 'Coq'; }
|
|
pre.src-groovy:before { content: 'Groovy'; }
|
|
/* additional language identifiers from org-babel-shell-names in
|
|
ob-shell.el: ob-shell is the only babel language using a lambda to put
|
|
the execution function name together. */
|
|
pre.src-bash:before { content: 'bash'; }
|
|
pre.src-csh:before { content: 'csh'; }
|
|
pre.src-ash:before { content: 'ash'; }
|
|
pre.src-dash:before { content: 'dash'; }
|
|
pre.src-ksh:before { content: 'ksh'; }
|
|
pre.src-mksh:before { content: 'mksh'; }
|
|
pre.src-posh:before { content: 'posh'; }
|
|
/* Additional Emacs modes also supported by the LaTeX listings package */
|
|
pre.src-ada:before { content: 'Ada'; }
|
|
pre.src-asm:before { content: 'Assembler'; }
|
|
pre.src-caml:before { content: 'Caml'; }
|
|
pre.src-delphi:before { content: 'Delphi'; }
|
|
pre.src-html:before { content: 'HTML'; }
|
|
pre.src-idl:before { content: 'IDL'; }
|
|
pre.src-mercury:before { content: 'Mercury'; }
|
|
pre.src-metapost:before { content: 'MetaPost'; }
|
|
pre.src-modula-2:before { content: 'Modula-2'; }
|
|
pre.src-pascal:before { content: 'Pascal'; }
|
|
pre.src-ps:before { content: 'PostScript'; }
|
|
pre.src-prolog:before { content: 'Prolog'; }
|
|
pre.src-simula:before { content: 'Simula'; }
|
|
pre.src-tcl:before { content: 'tcl'; }
|
|
pre.src-tex:before { content: 'TeX'; }
|
|
pre.src-plain-tex:before { content: 'Plain TeX'; }
|
|
pre.src-verilog:before { content: 'Verilog'; }
|
|
pre.src-vhdl:before { content: 'VHDL'; }
|
|
pre.src-xml:before { content: 'XML'; }
|
|
pre.src-nxml:before { content: 'XML'; }
|
|
/* add a generic configuration mode; LaTeX export needs an additional
|
|
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
|
|
pre.src-conf:before { content: 'Configuration File'; }
|
|
|
|
table { border-collapse:collapse; }
|
|
caption.t-above { caption-side: top; }
|
|
caption.t-bottom { caption-side: bottom; }
|
|
td, th { vertical-align:top; }
|
|
th.org-right { text-align: center; }
|
|
th.org-left { text-align: center; }
|
|
th.org-center { text-align: center; }
|
|
td.org-right { text-align: right; }
|
|
td.org-left { text-align: left; }
|
|
td.org-center { text-align: center; }
|
|
dt { font-weight: bold; }
|
|
.footpara { display: inline; }
|
|
.footdef { margin-bottom: 1em; }
|
|
.figure { padding: 1em; }
|
|
.figure p { text-align: center; }
|
|
.equation-container {
|
|
display: table;
|
|
text-align: center;
|
|
width: 100%;
|
|
}
|
|
.equation {
|
|
vertical-align: middle;
|
|
}
|
|
.equation-label {
|
|
display: table-cell;
|
|
text-align: right;
|
|
vertical-align: middle;
|
|
}
|
|
.inlinetask {
|
|
padding: 10px;
|
|
border: 2px solid gray;
|
|
margin: 10px;
|
|
background: #ffffcc;
|
|
}
|
|
#org-div-home-and-up
|
|
{ text-align: right; font-size: 70%; white-space: nowrap; }
|
|
textarea { overflow-x: auto; }
|
|
.linenr { font-size: smaller }
|
|
.code-highlighted { background-color: #ffff00; }
|
|
.org-info-js_info-navigation { border-style: none; }
|
|
#org-info-js_console-label
|
|
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
|
|
.org-info-js_search-highlight
|
|
{ background-color: #ffff00; color: #000000; font-weight: bold; }
|
|
.org-svg { width: 90%; }
|
|
/*]]>*/-->
|
|
</style>
|
|
<link rel="stylesheet" type="text/css" href="./css/htmlize.css"/>
|
|
<link rel="stylesheet" type="text/css" href="./css/readtheorg.css"/>
|
|
<script src="./js/jquery.min.js"></script>
|
|
<script src="./js/bootstrap.min.js"></script>
|
|
<script src="./js/jquery.stickytableheaders.min.js"></script>
|
|
<script src="./js/readtheorg.js"></script>
|
|
<script type="text/javascript">
|
|
/*
|
|
@licstart The following is the entire license notice for the
|
|
JavaScript code in this tag.
|
|
|
|
Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
|
|
|
The JavaScript code in this tag is free software: you can
|
|
redistribute it and/or modify it under the terms of the GNU
|
|
General Public License (GNU GPL) as published by the Free Software
|
|
Foundation, either version 3 of the License, or (at your option)
|
|
any later version. The code is distributed WITHOUT ANY WARRANTY;
|
|
without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
|
|
|
As additional permission under GNU GPL version 3 section 7, you
|
|
may distribute non-source (e.g., minimized or compacted) forms of
|
|
that code without the copy of the GNU GPL normally required by
|
|
section 4, provided you include this license notice and a URL
|
|
through which recipients can access the Corresponding Source.
|
|
|
|
|
|
@licend The above is the entire license notice
|
|
for the JavaScript code in this tag.
|
|
*/
|
|
<!--/*--><![CDATA[/*><!--*/
|
|
function CodeHighlightOn(elem, id)
|
|
{
|
|
var target = document.getElementById(id);
|
|
if(null != target) {
|
|
elem.cacheClassElem = elem.className;
|
|
elem.cacheClassTarget = target.className;
|
|
target.className = "code-highlighted";
|
|
elem.className = "code-highlighted";
|
|
}
|
|
}
|
|
function CodeHighlightOff(elem, id)
|
|
{
|
|
var target = document.getElementById(id);
|
|
if(elem.cacheClassElem)
|
|
elem.className = elem.cacheClassElem;
|
|
if(elem.cacheClassTarget)
|
|
target.className = elem.cacheClassTarget;
|
|
}
|
|
/*]]>*///-->
|
|
</script>
|
|
<script>
|
|
MathJax = {
|
|
tex: { macros: {
|
|
bm: ["\\boldsymbol{#1}",1],
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
<script type="text/javascript"
|
|
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.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>
|
|
<li><a href="#org281e6ef">1. Definition of the Stewart Platform Geometry</a>
|
|
<ul>
|
|
<li><a href="#orgd661d24">1.1. Frames Definition</a></li>
|
|
<li><a href="#org6a786bd">1.2. Location of the Spherical Joints</a></li>
|
|
<li><a href="#org2fd3c96">1.3. Length and orientation of the struts</a></li>
|
|
<li><a href="#org9fff9fb">1.4. Rest Position of the Stewart platform</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#orge01f9d8">2. Definition of the Inertia and geometry of the Fixed base, Mobile platform and Struts</a>
|
|
<ul>
|
|
<li><a href="#orgdd20a85">2.1. Inertia and Geometry of the Fixed and Mobile platforms</a></li>
|
|
<li><a href="#orgd33ea32">2.2. Inertia and Geometry of the struts</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org4aa9df0">3. Definition of the stiffness and damping of the joints</a>
|
|
<ul>
|
|
<li><a href="#orgd5ade20">3.1. Stiffness and Damping of the Actuator</a></li>
|
|
<li><a href="#org9f7d09b">3.2. Stiffness and Damping of the Spherical Joints</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org8db4e96">4. Summary of the Initialization Procedure and Matlab Example</a>
|
|
<ul>
|
|
<li><a href="#orga45bba4">4.1. Example of the initialization of a Stewart Platform</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org8c3d58d">5. Functions</a>
|
|
<ul>
|
|
<li><a href="#orgff16a81">5.1. <code>initializeFramesPositions</code>: Initialize the positions of frames {A}, {B}, {F} and {M}</a>
|
|
<ul>
|
|
<li><a href="#orgffd08f4">Documentation</a></li>
|
|
<li><a href="#org287c5ce">Function description</a></li>
|
|
<li><a href="#org994ae07">Optional Parameters</a></li>
|
|
<li><a href="#org5d26055">Initialize the Stewart structure</a></li>
|
|
<li><a href="#orge3d065b">Compute the position of each frame</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org89ccaa9">5.2. <code>generateGeneralConfiguration</code>: Generate a Very General Configuration</a>
|
|
<ul>
|
|
<li><a href="#orga2ce83b">Documentation</a></li>
|
|
<li><a href="#org2cf0448">Function description</a></li>
|
|
<li><a href="#orgc1caa88">Optional Parameters</a></li>
|
|
<li><a href="#org1d4ee09">Compute the pose</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org1d0a5e4">5.3. <code>computeJointsPose</code>: Compute the Pose of the Joints</a>
|
|
<ul>
|
|
<li><a href="#org4cad068">Documentation</a></li>
|
|
<li><a href="#org0943529">Function description</a></li>
|
|
<li><a href="#orgbd49788">Compute the position of the Joints</a></li>
|
|
<li><a href="#org648ffbf">Compute the strut length and orientation</a></li>
|
|
<li><a href="#orgd1dc4f5">Compute the orientation of the Joints</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org99665d0">5.4. <code>initializeStewartPose</code>: Determine the initial stroke in each leg to have the wanted pose</a>
|
|
<ul>
|
|
<li><a href="#orgd7db2e8">Function description</a></li>
|
|
<li><a href="#orgf985ddd">Optional Parameters</a></li>
|
|
<li><a href="#org8ccd270">Use the Inverse Kinematic function</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org5403136">5.5. <code>initializeCylindricalPlatforms</code>: Initialize the geometry of the Fixed and Mobile Platforms</a>
|
|
<ul>
|
|
<li><a href="#orgd5d3877">Function description</a></li>
|
|
<li><a href="#org89b8ffb">Optional Parameters</a></li>
|
|
<li><a href="#orgbe1337f">Create the <code>platforms</code> struct</a></li>
|
|
<li><a href="#orgc341af6">Save the <code>platforms</code> struct</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org00eda96">5.6. <code>initializeCylindricalStruts</code>: Define the inertia of cylindrical struts</a>
|
|
<ul>
|
|
<li><a href="#org6c51b85">Function description</a></li>
|
|
<li><a href="#org69e94db">Optional Parameters</a></li>
|
|
<li><a href="#org78ed453">Create the <code>struts</code> structure</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org88917f5">5.7. <code>initializeStrutDynamics</code>: Add Stiffness and Damping properties of each strut</a>
|
|
<ul>
|
|
<li><a href="#orgeaab382">Documentation</a></li>
|
|
<li><a href="#org67dab8e">Function description</a></li>
|
|
<li><a href="#org8f25fd7">Optional Parameters</a></li>
|
|
<li><a href="#orgb723c92">Add Stiffness and Damping properties of each strut</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#orgc7c1044">5.8. <code>initializeAmplifiedStrutDynamics</code>: Add Stiffness and Damping properties of each strut for an amplified piezoelectric actuator</a>
|
|
<ul>
|
|
<li><a href="#orgcd8de37">Documentation</a></li>
|
|
<li><a href="#org495f71a">Function description</a></li>
|
|
<li><a href="#org961095b">Optional Parameters</a></li>
|
|
<li><a href="#org972a2fe">Add Stiffness and Damping properties of each strut</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org809bd98">5.9. <code>initializeJointDynamics</code>: Add Stiffness and Damping properties for spherical joints</a>
|
|
<ul>
|
|
<li><a href="#org462ee22">Function description</a></li>
|
|
<li><a href="#org3f8c83d">Optional Parameters</a></li>
|
|
<li><a href="#org88cac16">Add Stiffness and Damping properties of each strut</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org852f598">5.10. <code>displayArchitecture</code>: 3D plot of the Stewart platform architecture</a>
|
|
<ul>
|
|
<li><a href="#orgdaedc25">Function description</a></li>
|
|
<li><a href="#org57e3729">Optional Parameters</a></li>
|
|
<li><a href="#org322dc3a">Figure Creation, Frames and Homogeneous transformations</a></li>
|
|
<li><a href="#orga02eb71">Fixed Base elements</a></li>
|
|
<li><a href="#orge41970f">Mobile Platform elements</a></li>
|
|
<li><a href="#org7bff0e2">Legs</a></li>
|
|
<li><a href="#orgd8a4adb">5.10.1. Figure parameters</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>
|
|
When possible, the notations are compatible with the one used in <a class='org-ref-reference' href="#taghirad13_paral">taghirad13_paral</a>.
|
|
</p>
|
|
|
|
<p>
|
|
The definition of the Stewart platform is done in three main parts:
|
|
</p>
|
|
<ul class="org-ul">
|
|
<li>First, the geometry if defined (Section <a href="#org9353b77">1</a>)</li>
|
|
<li>Then, the inertia of the mechanical elements are defined (Section <a href="#orgd06855f">2</a>)</li>
|
|
<li>Finally, the Stiffness and Damping characteristics of the elements are defined (Section <a href="#org38c0829">3</a>)</li>
|
|
</ul>
|
|
|
|
<p>
|
|
In section <a href="#orga41b24f">4</a>, the procedure the initialize the Stewart platform is summarize and the associated Matlab code is shown.
|
|
</p>
|
|
|
|
<p>
|
|
Finally, all the Matlab function used to initialize the Stewart platform are described in section <a href="#org3ecf5cd">5</a>.
|
|
</p>
|
|
|
|
<div id="outline-container-org281e6ef" class="outline-2">
|
|
<h2 id="org281e6ef"><span class="section-number-2">1</span> Definition of the Stewart Platform Geometry</h2>
|
|
<div class="outline-text-2" id="text-1">
|
|
<p>
|
|
<a id="org9353b77"></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>
|
|
<div id="outline-container-orgd661d24" class="outline-3">
|
|
<h3 id="orgd661d24"><span class="section-number-3">1.1</span> Frames Definition</h3>
|
|
<div class="outline-text-3" id="text-1-1">
|
|
<p>
|
|
We define 4 important <b>frames</b> (see Figure <a href="#orgc7fa821">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’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, …).
|
|
</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>
|
|
The definition of the frames is done with the <code>initializeFramesPositions</code> function (<a href="#org10264b7">link</a>);
|
|
</p>
|
|
|
|
|
|
<div id="orgc7fa821" 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>
|
|
|
|
<div id="outline-container-org6a786bd" class="outline-3">
|
|
<h3 id="org6a786bd"><span class="section-number-3">1.2</span> Location of the Spherical Joints</h3>
|
|
<div class="outline-text-3" id="text-1-2">
|
|
<p>
|
|
Then, we define the <b>location of the spherical joints</b> (see Figure <a href="#org30d1f8a">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>
|
|
A function (<code>generateGeneralConfiguration</code>) to set the position of the joints on a circle is described <a href="#org1ca50f4">here</a>.
|
|
</p>
|
|
|
|
<p>
|
|
The location of the spherical joints are then given by \({}^{F}\bm{a}_{i}\) and \({}^{M}\bm{b}_{i}\).
|
|
</p>
|
|
|
|
|
|
<div id="org30d1f8a" 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>
|
|
|
|
<div id="outline-container-org2fd3c96" class="outline-3">
|
|
<h3 id="org2fd3c96"><span class="section-number-3">1.3</span> Length and orientation of the struts</h3>
|
|
<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).
|
|
The length and orientation of each strut is represented in figure <a href="#org56d7e49">3</a>.
|
|
</p>
|
|
|
|
<p>
|
|
This is done with the <code>computeJointsPose</code> function (<a href="#org688de25">link</a>).
|
|
</p>
|
|
|
|
|
|
<div id="org56d7e49" 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>
|
|
|
|
<div id="outline-container-org9fff9fb" class="outline-3">
|
|
<h3 id="org9fff9fb"><span class="section-number-3">1.4</span> Rest Position of the Stewart platform</h3>
|
|
<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">
|
|
<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>
|
|
Then, the function <code>initializeStewartPose</code> (<a href="#org6e45b74">link</a>) compute the corresponding initial and rest position of each of the strut.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orge01f9d8" class="outline-2">
|
|
<h2 id="orge01f9d8"><span class="section-number-2">2</span> Definition of the Inertia and geometry of the Fixed base, Mobile platform and Struts</h2>
|
|
<div class="outline-text-2" id="text-2">
|
|
<p>
|
|
<a id="orgd06855f"></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>
|
|
<div id="outline-container-orgdd20a85" class="outline-3">
|
|
<h3 id="orgdd20a85"><span class="section-number-3">2.1</span> Inertia and Geometry of the Fixed and Mobile platforms</h3>
|
|
<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">
|
|
<li><code>initializeCylindricalPlatforms</code> (<a href="#org4a9389e">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>
|
|
|
|
<div id="outline-container-orgd33ea32" class="outline-3">
|
|
<h3 id="orgd33ea32"><span class="section-number-3">2.2</span> Inertia and Geometry of the struts</h3>
|
|
<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">
|
|
<li><code>initializeCylindricalStruts</code> (<a href="#org26263ac">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>
|
|
|
|
<div id="outline-container-org4aa9df0" class="outline-2">
|
|
<h2 id="org4aa9df0"><span class="section-number-2">3</span> Definition of the stiffness and damping of the joints</h2>
|
|
<div class="outline-text-2" id="text-3">
|
|
<p>
|
|
<a id="org38c0829"></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>
|
|
|
|
<div id="outline-container-orgd5ade20" class="outline-3">
|
|
<h3 id="orgd5ade20"><span class="section-number-3">3.1</span> Stiffness and Damping of the Actuator</h3>
|
|
<div class="outline-text-3" id="text-3-1">
|
|
<p>
|
|
Each Actuator is modeled by 3 elements in parallel (Figure <a href="#orgef41205">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>
|
|
|
|
|
|
<div id="orgef41205" 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>
|
|
The initialization of the stiffness and damping properties of the actuators is done with the <code>initializeStrutDynamics</code> (<a href="#org1c07928">link</a>).
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org9f7d09b" class="outline-3">
|
|
<h3 id="org9f7d09b"><span class="section-number-3">3.2</span> Stiffness and Damping of the Spherical Joints</h3>
|
|
<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>
|
|
This is done with the <code>initializeJointDynamics</code> function (<a href="#org3a3e638">link</a>).
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org8db4e96" class="outline-2">
|
|
<h2 id="org8db4e96"><span class="section-number-2">4</span> Summary of the Initialization Procedure and Matlab Example</h2>
|
|
<div class="outline-text-2" id="text-4">
|
|
<p>
|
|
<a id="orga41b24f"></a>
|
|
</p>
|
|
<p>
|
|
The procedure to define the Stewart platform is the following:
|
|
</p>
|
|
<ol class="org-ol">
|
|
<li>Define the initial position of frames \(\{A\}\), \(\{B\}\), \(\{F\}\) and \(\{M\}\).
|
|
We do that using the <code>initializeFramesPositions</code> function.
|
|
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>
|
|
<div id="outline-container-orga45bba4" class="outline-3">
|
|
<h3 id="orga45bba4"><span class="section-number-3">4.1</span> Example of the initialization of a Stewart Platform</h3>
|
|
<div class="outline-text-3" id="text-4-1">
|
|
<p>
|
|
Let’s first define the Stewart Platform Geometry.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">stewart = initializeFramesPositions(<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.01], <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">
|
|
<pre class="src src-matlab">stewart = initializeCylindricalPlatforms(stewart);
|
|
stewart = initializeCylindricalStruts(stewart);
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
Finally, initialize the strut stiffness and damping properties.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">stewart = initializeStrutDynamics(stewart, <span class="org-string">'Ki'</span>, 1e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'Ci'</span>, 1e2<span class="org-type">*</span>ones(6,1));
|
|
stewart = initializeAmplifiedStrutDynamics(stewart);
|
|
stewart = initializeJointDynamics(stewart);
|
|
</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">
|
|
<pre class="src src-matlab">displayArchitecture(stewart);
|
|
</pre>
|
|
</div>
|
|
|
|
|
|
<div id="org258c63f" 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.
|
|
The documentation of the function is available <a href="#org329c7fb">here</a>.
|
|
</p>
|
|
|
|
<p>
|
|
Let’s now move a little bit the top platform and re-display the configuration:
|
|
</p>
|
|
<div class="org-src-container">
|
|
<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>
|
|
|
|
Rx = [1 0 0;
|
|
0 cos(tx) <span class="org-type">-</span>sin(tx);
|
|
0 sin(tx) cos(tx)];
|
|
|
|
Ry = [ cos(ty) 0 sin(ty);
|
|
0 1 0;
|
|
<span class="org-type">-</span>sin(ty) 0 cos(ty)];
|
|
|
|
Rz = [cos(tz) <span class="org-type">-</span>sin(tz) 0;
|
|
sin(tz) cos(tz) 0;
|
|
0 0 1];
|
|
|
|
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>
|
|
|
|
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>
|
|
|
|
|
|
<div id="org24e005e" 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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org8c3d58d" class="outline-2">
|
|
<h2 id="org8c3d58d"><span class="section-number-2">5</span> Functions</h2>
|
|
<div class="outline-text-2" id="text-5">
|
|
<p>
|
|
<a id="org3ecf5cd"></a>
|
|
</p>
|
|
</div>
|
|
<div id="outline-container-orgff16a81" class="outline-3">
|
|
<h3 id="orgff16a81"><span class="section-number-3">5.1</span> <code>initializeFramesPositions</code>: Initialize the positions of frames {A}, {B}, {F} and {M}</h3>
|
|
<div class="outline-text-3" id="text-5-1">
|
|
<p>
|
|
<a id="org10264b7"></a>
|
|
</p>
|
|
|
|
<p>
|
|
This Matlab function is accessible <a href="src/initializeFramesPositions.m">here</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div id="outline-container-orgffd08f4" class="outline-4">
|
|
<h4 id="orgffd08f4">Documentation</h4>
|
|
<div class="outline-text-4" id="text-orgffd08f4">
|
|
|
|
<div id="org2f1c50d" 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>
|
|
|
|
<div id="outline-container-org287c5ce" class="outline-4">
|
|
<h4 id="org287c5ce">Function description</h4>
|
|
<div class="outline-text-4" id="text-org287c5ce">
|
|
<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">initializeFramesPositions</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(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">% - H [1x1] - Total Height of the Stewart Platform [m]</span>
|
|
<span class="org-comment">% - FO_M [3x1] - Position of {M} with respect to {F} [m]</span>
|
|
<span class="org-comment">% - MO_B [3x1] - Position of {B} with respect to {M} [m]</span>
|
|
<span class="org-comment">% - FO_A [3x1] - Position of {A} with respect to {F} [m]</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org994ae07" class="outline-4">
|
|
<h4 id="org994ae07">Optional Parameters</h4>
|
|
<div class="outline-text-4" id="text-org994ae07">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">arguments
|
|
args.H (1,1) double {mustBeNumeric, mustBePositive} = 90e<span class="org-type">-</span>3
|
|
args.MO_B (1,1) double {mustBeNumeric} = 50e<span class="org-type">-</span>3
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org5d26055" class="outline-4">
|
|
<h4 id="org5d26055">Initialize the Stewart structure</h4>
|
|
<div class="outline-text-4" id="text-org5d26055">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">stewart = struct();
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orge3d065b" class="outline-4">
|
|
<h4 id="orge3d065b">Compute the position of each frame</h4>
|
|
<div class="outline-text-4" id="text-orge3d065b">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">stewart.H = args.H; <span class="org-comment">% Total Height of the Stewart Platform [m]</span>
|
|
|
|
stewart.FO_M = [0; 0; stewart.H]; <span class="org-comment">% Position of {M} with respect to {F} [m]</span>
|
|
|
|
stewart.MO_B = [0; 0; args.MO_B]; <span class="org-comment">% Position of {B} with respect to {M} [m]</span>
|
|
|
|
stewart.FO_A = stewart.MO_B <span class="org-type">+</span> stewart.FO_M; <span class="org-comment">% Position of {A} with respect to {F} [m]</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org89ccaa9" class="outline-3">
|
|
<h3 id="org89ccaa9"><span class="section-number-3">5.2</span> <code>generateGeneralConfiguration</code>: Generate a Very General Configuration</h3>
|
|
<div class="outline-text-3" id="text-5-2">
|
|
<p>
|
|
<a id="org1ca50f4"></a>
|
|
</p>
|
|
|
|
<p>
|
|
This Matlab function is accessible <a href="src/generateGeneralConfiguration.m">here</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div id="outline-container-orga2ce83b" class="outline-4">
|
|
<h4 id="orga2ce83b">Documentation</h4>
|
|
<div class="outline-text-4" id="text-orga2ce83b">
|
|
<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}.
|
|
The radius of the circles can be chosen as well as the angles where the joints are located (see Figure <a href="#org419419a">8</a>).
|
|
</p>
|
|
|
|
|
|
<div id="org419419a" class="figure">
|
|
<p><img src="figs/stewart_bottom_plate.png" alt="stewart_bottom_plate.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 8: </span>Position of the joints</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org2cf0448" class="outline-4">
|
|
<h4 id="org2cf0448">Function description</h4>
|
|
<div class="outline-text-4" id="text-org2cf0448">
|
|
<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">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">% - Fa [3x6] - Its i'th column is the position vector of joint ai with respect to {F}</span>
|
|
<span class="org-comment">% - Mb [3x6] - Its i'th column is the position vector of joint bi with respect to {M}</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgc1caa88" class="outline-4">
|
|
<h4 id="orgc1caa88">Optional Parameters</h4>
|
|
<div class="outline-text-4" id="text-orgc1caa88">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">arguments
|
|
stewart
|
|
args.FH (1,1) double {mustBeNumeric, mustBePositive} = 15e<span class="org-type">-</span>3
|
|
args.FR (1,1) double {mustBeNumeric, mustBePositive} = 115e<span class="org-type">-</span>3;
|
|
args.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);
|
|
args.MH (1,1) double {mustBeNumeric, mustBePositive} = 15e<span class="org-type">-</span>3
|
|
args.MR (1,1) double {mustBeNumeric, mustBePositive} = 90e<span class="org-type">-</span>3;
|
|
args.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>
|
|
|
|
<div id="outline-container-org1d4ee09" class="outline-4">
|
|
<h4 id="org1d4ee09">Compute the pose</h4>
|
|
<div class="outline-text-4" id="text-org1d4ee09">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">stewart.Fa = zeros(3,6);
|
|
stewart.Mb = zeros(3,6);
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="org-src-container">
|
|
<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>
|
|
stewart.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];
|
|
stewart.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];
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org1d0a5e4" class="outline-3">
|
|
<h3 id="org1d0a5e4"><span class="section-number-3">5.3</span> <code>computeJointsPose</code>: Compute the Pose of the Joints</h3>
|
|
<div class="outline-text-3" id="text-5-3">
|
|
<p>
|
|
<a id="org688de25"></a>
|
|
</p>
|
|
|
|
<p>
|
|
This Matlab function is accessible <a href="src/computeJointsPose.m">here</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div id="outline-container-org4cad068" class="outline-4">
|
|
<h4 id="org4cad068">Documentation</h4>
|
|
<div class="outline-text-4" id="text-org4cad068">
|
|
|
|
<div id="org3383f39" class="figure">
|
|
<p><img src="figs/stewart-struts.png" alt="stewart-struts.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 9: </span>Position and orientation of the struts</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org0943529" class="outline-4">
|
|
<h4 id="org0943529">Function description</h4>
|
|
<div class="outline-text-4" id="text-org0943529">
|
|
<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">computeJointsPose</span>(<span class="org-variable-name">stewart</span>)
|
|
<span class="org-comment">% computeJointsPose -</span>
|
|
<span class="org-comment">%</span>
|
|
<span class="org-comment">% Syntax: [stewart] = computeJointsPose(stewart)</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">% - Fa [3x6] - Its i'th column is the position vector of joint ai with respect to {F}</span>
|
|
<span class="org-comment">% - Mb [3x6] - Its i'th column is the position vector of joint bi with respect to {M}</span>
|
|
<span class="org-comment">% - FO_A [3x1] - Position of {A} with respect to {F}</span>
|
|
<span class="org-comment">% - MO_B [3x1] - Position of {B} with respect to {M}</span>
|
|
<span class="org-comment">% - FO_M [3x1] - Position of {M} with respect to {F}</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">% - Aa [3x6] - The i'th column is the position of ai with respect to {A}</span>
|
|
<span class="org-comment">% - Ab [3x6] - The i'th column is the position of bi with respect to {A}</span>
|
|
<span class="org-comment">% - Ba [3x6] - The i'th column is the position of ai with respect to {B}</span>
|
|
<span class="org-comment">% - Bb [3x6] - The i'th column is the position of bi with respect to {B}</span>
|
|
<span class="org-comment">% - l [6x1] - The i'th element is the initial length of strut i</span>
|
|
<span class="org-comment">% - As [3x6] - The i'th column is the unit vector of strut i expressed in {A}</span>
|
|
<span class="org-comment">% - Bs [3x6] - The i'th column is the unit vector of strut i expressed in {B}</span>
|
|
<span class="org-comment">% - 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">% - 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>
|
|
|
|
<div id="outline-container-orgbd49788" class="outline-4">
|
|
<h4 id="orgbd49788">Compute the position of the Joints</h4>
|
|
<div class="outline-text-4" id="text-orgbd49788">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">stewart.Aa = stewart.Fa <span class="org-type">-</span> repmat(stewart.FO_A, [1, 6]);
|
|
stewart.Bb = stewart.Mb <span class="org-type">-</span> repmat(stewart.MO_B, [1, 6]);
|
|
|
|
stewart.Ab = stewart.Bb <span class="org-type">-</span> repmat(<span class="org-type">-</span>stewart.MO_B<span class="org-type">-</span>stewart.FO_M<span class="org-type">+</span>stewart.FO_A, [1, 6]);
|
|
stewart.Ba = stewart.Aa <span class="org-type">-</span> repmat( stewart.MO_B<span class="org-type">+</span>stewart.FO_M<span class="org-type">-</span>stewart.FO_A, [1, 6]);
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org648ffbf" class="outline-4">
|
|
<h4 id="org648ffbf">Compute the strut length and orientation</h4>
|
|
<div class="outline-text-4" id="text-org648ffbf">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">stewart.As = (stewart.Ab <span class="org-type">-</span> stewart.Aa)<span class="org-type">./</span>vecnorm(stewart.Ab <span class="org-type">-</span> stewart.Aa); <span class="org-comment">% As_i is the i'th vector of As</span>
|
|
|
|
stewart.l = vecnorm(stewart.Ab <span class="org-type">-</span> stewart.Aa)<span class="org-type">'</span>;
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">stewart.Bs = (stewart.Bb <span class="org-type">-</span> stewart.Ba)<span class="org-type">./</span>vecnorm(stewart.Bb <span class="org-type">-</span> stewart.Ba);
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgd1dc4f5" class="outline-4">
|
|
<h4 id="orgd1dc4f5">Compute the orientation of the Joints</h4>
|
|
<div class="outline-text-4" id="text-orgd1dc4f5">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">stewart.FRa = zeros(3,3,6);
|
|
stewart.MRb = zeros(3,3,6);
|
|
|
|
<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>
|
|
stewart.FRa(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = [cross([0;1;0], stewart.As(<span class="org-type">:</span>,<span class="org-constant">i</span>)) , cross(stewart.As(<span class="org-type">:</span>,<span class="org-constant">i</span>), cross([0;1;0], stewart.As(<span class="org-type">:</span>,<span class="org-constant">i</span>))) , stewart.As(<span class="org-type">:</span>,<span class="org-constant">i</span>)];
|
|
stewart.FRa(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = stewart.FRa(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>)<span class="org-type">./</span>vecnorm(stewart.FRa(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>));
|
|
|
|
stewart.MRb(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = [cross([0;1;0], stewart.Bs(<span class="org-type">:</span>,<span class="org-constant">i</span>)) , cross(stewart.Bs(<span class="org-type">:</span>,<span class="org-constant">i</span>), cross([0;1;0], stewart.Bs(<span class="org-type">:</span>,<span class="org-constant">i</span>))) , stewart.Bs(<span class="org-type">:</span>,<span class="org-constant">i</span>)];
|
|
stewart.MRb(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = stewart.MRb(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>)<span class="org-type">./</span>vecnorm(stewart.MRb(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>));
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org99665d0" class="outline-3">
|
|
<h3 id="org99665d0"><span class="section-number-3">5.4</span> <code>initializeStewartPose</code>: Determine the initial stroke in each leg to have the wanted pose</h3>
|
|
<div class="outline-text-3" id="text-5-4">
|
|
<p>
|
|
<a id="org6e45b74"></a>
|
|
</p>
|
|
|
|
<p>
|
|
This Matlab function is accessible <a href="src/initializeStewartPose.m">here</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div id="outline-container-orgd7db2e8" class="outline-4">
|
|
<h4 id="orgd7db2e8">Function description</h4>
|
|
<div class="outline-text-4" id="text-orgd7db2e8">
|
|
<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">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">% - dLi[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>
|
|
|
|
<div id="outline-container-orgf985ddd" class="outline-4">
|
|
<h4 id="orgf985ddd">Optional Parameters</h4>
|
|
<div class="outline-text-4" id="text-orgf985ddd">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">arguments
|
|
stewart
|
|
args.AP (3,1) double {mustBeNumeric} = zeros(3,1)
|
|
args.ARB (3,3) double {mustBeNumeric} = eye(3)
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org8ccd270" class="outline-4">
|
|
<h4 id="org8ccd270">Use the Inverse Kinematic function</h4>
|
|
<div class="outline-text-4" id="text-org8ccd270">
|
|
<div class="org-src-container">
|
|
<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);
|
|
|
|
stewart.dLi = dLi;
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org5403136" class="outline-3">
|
|
<h3 id="org5403136"><span class="section-number-3">5.5</span> <code>initializeCylindricalPlatforms</code>: Initialize the geometry of the Fixed and Mobile Platforms</h3>
|
|
<div class="outline-text-3" id="text-5-5">
|
|
<p>
|
|
<a id="org4a9389e"></a>
|
|
</p>
|
|
|
|
<p>
|
|
This Matlab function is accessible <a href="src/initializeCylindricalPlatforms.m">here</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div id="outline-container-orgd5d3877" class="outline-4">
|
|
<h4 id="orgd5d3877">Function description</h4>
|
|
<div class="outline-text-4" id="text-orgd5d3877">
|
|
<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">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">% - platforms [struct] - structure with the following fields:</span>
|
|
<span class="org-comment">% - Fpm [1x1] - Fixed Platform Mass [kg]</span>
|
|
<span class="org-comment">% - Msi [3x3] - Mobile Platform Inertia matrix [kg*m^2]</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">% - Fsi [3x3] - Fixed Platform Inertia matrix [kg*m^2]</span>
|
|
<span class="org-comment">% - Mph [1x1] - Mobile Platform Height [m]</span>
|
|
<span class="org-comment">% - Mpr [1x1] - Mobile Platform Radius [m]</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org89b8ffb" class="outline-4">
|
|
<h4 id="org89b8ffb">Optional Parameters</h4>
|
|
<div class="outline-text-4" id="text-org89b8ffb">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">arguments
|
|
stewart
|
|
args.Fpm (1,1) double {mustBeNumeric, mustBePositive} = 1
|
|
args.Fph (1,1) double {mustBeNumeric, mustBePositive} = 10e<span class="org-type">-</span>3
|
|
args.Fpr (1,1) double {mustBeNumeric, mustBePositive} = 125e<span class="org-type">-</span>3
|
|
args.Mpm (1,1) double {mustBeNumeric, mustBePositive} = 1
|
|
args.Mph (1,1) double {mustBeNumeric, mustBePositive} = 10e<span class="org-type">-</span>3
|
|
args.Mpr (1,1) double {mustBeNumeric, mustBePositive} = 100e<span class="org-type">-</span>3
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgbe1337f" class="outline-4">
|
|
<h4 id="orgbe1337f">Create the <code>platforms</code> struct</h4>
|
|
<div class="outline-text-4" id="text-orgbe1337f">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">platforms = struct();
|
|
|
|
platforms.Fpm = args.Fpm;
|
|
platforms.Fph = args.Fph;
|
|
platforms.Fpr = args.Fpr;
|
|
platforms.Fpi = diag([1<span class="org-type">/</span>12 <span class="org-type">*</span> platforms.Fpm <span class="org-type">*</span> (3<span class="org-type">*</span>platforms.Fpr<span class="org-type">^</span>2 <span class="org-type">+</span> platforms.Fph<span class="org-type">^</span>2), ...
|
|
1<span class="org-type">/</span>12 <span class="org-type">*</span> platforms.Fpm <span class="org-type">*</span> (3<span class="org-type">*</span>platforms.Fpr<span class="org-type">^</span>2 <span class="org-type">+</span> platforms.Fph<span class="org-type">^</span>2), ...
|
|
1<span class="org-type">/</span>2 <span class="org-type">*</span> platforms.Fpm <span class="org-type">*</span> platforms.Fpr<span class="org-type">^</span>2]);
|
|
|
|
platforms.Mpm = args.Mpm;
|
|
platforms.Mph = args.Mph;
|
|
platforms.Mpr = args.Mpr;
|
|
platforms.Mpi = diag([1<span class="org-type">/</span>12 <span class="org-type">*</span> platforms.Mpm <span class="org-type">*</span> (3<span class="org-type">*</span>platforms.Mpr<span class="org-type">^</span>2 <span class="org-type">+</span> platforms.Mph<span class="org-type">^</span>2), ...
|
|
1<span class="org-type">/</span>12 <span class="org-type">*</span> platforms.Mpm <span class="org-type">*</span> (3<span class="org-type">*</span>platforms.Mpr<span class="org-type">^</span>2 <span class="org-type">+</span> platforms.Mph<span class="org-type">^</span>2), ...
|
|
1<span class="org-type">/</span>2 <span class="org-type">*</span> platforms.Mpm <span class="org-type">*</span> platforms.Mpr<span class="org-type">^</span>2]);
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgc341af6" class="outline-4">
|
|
<h4 id="orgc341af6">Save the <code>platforms</code> struct</h4>
|
|
<div class="outline-text-4" id="text-orgc341af6">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">stewart.platforms = platforms;
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org00eda96" class="outline-3">
|
|
<h3 id="org00eda96"><span class="section-number-3">5.6</span> <code>initializeCylindricalStruts</code>: Define the inertia of cylindrical struts</h3>
|
|
<div class="outline-text-3" id="text-5-6">
|
|
<p>
|
|
<a id="org26263ac"></a>
|
|
</p>
|
|
|
|
<p>
|
|
This Matlab function is accessible <a href="src/initializeCylindricalStruts.m">here</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div id="outline-container-org6c51b85" class="outline-4">
|
|
<h4 id="org6c51b85">Function description</h4>
|
|
<div class="outline-text-4" id="text-org6c51b85">
|
|
<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">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 [struct] - structure with the following fields:</span>
|
|
<span class="org-comment">% - Fsm [6x1] - Mass of the Fixed part of the struts [kg]</span>
|
|
<span class="org-comment">% - Fsi [3x3x6] - Moment of Inertia for the Fixed part of the struts [kg*m^2]</span>
|
|
<span class="org-comment">% - Msm [6x1] - Mass of the Mobile part of the struts [kg]</span>
|
|
<span class="org-comment">% - Msi [3x3x6] - Moment of Inertia for the Mobile part of the struts [kg*m^2]</span>
|
|
<span class="org-comment">% - Fsh [6x1] - Height of cylinder for the Fixed part of the struts [m]</span>
|
|
<span class="org-comment">% - Fsr [6x1] - Radius of cylinder for the Fixed part of the struts [m]</span>
|
|
<span class="org-comment">% - Msh [6x1] - Height of cylinder for the Mobile part of the struts [m]</span>
|
|
<span class="org-comment">% - Msr [6x1] - Radius of cylinder for the Mobile part of the struts [m]</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org69e94db" class="outline-4">
|
|
<h4 id="org69e94db">Optional Parameters</h4>
|
|
<div class="outline-text-4" id="text-org69e94db">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">arguments
|
|
stewart
|
|
args.Fsm (1,1) double {mustBeNumeric, mustBePositive} = 0.1
|
|
args.Fsh (1,1) double {mustBeNumeric, mustBePositive} = 50e<span class="org-type">-</span>3
|
|
args.Fsr (1,1) double {mustBeNumeric, mustBePositive} = 5e<span class="org-type">-</span>3
|
|
args.Msm (1,1) double {mustBeNumeric, mustBePositive} = 0.1
|
|
args.Msh (1,1) double {mustBeNumeric, mustBePositive} = 50e<span class="org-type">-</span>3
|
|
args.Msr (1,1) double {mustBeNumeric, mustBePositive} = 5e<span class="org-type">-</span>3
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org78ed453" class="outline-4">
|
|
<h4 id="org78ed453">Create the <code>struts</code> structure</h4>
|
|
<div class="outline-text-4" id="text-org78ed453">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">struts = struct();
|
|
|
|
struts.Fsm = ones(6,1)<span class="org-type">.*</span>args.Fsm;
|
|
struts.Msm = ones(6,1)<span class="org-type">.*</span>args.Msm;
|
|
|
|
struts.Fsh = ones(6,1)<span class="org-type">.*</span>args.Fsh;
|
|
struts.Fsr = ones(6,1)<span class="org-type">.*</span>args.Fsr;
|
|
struts.Msh = ones(6,1)<span class="org-type">.*</span>args.Msh;
|
|
struts.Msr = ones(6,1)<span class="org-type">.*</span>args.Msr;
|
|
|
|
struts.Fsi = zeros(3, 3, 6);
|
|
struts.Msi = zeros(3, 3, 6);
|
|
<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>
|
|
struts.Fsi(<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> struts.Fsm(<span class="org-constant">i</span>) <span class="org-type">*</span> (3<span class="org-type">*</span>struts.Fsr(<span class="org-constant">i</span>)<span class="org-type">^</span>2 <span class="org-type">+</span> struts.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> struts.Fsm(<span class="org-constant">i</span>) <span class="org-type">*</span> (3<span class="org-type">*</span>struts.Fsr(<span class="org-constant">i</span>)<span class="org-type">^</span>2 <span class="org-type">+</span> struts.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> struts.Fsm(<span class="org-constant">i</span>) <span class="org-type">*</span> struts.Fsr(<span class="org-constant">i</span>)<span class="org-type">^</span>2]);
|
|
struts.Msi(<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> struts.Msm(<span class="org-constant">i</span>) <span class="org-type">*</span> (3<span class="org-type">*</span>struts.Msr(<span class="org-constant">i</span>)<span class="org-type">^</span>2 <span class="org-type">+</span> struts.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> struts.Msm(<span class="org-constant">i</span>) <span class="org-type">*</span> (3<span class="org-type">*</span>struts.Msr(<span class="org-constant">i</span>)<span class="org-type">^</span>2 <span class="org-type">+</span> struts.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> struts.Msm(<span class="org-constant">i</span>) <span class="org-type">*</span> struts.Msr(<span class="org-constant">i</span>)<span class="org-type">^</span>2]);
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">stewart.struts = struts;
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org88917f5" class="outline-3">
|
|
<h3 id="org88917f5"><span class="section-number-3">5.7</span> <code>initializeStrutDynamics</code>: Add Stiffness and Damping properties of each strut</h3>
|
|
<div class="outline-text-3" id="text-5-7">
|
|
<p>
|
|
<a id="org1c07928"></a>
|
|
</p>
|
|
|
|
<p>
|
|
This Matlab function is accessible <a href="src/initializeStrutDynamics.m">here</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div id="outline-container-orgeaab382" class="outline-4">
|
|
<h4 id="orgeaab382">Documentation</h4>
|
|
<div class="outline-text-4" id="text-orgeaab382">
|
|
|
|
<div id="orge60602d" class="figure">
|
|
<p><img src="figs/piezoelectric_stack.jpg" alt="piezoelectric_stack.jpg" width="500px" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 10: </span>Example of a piezoelectric stach actuator (PI)</p>
|
|
</div>
|
|
|
|
<p>
|
|
A simplistic model of such amplified actuator is shown in Figure <a href="#orgdff7381">11</a> where:
|
|
</p>
|
|
<ul class="org-ul">
|
|
<li>\(k_{i}\) represent the vertical stiffness of the actuator</li>
|
|
<li>\(F_{i}\) represents the force applied by the actuator</li>
|
|
<li>\(F_{m,i}\) represents the total measured force</li>
|
|
<li>\(v_{m,i}\) represents the absolute velocity of the top part of the actuator</li>
|
|
<li>\(d_{m,i}\) represents the total relative displacement of the actuator</li>
|
|
</ul>
|
|
|
|
|
|
<div id="orgdff7381" class="figure">
|
|
<p><img src="figs/actuator_model_simple.png" alt="actuator_model_simple.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 11: </span>Simple model of an Actuator</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org67dab8e" class="outline-4">
|
|
<h4 id="org67dab8e">Function description</h4>
|
|
<div class="outline-text-4" id="text-org67dab8e">
|
|
<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">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">% - Ki [6x1] - Stiffness of each strut [N/m]</span>
|
|
<span class="org-comment">% - Ci [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">% - Ki [6x1] - Stiffness of each strut [N/m]</span>
|
|
<span class="org-comment">% - Ci [6x1] - Damping of each strut [N/(m/s)]</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org8f25fd7" class="outline-4">
|
|
<h4 id="org8f25fd7">Optional Parameters</h4>
|
|
<div class="outline-text-4" id="text-org8f25fd7">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">arguments
|
|
stewart
|
|
args.Ki (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e6<span class="org-type">*</span>ones(6,1)
|
|
args.Ci (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e1<span class="org-type">*</span>ones(6,1)
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgb723c92" class="outline-4">
|
|
<h4 id="orgb723c92">Add Stiffness and Damping properties of each strut</h4>
|
|
<div class="outline-text-4" id="text-orgb723c92">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">stewart.Ki = args.Ki;
|
|
stewart.Ci = args.Ci;
|
|
|
|
stewart.actuator_type = 1;
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgc7c1044" class="outline-3">
|
|
<h3 id="orgc7c1044"><span class="section-number-3">5.8</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-8">
|
|
<p>
|
|
<a id="orgbfe718f"></a>
|
|
</p>
|
|
|
|
<p>
|
|
This Matlab function is accessible <a href="src/initializeAmplifiedStrutDynamics.m">here</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div id="outline-container-orgcd8de37" class="outline-4">
|
|
<h4 id="orgcd8de37">Documentation</h4>
|
|
<div class="outline-text-4" id="text-orgcd8de37">
|
|
<p>
|
|
An amplified piezoelectric actuator is shown in Figure <a href="#org75cf2c8">12</a>.
|
|
</p>
|
|
|
|
|
|
<div id="org75cf2c8" 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 12: </span>Example of an Amplified piezoelectric actuator with an integrated displacement sensor (Cedrat Technologies)</p>
|
|
</div>
|
|
|
|
<p>
|
|
A simplistic model of such amplified actuator is shown in Figure <a href="#orgba87752">13</a> where:
|
|
</p>
|
|
<ul class="org-ul">
|
|
<li>\(k_{p,i}\) represent the vertical stiffness when the piezoelectric stack is removed</li>
|
|
<li>\(k_{s,i}\) is the vertical stiffness contribution of the piezoelectric stack</li>
|
|
<li>\(F_{i}\) represents the part of the piezoelectric stack that is used as a force actuator</li>
|
|
<li>\(F_{m,i}\) represents the remaining part of the piezoelectric stack that is used as a force sensor</li>
|
|
<li>\(v_{m,i}\) represents the absolute velocity of the top part of the actuator</li>
|
|
<li>\(d_{m,i}\) represents the total relative displacement of the actuator</li>
|
|
</ul>
|
|
|
|
|
|
<div id="orgba87752" class="figure">
|
|
<p><img src="figs/iff_1dof.png" alt="iff_1dof.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 13: </span>Model of an amplified actuator</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org495f71a" class="outline-4">
|
|
<h4 id="org495f71a">Function description</h4>
|
|
<div class="outline-text-4" id="text-org495f71a">
|
|
<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">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">% - Ksi [6x1] - Vertical stiffness contribution of the piezoelectric stack [N/m]</span>
|
|
<span class="org-comment">% - Csi [6x1] - Vertical damping contribution of the piezoelectric stack [N/(m/s)]</span>
|
|
<span class="org-comment">% - Kdi [6x1] - Vertical stiffness when the piezoelectric stack is removed [N/m]</span>
|
|
<span class="org-comment">% - Cdi [6x1] - Vertical damping when the piezoelectric stack is removed [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">% - Ki [6x1] - Total Stiffness of each strut [N/m]</span>
|
|
<span class="org-comment">% - Ci [6x1] - Total Damping of each strut [N/(m/s)]</span>
|
|
<span class="org-comment">% - Ksi [6x1] - Vertical stiffness contribution of the piezoelectric stack [N/m]</span>
|
|
<span class="org-comment">% - Csi [6x1] - Vertical damping contribution of the piezoelectric stack [N/(m/s)]</span>
|
|
<span class="org-comment">% - Kdi [6x1] - Vertical stiffness when the piezoelectric stack is removed [N/m]</span>
|
|
<span class="org-comment">% - Cdi [6x1] - Vertical damping when the piezoelectric stack is removed [N/(m/s)]</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org961095b" class="outline-4">
|
|
<h4 id="org961095b">Optional Parameters</h4>
|
|
<div class="outline-text-4" id="text-org961095b">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">arguments
|
|
stewart
|
|
args.Kdi (6,1) double {mustBeNumeric, mustBeNonnegative} = 5e6<span class="org-type">*</span>ones(6,1)
|
|
args.Cdi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e1<span class="org-type">*</span>ones(6,1)
|
|
args.Ksi (6,1) double {mustBeNumeric, mustBeNonnegative} = 15e6<span class="org-type">*</span>ones(6,1)
|
|
args.Csi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e1<span class="org-type">*</span>ones(6,1)
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org972a2fe" class="outline-4">
|
|
<h4 id="org972a2fe">Add Stiffness and Damping properties of each strut</h4>
|
|
<div class="outline-text-4" id="text-org972a2fe">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">stewart.Ksi = args.Ksi;
|
|
stewart.Csi = args.Csi;
|
|
|
|
stewart.Kdi = args.Kdi;
|
|
stewart.Cdi = args.Cdi;
|
|
|
|
stewart.Ki = args.Ksi <span class="org-type">+</span> args.Kdi;
|
|
stewart.Ci = args.Csi <span class="org-type">+</span> args.Cdi;
|
|
|
|
stewart.actuator_type = 2;
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org809bd98" class="outline-3">
|
|
<h3 id="org809bd98"><span class="section-number-3">5.9</span> <code>initializeJointDynamics</code>: Add Stiffness and Damping properties for spherical joints</h3>
|
|
<div class="outline-text-3" id="text-5-9">
|
|
<p>
|
|
<a id="org3a3e638"></a>
|
|
</p>
|
|
|
|
<p>
|
|
This Matlab function is accessible <a href="src/initializeJointDynamics.m">here</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div id="outline-container-org462ee22" class="outline-4">
|
|
<h4 id="org462ee22">Function description</h4>
|
|
<div class="outline-text-4" id="text-org462ee22">
|
|
<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">% - Ksbi [6x1] - Bending (Rx, Ry) Stiffness for each top Spherical joints [(N.m)/rad]</span>
|
|
<span class="org-comment">% - Csbi [6x1] - Bending (Rx, Ry) Damping of each top Spherical joint [(N.m)/(rad/s)]</span>
|
|
<span class="org-comment">% - Ksti [6x1] - Torsion (Rz) Stiffness for each top Spherical joints [(N.m)/rad]</span>
|
|
<span class="org-comment">% - Csti [6x1] - Torsion (Rz) Damping of each top Spherical joint [(N.m)/(rad/s)]</span>
|
|
<span class="org-comment">% - Kubi [6x1] - Bending (Rx, Ry) Stiffness for each bottom Universal joints [(N.m)/rad]</span>
|
|
<span class="org-comment">% - Cubi [6x1] - Bending (Rx, Ry) Damping of each bottom Universal joint [(N.m)/(rad/s)]</span>
|
|
<span class="org-comment">% - disable [boolean] - Sets all the stiffness/damping to zero</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">% - Ksbi [6x1] - Bending (Rx, Ry) Stiffness for each top Spherical joints [(N.m)/rad]</span>
|
|
<span class="org-comment">% - Csbi [6x1] - Bending (Rx, Ry) Damping of each top Spherical joint [(N.m)/(rad/s)]</span>
|
|
<span class="org-comment">% - Ksti [6x1] - Torsion (Rz) Stiffness for each top Spherical joints [(N.m)/rad]</span>
|
|
<span class="org-comment">% - Csti [6x1] - Torsion (Rz) Damping of each top Spherical joint [(N.m)/(rad/s)]</span>
|
|
<span class="org-comment">% - Kubi [6x1] - Bending (Rx, Ry) Stiffness for each bottom Universal joints [(N.m)/rad]</span>
|
|
<span class="org-comment">% - Cubi [6x1] - Bending (Rx, Ry) Damping of each bottom Universal joint [(N.m)/(rad/s)]</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org3f8c83d" class="outline-4">
|
|
<h4 id="org3f8c83d">Optional Parameters</h4>
|
|
<div class="outline-text-4" id="text-org3f8c83d">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">arguments
|
|
stewart
|
|
args.Ksbi (6,1) double {mustBeNumeric, mustBeNonnegative} = 15<span class="org-type">*</span>ones(6,1)
|
|
args.Csbi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e<span class="org-type">-</span>4<span class="org-type">*</span>ones(6,1)
|
|
args.Ksti (6,1) double {mustBeNumeric, mustBeNonnegative} = 20<span class="org-type">*</span>ones(6,1)
|
|
args.Csti (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e<span class="org-type">-</span>3<span class="org-type">*</span>ones(6,1)
|
|
args.Kubi (6,1) double {mustBeNumeric, mustBeNonnegative} = 15<span class="org-type">*</span>ones(6,1)
|
|
args.Cubi (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e<span class="org-type">-</span>4<span class="org-type">*</span>ones(6,1)
|
|
args.disable logical {mustBeNumericOrLogical} = <span class="org-constant">false</span>
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org88cac16" class="outline-4">
|
|
<h4 id="org88cac16">Add Stiffness and Damping properties of each strut</h4>
|
|
<div class="outline-text-4" id="text-org88cac16">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"><span class="org-keyword">if</span> args.disable
|
|
stewart.Ksbi = zeros(6,1);
|
|
stewart.Csbi = zeros(6,1);
|
|
stewart.Ksti = zeros(6,1);
|
|
stewart.Csti = zeros(6,1);
|
|
stewart.Kubi = zeros(6,1);
|
|
stewart.Cubi = zeros(6,1);
|
|
<span class="org-keyword">else</span>
|
|
stewart.Ksbi = args.Ksbi;
|
|
stewart.Csbi = args.Csbi;
|
|
stewart.Ksti = args.Ksti;
|
|
stewart.Csti = args.Csti;
|
|
stewart.Kubi = args.Kubi;
|
|
stewart.Cubi = args.Cubi;
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org852f598" class="outline-3">
|
|
<h3 id="org852f598"><span class="section-number-3">5.10</span> <code>displayArchitecture</code>: 3D plot of the Stewart platform architecture</h3>
|
|
<div class="outline-text-3" id="text-5-10">
|
|
<p>
|
|
<a id="org329c7fb"></a>
|
|
</p>
|
|
|
|
<p>
|
|
This Matlab function is accessible <a href="src/displayArchitecture.m">here</a>.
|
|
</p>
|
|
</div>
|
|
|
|
<div id="outline-container-orgdaedc25" class="outline-4">
|
|
<h4 id="orgdaedc25">Function description</h4>
|
|
<div class="outline-text-4" id="text-orgdaedc25">
|
|
<div class="org-src-container">
|
|
<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">%</span>
|
|
<span class="org-comment">% Outputs:</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org57e3729" class="outline-4">
|
|
<h4 id="org57e3729">Optional Parameters</h4>
|
|
<div class="outline-text-4" id="text-org57e3729">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">arguments
|
|
stewart
|
|
args.AP (3,1) double {mustBeNumeric} = zeros(3,1)
|
|
args.ARB (3,3) double {mustBeNumeric} = eye(3)
|
|
args.F_color = [0 0.4470 0.7410]
|
|
args.M_color = [0.8500 0.3250 0.0980]
|
|
args.L_color = [0 0 0]
|
|
args.frames logical {mustBeNumericOrLogical} = <span class="org-constant">true</span>
|
|
args.legs logical {mustBeNumericOrLogical} = <span class="org-constant">true</span>
|
|
args.joints logical {mustBeNumericOrLogical} = <span class="org-constant">true</span>
|
|
args.labels logical {mustBeNumericOrLogical} = <span class="org-constant">true</span>
|
|
args.platforms logical {mustBeNumericOrLogical} = <span class="org-constant">true</span>
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org322dc3a" class="outline-4">
|
|
<h4 id="org322dc3a">Figure Creation, Frames and Homogeneous transformations</h4>
|
|
<div class="outline-text-4" id="text-org322dc3a">
|
|
<p>
|
|
The reference frame of the 3d plot corresponds to the frame \(\{F\}\).
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"><span class="org-type">figure</span>;
|
|
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">
|
|
<pre class="src src-matlab">FTa = [eye(3), stewart.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>stewart.MO_B; ...
|
|
zeros<span class="org-type">(1,3), 1];</span>
|
|
|
|
FTm = FTa<span class="org-type">*</span>ATb<span class="org-type">*</span>BTm;
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
Let’s define a parameter that define the length of the unit vectors used to display the frames.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">d_unit_vector = stewart.H<span class="org-type">/</span>4;
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
Let’s define a parameter used to position the labels with respect to the center of the element.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">d_label = stewart.H<span class="org-type">/</span>20;
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orga02eb71" class="outline-4">
|
|
<h4 id="orga02eb71">Fixed Base elements</h4>
|
|
<div class="outline-text-4" id="text-orga02eb71">
|
|
<p>
|
|
Let’s first plot the frame \(\{F\}\).
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">Ff = [0, 0, 0];
|
|
<span class="org-keyword">if</span> args.frames
|
|
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)
|
|
|
|
<span class="org-keyword">if</span> args.labels
|
|
<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);
|
|
<span class="org-keyword">end</span>
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
Now plot the frame \(\{A\}\) fixed to the Base.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">Fa = stewart.FO_A;
|
|
|
|
<span class="org-keyword">if</span> args.frames
|
|
quiver3(Fa(1)<span class="org-type">*</span>ones(1,3), Fa(2)<span class="org-type">*</span>ones(1,3), Fa(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)
|
|
|
|
<span class="org-keyword">if</span> args.labels
|
|
<span class="org-type">text</span>(Fa(1) <span class="org-type">+</span> d_label, ...
|
|
Fa<span class="org-type">(2) + d_label, ...</span>
|
|
Fa(3) <span class="org-type">+</span> d_label, <span class="org-string">'$\{A\}$'</span>, <span class="org-string">'Color'</span>, args.F_color);
|
|
<span class="org-keyword">end</span>
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
Let’s then plot the circle corresponding to the shape of the Fixed base.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"><span class="org-keyword">if</span> args.platforms <span class="org-type">&&</span> isfield(stewart, <span class="org-string">'platforms'</span>) <span class="org-type">&&</span> isfield(stewart.platforms, <span class="org-string">'Fpr'</span>)
|
|
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.platforms.Fpr; <span class="org-comment">% Radius of the circle [m]</span>
|
|
|
|
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));
|
|
|
|
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);
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
Let’s now plot the position and labels of the Fixed Joints
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"><span class="org-keyword">if</span> args.joints
|
|
scatter3(stewart.Fa(1,<span class="org-type">:</span>), ...
|
|
stewart.Fa(2,<span class="org-type">:</span>), ...
|
|
stewart.Fa(3,<span class="org-type">:</span>), <span class="org-string">'MarkerEdgeColor'</span>, args.F_color);
|
|
<span class="org-keyword">if</span> args.labels
|
|
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:size(stewart.Fa,2)</span>
|
|
<span class="org-type">text</span>(stewart.Fa(1,<span class="org-constant">i</span>) <span class="org-type">+</span> d_label, ...
|
|
stewart.Fa(2,<span class="org-constant">i</span>), ...
|
|
stewart.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>
|
|
<span class="org-keyword">end</span>
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orge41970f" class="outline-4">
|
|
<h4 id="orge41970f">Mobile Platform elements</h4>
|
|
<div class="outline-text-4" id="text-orge41970f">
|
|
<p>
|
|
Plot the frame \(\{M\}\).
|
|
</p>
|
|
<div class="org-src-container">
|
|
<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>
|
|
|
|
<span class="org-keyword">if</span> args.frames
|
|
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)
|
|
|
|
<span class="org-keyword">if</span> args.labels
|
|
<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);
|
|
<span class="org-keyword">end</span>
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
Plot the frame \(\{B\}\).
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">FB = stewart.FO_A <span class="org-type">+</span> args.AP;
|
|
|
|
<span class="org-keyword">if</span> args.frames
|
|
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)
|
|
|
|
<span class="org-keyword">if</span> args.labels
|
|
<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);
|
|
<span class="org-keyword">end</span>
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
Let’s then plot the circle corresponding to the shape of the Mobile platform.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"><span class="org-keyword">if</span> args.platforms <span class="org-type">&&</span> isfield(stewart, <span class="org-string">'platforms'</span>) <span class="org-type">&&</span> isfield(stewart.platforms, <span class="org-string">'Mpr'</span>)
|
|
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.platforms.Mpr; <span class="org-comment">% Radius of the circle [m]</span>
|
|
|
|
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));
|
|
|
|
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);
|
|
<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">
|
|
<pre class="src src-matlab"><span class="org-keyword">if</span> args.joints
|
|
Fb = FTm<span class="org-type">*</span>[stewart.Mb;ones(1,6)];
|
|
|
|
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);
|
|
|
|
<span class="org-keyword">if</span> args.labels
|
|
<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>
|
|
<span class="org-keyword">end</span>
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org7bff0e2" class="outline-4">
|
|
<h4 id="org7bff0e2">Legs</h4>
|
|
<div class="outline-text-4" id="text-org7bff0e2">
|
|
<p>
|
|
Plot the legs connecting the joints of the fixed base to the joints of the mobile platform.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"><span class="org-keyword">if</span> args.legs
|
|
<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>
|
|
plot3([stewart.Fa(1,<span class="org-constant">i</span>), Fb(1,<span class="org-constant">i</span>)], ...
|
|
[stewart.Fa(2,<span class="org-constant">i</span>), Fb(2,<span class="org-constant">i</span>)], ...
|
|
[stewart.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>((stewart.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, ...
|
|
(stewart.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, ...
|
|
(stewart.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>
|
|
<span class="org-keyword">end</span>
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgd8a4adb" class="outline-4">
|
|
<h4 id="orgd8a4adb"><span class="section-number-4">5.10.1</span> Figure parameters</h4>
|
|
<div class="outline-text-4" id="text-5-10-1">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab">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;
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<p>
|
|
|
|
<h1 class='org-ref-bib-h1'>Bibliography</h1>
|
|
<ul class='org-ref-bib'><li><a id="taghirad13_paral">[taghirad13_paral]</a> <a name="taghirad13_paral"></a>Taghirad, Parallel robots : mechanics and control, CRC Press (2013).</li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
<div id="postamble" class="status">
|
|
<p class="author">Author: Dehaeze Thomas</p>
|
|
<p class="date">Created: 2020-02-10 lun. 18:17</p>
|
|
</div>
|
|
</body>
|
|
</html>
|