2020-01-27 17:42:09 +01:00
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
2020-02-11 15:27:39 +01:00
<?xml version="1.0" encoding="utf-8"?>
2020-01-27 17:42:09 +01:00
< !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-11 15:27:39 +01:00
<!-- 2020 - 02 - 11 mar. 15:23 -->
2020-01-27 17:42:09 +01:00
< 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 >
2020-01-29 16:49:41 +01:00
< script >
2020-02-06 17:25:38 +01:00
MathJax = {
tex: { macros: {
bm: ["\\boldsymbol{#1}",1],
}
2020-01-29 16:49:41 +01:00
}
2020-02-06 17:25:38 +01:00
};
< / script >
< script type = "text/javascript"
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">< / script >
2020-01-27 17:42:09 +01:00
< / 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 >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org8d01b94" > Definition of the Stewart Platform Geometry< / a >
2020-01-27 17:42:09 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org8fe4e0e" > Frames Definition< / a > < / li >
< li > < a href = "#org1fc986a" > Location of the Spherical Joints< / a > < / li >
< li > < a href = "#org6a51c7d" > Length and orientation of the struts< / a > < / li >
< li > < a href = "#org9261b10" > Rest Position of the Stewart platform< / a > < / li >
2020-01-27 17:42:09 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#orgbce93f2" > Definition of the Inertia and geometry of the Fixed base, Mobile platform and Struts< / a >
2020-01-27 17:42:09 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#orgd783c33" > Inertia and Geometry of the Fixed and Mobile platforms< / a > < / li >
< li > < a href = "#org126d465" > Inertia and Geometry of the struts< / a > < / li >
2020-01-27 17:42:09 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#orgd7fb840" > Definition of the stiffness and damping of the joints< / a >
2020-01-27 17:42:09 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#orgdb7ce43" > Stiffness and Damping of the Actuator< / a > < / li >
< li > < a href = "#orgd5629d6" > Stiffness and Damping of the Spherical Joints< / a > < / li >
2020-01-27 17:42:09 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org6d2c540" > Summary of the Initialization Procedure and Matlab Example< / a >
2020-01-27 17:42:09 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org715f118" > Example of the initialization of a Stewart Platform< / a > < / li >
2020-01-27 17:42:09 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org48340b4" > Functions< / a >
2020-01-27 17:42:09 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#orgd89f0e1" > < code > initializeStewartPlatform< / code > : Initialize the Stewart Platform structure< / a >
2020-01-27 17:42:09 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#orgbc1420f" > Documentation< / a > < / li >
< li > < a href = "#org3c4d7d8" > Function description< / a > < / li >
< li > < a href = "#orgd567fc1" > Initialize the Stewart structure< / a > < / li >
2020-01-27 17:42:09 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#orgb11894c" > < code > initializeFramesPositions< / code > : Initialize the positions of frames {A}, {B}, {F} and {M}< / a >
2020-01-27 17:42:09 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org527c72f" > Documentation< / a > < / li >
< li > < a href = "#orgb28c816" > Function description< / a > < / li >
< li > < a href = "#org8bcc794" > Optional Parameters< / a > < / li >
< li > < a href = "#org458592e" > Compute the position of each frame< / a > < / li >
< li > < a href = "#org0516874" > Populate the < code > stewart< / code > structure< / a > < / li >
2020-01-27 17:42:09 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org9057387" > < code > generateGeneralConfiguration< / code > : Generate a Very General Configuration< / a >
2020-01-27 17:42:09 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org8e00e26" > Documentation< / a > < / li >
< li > < a href = "#orgd7988c9" > Function description< / a > < / li >
< li > < a href = "#orgbca44f1" > Optional Parameters< / a > < / li >
< li > < a href = "#org232e4c2" > Compute the pose< / a > < / li >
< li > < a href = "#orgc0cd111" > Populate the < code > stewart< / code > structure< / a > < / li >
2020-01-27 17:42:09 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org861f6de" > < code > computeJointsPose< / code > : Compute the Pose of the Joints< / a >
2020-01-27 17:42:09 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org7165251" > Documentation< / a > < / li >
< li > < a href = "#org67db014" > Function description< / a > < / li >
< li > < a href = "#org96d0ef3" > Check the < code > stewart< / code > structure elements< / a > < / li >
< li > < a href = "#org52b0d4c" > Compute the position of the Joints< / a > < / li >
< li > < a href = "#org4b76b0f" > Compute the strut length and orientation< / a > < / li >
< li > < a href = "#orgd621d5e" > Compute the orientation of the Joints< / a > < / li >
< li > < a href = "#org2a4c563" > Populate the < code > stewart< / code > structure< / a > < / li >
2020-01-27 17:42:09 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org329bef9" > < code > initializeStewartPose< / code > : Determine the initial stroke in each leg to have the wanted pose< / a >
2020-01-28 17:15:19 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#orgbe9f167" > Function description< / a > < / li >
< li > < a href = "#org9aa96f1" > Optional Parameters< / a > < / li >
< li > < a href = "#org3d3ef62" > Use the Inverse Kinematic function< / a > < / li >
< li > < a href = "#org63a831f" > Populate the < code > stewart< / code > structure< / a > < / li >
2020-01-27 17:42:09 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org6ff5b31" > < code > initializeCylindricalPlatforms< / code > : Initialize the geometry of the Fixed and Mobile Platforms< / a >
2020-01-27 17:42:09 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org930d1f3" > Function description< / a > < / li >
< li > < a href = "#orgf010fb9" > Optional Parameters< / a > < / li >
< li > < a href = "#org25a390a" > Compute the Inertia matrices of platforms< / a > < / li >
< li > < a href = "#org61255f3" > Populate the < code > stewart< / code > structure< / a > < / li >
2020-01-27 17:42:09 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org60aa215" > < code > initializeCylindricalStruts< / code > : Define the inertia of cylindrical struts< / a >
2020-01-27 17:42:09 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#orgc7d5120" > Function description< / a > < / li >
< li > < a href = "#orgfb4e3ed" > Optional Parameters< / a > < / li >
< li > < a href = "#orgc056498" > Compute the properties of the cylindrical struts< / a > < / li >
< li > < a href = "#orgc329127" > Populate the < code > stewart< / code > structure< / a > < / li >
2020-01-27 17:42:09 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org3ad0cd1" > < code > initializeStrutDynamics< / code > : Add Stiffness and Damping properties of each strut< / a >
2020-01-27 17:42:09 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org9075466" > Documentation< / a > < / li >
< li > < a href = "#org21e1e52" > Function description< / a > < / li >
< li > < a href = "#orgd9bda04" > Optional Parameters< / a > < / li >
< li > < a href = "#orgadb8327" > Add Stiffness and Damping properties of each strut< / a > < / li >
2020-02-07 17:12:26 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#orgd8d403e" > < code > initializeAmplifiedStrutDynamics< / code > : Add Stiffness and Damping properties of each strut for an amplified piezoelectric actuator< / a >
2020-02-07 17:12:26 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org8ba232a" > Documentation< / a > < / li >
< li > < a href = "#org7b6e247" > Function description< / a > < / li >
< li > < a href = "#org936848c" > Optional Parameters< / a > < / li >
< li > < a href = "#org9b435e8" > Compute the total stiffness and damping< / a > < / li >
< li > < a href = "#orgd78e8b0" > Populate the < code > stewart< / code > structure< / a > < / li >
2020-02-10 18:17:37 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#orgeb6173a" > < code > initializeJointDynamics< / code > : Add Stiffness and Damping properties for spherical joints< / a >
2020-02-10 18:17:37 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org051062f" > Function description< / a > < / li >
< li > < a href = "#orgf57427f" > Optional Parameters< / a > < / li >
< li > < a href = "#orgc6d4183" > Add Actuator Type< / a > < / li >
< li > < a href = "#orgc0e613c" > Add Stiffness and Damping in Translation of each strut< / a > < / li >
< li > < a href = "#org04698fc" > Add Stiffness and Damping in Rotation of each strut< / a > < / li >
2020-02-11 15:16:07 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#orgea07e0e" > < code > initializeInertialSensor< / code > : Initialize the inertial sensor in each strut< / a >
2020-02-11 15:16:07 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org86c4462" > Function description< / a > < / li >
< li > < a href = "#org6d69ef4" > Optional Parameters< / a > < / li >
< li > < a href = "#org463075d" > Compute the properties of the sensor< / a > < / li >
< li > < a href = "#orgbf82c53" > Populate the < code > stewart< / code > structure< / a > < / li >
2020-02-11 15:16:07 +01:00
< / ul >
< / li >
2020-02-11 15:27:39 +01:00
< li > < a href = "#org5266e9d" > < code > displayArchitecture< / code > : 3D plot of the Stewart platform architecture< / a >
2020-02-11 15:16:07 +01:00
< ul >
2020-02-11 15:27:39 +01:00
< li > < a href = "#orgfcc25cc" > Function description< / a > < / li >
< li > < a href = "#org51d9478" > Optional Parameters< / a > < / li >
< li > < a href = "#org1ee899b" > Check the < code > stewart< / code > structure elements< / a > < / li >
< li > < a href = "#orgc088b18" > Figure Creation, Frames and Homogeneous transformations< / a > < / li >
< li > < a href = "#orgc25a979" > Fixed Base elements< / a > < / li >
< li > < a href = "#org8417772" > Mobile Platform elements< / a > < / li >
< li > < a href = "#org5f40b79" > Legs< / a > < / li >
< li > < a href = "#org81be27b" > Figure parameters< / a > < / li >
2020-01-27 17:42:09 +01:00
< / ul >
< / li >
< / ul >
< / li >
< / ul >
< / div >
< / div >
< p >
2020-01-28 17:15:19 +01:00
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.
2020-01-27 17:42:09 +01:00
< / p >
< p >
2020-01-28 17:15:19 +01:00
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" >
2020-02-11 15:27:39 +01:00
< li > First, the geometry if defined (Section < a href = "#orga5e83f9" > No description for this link< / a > )< / li >
< li > Then, the inertia of the mechanical elements are defined (Section < a href = "#orga326389" > No description for this link< / a > )< / li >
< li > Finally, the Stiffness and Damping characteristics of the elements are defined (Section < a href = "#org96459ea" > No description for this link< / a > )< / li >
2020-01-28 17:15:19 +01:00
< / ul >
< p >
2020-02-11 15:27:39 +01:00
In section < a href = "#orgaede9ee" > No description for this link< / a > , the procedure the initialize the Stewart platform is summarize and the associated Matlab code is shown.
2020-01-28 17:15:19 +01:00
< / p >
< p >
2020-02-11 15:27:39 +01:00
Finally, all the Matlab function used to initialize the Stewart platform are described in section < a href = "#orgac086c4" > No description for this link< / a > .
2020-01-28 17:15:19 +01:00
< / p >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org8d01b94" class = "outline-2" >
< h2 id = "org8d01b94" > Definition of the Stewart Platform Geometry< / h2 >
< div class = "outline-text-2" id = "text-org8d01b94" >
2020-01-28 17:15:19 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "orga5e83f9" > < / a >
2020-01-28 17:15:19 +01:00
< / 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 >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org8fe4e0e" class = "outline-3" >
< h3 id = "org8fe4e0e" > Frames Definition< / h3 >
< div class = "outline-text-3" id = "text-org8fe4e0e" >
2020-01-28 17:15:19 +01:00
< p >
2020-02-11 15:27:39 +01:00
We define 4 important < b > frames< / b > (see Figure < a href = "#org9940a8f" > 1< / a > ):
2020-01-27 17:42:09 +01:00
< / 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 >
2020-01-28 17:15:19 +01:00
< 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 >
2020-01-27 17:42:09 +01:00
< / ul >
2020-01-28 17:15:19 +01:00
< p >
The frames \(\{A\}\) and \(\{B\}\) are used for all the kinematic analysis (Jacobian, Stiffness matrix, … ).
< / p >
2020-01-27 17:42:09 +01:00
< p >
2020-01-28 17:15:19 +01:00
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 >
2020-02-11 15:27:39 +01:00
The definition of the frames is done with the < code > initializeFramesPositions< / code > function (< a href = "#org3009bf2" > link< / a > );
2020-01-28 17:15:19 +01:00
< / p >
2020-02-11 15:27:39 +01:00
< div id = "org9940a8f" class = "figure" >
2020-01-28 17:15:19 +01:00
< 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 >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org1fc986a" class = "outline-3" >
< h3 id = "org1fc986a" > Location of the Spherical Joints< / h3 >
< div class = "outline-text-3" id = "text-org1fc986a" >
2020-01-28 17:15:19 +01:00
< p >
2020-02-11 15:27:39 +01:00
Then, we define the < b > location of the spherical joints< / b > (see Figure < a href = "#org5a59399" > 2< /a>):
2020-01-27 17:42:09 +01:00
< / 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 >
2020-01-28 17:15:19 +01:00
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 >
2020-02-06 17:25:38 +01:00
The location of the joints can be set to arbitrary positions or it can be computed to obtain specific configurations such as:
2020-01-27 17:42:09 +01:00
< / p >
< ul class = "org-ul" >
2020-02-06 17:25:38 +01:00
< li > A cubic configuration: function < code > generateCubicConfiguration< / code > (described in < a href = "cubic-configuration.html" > this< / a > file)< / li >
2020-01-28 17:15:19 +01:00
< li > A symmetrical configuration< / li >
2020-01-27 17:42:09 +01:00
< / ul >
2020-02-06 17:25:38 +01:00
< p >
2020-02-11 15:27:39 +01:00
A function (< code > generateGeneralConfiguration< / code > ) to set the position of the joints on a circle is described < a href = "#org9f50820" > here< / a > .
2020-02-06 17:25:38 +01:00
< / p >
2020-01-27 17:42:09 +01:00
< p >
2020-01-28 17:15:19 +01:00
The location of the spherical joints are then given by \({}^{F}\bm{a}_{i}\) and \({}^{M}\bm{b}_{i}\).
< / p >
2020-02-11 15:27:39 +01:00
< div id = "org5a59399" class = "figure" >
2020-01-28 17:15:19 +01:00
< 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 >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org6a51c7d" class = "outline-3" >
< h3 id = "org6a51c7d" > Length and orientation of the struts< / h3 >
< div class = "outline-text-3" id = "text-org6a51c7d" >
2020-01-28 17:15:19 +01:00
< 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).
2020-02-11 15:27:39 +01:00
The length and orientation of each strut is represented in figure < a href = "#org145b8ab" > 3< / a > .
2020-01-28 17:15:19 +01:00
< / p >
< p >
2020-02-11 15:27:39 +01:00
This is done with the < code > computeJointsPose< / code > function (< a href = "#org7f34b08" > link< / a > ).
2020-01-28 17:15:19 +01:00
< / p >
2020-02-11 15:27:39 +01:00
< div id = "org145b8ab" class = "figure" >
2020-01-28 17:15:19 +01:00
< 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 >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org9261b10" class = "outline-3" >
< h3 id = "org9261b10" > Rest Position of the Stewart platform< / h3 >
< div class = "outline-text-3" id = "text-org9261b10" >
2020-01-28 17:15:19 +01:00
< 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:
2020-01-27 17:42:09 +01:00
< / p >
< ul class = "org-ul" >
2020-01-28 17:18:10 +01:00
< li > the position of \(\bm{O}_B\) expressed in \(\{A\}\) using \({}^A\bm{P}\)< / li >
< li > the orientation of \(\{B\}\) expressed in \(\{A\}\) using a rotation matrix \({}^{A}\bm{R}_{B}\)< / li >
2020-01-27 17:42:09 +01:00
< / ul >
< p >
2020-02-11 15:27:39 +01:00
Then, the function < code > initializeStewartPose< / code > (< a href = "#orga94c6a9" > link< / a > ) compute the corresponding initial and rest position of each of the strut.
2020-01-28 17:15:19 +01:00
< / p >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgbce93f2" class = "outline-2" >
< h2 id = "orgbce93f2" > Definition of the Inertia and geometry of the Fixed base, Mobile platform and Struts< / h2 >
< div class = "outline-text-2" id = "text-orgbce93f2" >
2020-01-28 17:15:19 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "orga326389" > < / a >
2020-01-28 17:15:19 +01:00
< / p >
< p >
Now that the geometry of the Stewart platform has been defined, we have to choose the inertia of:
2020-01-27 17:42:09 +01:00
< / p >
< ul class = "org-ul" >
2020-01-28 17:15:19 +01:00
< li > The Fixed base< / li >
< li > The Mobile platform< / li >
< li > The two parts of the struts< / li >
2020-01-27 17:42:09 +01:00
< / ul >
< p >
2020-01-28 17:15:19 +01:00
The inertia of these elements will modify the dynamics of the systems.
It is thus important to set them properly.
< / p >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgd783c33" class = "outline-3" >
< h3 id = "orgd783c33" > Inertia and Geometry of the Fixed and Mobile platforms< / h3 >
< div class = "outline-text-3" id = "text-orgd783c33" >
2020-01-28 17:15:19 +01:00
< 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:
2020-01-27 17:42:09 +01:00
< / p >
< ul class = "org-ul" >
2020-02-11 15:27:39 +01:00
< li > < code > initializeCylindricalPlatforms< / code > (< a href = "#org6ad7062" > link< / a > ): by choosing the height, radius and mass of the platforms, it computes the inertia matrix that will be used for simulation< / li >
2020-01-27 17:42:09 +01:00
< / ul >
2020-01-28 17:15:19 +01:00
< / div >
< / div >
2020-01-27 17:42:09 +01:00
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org126d465" class = "outline-3" >
< h3 id = "org126d465" > Inertia and Geometry of the struts< / h3 >
< div class = "outline-text-3" id = "text-org126d465" >
2020-01-28 17:15:19 +01:00
< 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" >
2020-02-11 15:27:39 +01:00
< li > < code > initializeCylindricalStruts< / code > (< a href = "#org6263b6d" > 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 >
2020-01-28 17:15:19 +01:00
< / ul >
< / div >
< / div >
< / div >
2020-01-27 17:42:09 +01:00
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgd7fb840" class = "outline-2" >
< h2 id = "orgd7fb840" > Definition of the stiffness and damping of the joints< / h2 >
< div class = "outline-text-2" id = "text-orgd7fb840" >
2020-01-28 17:15:19 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "org96459ea" > < / a >
2020-01-28 17:15:19 +01:00
< / 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 >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgdb7ce43" class = "outline-3" >
< h3 id = "orgdb7ce43" > Stiffness and Damping of the Actuator< / h3 >
< div class = "outline-text-3" id = "text-orgdb7ce43" >
2020-01-28 17:15:19 +01:00
< p >
2020-02-11 15:27:39 +01:00
Each Actuator is modeled by 3 elements in parallel (Figure < a href = "#orgf28da6c" > 4< / a > ):
2020-01-28 17:15:19 +01:00
< / p >
< ul class = "org-ul" >
< li > A spring with a stiffness \(k_{i}\)< / li >
< li > A dashpot with a damping \(c_{i}\)< / li >
2020-01-29 16:49:41 +01:00
< li > An ideal force actuator generating a force \(\tau_i\)< / li >
2020-01-28 17:15:19 +01:00
< / ul >
2020-02-11 15:27:39 +01:00
< div id = "orgf28da6c" class = "figure" >
2020-01-28 17:15:19 +01:00
< 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 >
2020-02-11 15:27:39 +01:00
The initialization of the stiffness and damping properties of the actuators is done with the < code > initializeStrutDynamics< / code > (< a href = "#org7f8f2b7" > link< / a > ).
2020-01-28 17:15:19 +01:00
< / p >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgd5629d6" class = "outline-3" >
< h3 id = "orgd5629d6" > Stiffness and Damping of the Spherical Joints< / h3 >
< div class = "outline-text-3" id = "text-orgd5629d6" >
2020-01-28 17:15:19 +01:00
< 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 >
2020-02-11 15:27:39 +01:00
This is done with the < code > initializeJointDynamics< / code > function (< a href = "#org0d21456" > link< / a > ).
2020-01-28 17:15:19 +01:00
< / p >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org6d2c540" class = "outline-2" >
< h2 id = "org6d2c540" > Summary of the Initialization Procedure and Matlab Example< / h2 >
< div class = "outline-text-2" id = "text-org6d2c540" >
2020-01-28 17:15:19 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "orgaede9ee" > < / a >
2020-01-28 17:15:19 +01:00
< / p >
2020-01-27 17:42:09 +01:00
< p >
The procedure to define the Stewart platform is the following:
< / p >
< ol class = "org-ol" >
2020-01-28 17:18:10 +01:00
< li > Define the initial position of frames \(\{A\}\), \(\{B\}\), \(\{F\}\) and \(\{M\}\).
2020-01-27 17:42:09 +01:00
We do that using the < code > initializeFramesPositions< / code > function.
2020-01-28 17:18:10 +01:00
We have to specify the total height of the Stewart platform \(H\) and the position \({}^{M}\bm{O}_{B}\) of \(\{B\}\) with respect to \(\{M\}\).< / li >
< li > Compute the positions of joints \({}^{F}\bm{a}_{i}\) and \({}^{M}\bm{b}_{i}\).
2020-01-27 17:42:09 +01:00
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.
2020-01-28 17:15:19 +01:00
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 >
2020-01-27 17:42:09 +01:00
< / 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 >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org715f118" class = "outline-3" >
< h3 id = "org715f118" > Example of the initialization of a Stewart Platform< / h3 >
< div class = "outline-text-3" id = "text-org715f118" >
2020-01-28 17:15:19 +01:00
< p >
Let’ s first define the Stewart Platform Geometry.
< / p >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, < span class = "org-string" > 'H'< / span > , 90e< span class = "org-type" > -< / span > 3, < span class = "org-string" > 'MO_B'< / span > , 45e< span class = "org-type" > -< / span > 3);
2020-01-28 17:15:19 +01:00
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
2020-02-11 15:16:07 +01:00
stewart = initializeStewartPose(stewart, < span class = "org-string" > 'AP'< / span > , [0;0;0], < span class = "org-string" > 'ARB'< / span > , eye(3));
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
2020-01-28 17:15:19 +01:00
< p >
Then, define the inertia and geometry of the fixed base, mobile platform and struts.
< / p >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-01-28 17:15:19 +01:00
< pre class = "src src-matlab" > stewart = initializeCylindricalPlatforms(stewart);
2020-01-27 17:42:09 +01:00
stewart = initializeCylindricalStruts(stewart);
2020-01-28 17:15:19 +01:00
< / pre >
< / div >
2020-01-27 17:42:09 +01:00
2020-01-28 17:15:19 +01:00
< p >
2020-02-11 15:16:07 +01:00
We initialize the strut stiffness and damping properties.
2020-01-28 17:15:19 +01:00
< / p >
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > stewart = initializeStrutDynamics(stewart, < span class = "org-string" > 'K'< / span > , 1e6< span class = "org-type" > *< / span > ones(6,1), < span class = "org-string" > 'C'< / span > , 1e2< span class = "org-type" > *< / span > ones(6,1));
2020-02-10 18:17:37 +01:00
stewart = initializeAmplifiedStrutDynamics(stewart);
2020-02-07 17:12:26 +01:00
stewart = initializeJointDynamics(stewart);
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
2020-01-28 17:15:19 +01:00
2020-02-11 15:16:07 +01:00
< p >
And finally the inertial sensors included in each strut.
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > stewart = initializeInertialSensor(stewart, < span class = "org-string" > 'type'< / span > , < span class = "org-string" > 'none'< / span > );
< / pre >
< / div >
2020-01-28 17:15:19 +01:00
< p >
The obtained < code > stewart< / code > Matlab structure contains all the information for analysis of the Stewart platform and for simulations using Simscape.
< / p >
2020-02-07 17:12:26 +01:00
< 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 >
2020-01-27 17:42:09 +01:00
< / div >
2020-02-07 17:12:26 +01:00
2020-02-11 15:27:39 +01:00
< div id = "org85ee757" class = "figure" >
2020-02-07 17:12:26 +01:00
< 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 >
2020-01-27 17:42:09 +01:00
< / div >
2020-02-07 17:12:26 +01:00
< p >
There are many options to show or hides elements such as labels and frames.
2020-02-11 15:27:39 +01:00
The documentation of the function is available < a href = "#org5526211" > here< / a > .
2020-02-07 17:12:26 +01:00
< / 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 >
2020-01-27 17:42:09 +01:00
< / div >
2020-02-07 17:12:26 +01:00
2020-02-11 15:27:39 +01:00
< div id = "orgfe6ca21" class = "figure" >
2020-02-07 17:12:26 +01:00
< 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 >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org48340b4" class = "outline-2" >
< h2 id = "org48340b4" > Functions< / h2 >
< div class = "outline-text-2" id = "text-org48340b4" >
2020-01-28 17:15:19 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "orgac086c4" > < / a >
2020-01-28 17:15:19 +01:00
< / p >
< / div >
2020-02-11 15:16:07 +01:00
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgd89f0e1" class = "outline-3" >
< h3 id = "orgd89f0e1" > < code > initializeStewartPlatform< / code > : Initialize the Stewart Platform structure< / h3 >
< div class = "outline-text-3" id = "text-orgd89f0e1" >
2020-01-27 17:42:09 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "org2917f22" > < / a >
2020-01-27 17:42:09 +01:00
< / p >
< p >
2020-02-11 15:16:07 +01:00
This Matlab function is accessible < a href = "src/initializeStewartPlatform.m" > here< / a > .
2020-01-27 17:42:09 +01:00
< / p >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgbc1420f" class = "outline-4" >
< h4 id = "orgbc1420f" > Documentation< / h4 >
< div class = "outline-text-4" id = "text-orgbc1420f" >
2020-02-10 18:17:37 +01:00
2020-02-11 15:27:39 +01:00
< div id = "orge07a045" class = "figure" >
2020-02-10 18:17:37 +01:00
< 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 >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org3c4d7d8" class = "outline-4" >
< h4 id = "org3c4d7d8" > Function description< / h4 >
< div class = "outline-text-4" id = "text-org3c4d7d8" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > < span class = "org-keyword" > function< / span > < span class = "org-variable-name" > [stewart]< / span > = < span class = "org-function-name" > initializeStewartPlatform< / span > ()
< span class = "org-comment" > % initializeStewartPlatform - Initialize the stewart structure< / span >
< span class = "org-comment" > %< / span >
< span class = "org-comment" > % Syntax: [stewart] = initializeStewartPlatform(args)< / span >
< span class = "org-comment" > %< / span >
< span class = "org-comment" > % Outputs:< / span >
< span class = "org-comment" > % - stewart - A structure with the following sub-structures:< / span >
< span class = "org-comment" > % - platform_F -< / span >
< span class = "org-comment" > % - platform_M -< / span >
< span class = "org-comment" > % - joints_F -< / span >
< span class = "org-comment" > % - joints_M -< / span >
< span class = "org-comment" > % - struts_F -< / span >
< span class = "org-comment" > % - struts_M -< / span >
< span class = "org-comment" > % - actuators -< / span >
< span class = "org-comment" > % - geometry -< / span >
< span class = "org-comment" > % - properties -< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgd567fc1" class = "outline-4" >
< h4 id = "orgd567fc1" > Initialize the Stewart structure< / h4 >
< div class = "outline-text-4" id = "text-orgd567fc1" >
2020-02-11 15:16:07 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > stewart = struct();
stewart.platform_F = struct();
stewart.platform_M = struct();
stewart.joints_F = struct();
stewart.joints_M = struct();
stewart.struts_F = struct();
stewart.struts_M = struct();
stewart.actuators = struct();
stewart.sensors = struct();
stewart.sensors.inertial = struct();
stewart.sensors.force = struct();
stewart.sensors.relative = struct();
stewart.geometry = struct();
stewart.kinematics = struct();
< / pre >
< / div >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgb11894c" class = "outline-3" >
< h3 id = "orgb11894c" > < code > initializeFramesPositions< / code > : Initialize the positions of frames {A}, {B}, {F} and {M}< / h3 >
< div class = "outline-text-3" id = "text-orgb11894c" >
2020-02-11 15:16:07 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "org3009bf2" > < / a >
2020-02-11 15:16:07 +01:00
< / p >
< p >
This Matlab function is accessible < a href = "src/initializeFramesPositions.m" > here< / a > .
< / p >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org527c72f" class = "outline-4" >
< h4 id = "org527c72f" > Documentation< / h4 >
< div class = "outline-text-4" id = "text-org527c72f" >
2020-02-11 15:16:07 +01:00
2020-02-11 15:27:39 +01:00
< div id = "org5ddff61" class = "figure" >
2020-02-11 15:16:07 +01:00
< p > < img src = "figs/stewart-frames-position.png" alt = "stewart-frames-position.png" / >
< / p >
< p > < span class = "figure-number" > Figure 8: < / span > Definition of the position of the frames< / p >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgb28c816" class = "outline-4" >
< h4 id = "orgb28c816" > Function description< / h4 >
< div class = "outline-text-4" id = "text-orgb28c816" >
2020-02-11 15:16:07 +01:00
< 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" > stewart< / span > , < span class = "org-variable-name" > args< / span > )
2020-01-27 17:42:09 +01:00
< span class = "org-comment" > % initializeFramesPositions - Initialize the positions of frames {A}, {B}, {F} and {M}< / span >
< span class = "org-comment" > %< / span >
2020-02-11 15:16:07 +01:00
< span class = "org-comment" > % Syntax: [stewart] = initializeFramesPositions(stewart, args)< / span >
2020-01-27 17:42:09 +01:00
< 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 >
2020-02-11 15:16:07 +01:00
< span class = "org-comment" > % - geometry.H [1x1] - Total Height of the Stewart Platform [m]< / span >
< span class = "org-comment" > % - geometry.FO_M [3x1] - Position of {M} with respect to {F} [m]< / span >
< span class = "org-comment" > % - platform_M.MO_B [3x1] - Position of {B} with respect to {M} [m]< / span >
< span class = "org-comment" > % - platform_F.FO_A [3x1] - Position of {A} with respect to {F} [m]< / span >
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org8bcc794" class = "outline-4" >
< h4 id = "org8bcc794" > Optional Parameters< / h4 >
< div class = "outline-text-4" id = "text-org8bcc794" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > arguments
2020-02-11 15:16:07 +01:00
stewart
2020-01-27 17:42:09 +01:00
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 >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org458592e" class = "outline-4" >
< h4 id = "org458592e" > Compute the position of each frame< / h4 >
< div class = "outline-text-4" id = "text-org458592e" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > H = args.H; < span class = "org-comment" > % Total Height of the Stewart Platform [m]< / span >
FO_M = [0; 0; H]; < span class = "org-comment" > % Position of {M} with respect to {F} [m]< / span >
MO_B = [0; 0; args.MO_B]; < span class = "org-comment" > % Position of {B} with respect to {M} [m]< / span >
FO_A = MO_B < span class = "org-type" > +< / span > FO_M; < span class = "org-comment" > % Position of {A} with respect to {F} [m]< / span >
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org0516874" class = "outline-4" >
< h4 id = "org0516874" > Populate the < code > stewart< / code > structure< / h4 >
< div class = "outline-text-4" id = "text-org0516874" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > stewart.geometry.H = H;
stewart.geometry.FO_M = FO_M;
stewart.platform_M.MO_B = MO_B;
stewart.platform_F.FO_A = FO_A;
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org9057387" class = "outline-3" >
< h3 id = "org9057387" > < code > generateGeneralConfiguration< / code > : Generate a Very General Configuration< / h3 >
< div class = "outline-text-3" id = "text-org9057387" >
2020-01-27 17:42:09 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "org9f50820" > < / a >
2020-01-27 17:42:09 +01:00
< / p >
< p >
This Matlab function is accessible < a href = "src/generateGeneralConfiguration.m" > here< / a > .
< / p >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org8e00e26" class = "outline-4" >
< h4 id = "org8e00e26" > Documentation< / h4 >
< div class = "outline-text-4" id = "text-org8e00e26" >
2020-02-10 18:17:37 +01:00
< 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}.
2020-02-11 15:27:39 +01:00
The radius of the circles can be chosen as well as the angles where the joints are located (see Figure < a href = "#org4c354b6" > 9< / a > ).
2020-02-10 18:17:37 +01:00
< / p >
2020-02-11 15:27:39 +01:00
< div id = "org4c354b6" class = "figure" >
2020-02-10 18:17:37 +01:00
< p > < img src = "figs/stewart_bottom_plate.png" alt = "stewart_bottom_plate.png" / >
< / p >
2020-02-11 15:16:07 +01:00
< p > < span class = "figure-number" > Figure 9: < / span > Position of the joints< / p >
2020-02-10 18:17:37 +01:00
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgd7988c9" class = "outline-4" >
< h4 id = "orgd7988c9" > Function description< / h4 >
< div class = "outline-text-4" id = "text-orgd7988c9" >
2020-01-27 17:42:09 +01:00
< 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 >
2020-02-11 15:16:07 +01:00
< span class = "org-comment" > % - platform_F.Fa [3x6] - Its i'th column is the position vector of joint ai with respect to {F}< / span >
< span class = "org-comment" > % - platform_M.Mb [3x6] - Its i'th column is the position vector of joint bi with respect to {M}< / span >
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgbca44f1" class = "outline-4" >
< h4 id = "orgbca44f1" > Optional Parameters< / h4 >
< div class = "outline-text-4" id = "text-orgbca44f1" >
2020-01-27 17:42:09 +01:00
< 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 >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org232e4c2" class = "outline-4" >
< h4 id = "org232e4c2" > Compute the pose< / h4 >
< div class = "outline-text-4" id = "text-org232e4c2" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > Fa = zeros(3,6);
Mb = zeros(3,6);
2020-01-27 17:42:09 +01:00
< / 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 >
2020-02-11 15:16:07 +01:00
Fa(< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > ) = [args.FR< span class = "org-type" > *< / span > cos(args.FTh(< span class = "org-constant" > i< / span > )); args.FR< span class = "org-type" > *< / span > sin(args.FTh(< span class = "org-constant" > i< / span > )); args.FH];
Mb(< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > ) = [args.MR< span class = "org-type" > *< / span > cos(args.MTh(< span class = "org-constant" > i< / span > )); args.MR< span class = "org-type" > *< / span > sin(args.MTh(< span class = "org-constant" > i< / span > )); < span class = "org-type" > -< / span > args.MH];
2020-01-27 17:42:09 +01:00
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:16:07 +01:00
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgc0cd111" class = "outline-4" >
< h4 id = "orgc0cd111" > Populate the < code > stewart< / code > structure< / h4 >
< div class = "outline-text-4" id = "text-orgc0cd111" >
2020-02-11 15:16:07 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > stewart.platform_F.Fa = Fa;
stewart.platform_M.Mb = Mb;
< / pre >
< / div >
< / div >
< / div >
2020-01-27 17:42:09 +01:00
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org861f6de" class = "outline-3" >
< h3 id = "org861f6de" > < code > computeJointsPose< / code > : Compute the Pose of the Joints< / h3 >
< div class = "outline-text-3" id = "text-org861f6de" >
2020-01-27 17:42:09 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "org7f34b08" > < / a >
2020-01-27 17:42:09 +01:00
< / p >
< p >
This Matlab function is accessible < a href = "src/computeJointsPose.m" > here< / a > .
< / p >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org7165251" class = "outline-4" >
< h4 id = "org7165251" > Documentation< / h4 >
< div class = "outline-text-4" id = "text-org7165251" >
2020-02-10 18:17:37 +01:00
2020-02-11 15:27:39 +01:00
< div id = "org8ffb841" class = "figure" >
2020-02-10 18:17:37 +01:00
< p > < img src = "figs/stewart-struts.png" alt = "stewart-struts.png" / >
< / p >
2020-02-11 15:16:07 +01:00
< p > < span class = "figure-number" > Figure 10: < / span > Position and orientation of the struts< / p >
2020-02-10 18:17:37 +01:00
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org67db014" class = "outline-4" >
< h4 id = "org67db014" > Function description< / h4 >
< div class = "outline-text-4" id = "text-org67db014" >
2020-01-27 17:42:09 +01:00
< 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 >
2020-02-11 15:16:07 +01:00
< span class = "org-comment" > % - platform_F.Fa [3x6] - Its i'th column is the position vector of joint ai with respect to {F}< / span >
< span class = "org-comment" > % - platform_M.Mb [3x6] - Its i'th column is the position vector of joint bi with respect to {M}< / span >
< span class = "org-comment" > % - platform_F.FO_A [3x1] - Position of {A} with respect to {F}< / span >
< span class = "org-comment" > % - platform_M.MO_B [3x1] - Position of {B} with respect to {M}< / span >
< span class = "org-comment" > % - geometry.FO_M [3x1] - Position of {M} with respect to {F}< / span >
2020-01-27 17:42:09 +01:00
< span class = "org-comment" > %< / span >
< span class = "org-comment" > % Outputs:< / span >
< span class = "org-comment" > % - stewart - A structure with the following added fields< / span >
2020-02-11 15:16:07 +01:00
< span class = "org-comment" > % - geometry.Aa [3x6] - The i'th column is the position of ai with respect to {A}< / span >
< span class = "org-comment" > % - geometry.Ab [3x6] - The i'th column is the position of bi with respect to {A}< / span >
< span class = "org-comment" > % - geometry.Ba [3x6] - The i'th column is the position of ai with respect to {B}< / span >
< span class = "org-comment" > % - geometry.Bb [3x6] - The i'th column is the position of bi with respect to {B}< / span >
< span class = "org-comment" > % - geometry.l [6x1] - The i'th element is the initial length of strut i< / span >
< span class = "org-comment" > % - geometry.As [3x6] - The i'th column is the unit vector of strut i expressed in {A}< / span >
< span class = "org-comment" > % - geometry.Bs [3x6] - The i'th column is the unit vector of strut i expressed in {B}< / span >
< span class = "org-comment" > % - struts_F.l [6x1] - Length of the Fixed part of the i'th strut< / span >
< span class = "org-comment" > % - struts_M.l [6x1] - Length of the Mobile part of the i'th strut< / span >
< span class = "org-comment" > % - platform_F.FRa [3x3x6] - The i'th 3x3 array is the rotation matrix to orientate the bottom of the i'th strut from {F}< / span >
< span class = "org-comment" > % - platform_M.MRb [3x3x6] - The i'th 3x3 array is the rotation matrix to orientate the top of the i'th strut from {M}< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org96d0ef3" class = "outline-4" >
< h4 id = "org96d0ef3" > Check the < code > stewart< / code > structure elements< / h4 >
< div class = "outline-text-4" id = "text-org96d0ef3" >
2020-02-11 15:16:07 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > assert(isfield(stewart.platform_F, < span class = "org-string" > 'Fa'< / span > ), < span class = "org-string" > 'stewart.platform_F should have attribute Fa'< / span > )
Fa = stewart.platform_F.Fa;
assert(isfield(stewart.platform_M, < span class = "org-string" > 'Mb'< / span > ), < span class = "org-string" > 'stewart.platform_M should have attribute Mb'< / span > )
Mb = stewart.platform_M.Mb;
assert(isfield(stewart.platform_F, < span class = "org-string" > 'FO_A'< / span > ), < span class = "org-string" > 'stewart.platform_F should have attribute FO_A'< / span > )
FO_A = stewart.platform_F.FO_A;
assert(isfield(stewart.platform_M, < span class = "org-string" > 'MO_B'< / span > ), < span class = "org-string" > 'stewart.platform_M should have attribute MO_B'< / span > )
MO_B = stewart.platform_M.MO_B;
assert(isfield(stewart.geometry, < span class = "org-string" > 'FO_M'< / span > ), < span class = "org-string" > 'stewart.geometry should have attribute FO_M'< / span > )
FO_M = stewart.geometry.FO_M;
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org52b0d4c" class = "outline-4" >
< h4 id = "org52b0d4c" > Compute the position of the Joints< / h4 >
< div class = "outline-text-4" id = "text-org52b0d4c" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > Aa = Fa < span class = "org-type" > -< / span > repmat(FO_A, [1, 6]);
Bb = Mb < span class = "org-type" > -< / span > repmat(MO_B, [1, 6]);
2020-01-27 17:42:09 +01:00
2020-02-11 15:16:07 +01:00
Ab = Bb < span class = "org-type" > -< / span > repmat(< span class = "org-type" > -< / span > MO_B< span class = "org-type" > -< / span > FO_M< span class = "org-type" > +< / span > FO_A, [1, 6]);
Ba = Aa < span class = "org-type" > -< / span > repmat( MO_B< span class = "org-type" > +< / span > FO_M< span class = "org-type" > -< / span > FO_A, [1, 6]);
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org4b76b0f" class = "outline-4" >
< h4 id = "org4b76b0f" > Compute the strut length and orientation< / h4 >
< div class = "outline-text-4" id = "text-org4b76b0f" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > As = (Ab < span class = "org-type" > -< / span > Aa)< span class = "org-type" > ./< / span > vecnorm(Ab < span class = "org-type" > -< / span > Aa); < span class = "org-comment" > % As_i is the i'th vector of As< / span >
2020-01-27 17:42:09 +01:00
2020-02-11 15:16:07 +01:00
l = vecnorm(Ab < span class = "org-type" > -< / span > Aa)< span class = "org-type" > '< / span > ;
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > Bs = (Bb < span class = "org-type" > -< / span > Ba)< span class = "org-type" > ./< / span > vecnorm(Bb < span class = "org-type" > -< / span > Ba);
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgd621d5e" class = "outline-4" >
< h4 id = "orgd621d5e" > Compute the orientation of the Joints< / h4 >
< div class = "outline-text-4" id = "text-orgd621d5e" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > FRa = zeros(3,3,6);
MRb = zeros(3,3,6);
2020-01-27 17:42:09 +01:00
< span class = "org-keyword" > for< / span > < span class = "org-variable-name" > < span class = "org-constant" > i< / span > < / span > = < span class = "org-constant" > 1:6< / span >
2020-02-11 15:16:07 +01:00
FRa(< span class = "org-type" > :< / span > ,< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > ) = [cross([0;1;0], As(< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > )) , cross(As(< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > ), cross([0;1;0], As(< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > ))) , As(< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > )];
FRa(< span class = "org-type" > :< / span > ,< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > ) = FRa(< span class = "org-type" > :< / span > ,< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > )< span class = "org-type" > ./< / span > vecnorm(FRa(< span class = "org-type" > :< / span > ,< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > ));
2020-01-27 17:42:09 +01:00
2020-02-11 15:16:07 +01:00
MRb(< span class = "org-type" > :< / span > ,< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > ) = [cross([0;1;0], Bs(< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > )) , cross(Bs(< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > ), cross([0;1;0], Bs(< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > ))) , Bs(< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > )];
MRb(< span class = "org-type" > :< / span > ,< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > ) = MRb(< span class = "org-type" > :< / span > ,< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > )< span class = "org-type" > ./< / span > vecnorm(MRb(< span class = "org-type" > :< / span > ,< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > ));
2020-01-27 17:42:09 +01:00
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:16:07 +01:00
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org2a4c563" class = "outline-4" >
< h4 id = "org2a4c563" > Populate the < code > stewart< / code > structure< / h4 >
< div class = "outline-text-4" id = "text-org2a4c563" >
2020-02-11 15:16:07 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > stewart.geometry.Aa = Aa;
stewart.geometry.Ab = Ab;
stewart.geometry.Ba = Ba;
stewart.geometry.Bb = Bb;
stewart.geometry.As = As;
stewart.geometry.Bs = Bs;
stewart.geometry.l = l;
stewart.struts_F.l = l< span class = "org-type" > /< / span > 2;
stewart.struts_M.l = l< span class = "org-type" > /< / span > 2;
stewart.platform_F.FRa = FRa;
stewart.platform_M.MRb = MRb;
< / pre >
< / div >
< / div >
< / div >
2020-01-27 17:42:09 +01:00
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org329bef9" class = "outline-3" >
< h3 id = "org329bef9" > < code > initializeStewartPose< / code > : Determine the initial stroke in each leg to have the wanted pose< / h3 >
< div class = "outline-text-3" id = "text-org329bef9" >
2020-01-27 17:42:09 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "orga94c6a9" > < / a >
2020-01-27 17:42:09 +01:00
< / p >
< p >
2020-01-28 17:15:19 +01:00
This Matlab function is accessible < a href = "src/initializeStewartPose.m" > here< / a > .
2020-01-27 17:42:09 +01:00
< / p >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgbe9f167" class = "outline-4" >
< h4 id = "orgbe9f167" > Function description< / h4 >
< div class = "outline-text-4" id = "text-orgbe9f167" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-01-28 17:15:19 +01:00
< pre class = "src src-matlab" > < span class = "org-keyword" > function< / span > < span class = "org-variable-name" > [stewart]< / span > = < span class = "org-function-name" > initializeStewartPose< / span > (< span class = "org-variable-name" > stewart< / span > , < span class = "org-variable-name" > args< / span > )
< span class = "org-comment" > % initializeStewartPose - Determine the initial stroke in each leg to have the wanted pose< / span >
< span class = "org-comment" > % It uses the inverse kinematic< / span >
2020-01-27 17:42:09 +01:00
< span class = "org-comment" > %< / span >
2020-01-28 17:15:19 +01:00
< span class = "org-comment" > % Syntax: [stewart] = initializeStewartPose(stewart, args)< / span >
2020-01-27 17:42:09 +01:00
< span class = "org-comment" > %< / span >
< span class = "org-comment" > % Inputs:< / span >
2020-01-28 17:15:19 +01:00
< 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 >
2020-01-27 17:42:09 +01:00
< span class = "org-comment" > %< / span >
< span class = "org-comment" > % Outputs:< / span >
< span class = "org-comment" > % - stewart - updated Stewart structure with the added fields:< / span >
2020-02-11 15:16:07 +01:00
< span class = "org-comment" > % - actuators.Leq [6x1] - The 6 needed displacement of the struts from the initial position in [m] to have the wanted pose of {B} w.r.t. {A}< / span >
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org9aa96f1" class = "outline-4" >
< h4 id = "org9aa96f1" > Optional Parameters< / h4 >
< div class = "outline-text-4" id = "text-org9aa96f1" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > arguments
stewart
2020-01-28 17:15:19 +01:00
args.AP (3,1) double {mustBeNumeric} = zeros(3,1)
args.ARB (3,3) double {mustBeNumeric} = eye(3)
2020-01-27 17:42:09 +01:00
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org3d3ef62" class = "outline-4" >
< h4 id = "org3d3ef62" > Use the Inverse Kinematic function< / h4 >
< div class = "outline-text-4" id = "text-org3d3ef62" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-01-28 17:15:19 +01:00
< pre class = "src src-matlab" > [Li, dLi] = inverseKinematics(stewart, < span class = "org-string" > 'AP'< / span > , args.AP, < span class = "org-string" > 'ARB'< / span > , args.ARB);
2020-02-11 15:16:07 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-01-27 17:42:09 +01:00
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org63a831f" class = "outline-4" >
< h4 id = "org63a831f" > Populate the < code > stewart< / code > structure< / h4 >
< div class = "outline-text-4" id = "text-org63a831f" >
2020-02-11 15:16:07 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > stewart.actuators.Leq = dLi;
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org6ff5b31" class = "outline-3" >
< h3 id = "org6ff5b31" > < code > initializeCylindricalPlatforms< / code > : Initialize the geometry of the Fixed and Mobile Platforms< / h3 >
< div class = "outline-text-3" id = "text-org6ff5b31" >
2020-01-27 17:42:09 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "org6ad7062" > < / a >
2020-01-27 17:42:09 +01:00
< / p >
< p >
This Matlab function is accessible < a href = "src/initializeCylindricalPlatforms.m" > here< / a > .
< / p >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org930d1f3" class = "outline-4" >
< h4 id = "org930d1f3" > Function description< / h4 >
< div class = "outline-text-4" id = "text-org930d1f3" >
2020-01-27 17:42:09 +01:00
< 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 >
2020-02-11 15:16:07 +01:00
< span class = "org-comment" > % - platform_F [struct] - structure with the following fields:< / span >
< span class = "org-comment" > % - type = 1< / span >
< span class = "org-comment" > % - M [1x1] - Fixed Platform Mass [kg]< / span >
< span class = "org-comment" > % - I [3x3] - Fixed Platform Inertia matrix [kg*m^2]< / span >
< span class = "org-comment" > % - H [1x1] - Fixed Platform Height [m]< / span >
< span class = "org-comment" > % - R [1x1] - Fixed Platform Radius [m]< / span >
< span class = "org-comment" > % - platform_M [struct] - structure with the following fields:< / span >
< span class = "org-comment" > % - M [1x1] - Mobile Platform Mass [kg]< / span >
< span class = "org-comment" > % - I [3x3] - Mobile Platform Inertia matrix [kg*m^2]< / span >
< span class = "org-comment" > % - H [1x1] - Mobile Platform Height [m]< / span >
< span class = "org-comment" > % - R [1x1] - Mobile Platform Radius [m]< / span >
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgf010fb9" class = "outline-4" >
< h4 id = "orgf010fb9" > Optional Parameters< / h4 >
< div class = "outline-text-4" id = "text-orgf010fb9" >
2020-01-27 17:42:09 +01:00
< 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 >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org25a390a" class = "outline-4" >
< h4 id = "org25a390a" > Compute the Inertia matrices of platforms< / h4 >
< div class = "outline-text-4" id = "text-org25a390a" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > I_F = diag([1< span class = "org-type" > /< / span > 12< span class = "org-type" > *< / span > args.Fpm < span class = "org-type" > *< / span > (3< span class = "org-type" > *< / span > args.Fpr< span class = "org-type" > ^< / span > 2 < span class = "org-type" > +< / span > args.Fph< span class = "org-type" > ^< / span > 2), ...
1< span class = "org-type" > /< / span > 12< span class = "org-type" > *< / span > args.Fpm < span class = "org-type" > *< / span > (3< span class = "org-type" > *< / span > args.Fpr< span class = "org-type" > ^< / span > 2 < span class = "org-type" > +< / span > args.Fph< span class = "org-type" > ^< / span > 2), ...
1< span class = "org-type" > /< / span > 2 < span class = "org-type" > *< / span > args.Fpm < span class = "org-type" > *< / span > args.Fpr< span class = "org-type" > ^< / span > 2]);
< / pre >
< / div >
2020-01-27 17:42:09 +01:00
2020-02-11 15:16:07 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > I_M = diag([1< span class = "org-type" > /< / span > 12< span class = "org-type" > *< / span > args.Mpm < span class = "org-type" > *< / span > (3< span class = "org-type" > *< / span > args.Mpr< span class = "org-type" > ^< / span > 2 < span class = "org-type" > +< / span > args.Mph< span class = "org-type" > ^< / span > 2), ...
1< span class = "org-type" > /< / span > 12< span class = "org-type" > *< / span > args.Mpm < span class = "org-type" > *< / span > (3< span class = "org-type" > *< / span > args.Mpr< span class = "org-type" > ^< / span > 2 < span class = "org-type" > +< / span > args.Mph< span class = "org-type" > ^< / span > 2), ...
1< span class = "org-type" > /< / span > 2 < span class = "org-type" > *< / span > args.Mpm < span class = "org-type" > *< / span > args.Mpr< span class = "org-type" > ^< / span > 2]);
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org61255f3" class = "outline-4" >
< h4 id = "org61255f3" > Populate the < code > stewart< / code > structure< / h4 >
< div class = "outline-text-4" id = "text-org61255f3" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > stewart.platform_F.type = 1;
stewart.platform_F.I = I_F;
stewart.platform_F.M = args.Fpm;
stewart.platform_F.R = args.Fpr;
stewart.platform_F.H = args.Fph;
< / pre >
< / div >
< div class = "org-src-container" >
< pre class = "src src-matlab" > stewart.platform_M.type = 1;
stewart.platform_M.I = I_M;
stewart.platform_M.M = args.Mpm;
stewart.platform_M.R = args.Mpr;
stewart.platform_M.H = args.Mph;
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org60aa215" class = "outline-3" >
< h3 id = "org60aa215" > < code > initializeCylindricalStruts< / code > : Define the inertia of cylindrical struts< / h3 >
< div class = "outline-text-3" id = "text-org60aa215" >
2020-01-27 17:42:09 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "org6263b6d" > < / a >
2020-01-27 17:42:09 +01:00
< / p >
< p >
This Matlab function is accessible < a href = "src/initializeCylindricalStruts.m" > here< / a > .
< / p >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgc7d5120" class = "outline-4" >
< h4 id = "orgc7d5120" > Function description< / h4 >
< div class = "outline-text-4" id = "text-orgc7d5120" >
2020-01-27 17:42:09 +01:00
< 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 >
2020-02-11 15:16:07 +01:00
< span class = "org-comment" > % - struts_F [struct] - structure with the following fields:< / span >
< span class = "org-comment" > % - M [6x1] - Mass of the Fixed part of the struts [kg]< / span >
< span class = "org-comment" > % - I [3x3x6] - Moment of Inertia for the Fixed part of the struts [kg*m^2]< / span >
< span class = "org-comment" > % - H [6x1] - Height of cylinder for the Fixed part of the struts [m]< / span >
< span class = "org-comment" > % - R [6x1] - Radius of cylinder for the Fixed part of the struts [m]< / span >
< span class = "org-comment" > % - struts_M [struct] - structure with the following fields:< / span >
< span class = "org-comment" > % - M [6x1] - Mass of the Mobile part of the struts [kg]< / span >
< span class = "org-comment" > % - I [3x3x6] - Moment of Inertia for the Mobile part of the struts [kg*m^2]< / span >
< span class = "org-comment" > % - H [6x1] - Height of cylinder for the Mobile part of the struts [m]< / span >
< span class = "org-comment" > % - R [6x1] - Radius of cylinder for the Mobile part of the struts [m]< / span >
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgfb4e3ed" class = "outline-4" >
< h4 id = "orgfb4e3ed" > Optional Parameters< / h4 >
< div class = "outline-text-4" id = "text-orgfb4e3ed" >
2020-01-27 17:42:09 +01:00
< 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 >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgc056498" class = "outline-4" >
< h4 id = "orgc056498" > Compute the properties of the cylindrical struts< / h4 >
< div class = "outline-text-4" id = "text-orgc056498" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > Fsm = ones(6,1)< span class = "org-type" > .*< / span > args.Fsm;
Fsh = ones(6,1)< span class = "org-type" > .*< / span > args.Fsh;
Fsr = ones(6,1)< span class = "org-type" > .*< / span > args.Fsr;
2020-01-27 17:42:09 +01:00
2020-02-11 15:16:07 +01:00
Msm = ones(6,1)< span class = "org-type" > .*< / span > args.Msm;
Msh = ones(6,1)< span class = "org-type" > .*< / span > args.Msh;
Msr = ones(6,1)< span class = "org-type" > .*< / span > args.Msr;
< / pre >
< / div >
2020-01-27 17:42:09 +01:00
2020-02-11 15:16:07 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > I_F = zeros(3, 3, 6); < span class = "org-comment" > % Inertia of the "fixed" part of the strut< / span >
I_M = zeros(3, 3, 6); < span class = "org-comment" > % Inertia of the "mobile" part of the strut< / span >
2020-01-27 17:42:09 +01:00
< span class = "org-keyword" > for< / span > < span class = "org-variable-name" > < span class = "org-constant" > i< / span > < / span > = < span class = "org-constant" > 1:6< / span >
2020-02-11 15:16:07 +01:00
I_F(< span class = "org-type" > :< / span > ,< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > ) = diag([1< span class = "org-type" > /< / span > 12 < span class = "org-type" > *< / span > Fsm(< span class = "org-constant" > i< / span > ) < span class = "org-type" > *< / span > (3< span class = "org-type" > *< / span > Fsr(< span class = "org-constant" > i< / span > )< span class = "org-type" > ^< / span > 2 < span class = "org-type" > +< / span > Fsh(< span class = "org-constant" > i< / span > )< span class = "org-type" > ^< / span > 2), ...
1< span class = "org-type" > /< / span > 12 < span class = "org-type" > *< / span > Fsm(< span class = "org-constant" > i< / span > ) < span class = "org-type" > *< / span > (3< span class = "org-type" > *< / span > Fsr(< span class = "org-constant" > i< / span > )< span class = "org-type" > ^< / span > 2 < span class = "org-type" > +< / span > Fsh(< span class = "org-constant" > i< / span > )< span class = "org-type" > ^< / span > 2), ...
1< span class = "org-type" > /< / span > 2 < span class = "org-type" > *< / span > Fsm(< span class = "org-constant" > i< / span > ) < span class = "org-type" > *< / span > Fsr(< span class = "org-constant" > i< / span > )< span class = "org-type" > ^< / span > 2]);
I_M(< span class = "org-type" > :< / span > ,< span class = "org-type" > :< / span > ,< span class = "org-constant" > i< / span > ) = diag([1< span class = "org-type" > /< / span > 12 < span class = "org-type" > *< / span > Msm(< span class = "org-constant" > i< / span > ) < span class = "org-type" > *< / span > (3< span class = "org-type" > *< / span > Msr(< span class = "org-constant" > i< / span > )< span class = "org-type" > ^< / span > 2 < span class = "org-type" > +< / span > Msh(< span class = "org-constant" > i< / span > )< span class = "org-type" > ^< / span > 2), ...
1< span class = "org-type" > /< / span > 12 < span class = "org-type" > *< / span > Msm(< span class = "org-constant" > i< / span > ) < span class = "org-type" > *< / span > (3< span class = "org-type" > *< / span > Msr(< span class = "org-constant" > i< / span > )< span class = "org-type" > ^< / span > 2 < span class = "org-type" > +< / span > Msh(< span class = "org-constant" > i< / span > )< span class = "org-type" > ^< / span > 2), ...
1< span class = "org-type" > /< / span > 2 < span class = "org-type" > *< / span > Msm(< span class = "org-constant" > i< / span > ) < span class = "org-type" > *< / span > Msr(< span class = "org-constant" > i< / span > )< span class = "org-type" > ^< / span > 2]);
2020-01-27 17:42:09 +01:00
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
2020-02-11 15:16:07 +01:00
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgc329127" class = "outline-4" >
< h4 id = "orgc329127" > Populate the < code > stewart< / code > structure< / h4 >
< div class = "outline-text-4" id = "text-orgc329127" >
2020-02-11 15:16:07 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > stewart.struts_M.type = 1;
stewart.struts_M.I = I_M;
stewart.struts_M.M = Msm;
stewart.struts_M.R = Msr;
stewart.struts_M.H = Msh;
< / pre >
< / div >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > stewart.struts_F.type = 1;
stewart.struts_F.I = I_F;
stewart.struts_F.M = Fsm;
stewart.struts_F.R = Fsr;
stewart.struts_F.H = Fsh;
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org3ad0cd1" class = "outline-3" >
< h3 id = "org3ad0cd1" > < code > initializeStrutDynamics< / code > : Add Stiffness and Damping properties of each strut< / h3 >
< div class = "outline-text-3" id = "text-org3ad0cd1" >
2020-01-27 17:42:09 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "org7f8f2b7" > < / a >
2020-01-27 17:42:09 +01:00
< / p >
< p >
2020-01-28 17:15:19 +01:00
This Matlab function is accessible < a href = "src/initializeStrutDynamics.m" > here< / a > .
2020-01-27 17:42:09 +01:00
< / p >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org9075466" class = "outline-4" >
< h4 id = "org9075466" > Documentation< / h4 >
< div class = "outline-text-4" id = "text-org9075466" >
2020-02-10 18:17:37 +01:00
2020-02-11 15:27:39 +01:00
< div id = "orgbbfb204" class = "figure" >
2020-02-10 18:17:37 +01:00
< p > < img src = "figs/piezoelectric_stack.jpg" alt = "piezoelectric_stack.jpg" width = "500px" / >
< / p >
2020-02-11 15:16:07 +01:00
< p > < span class = "figure-number" > Figure 11: < / span > Example of a piezoelectric stach actuator (PI)< / p >
2020-02-10 18:17:37 +01:00
< / div >
< p >
2020-02-11 15:27:39 +01:00
A simplistic model of such amplified actuator is shown in Figure < a href = "#org624c98d" > 12< / a > where:
2020-02-10 18:17:37 +01:00
< / p >
< ul class = "org-ul" >
2020-02-11 15:16:07 +01:00
< li > \(K\) represent the vertical stiffness of the actuator< / li >
< li > \(C\) represent the vertical damping of the actuator< / li >
< li > \(F\) represents the force applied by the actuator< / li >
< li > \(F_{m}\) represents the total measured force< / li >
< li > \(v_{m}\) represents the absolute velocity of the top part of the actuator< / li >
< li > \(d_{m}\) represents the total relative displacement of the actuator< / li >
2020-02-10 18:17:37 +01:00
< / ul >
2020-02-11 15:27:39 +01:00
< div id = "org624c98d" class = "figure" >
2020-02-10 18:17:37 +01:00
< p > < img src = "figs/actuator_model_simple.png" alt = "actuator_model_simple.png" / >
< / p >
2020-02-11 15:16:07 +01:00
< p > < span class = "figure-number" > Figure 12: < / span > Simple model of an Actuator< / p >
2020-02-10 18:17:37 +01:00
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org21e1e52" class = "outline-4" >
< h4 id = "org21e1e52" > Function description< / h4 >
< div class = "outline-text-4" id = "text-org21e1e52" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-01-28 17:15:19 +01:00
< pre class = "src src-matlab" > < span class = "org-keyword" > function< / span > < span class = "org-variable-name" > [stewart]< / span > = < span class = "org-function-name" > initializeStrutDynamics< / span > (< span class = "org-variable-name" > stewart< / span > , < span class = "org-variable-name" > args< / span > )
< span class = "org-comment" > % initializeStrutDynamics - Add Stiffness and Damping properties of each strut< / span >
2020-01-27 17:42:09 +01:00
< span class = "org-comment" > %< / span >
2020-01-28 17:15:19 +01:00
< span class = "org-comment" > % Syntax: [stewart] = initializeStrutDynamics(args)< / span >
2020-01-27 17:42:09 +01:00
< span class = "org-comment" > %< / span >
< span class = "org-comment" > % Inputs:< / span >
2020-01-28 17:15:19 +01:00
< span class = "org-comment" > % - args - Structure with the following fields:< / span >
2020-02-11 15:16:07 +01:00
< span class = "org-comment" > % - K [6x1] - Stiffness of each strut [N/m]< / span >
< span class = "org-comment" > % - C [6x1] - Damping of each strut [N/(m/s)]< / span >
2020-01-27 17:42:09 +01:00
< span class = "org-comment" > %< / span >
< span class = "org-comment" > % Outputs:< / span >
< span class = "org-comment" > % - stewart - updated Stewart structure with the added fields:< / span >
2020-02-11 15:16:07 +01:00
< span class = "org-comment" > % - actuators.type = 1< / span >
< span class = "org-comment" > % - actuators.K [6x1] - Stiffness of each strut [N/m]< / span >
< span class = "org-comment" > % - actuators.C [6x1] - Damping of each strut [N/(m/s)]< / span >
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgd9bda04" class = "outline-4" >
< h4 id = "orgd9bda04" > Optional Parameters< / h4 >
< div class = "outline-text-4" id = "text-orgd9bda04" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > arguments
stewart
2020-02-11 15:16:07 +01:00
args.K (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e6< span class = "org-type" > *< / span > ones(6,1)
args.C (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e1< span class = "org-type" > *< / span > ones(6,1)
2020-01-27 17:42:09 +01:00
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgadb8327" class = "outline-4" >
< h4 id = "orgadb8327" > Add Stiffness and Damping properties of each strut< / h4 >
< div class = "outline-text-4" id = "text-orgadb8327" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > stewart.actuators.type = 1;
2020-02-10 18:17:37 +01:00
2020-02-11 15:16:07 +01:00
stewart.actuators.K = args.K;
stewart.actuators.C = args.C;
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgd8d403e" class = "outline-3" >
< h3 id = "orgd8d403e" > < code > initializeAmplifiedStrutDynamics< / code > : Add Stiffness and Damping properties of each strut for an amplified piezoelectric actuator< / h3 >
< div class = "outline-text-3" id = "text-orgd8d403e" >
2020-01-27 17:42:09 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "org7d40eca" > < / a >
2020-02-10 18:17:37 +01:00
< / p >
< p >
This Matlab function is accessible < a href = "src/initializeAmplifiedStrutDynamics.m" > here< / a > .
< / p >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org8ba232a" class = "outline-4" >
< h4 id = "org8ba232a" > Documentation< / h4 >
< div class = "outline-text-4" id = "text-org8ba232a" >
2020-02-10 18:17:37 +01:00
< p >
2020-02-11 15:27:39 +01:00
An amplified piezoelectric actuator is shown in Figure < a href = "#org9e7e9ad" > 13< / a > .
2020-02-10 18:17:37 +01:00
< / p >
2020-02-11 15:27:39 +01:00
< div id = "org9e7e9ad" class = "figure" >
2020-02-10 18:17:37 +01:00
< p > < img src = "figs/amplified_piezo_with_displacement_sensor.jpg" alt = "amplified_piezo_with_displacement_sensor.jpg" width = "500px" / >
< / p >
2020-02-11 15:16:07 +01:00
< p > < span class = "figure-number" > Figure 13: < / span > Example of an Amplified piezoelectric actuator with an integrated displacement sensor (Cedrat Technologies)< / p >
2020-02-10 18:17:37 +01:00
< / div >
< p >
2020-02-11 15:27:39 +01:00
A simplistic model of such amplified actuator is shown in Figure < a href = "#orgcf4c3de" > 14< / a > where:
2020-02-10 18:17:37 +01:00
< / p >
< ul class = "org-ul" >
2020-02-11 15:16:07 +01:00
< li > \(K_{r}\) represent the vertical stiffness when the piezoelectric stack is removed< / li >
< li > \(K_{a}\) is the vertical stiffness contribution of the piezoelectric stack< / li >
2020-02-10 18:17:37 +01:00
< 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 >
2020-02-11 15:27:39 +01:00
< div id = "orgcf4c3de" class = "figure" >
2020-02-10 18:17:37 +01:00
< p > < img src = "figs/iff_1dof.png" alt = "iff_1dof.png" / >
< / p >
2020-02-11 15:16:07 +01:00
< p > < span class = "figure-number" > Figure 14: < / span > Model of an amplified actuator< / p >
2020-02-10 18:17:37 +01:00
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org7b6e247" class = "outline-4" >
< h4 id = "org7b6e247" > Function description< / h4 >
< div class = "outline-text-4" id = "text-org7b6e247" >
2020-02-10 18:17:37 +01:00
< 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 >
2020-02-11 15:16:07 +01:00
< span class = "org-comment" > % - Ka [6x1] - Vertical stiffness contribution of the piezoelectric stack [N/m]< / span >
< span class = "org-comment" > % - Ca [6x1] - Vertical damping contribution of the piezoelectric stack [N/(m/s)]< / span >
< span class = "org-comment" > % - Kr [6x1] - Vertical (residual) stiffness when the piezoelectric stack is removed [N/m]< / span >
< span class = "org-comment" > % - Cr [6x1] - Vertical (residual) damping when the piezoelectric stack is removed [N/(m/s)]< / span >
2020-02-10 18:17:37 +01:00
< span class = "org-comment" > %< / span >
< span class = "org-comment" > % Outputs:< / span >
< span class = "org-comment" > % - stewart - updated Stewart structure with the added fields:< / span >
2020-02-11 15:16:07 +01:00
< span class = "org-comment" > % - actuators.type = 2< / span >
< span class = "org-comment" > % - actuators.K [6x1] - Total Stiffness of each strut [N/m]< / span >
< span class = "org-comment" > % - actuators.C [6x1] - Total Damping of each strut [N/(m/s)]< / span >
< span class = "org-comment" > % - actuators.Ka [6x1] - Vertical stiffness contribution of the piezoelectric stack [N/m]< / span >
< span class = "org-comment" > % - actuators.Ca [6x1] - Vertical damping contribution of the piezoelectric stack [N/(m/s)]< / span >
< span class = "org-comment" > % - actuators.Kr [6x1] - Vertical stiffness when the piezoelectric stack is removed [N/m]< / span >
< span class = "org-comment" > % - actuators.Cr [6x1] - Vertical damping when the piezoelectric stack is removed [N/(m/s)]< / span >
2020-02-10 18:17:37 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org936848c" class = "outline-4" >
< h4 id = "org936848c" > Optional Parameters< / h4 >
< div class = "outline-text-4" id = "text-org936848c" >
2020-02-10 18:17:37 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > arguments
stewart
2020-02-11 15:16:07 +01:00
args.Kr (6,1) double {mustBeNumeric, mustBeNonnegative} = 5e6< span class = "org-type" > *< / span > ones(6,1)
args.Cr (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e1< span class = "org-type" > *< / span > ones(6,1)
args.Ka (6,1) double {mustBeNumeric, mustBeNonnegative} = 15e6< span class = "org-type" > *< / span > ones(6,1)
args.Ca (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e1< span class = "org-type" > *< / span > ones(6,1)
2020-02-10 18:17:37 +01:00
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org9b435e8" class = "outline-4" >
< h4 id = "org9b435e8" > Compute the total stiffness and damping< / h4 >
< div class = "outline-text-4" id = "text-org9b435e8" >
2020-02-10 18:17:37 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > K = args.Ka < span class = "org-type" > +< / span > args.Kr;
C = args.Ca < span class = "org-type" > +< / span > args.Cr;
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgd78e8b0" class = "outline-4" >
< h4 id = "orgd78e8b0" > Populate the < code > stewart< / code > structure< / h4 >
< div class = "outline-text-4" id = "text-orgd78e8b0" >
2020-02-11 15:16:07 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > stewart.actuators.type = 2;
2020-02-10 18:17:37 +01:00
2020-02-11 15:16:07 +01:00
stewart.actuators.Ka = args.Ka;
stewart.actuators.Ca = args.Ca;
2020-02-10 18:17:37 +01:00
2020-02-11 15:16:07 +01:00
stewart.actuators.Kr = args.Kr;
stewart.actuators.Cr = args.Cr;
2020-02-10 18:17:37 +01:00
2020-02-11 15:16:07 +01:00
stewart.actuators.K = K;
stewart.actuators.C = K;
2020-02-10 18:17:37 +01:00
< / pre >
< / div >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgeb6173a" class = "outline-3" >
< h3 id = "orgeb6173a" > < code > initializeJointDynamics< / code > : Add Stiffness and Damping properties for spherical joints< / h3 >
< div class = "outline-text-3" id = "text-orgeb6173a" >
2020-02-10 18:17:37 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "org0d21456" > < / a >
2020-01-27 17:42:09 +01:00
< / p >
< p >
2020-01-28 17:15:19 +01:00
This Matlab function is accessible < a href = "src/initializeJointDynamics.m" > here< / a > .
2020-01-27 17:42:09 +01:00
< / p >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org051062f" class = "outline-4" >
< h4 id = "org051062f" > Function description< / h4 >
< div class = "outline-text-4" id = "text-org051062f" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-01-28 17:15:19 +01:00
< pre class = "src src-matlab" > < span class = "org-keyword" > function< / span > < span class = "org-variable-name" > [stewart]< / span > = < span class = "org-function-name" > 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 >
2020-01-27 17:42:09 +01:00
< span class = "org-comment" > %< / span >
2020-01-28 17:15:19 +01:00
< span class = "org-comment" > % Syntax: [stewart] = initializeJointDynamics(args)< / span >
2020-01-27 17:42:09 +01:00
< span class = "org-comment" > %< / span >
< span class = "org-comment" > % Inputs:< / span >
2020-01-28 17:15:19 +01:00
< span class = "org-comment" > % - args - Structure with the following fields:< / span >
2020-02-11 15:16:07 +01:00
< span class = "org-comment" > % - type_F - 'universal', 'spherical', 'univesal_p', 'spherical_p'< / span >
< span class = "org-comment" > % - type_M - 'universal', 'spherical', 'univesal_p', 'spherical_p'< / span >
< span class = "org-comment" > % - Kf_M [6x1] - Bending (Rx, Ry) Stiffness for each top joints [(N.m)/rad]< / span >
< span class = "org-comment" > % - Kt_M [6x1] - Torsion (Rz) Stiffness for each top joints [(N.m)/rad]< / span >
< span class = "org-comment" > % - Cf_M [6x1] - Bending (Rx, Ry) Damping of each top joint [(N.m)/(rad/s)]< / span >
< span class = "org-comment" > % - Ct_M [6x1] - Torsion (Rz) Damping of each top joint [(N.m)/(rad/s)]< / span >
< span class = "org-comment" > % - Kf_F [6x1] - Bending (Rx, Ry) Stiffness for each bottom joints [(N.m)/rad]< / span >
< span class = "org-comment" > % - Kt_F [6x1] - Torsion (Rz) Stiffness for each bottom joints [(N.m)/rad]< / span >
< span class = "org-comment" > % - Cf_F [6x1] - Bending (Rx, Ry) Damping of each bottom joint [(N.m)/(rad/s)]< / span >
< span class = "org-comment" > % - Cf_F [6x1] - Torsion (Rz) Damping of each bottom joint [(N.m)/(rad/s)]< / span >
2020-01-27 17:42:09 +01:00
< span class = "org-comment" > %< / span >
< span class = "org-comment" > % Outputs:< / span >
2020-01-28 17:15:19 +01:00
< span class = "org-comment" > % - stewart - updated Stewart structure with the added fields:< / span >
2020-02-11 15:16:07 +01:00
< span class = "org-comment" > % - stewart.joints_F and stewart.joints_M:< / span >
< span class = "org-comment" > % - type - 1 (universal), 2 (spherical), 3 (universal perfect), 4 (spherical perfect)< / span >
< span class = "org-comment" > % - Kx, Ky, Kz [6x1] - Translation (Tx, Ty, Tz) Stiffness [N/m]< / span >
< span class = "org-comment" > % - Kf [6x1] - Flexion (Rx, Ry) Stiffness [(N.m)/rad]< / span >
< span class = "org-comment" > % - Kt [6x1] - Torsion (Rz) Stiffness [(N.m)/rad]< / span >
< span class = "org-comment" > % - Cx, Cy, Cz [6x1] - Translation (Rx, Ry) Damping [N/(m/s)]< / span >
< span class = "org-comment" > % - Cf [6x1] - Flexion (Rx, Ry) Damping [(N.m)/(rad/s)]< / span >
< span class = "org-comment" > % - Cb [6x1] - Torsion (Rz) Damping [(N.m)/(rad/s)]< / span >
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgf57427f" class = "outline-4" >
< h4 id = "orgf57427f" > Optional Parameters< / h4 >
< div class = "outline-text-4" id = "text-orgf57427f" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > arguments
stewart
2020-02-11 15:16:07 +01:00
args.type_F char {mustBeMember(args.type_F,{< span class = "org-string" > 'universal'< / span > , < span class = "org-string" > 'spherical'< / span > , < span class = "org-string" > 'univesal_p'< / span > , < span class = "org-string" > 'spherical_p'< / span > })} = < span class = "org-string" > 'universal'< / span >
args.type_M char {mustBeMember(args.type_M,{< span class = "org-string" > 'universal'< / span > , < span class = "org-string" > 'spherical'< / span > , < span class = "org-string" > 'univesal_p'< / span > , < span class = "org-string" > 'spherical_p'< / span > })} = < span class = "org-string" > 'spherical'< / span >
args.Kf_M (6,1) double {mustBeNumeric, mustBeNonnegative} = 15< span class = "org-type" > *< / span > ones(6,1)
args.Cf_M (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e< span class = "org-type" > -< / span > 4< span class = "org-type" > *< / span > ones(6,1)
args.Kt_M (6,1) double {mustBeNumeric, mustBeNonnegative} = 20< span class = "org-type" > *< / span > ones(6,1)
args.Ct_M (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e< span class = "org-type" > -< / span > 3< span class = "org-type" > *< / span > ones(6,1)
args.Kf_F (6,1) double {mustBeNumeric, mustBeNonnegative} = 15< span class = "org-type" > *< / span > ones(6,1)
args.Cf_F (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e< span class = "org-type" > -< / span > 4< span class = "org-type" > *< / span > ones(6,1)
args.Kt_F (6,1) double {mustBeNumeric, mustBeNonnegative} = 20< span class = "org-type" > *< / span > ones(6,1)
args.Ct_F (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e< span class = "org-type" > -< / span > 3< span class = "org-type" > *< / span > ones(6,1)
2020-01-27 17:42:09 +01:00
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgc6d4183" class = "outline-4" >
< h4 id = "orgc6d4183" > Add Actuator Type< / h4 >
< div class = "outline-text-4" id = "text-orgc6d4183" >
2020-01-27 17:42:09 +01:00
< div class = "org-src-container" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > < span class = "org-keyword" > switch< / span > < span class = "org-constant" > args.type_F< / span >
< span class = "org-keyword" > case< / span > < span class = "org-string" > 'universal'< / span >
stewart.joints_F.type = 1;
< span class = "org-keyword" > case< / span > < span class = "org-string" > 'spherical'< / span >
stewart.joints_F.type = 2;
< span class = "org-keyword" > case< / span > < span class = "org-string" > 'universal_p'< / span >
stewart.joints_F.type = 3;
< span class = "org-keyword" > case< / span > < span class = "org-string" > 'spherical_p'< / span >
stewart.joints_F.type = 4;
< span class = "org-keyword" > end< / span >
< span class = "org-keyword" > switch< / span > < span class = "org-constant" > args.type_M< / span >
< span class = "org-keyword" > case< / span > < span class = "org-string" > 'universal'< / span >
stewart.joints_M.type = 1;
< span class = "org-keyword" > case< / span > < span class = "org-string" > 'spherical'< / span >
stewart.joints_M.type = 2;
< span class = "org-keyword" > case< / span > < span class = "org-string" > 'universal_p'< / span >
stewart.joints_M.type = 3;
< span class = "org-keyword" > case< / span > < span class = "org-string" > 'spherical_p'< / span >
stewart.joints_M.type = 4;
2020-02-06 17:25:38 +01:00
< span class = "org-keyword" > end< / span >
2020-01-27 17:42:09 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:16:07 +01:00
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgc0e613c" class = "outline-4" >
< h4 id = "orgc0e613c" > Add Stiffness and Damping in Translation of each strut< / h4 >
< div class = "outline-text-4" id = "text-orgc0e613c" >
2020-02-11 15:16:07 +01:00
< p >
Translation Stiffness
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > stewart.joints_M.Kx = zeros(6,1);
stewart.joints_M.Ky = zeros(6,1);
stewart.joints_M.Kz = zeros(6,1);
stewart.joints_F.Kx = zeros(6,1);
stewart.joints_F.Ky = zeros(6,1);
stewart.joints_F.Kz = zeros(6,1);
< / pre >
2020-01-27 17:42:09 +01:00
< / div >
2020-02-07 17:12:26 +01:00
< p >
2020-02-11 15:16:07 +01:00
Translation Damping
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > stewart.joints_M.Cx = zeros(6,1);
stewart.joints_M.Cy = zeros(6,1);
stewart.joints_M.Cz = zeros(6,1);
stewart.joints_F.Cx = zeros(6,1);
stewart.joints_F.Cy = zeros(6,1);
stewart.joints_F.Cz = zeros(6,1);
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org04698fc" class = "outline-4" >
< h4 id = "org04698fc" > Add Stiffness and Damping in Rotation of each strut< / h4 >
< div class = "outline-text-4" id = "text-org04698fc" >
2020-02-11 15:16:07 +01:00
< p >
Rotational Stiffness
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > stewart.joints_M.Kf = args.Kf_M;
stewart.joints_M.Kt = args.Kf_M;
stewart.joints_F.Kf = args.Kf_F;
stewart.joints_F.Kt = args.Kf_F;
< / pre >
< / div >
< p >
Rotational Damping
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > stewart.joints_M.Cf = args.Cf_M;
stewart.joints_M.Ct = args.Cf_M;
stewart.joints_F.Cf = args.Cf_F;
stewart.joints_F.Ct = args.Cf_F;
< / pre >
< / div >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgea07e0e" class = "outline-3" >
< h3 id = "orgea07e0e" > < code > initializeInertialSensor< / code > : Initialize the inertial sensor in each strut< / h3 >
< div class = "outline-text-3" id = "text-orgea07e0e" >
2020-02-11 15:16:07 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "orgd96277a" > < / a >
2020-02-11 15:16:07 +01:00
< / p >
< p >
This Matlab function is accessible < a href = "src/initializeInertialSensor.m" > here< / a > .
< / p >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org86c4462" class = "outline-4" >
< h4 id = "org86c4462" > Function description< / h4 >
< div class = "outline-text-4" id = "text-org86c4462" >
2020-02-11 15:16:07 +01:00
< 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" > initializeInertialSensor< / span > (< span class = "org-variable-name" > stewart< / span > , < span class = "org-variable-name" > args< / span > )
< span class = "org-comment" > % initializeInertialSensor - Initialize the inertial sensor in each strut< / span >
< span class = "org-comment" > %< / span >
< span class = "org-comment" > % Syntax: [stewart] = initializeInertialSensor(args)< / span >
< span class = "org-comment" > %< / span >
< span class = "org-comment" > % Inputs:< / span >
< span class = "org-comment" > % - args - Structure with the following fields:< / span >
< span class = "org-comment" > % - type - 'geophone', 'accelerometer', 'none'< / span >
< span class = "org-comment" > % - mass [1x1] - Weight of the inertial mass [kg]< / span >
< span class = "org-comment" > % - freq [1x1] - Cutoff frequency [Hz]< / span >
< span class = "org-comment" > %< / span >
< span class = "org-comment" > % Outputs:< / span >
< span class = "org-comment" > % - stewart - updated Stewart structure with the added fields:< / span >
< span class = "org-comment" > % - stewart.sensors.inertial< / span >
< span class = "org-comment" > % - type - 1 (geophone), 2 (accelerometer), 3 (none)< / span >
< span class = "org-comment" > % - K [1x1] - Stiffness [N/m]< / span >
< span class = "org-comment" > % - C [1x1] - Damping [N/(m/s)]< / span >
< span class = "org-comment" > % - M [1x1] - Inertial Mass [kg]< / span >
< span class = "org-comment" > % - G [1x1] - Gain< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org6d69ef4" class = "outline-4" >
< h4 id = "org6d69ef4" > Optional Parameters< / h4 >
< div class = "outline-text-4" id = "text-org6d69ef4" >
2020-02-11 15:16:07 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > arguments
stewart
args.type char {mustBeMember(args.type,{< span class = "org-string" > 'geophone'< / span > , < span class = "org-string" > 'accelerometer'< / span > , < span class = "org-string" > 'none'< / span > })} = < span class = "org-string" > 'none'< / span >
args.mass (1,1) double {mustBeNumeric, mustBeNonnegative} = 1e< span class = "org-type" > -< / span > 2
args.freq (1,1) double {mustBeNumeric, mustBeNonnegative} = 1e3
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org463075d" class = "outline-4" >
< h4 id = "org463075d" > Compute the properties of the sensor< / h4 >
< div class = "outline-text-4" id = "text-org463075d" >
2020-02-11 15:16:07 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > sensor = struct();
< span class = "org-keyword" > switch< / span > < span class = "org-constant" > args.type< / span >
< span class = "org-keyword" > case< / span > < span class = "org-string" > 'geophone'< / span >
sensor.type = 1;
sensor.M = args.mass;
sensor.K = sensor.M < span class = "org-type" > *< / span > (2< span class = "org-type" > *< / span > < span class = "org-constant" > pi< / span > < span class = "org-type" > *< / span > args.freq)< span class = "org-type" > ^< / span > 2;
sensor.C = 2< span class = "org-type" > *< / span > sqrt(sensor.M < span class = "org-type" > *< / span > sensor.K);
< span class = "org-keyword" > case< / span > < span class = "org-string" > 'accelerometer'< / span >
sensor.type = 2;
sensor.M = args.mass;
sensor.K = sensor.M < span class = "org-type" > *< / span > (2< span class = "org-type" > *< / span > < span class = "org-constant" > pi< / span > < span class = "org-type" > *< / span > args.freq)< span class = "org-type" > ^< / span > 2;
sensor.C = 2< span class = "org-type" > *< / span > sqrt(sensor.M < span class = "org-type" > *< / span > sensor.K);
sensor.G = < span class = "org-type" > -< / span > sensor.K< span class = "org-type" > /< / span > sensor.M;
< span class = "org-keyword" > case< / span > < span class = "org-string" > 'none'< / span >
sensor.type = 3;
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgbf82c53" class = "outline-4" >
< h4 id = "orgbf82c53" > Populate the < code > stewart< / code > structure< / h4 >
< div class = "outline-text-4" id = "text-orgbf82c53" >
2020-02-11 15:16:07 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > stewart.sensors.inertial = sensor;
< / pre >
< / div >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org5266e9d" class = "outline-3" >
< h3 id = "org5266e9d" > < code > displayArchitecture< / code > : 3D plot of the Stewart platform architecture< / h3 >
< div class = "outline-text-3" id = "text-org5266e9d" >
2020-02-11 15:16:07 +01:00
< p >
2020-02-11 15:27:39 +01:00
< a id = "org5526211" > < / a >
2020-02-07 17:12:26 +01:00
< / p >
< p >
This Matlab function is accessible < a href = "src/displayArchitecture.m" > here< / a > .
< / p >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgfcc25cc" class = "outline-4" >
< h4 id = "orgfcc25cc" > Function description< / h4 >
< div class = "outline-text-4" id = "text-orgfcc25cc" >
2020-02-07 17:12:26 +01:00
< 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 >
2020-02-07 17:18:46 +01:00
< 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 >
2020-02-07 17:12:26 +01:00
< 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 >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org51d9478" class = "outline-4" >
< h4 id = "org51d9478" > Optional Parameters< / h4 >
< div class = "outline-text-4" id = "text-org51d9478" >
2020-02-07 17:12:26 +01:00
< 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)
2020-02-07 17:18:46 +01:00
args.F_color = [0 0.4470 0.7410]
args.M_color = [0.8500 0.3250 0.0980]
args.L_color = [0 0 0]
2020-02-11 15:16:07 +01:00
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 >
2020-02-07 17:12:26 +01:00
args.platforms logical {mustBeNumericOrLogical} = < span class = "org-constant" > true< / span >
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org1ee899b" class = "outline-4" >
< h4 id = "org1ee899b" > Check the < code > stewart< / code > structure elements< / h4 >
< div class = "outline-text-4" id = "text-org1ee899b" >
2020-02-11 15:16:07 +01:00
< div class = "org-src-container" >
< pre class = "src src-matlab" > assert(isfield(stewart.platform_F, < span class = "org-string" > 'FO_A'< / span > ), < span class = "org-string" > 'stewart.platform_F should have attribute FO_A'< / span > )
FO_A = stewart.platform_F.FO_A;
assert(isfield(stewart.platform_M, < span class = "org-string" > 'MO_B'< / span > ), < span class = "org-string" > 'stewart.platform_M should have attribute MO_B'< / span > )
MO_B = stewart.platform_M.MO_B;
assert(isfield(stewart.geometry, < span class = "org-string" > 'H'< / span > ), < span class = "org-string" > 'stewart.geometry should have attribute H'< / span > )
H = stewart.geometry.H;
assert(isfield(stewart.platform_F, < span class = "org-string" > 'Fa'< / span > ), < span class = "org-string" > 'stewart.platform_F should have attribute Fa'< / span > )
Fa = stewart.platform_F.Fa;
assert(isfield(stewart.platform_M, < span class = "org-string" > 'Mb'< / span > ), < span class = "org-string" > 'stewart.platform_M should have attribute Mb'< / span > )
Mb = stewart.platform_M.Mb;
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgc088b18" class = "outline-4" >
< h4 id = "orgc088b18" > Figure Creation, Frames and Homogeneous transformations< / h4 >
< div class = "outline-text-4" id = "text-orgc088b18" >
2020-02-07 17:12:26 +01:00
< 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" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > FTa = [eye(3), FO_A; ...
2020-02-07 17:12:26 +01:00
zeros< span class = "org-type" > (1,3), 1];< / span >
ATb = [args.ARB, args.AP; ...
zeros< span class = "org-type" > (1,3), 1];< / span >
2020-02-11 15:16:07 +01:00
BTm = [eye(3), < span class = "org-type" > -< / span > MO_B; ...
2020-02-07 17:12:26 +01:00
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" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > d_unit_vector = H< span class = "org-type" > /< / span > 4;
2020-02-07 17:12:26 +01:00
< / 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" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > d_label = H< span class = "org-type" > /< / span > 20;
2020-02-07 17:12:26 +01:00
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-orgc25a979" class = "outline-4" >
< h4 id = "orgc25a979" > Fixed Base elements< / h4 >
< div class = "outline-text-4" id = "text-orgc25a979" >
2020-02-07 17:12:26 +01:00
< 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), ...
2020-02-07 17:18:46 +01:00
[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)
2020-02-07 17:12:26 +01:00
< 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 >
2020-02-07 17:18:46 +01:00
Ff(3) < span class = "org-type" > +< / span > d_label, < span class = "org-string" > '$\{F\}$'< / span > , < span class = "org-string" > 'Color'< / span > , args.F_color);
2020-02-07 17:12:26 +01:00
< 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" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > < span class = "org-keyword" > if< / span > args.frames
quiver3(FO_A(1)< span class = "org-type" > *< / span > ones(1,3), FO_A(2)< span class = "org-type" > *< / span > ones(1,3), FO_A(3)< span class = "org-type" > *< / span > ones(1,3), ...
2020-02-07 17:18:46 +01:00
[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)
2020-02-07 17:12:26 +01:00
< span class = "org-keyword" > if< / span > args.labels
2020-02-11 15:16:07 +01:00
< span class = "org-type" > text< / span > (FO_A(1) < span class = "org-type" > +< / span > d_label, ...
FO_A< span class = "org-type" > (2) + d_label, ...< / span >
FO_A(3) < span class = "org-type" > +< / span > d_label, < span class = "org-string" > '$\{A\}$'< / span > , < span class = "org-string" > 'Color'< / span > , args.F_color);
2020-02-07 17:12:26 +01:00
< 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" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > < span class = "org-keyword" > if< / span > args.platforms < span class = "org-type" > & & < / span > stewart.platform_F.type < span class = "org-type" > ==< / span > 1
2020-02-07 17:12:26 +01:00
theta = [0< span class = "org-type" > :< / span > 0.01< span class = "org-type" > :< / span > 2< span class = "org-type" > *< / span > < span class = "org-constant" > pi< / span > < span class = "org-type" > +< / span > 0.01]; < span class = "org-comment" > % Angles [rad]< / span >
v = null([0; 0; 1]< span class = "org-type" > '< / span > ); < span class = "org-comment" > % Two vectors that are perpendicular to the circle normal< / span >
center = [0; 0; 0]; < span class = "org-comment" > % Center of the circle< / span >
2020-02-11 15:16:07 +01:00
radius = stewart.platform_F.R; < span class = "org-comment" > % Radius of the circle [m]< / span >
2020-02-07 17:12:26 +01:00
points = center< span class = "org-type" > *< / span > ones(1, length(theta)) < span class = "org-type" > +< / span > radius< span class = "org-type" > *< / span > (v(< span class = "org-type" > :< / span > ,1)< span class = "org-type" > *< / span > cos(theta) < span class = "org-type" > +< / span > v(< span class = "org-type" > :< / span > ,2)< span class = "org-type" > *< / span > sin(theta));
plot3(points(1,< span class = "org-type" > :< / span > ), ...
points< span class = "org-type" > (2,:), ...< / span >
2020-02-07 17:18:46 +01:00
points(3,< span class = "org-type" > :< / span > ), < span class = "org-string" > '-'< / span > , < span class = "org-string" > 'Color'< / span > , args.F_color);
2020-02-07 17:12:26 +01:00
< 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
2020-02-11 15:16:07 +01:00
scatter3(Fa(1,< span class = "org-type" > :< / span > ), ...
Fa< span class = "org-type" > (2,:), ...< / span >
Fa(3,< span class = "org-type" > :< / span > ), < span class = "org-string" > 'MarkerEdgeColor'< / span > , args.F_color);
2020-02-07 17:12:26 +01:00
< span class = "org-keyword" > if< / span > args.labels
2020-02-11 15:16:07 +01:00
< span class = "org-keyword" > for< / span > < span class = "org-variable-name" > < span class = "org-constant" > i< / span > < / span > = < span class = "org-constant" > 1:size(Fa,2)< / span >
< span class = "org-type" > text< / span > (Fa(1,< span class = "org-constant" > i< / span > ) < span class = "org-type" > +< / span > d_label, ...
Fa(2,< span class = "org-constant" > i< / span > ), ...
Fa(3,< span class = "org-constant" > i< / span > ), sprintf(< span class = "org-string" > '$a_{%i}$'< / span > , < span class = "org-constant" > i< / span > ), < span class = "org-string" > 'Color'< / span > , args.F_color);
2020-02-07 17:12:26 +01:00
< span class = "org-keyword" > end< / span >
< span class = "org-keyword" > end< / span >
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org8417772" class = "outline-4" >
< h4 id = "org8417772" > Mobile Platform elements< / h4 >
< div class = "outline-text-4" id = "text-org8417772" >
2020-02-07 17:12:26 +01:00
< 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), ...
2020-02-07 17:18:46 +01:00
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)
2020-02-07 17:12:26 +01:00
< 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 >
2020-02-07 17:18:46 +01:00
Fm(3) < span class = "org-type" > +< / span > d_label, < span class = "org-string" > '$\{M\}$'< / span > , < span class = "org-string" > 'Color'< / span > , args.M_color);
2020-02-07 17:12:26 +01:00
< 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" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > FB = FO_A < span class = "org-type" > +< / span > args.AP;
2020-02-07 17:12:26 +01:00
< 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), ...
2020-02-07 17:18:46 +01:00
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)
2020-02-07 17:12:26 +01:00
< 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 >
2020-02-07 17:18:46 +01:00
FB(3) < span class = "org-type" > +< / span > d_label, < span class = "org-string" > '$\{B\}$'< / span > , < span class = "org-string" > 'Color'< / span > , args.M_color);
2020-02-07 17:12:26 +01:00
< 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" >
2020-02-11 15:16:07 +01:00
< pre class = "src src-matlab" > < span class = "org-keyword" > if< / span > args.platforms < span class = "org-type" > & & < / span > stewart.platform_M.type < span class = "org-type" > ==< / span > 1
2020-02-07 17:12:26 +01:00
theta = [0< span class = "org-type" > :< / span > 0.01< span class = "org-type" > :< / span > 2< span class = "org-type" > *< / span > < span class = "org-constant" > pi< / span > < span class = "org-type" > +< / span > 0.01]; < span class = "org-comment" > % Angles [rad]< / span >
v = null((FTm(1< span class = "org-type" > :< / span > 3,1< span class = "org-type" > :< / span > 3)< span class = "org-type" > *< / span > [0;0;1])< span class = "org-type" > '< / span > ); < span class = "org-comment" > % Two vectors that are perpendicular to the circle normal< / span >
center = Fm(1< span class = "org-type" > :< / span > 3); < span class = "org-comment" > % Center of the circle< / span >
2020-02-11 15:16:07 +01:00
radius = stewart.platform_M.R; < span class = "org-comment" > % Radius of the circle [m]< / span >
2020-02-07 17:12:26 +01:00
points = center< span class = "org-type" > *< / span > ones(1, length(theta)) < span class = "org-type" > +< / span > radius< span class = "org-type" > *< / span > (v(< span class = "org-type" > :< / span > ,1)< span class = "org-type" > *< / span > cos(theta) < span class = "org-type" > +< / span > v(< span class = "org-type" > :< / span > ,2)< span class = "org-type" > *< / span > sin(theta));
plot3(points(1,< span class = "org-type" > :< / span > ), ...
points< span class = "org-type" > (2,:), ...< / span >
2020-02-07 17:18:46 +01:00
points(3,< span class = "org-type" > :< / span > ), < span class = "org-string" > '-'< / span > , < span class = "org-string" > 'Color'< / span > , args.M_color);
2020-02-07 17:12:26 +01:00
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
< p >
Plot the position and labels of the rotation joints fixed to the mobile platform.
< / p >
< div class = "org-src-container" >
< pre class = "src src-matlab" > < span class = "org-keyword" > if< / span > args.joints
2020-02-11 15:16:07 +01:00
Fb = FTm< span class = "org-type" > *< / span > [Mb;ones(1,6)];
2020-02-07 17:12:26 +01:00
scatter3(Fb(1,< span class = "org-type" > :< / span > ), ...
Fb< span class = "org-type" > (2,:), ...< / span >
2020-02-07 17:18:46 +01:00
Fb(3,< span class = "org-type" > :< / span > ), < span class = "org-string" > 'MarkerEdgeColor'< / span > , args.M_color);
2020-02-07 17:12:26 +01:00
< 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 > ), ...
2020-02-07 17:18:46 +01:00
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);
2020-02-07 17:12:26 +01:00
< span class = "org-keyword" > end< / span >
< span class = "org-keyword" > end< / span >
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org5f40b79" class = "outline-4" >
< h4 id = "org5f40b79" > Legs< / h4 >
< div class = "outline-text-4" id = "text-org5f40b79" >
2020-02-07 17:12:26 +01:00
< 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 >
2020-02-11 15:16:07 +01:00
plot3([Fa(1,< span class = "org-constant" > i< / span > ), Fb(1,< span class = "org-constant" > i< / span > )], ...
[Fa(2,< span class = "org-constant" > i< / span > ), Fb(2,< span class = "org-constant" > i< / span > )], ...
[Fa(3,< span class = "org-constant" > i< / span > ), Fb(3,< span class = "org-constant" > i< / span > )], < span class = "org-string" > '-'< / span > , < span class = "org-string" > 'Color'< / span > , args.L_color);
2020-02-07 17:12:26 +01:00
< span class = "org-keyword" > if< / span > args.labels
2020-02-11 15:16:07 +01:00
< span class = "org-type" > text< / span > ((Fa(1,< span class = "org-constant" > i< / span > )< span class = "org-type" > +< / span > Fb(1,< span class = "org-constant" > i< / span > ))< span class = "org-type" > /< / span > 2 < span class = "org-type" > +< / span > d_label, ...
(Fa(2,< span class = "org-constant" > i< / span > )< span class = "org-type" > +< / span > Fb(2,< span class = "org-constant" > i< / span > ))< span class = "org-type" > /< / span > 2, ...
(Fa(3,< span class = "org-constant" > i< / span > )< span class = "org-type" > +< / span > Fb(3,< span class = "org-constant" > i< / span > ))< span class = "org-type" > /< / span > 2, sprintf(< span class = "org-string" > '$%i$'< / span > , < span class = "org-constant" > i< / span > ), < span class = "org-string" > 'Color'< / span > , args.L_color);
2020-02-07 17:12:26 +01:00
< span class = "org-keyword" > end< / span >
< span class = "org-keyword" > end< / span >
< span class = "org-keyword" > end< / span >
< / pre >
< / div >
< / div >
< / div >
2020-02-11 15:27:39 +01:00
< div id = "outline-container-org81be27b" class = "outline-4" >
< h4 id = "org81be27b" > Figure parameters< / h4 >
< div class = "outline-text-4" id = "text-org81be27b" >
2020-02-07 17:12:26 +01:00
< 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 >
2020-01-27 17:42:09 +01:00
< / div >
< p >
2020-01-28 17:15:19 +01:00
< 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 >
2020-01-27 17:42:09 +01:00
< / p >
< / div >
< div id = "postamble" class = "status" >
< p class = "author" > Author: Dehaeze Thomas< / p >
2020-02-11 15:27:39 +01:00
< p class = "date" > Created: 2020-02-11 mar. 15:23< / p >
2020-01-27 17:42:09 +01:00
< / div >
< / body >
< / html >