1623 lines
81 KiB
HTML
1623 lines
81 KiB
HTML
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||
|
<head>
|
||
|
<!-- 2020-01-27 lun. 17:41 -->
|
||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
<title>Stewart Platform - Definition of the Architecture</title>
|
||
|
<meta name="generator" content="Org mode" />
|
||
|
<meta name="author" content="Dehaeze Thomas" />
|
||
|
<style type="text/css">
|
||
|
<!--/*--><![CDATA[/*><!--*/
|
||
|
.title { text-align: center;
|
||
|
margin-bottom: .2em; }
|
||
|
.subtitle { text-align: center;
|
||
|
font-size: medium;
|
||
|
font-weight: bold;
|
||
|
margin-top:0; }
|
||
|
.todo { font-family: monospace; color: red; }
|
||
|
.done { font-family: monospace; color: green; }
|
||
|
.priority { font-family: monospace; color: orange; }
|
||
|
.tag { background-color: #eee; font-family: monospace;
|
||
|
padding: 2px; font-size: 80%; font-weight: normal; }
|
||
|
.timestamp { color: #bebebe; }
|
||
|
.timestamp-kwd { color: #5f9ea0; }
|
||
|
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
|
||
|
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
|
||
|
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
|
||
|
.underline { text-decoration: underline; }
|
||
|
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
|
||
|
p.verse { margin-left: 3%; }
|
||
|
pre {
|
||
|
border: 1px solid #ccc;
|
||
|
box-shadow: 3px 3px 3px #eee;
|
||
|
padding: 8pt;
|
||
|
font-family: monospace;
|
||
|
overflow: auto;
|
||
|
margin: 1.2em;
|
||
|
}
|
||
|
pre.src {
|
||
|
position: relative;
|
||
|
overflow: visible;
|
||
|
padding-top: 1.2em;
|
||
|
}
|
||
|
pre.src:before {
|
||
|
display: none;
|
||
|
position: absolute;
|
||
|
background-color: white;
|
||
|
top: -10px;
|
||
|
right: 10px;
|
||
|
padding: 3px;
|
||
|
border: 1px solid black;
|
||
|
}
|
||
|
pre.src:hover:before { display: inline;}
|
||
|
/* Languages per Org manual */
|
||
|
pre.src-asymptote:before { content: 'Asymptote'; }
|
||
|
pre.src-awk:before { content: 'Awk'; }
|
||
|
pre.src-C:before { content: 'C'; }
|
||
|
/* pre.src-C++ doesn't work in CSS */
|
||
|
pre.src-clojure:before { content: 'Clojure'; }
|
||
|
pre.src-css:before { content: 'CSS'; }
|
||
|
pre.src-D:before { content: 'D'; }
|
||
|
pre.src-ditaa:before { content: 'ditaa'; }
|
||
|
pre.src-dot:before { content: 'Graphviz'; }
|
||
|
pre.src-calc:before { content: 'Emacs Calc'; }
|
||
|
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
|
||
|
pre.src-fortran:before { content: 'Fortran'; }
|
||
|
pre.src-gnuplot:before { content: 'gnuplot'; }
|
||
|
pre.src-haskell:before { content: 'Haskell'; }
|
||
|
pre.src-hledger:before { content: 'hledger'; }
|
||
|
pre.src-java:before { content: 'Java'; }
|
||
|
pre.src-js:before { content: 'Javascript'; }
|
||
|
pre.src-latex:before { content: 'LaTeX'; }
|
||
|
pre.src-ledger:before { content: 'Ledger'; }
|
||
|
pre.src-lisp:before { content: 'Lisp'; }
|
||
|
pre.src-lilypond:before { content: 'Lilypond'; }
|
||
|
pre.src-lua:before { content: 'Lua'; }
|
||
|
pre.src-matlab:before { content: 'MATLAB'; }
|
||
|
pre.src-mscgen:before { content: 'Mscgen'; }
|
||
|
pre.src-ocaml:before { content: 'Objective Caml'; }
|
||
|
pre.src-octave:before { content: 'Octave'; }
|
||
|
pre.src-org:before { content: 'Org mode'; }
|
||
|
pre.src-oz:before { content: 'OZ'; }
|
||
|
pre.src-plantuml:before { content: 'Plantuml'; }
|
||
|
pre.src-processing:before { content: 'Processing.js'; }
|
||
|
pre.src-python:before { content: 'Python'; }
|
||
|
pre.src-R:before { content: 'R'; }
|
||
|
pre.src-ruby:before { content: 'Ruby'; }
|
||
|
pre.src-sass:before { content: 'Sass'; }
|
||
|
pre.src-scheme:before { content: 'Scheme'; }
|
||
|
pre.src-screen:before { content: 'Gnu Screen'; }
|
||
|
pre.src-sed:before { content: 'Sed'; }
|
||
|
pre.src-sh:before { content: 'shell'; }
|
||
|
pre.src-sql:before { content: 'SQL'; }
|
||
|
pre.src-sqlite:before { content: 'SQLite'; }
|
||
|
/* additional languages in org.el's org-babel-load-languages alist */
|
||
|
pre.src-forth:before { content: 'Forth'; }
|
||
|
pre.src-io:before { content: 'IO'; }
|
||
|
pre.src-J:before { content: 'J'; }
|
||
|
pre.src-makefile:before { content: 'Makefile'; }
|
||
|
pre.src-maxima:before { content: 'Maxima'; }
|
||
|
pre.src-perl:before { content: 'Perl'; }
|
||
|
pre.src-picolisp:before { content: 'Pico Lisp'; }
|
||
|
pre.src-scala:before { content: 'Scala'; }
|
||
|
pre.src-shell:before { content: 'Shell Script'; }
|
||
|
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
|
||
|
/* additional language identifiers per "defun org-babel-execute"
|
||
|
in ob-*.el */
|
||
|
pre.src-cpp:before { content: 'C++'; }
|
||
|
pre.src-abc:before { content: 'ABC'; }
|
||
|
pre.src-coq:before { content: 'Coq'; }
|
||
|
pre.src-groovy:before { content: 'Groovy'; }
|
||
|
/* additional language identifiers from org-babel-shell-names in
|
||
|
ob-shell.el: ob-shell is the only babel language using a lambda to put
|
||
|
the execution function name together. */
|
||
|
pre.src-bash:before { content: 'bash'; }
|
||
|
pre.src-csh:before { content: 'csh'; }
|
||
|
pre.src-ash:before { content: 'ash'; }
|
||
|
pre.src-dash:before { content: 'dash'; }
|
||
|
pre.src-ksh:before { content: 'ksh'; }
|
||
|
pre.src-mksh:before { content: 'mksh'; }
|
||
|
pre.src-posh:before { content: 'posh'; }
|
||
|
/* Additional Emacs modes also supported by the LaTeX listings package */
|
||
|
pre.src-ada:before { content: 'Ada'; }
|
||
|
pre.src-asm:before { content: 'Assembler'; }
|
||
|
pre.src-caml:before { content: 'Caml'; }
|
||
|
pre.src-delphi:before { content: 'Delphi'; }
|
||
|
pre.src-html:before { content: 'HTML'; }
|
||
|
pre.src-idl:before { content: 'IDL'; }
|
||
|
pre.src-mercury:before { content: 'Mercury'; }
|
||
|
pre.src-metapost:before { content: 'MetaPost'; }
|
||
|
pre.src-modula-2:before { content: 'Modula-2'; }
|
||
|
pre.src-pascal:before { content: 'Pascal'; }
|
||
|
pre.src-ps:before { content: 'PostScript'; }
|
||
|
pre.src-prolog:before { content: 'Prolog'; }
|
||
|
pre.src-simula:before { content: 'Simula'; }
|
||
|
pre.src-tcl:before { content: 'tcl'; }
|
||
|
pre.src-tex:before { content: 'TeX'; }
|
||
|
pre.src-plain-tex:before { content: 'Plain TeX'; }
|
||
|
pre.src-verilog:before { content: 'Verilog'; }
|
||
|
pre.src-vhdl:before { content: 'VHDL'; }
|
||
|
pre.src-xml:before { content: 'XML'; }
|
||
|
pre.src-nxml:before { content: 'XML'; }
|
||
|
/* add a generic configuration mode; LaTeX export needs an additional
|
||
|
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
|
||
|
pre.src-conf:before { content: 'Configuration File'; }
|
||
|
|
||
|
table { border-collapse:collapse; }
|
||
|
caption.t-above { caption-side: top; }
|
||
|
caption.t-bottom { caption-side: bottom; }
|
||
|
td, th { vertical-align:top; }
|
||
|
th.org-right { text-align: center; }
|
||
|
th.org-left { text-align: center; }
|
||
|
th.org-center { text-align: center; }
|
||
|
td.org-right { text-align: right; }
|
||
|
td.org-left { text-align: left; }
|
||
|
td.org-center { text-align: center; }
|
||
|
dt { font-weight: bold; }
|
||
|
.footpara { display: inline; }
|
||
|
.footdef { margin-bottom: 1em; }
|
||
|
.figure { padding: 1em; }
|
||
|
.figure p { text-align: center; }
|
||
|
.equation-container {
|
||
|
display: table;
|
||
|
text-align: center;
|
||
|
width: 100%;
|
||
|
}
|
||
|
.equation {
|
||
|
vertical-align: middle;
|
||
|
}
|
||
|
.equation-label {
|
||
|
display: table-cell;
|
||
|
text-align: right;
|
||
|
vertical-align: middle;
|
||
|
}
|
||
|
.inlinetask {
|
||
|
padding: 10px;
|
||
|
border: 2px solid gray;
|
||
|
margin: 10px;
|
||
|
background: #ffffcc;
|
||
|
}
|
||
|
#org-div-home-and-up
|
||
|
{ text-align: right; font-size: 70%; white-space: nowrap; }
|
||
|
textarea { overflow-x: auto; }
|
||
|
.linenr { font-size: smaller }
|
||
|
.code-highlighted { background-color: #ffff00; }
|
||
|
.org-info-js_info-navigation { border-style: none; }
|
||
|
#org-info-js_console-label
|
||
|
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
|
||
|
.org-info-js_search-highlight
|
||
|
{ background-color: #ffff00; color: #000000; font-weight: bold; }
|
||
|
.org-svg { width: 90%; }
|
||
|
/*]]>*/-->
|
||
|
</style>
|
||
|
<link rel="stylesheet" type="text/css" href="./css/htmlize.css"/>
|
||
|
<link rel="stylesheet" type="text/css" href="./css/readtheorg.css"/>
|
||
|
<script src="./js/jquery.min.js"></script>
|
||
|
<script src="./js/bootstrap.min.js"></script>
|
||
|
<script src="./js/jquery.stickytableheaders.min.js"></script>
|
||
|
<script src="./js/readtheorg.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
/*
|
||
|
@licstart The following is the entire license notice for the
|
||
|
JavaScript code in this tag.
|
||
|
|
||
|
Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||
|
|
||
|
The JavaScript code in this tag is free software: you can
|
||
|
redistribute it and/or modify it under the terms of the GNU
|
||
|
General Public License (GNU GPL) as published by the Free Software
|
||
|
Foundation, either version 3 of the License, or (at your option)
|
||
|
any later version. The code is distributed WITHOUT ANY WARRANTY;
|
||
|
without even the implied warranty of MERCHANTABILITY or FITNESS
|
||
|
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
||
|
|
||
|
As additional permission under GNU GPL version 3 section 7, you
|
||
|
may distribute non-source (e.g., minimized or compacted) forms of
|
||
|
that code without the copy of the GNU GPL normally required by
|
||
|
section 4, provided you include this license notice and a URL
|
||
|
through which recipients can access the Corresponding Source.
|
||
|
|
||
|
|
||
|
@licend The above is the entire license notice
|
||
|
for the JavaScript code in this tag.
|
||
|
*/
|
||
|
<!--/*--><![CDATA[/*><!--*/
|
||
|
function CodeHighlightOn(elem, id)
|
||
|
{
|
||
|
var target = document.getElementById(id);
|
||
|
if(null != target) {
|
||
|
elem.cacheClassElem = elem.className;
|
||
|
elem.cacheClassTarget = target.className;
|
||
|
target.className = "code-highlighted";
|
||
|
elem.className = "code-highlighted";
|
||
|
}
|
||
|
}
|
||
|
function CodeHighlightOff(elem, id)
|
||
|
{
|
||
|
var target = document.getElementById(id);
|
||
|
if(elem.cacheClassElem)
|
||
|
elem.className = elem.cacheClassElem;
|
||
|
if(elem.cacheClassTarget)
|
||
|
target.className = elem.cacheClassTarget;
|
||
|
}
|
||
|
/*]]>*///-->
|
||
|
</script>
|
||
|
<script type="text/x-mathjax-config">
|
||
|
MathJax.Hub.Config({
|
||
|
displayAlign: "center",
|
||
|
displayIndent: "0em",
|
||
|
|
||
|
"HTML-CSS": { scale: 100,
|
||
|
linebreaks: { automatic: "false" },
|
||
|
webFont: "TeX"
|
||
|
},
|
||
|
SVG: {scale: 100,
|
||
|
linebreaks: { automatic: "false" },
|
||
|
font: "TeX"},
|
||
|
NativeMML: {scale: 100},
|
||
|
TeX: { equationNumbers: {autoNumber: "AMS"},
|
||
|
MultLineWidth: "85%",
|
||
|
TagSide: "right",
|
||
|
TagIndent: ".8em",
|
||
|
Macros: {
|
||
|
bm: ["{\\boldsymbol #1}",1],
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
</script>
|
||
|
<script type="text/javascript"
|
||
|
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML"></script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="org-div-home-and-up">
|
||
|
<a accesskey="h" href="./index.html"> UP </a>
|
||
|
|
|
||
|
<a accesskey="H" href="./index.html"> HOME </a>
|
||
|
</div><div id="content">
|
||
|
<h1 class="title">Stewart Platform - Definition of the Architecture</h1>
|
||
|
<div id="table-of-contents">
|
||
|
<h2>Table of Contents</h2>
|
||
|
<div id="text-table-of-contents">
|
||
|
<ul>
|
||
|
<li><a href="#orgca240c7">1. Procedure</a></li>
|
||
|
<li><a href="#org86418be">2. Matlab Code</a>
|
||
|
<ul>
|
||
|
<li><a href="#org95a8af4">2.1. Simscape Model</a></li>
|
||
|
<li><a href="#orge7772a8">2.2. Test the functions</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li><a href="#orgf574cc3">3. <code>initializeFramesPositions</code>: Initialize the positions of frames {A}, {B}, {F} and {M}</a>
|
||
|
<ul>
|
||
|
<li><a href="#orgb31e49e">3.1. Function description</a></li>
|
||
|
<li><a href="#org7b8e6cc">3.2. Documentation</a></li>
|
||
|
<li><a href="#orgdeba6d8">3.3. Optional Parameters</a></li>
|
||
|
<li><a href="#orgc1bdcd1">3.4. Initialize the Stewart structure</a></li>
|
||
|
<li><a href="#orga780117">3.5. Compute the position of each frame</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li><a href="#org89ec5b4">4. Initialize the position of the Joints</a>
|
||
|
<ul>
|
||
|
<li><a href="#orgc3d5c40">4.1. <code>generateCubicConfiguration</code>: Generate a Cubic Configuration</a>
|
||
|
<ul>
|
||
|
<li><a href="#orgfbca2f8">4.1.1. Function description</a></li>
|
||
|
<li><a href="#orgfcd09a5">4.1.2. Documentation</a></li>
|
||
|
<li><a href="#org714652b">4.1.3. Optional Parameters</a></li>
|
||
|
<li><a href="#orga0c06c2">4.1.4. Position of the Cube</a></li>
|
||
|
<li><a href="#org8b1cfb2">4.1.5. Compute the pose</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li><a href="#org32836d0">4.2. <code>generateGeneralConfiguration</code>: Generate a Very General Configuration</a>
|
||
|
<ul>
|
||
|
<li><a href="#org511b6d1">4.2.1. Function description</a></li>
|
||
|
<li><a href="#orgb637703">4.2.2. Documentation</a></li>
|
||
|
<li><a href="#orgabdf6ba">4.2.3. Optional Parameters</a></li>
|
||
|
<li><a href="#orgf08cc15">4.2.4. Compute the pose</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li><a href="#org8d06987">5. <code>computeJointsPose</code>: Compute the Pose of the Joints</a>
|
||
|
<ul>
|
||
|
<li><a href="#orga74be1e">5.1. Function description</a></li>
|
||
|
<li><a href="#orged612e9">5.2. Documentation</a></li>
|
||
|
<li><a href="#orgdbc3b9e">5.3. Compute the position of the Joints</a></li>
|
||
|
<li><a href="#org6636b9c">5.4. Compute the strut length and orientation</a></li>
|
||
|
<li><a href="#orge378fdd">5.5. Compute the orientation of the Joints</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li><a href="#orge020103">6. <code>initializeStrutDynamics</code>: Add Stiffness and Damping properties of each strut</a>
|
||
|
<ul>
|
||
|
<li><a href="#orgaf4897c">6.1. Function description</a></li>
|
||
|
<li><a href="#org5335f58">6.2. Optional Parameters</a></li>
|
||
|
<li><a href="#org3fd0b36">6.3. Add Stiffness and Damping properties of each strut</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li><a href="#org2b181fd">7. <code>computeJacobian</code>: Compute the Jacobian Matrix</a>
|
||
|
<ul>
|
||
|
<li><a href="#org7ede423">7.1. Function description</a></li>
|
||
|
<li><a href="#org5097124">7.2. Compute Jacobian Matrix</a></li>
|
||
|
<li><a href="#org99481a5">7.3. Compute Stiffness Matrix</a></li>
|
||
|
<li><a href="#org472b8f6">7.4. Compute Compliance Matrix</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li><a href="#org42f859e">8. Initialize the Geometry of the Mechanical Elements</a>
|
||
|
<ul>
|
||
|
<li><a href="#org15ddf0b">8.1. <code>initializeCylindricalPlatforms</code>: Initialize the geometry of the Fixed and Mobile Platforms</a>
|
||
|
<ul>
|
||
|
<li><a href="#orgf91e9a9">8.1.1. Function description</a></li>
|
||
|
<li><a href="#org174fb57">8.1.2. Optional Parameters</a></li>
|
||
|
<li><a href="#org20a37fd">8.1.3. Create the <code>platforms</code> struct</a></li>
|
||
|
<li><a href="#org23aeb2f">8.1.4. Save the <code>platforms</code> struct</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li><a href="#org08b9351">8.2. <code>initializeCylindricalStruts</code>: Define the mass and moment of inertia of cylindrical struts</a>
|
||
|
<ul>
|
||
|
<li><a href="#orgcbfa79e">8.2.1. Function description</a></li>
|
||
|
<li><a href="#org0555b5f">8.2.2. Optional Parameters</a></li>
|
||
|
<li><a href="#org295542d">8.2.3. Create the <code>struts</code> structure</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li><a href="#orgb5f49ec">9. <code>initializeStewartPose</code>: Determine the initial stroke in each leg to have the wanted pose</a>
|
||
|
<ul>
|
||
|
<li><a href="#org16bc1b7">9.1. Function description</a></li>
|
||
|
<li><a href="#orgdcc1638">9.2. Optional Parameters</a></li>
|
||
|
<li><a href="#org79580d6">9.3. Use the Inverse Kinematic function</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li><a href="#org7f49db4">10. Utility Functions</a>
|
||
|
<ul>
|
||
|
<li><a href="#org5e1e7a4">10.1. <code>inverseKinematics</code>: Compute Inverse Kinematics</a>
|
||
|
<ul>
|
||
|
<li><a href="#org4a5b7c1">10.1.1. Function description</a></li>
|
||
|
<li><a href="#org16c2586">10.1.2. Optional Parameters</a></li>
|
||
|
<li><a href="#orgd1d1be1">10.1.3. Theory</a></li>
|
||
|
<li><a href="#org8c782f7">10.1.4. Compute</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li><a href="#org0570ed5">10.2. <code>forwardKinematicsApprox</code>: Compute the Forward Kinematics</a>
|
||
|
<ul>
|
||
|
<li><a href="#org23b424f">10.2.1. Function description</a></li>
|
||
|
<li><a href="#org66c7154">10.2.2. Optional Parameters</a></li>
|
||
|
<li><a href="#orge00b1b5">10.2.3. Computation</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li><a href="#org2a131cd">11. Other Elements</a>
|
||
|
<ul>
|
||
|
<li><a href="#org0150942">11.1. Z-Axis Geophone</a></li>
|
||
|
<li><a href="#org502059d">11.2. Z-Axis Accelerometer</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<p>
|
||
|
Stewart platforms are generated in multiple steps.
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
We define 4 important <b>frames</b>:
|
||
|
</p>
|
||
|
<ul class="org-ul">
|
||
|
<li>\(\{F\}\): Frame fixed to the <b>Fixed</b> base and located at the center of its bottom surface.
|
||
|
This is used to fix the Stewart platform to some support.</li>
|
||
|
<li>\(\{M\}\): Frame fixed to the <b>Moving</b> platform and located at the center of its top surface.
|
||
|
This is used to place things on top of the Stewart platform.</li>
|
||
|
<li>\(\{A\}\): Frame fixed to the fixed base.
|
||
|
It defined the center of rotation of the moving platform.</li>
|
||
|
<li>\(\{B\}\): Frame fixed to the moving platform.
|
||
|
The motion of the moving platforms and forces applied to it are defined with respect to this frame \(\{B\}\).</li>
|
||
|
</ul>
|
||
|
|
||
|
<p>
|
||
|
Then, we define the <b>location of the spherical joints</b>:
|
||
|
</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>
|
||
|
We define the <b>rest position</b> of the Stewart platform:
|
||
|
</p>
|
||
|
<ul class="org-ul">
|
||
|
<li>For simplicity, we suppose that the fixed base and the moving platform are parallel and aligned with the vertical axis at their rest position.</li>
|
||
|
<li>Thus, to define the rest position of the Stewart platform, we just have to defined its total height \(H\).
|
||
|
\(H\) corresponds to the distance from the bottom of the fixed base to the top of the moving platform.</li>
|
||
|
</ul>
|
||
|
|
||
|
<p>
|
||
|
From \(\bm{a}_{i}\) and \(\bm{b}_{i}\), we can determine the <b>length and orientation of each strut</b>:
|
||
|
</p>
|
||
|
<ul class="org-ul">
|
||
|
<li>\(l_{i}\) is the length of the strut</li>
|
||
|
<li>\({}^{A}\hat{\bm{s}}_{i}\) is the unit vector align with the strut</li>
|
||
|
</ul>
|
||
|
|
||
|
<p>
|
||
|
The position of the Spherical joints can be computed using various methods:
|
||
|
</p>
|
||
|
<ul class="org-ul">
|
||
|
<li>Cubic configuration</li>
|
||
|
<li>Circular configuration</li>
|
||
|
<li>Arbitrary position</li>
|
||
|
<li>These methods should be easily scriptable and corresponds to specific functions that returns \({}^{F}\bm{a}_{i}\) and \({}^{M}\bm{b}_{i}\).
|
||
|
The input of these functions are the parameters corresponding to the wanted geometry.</li>
|
||
|
</ul>
|
||
|
|
||
|
<p>
|
||
|
For Simscape, we need:
|
||
|
</p>
|
||
|
<ul class="org-ul">
|
||
|
<li>The position and orientation of each spherical joint fixed to the fixed base: \({}^{F}\bm{a}_{i}\) and \({}^{F}\bm{R}_{a_{i}}\)</li>
|
||
|
<li>The position and orientation of each spherical joint fixed to the moving platform: \({}^{M}\bm{b}_{i}\) and \({}^{M}\bm{R}_{b_{i}}\)</li>
|
||
|
<li>The rest length of each strut: \(l_{i}\)</li>
|
||
|
<li>The stiffness and damping of each actuator: \(k_{i}\) and \(c_{i}\)</li>
|
||
|
<li>The position of the frame \(\{A\}\) with respect to the frame \(\{F\}\): \({}^{F}\bm{O}_{A}\)</li>
|
||
|
<li>The position of the frame \(\{B\}\) with respect to the frame \(\{M\}\): \({}^{M}\bm{O}_{B}\)</li>
|
||
|
</ul>
|
||
|
|
||
|
|
||
|
<div id="outline-container-orgca240c7" class="outline-2">
|
||
|
<h2 id="orgca240c7"><span class="section-number-2">1</span> Procedure</h2>
|
||
|
<div class="outline-text-2" id="text-1">
|
||
|
<p>
|
||
|
The procedure to define the Stewart platform is the following:
|
||
|
</p>
|
||
|
<ol class="org-ol">
|
||
|
<li>Define the initial position of frames {A}, {B}, {F} and {M}.
|
||
|
We do that using the <code>initializeFramesPositions</code> function.
|
||
|
We have to specify the total height of the Stewart platform \(H\) and the position \({}^{M}O_{B}\) of {B} with respect to {M}.</li>
|
||
|
<li>Compute the positions of joints \({}^{F}a_{i}\) and \({}^{M}b_{i}\).
|
||
|
We can do that using various methods depending on the wanted architecture:
|
||
|
<ul class="org-ul">
|
||
|
<li><code>generateCubicConfiguration</code> permits to generate a cubic configuration</li>
|
||
|
</ul></li>
|
||
|
<li>Compute the position and orientation of the joints with respect to the fixed base and the moving platform.
|
||
|
This is done with the <code>computeJointsPose</code> function.</li>
|
||
|
<li>Define the dynamical properties of the Stewart platform.
|
||
|
The output are the stiffness and damping of each strut \(k_{i}\) and \(c_{i}\).
|
||
|
This can be done we simply choosing directly the stiffness and damping of each strut.
|
||
|
The stiffness and damping of each actuator can also be determine from the wanted stiffness of the Stewart platform for instance.</li>
|
||
|
<li>Define the mass and inertia of each element of the Stewart platform.</li>
|
||
|
</ol>
|
||
|
|
||
|
<p>
|
||
|
By following this procedure, we obtain a Matlab structure <code>stewart</code> that contains all the information for the Simscape model and for further analysis.
|
||
|
</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org86418be" class="outline-2">
|
||
|
<h2 id="org86418be"><span class="section-number-2">2</span> Matlab Code</h2>
|
||
|
<div class="outline-text-2" id="text-2">
|
||
|
</div>
|
||
|
<div id="outline-container-org95a8af4" class="outline-3">
|
||
|
<h3 id="org95a8af4"><span class="section-number-3">2.1</span> Simscape Model</h3>
|
||
|
<div class="outline-text-3" id="text-2-1">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">open(<span class="org-string">'stewart_platform.slx'</span>)
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orge7772a8" class="outline-3">
|
||
|
<h3 id="orge7772a8"><span class="section-number-3">2.2</span> Test the functions</h3>
|
||
|
<div class="outline-text-3" id="text-2-2">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart = initializeFramesPositions(<span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
|
||
|
<span class="org-comment">% stewart = generateCubicConfiguration(stewart, 'Hc', 60e-3, 'FOc', 45e-3, 'FHa', 5e-3, 'MHb', 5e-3);</span>
|
||
|
stewart = generateGeneralConfiguration(stewart);
|
||
|
stewart = computeJointsPose(stewart);
|
||
|
stewart = initializeStrutDynamics(stewart, <span class="org-string">'Ki'</span>, 1e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'Ci'</span>, 1e2<span class="org-type">*</span>ones(6,1));
|
||
|
stewart = initializeCylindricalPlatforms(stewart);
|
||
|
stewart = initializeCylindricalStruts(stewart);
|
||
|
stewart = computeJacobian(stewart);
|
||
|
stewart = initializeStewartPose(stewart, <span class="org-string">'AP'</span>, [0;0;0.01], <span class="org-string">'ARB'</span>, eye(3));
|
||
|
|
||
|
[Li, dLi] = inverseKinematics(stewart, <span class="org-string">'AP'</span>, [0;0;0.00001], <span class="org-string">'ARB'</span>, eye(3));
|
||
|
[P, R] = forwardKinematicsApprox(stewart, <span class="org-string">'dL'</span>, dLi);
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgf574cc3" class="outline-2">
|
||
|
<h2 id="orgf574cc3"><span class="section-number-2">3</span> <code>initializeFramesPositions</code>: Initialize the positions of frames {A}, {B}, {F} and {M}</h2>
|
||
|
<div class="outline-text-2" id="text-3">
|
||
|
<p>
|
||
|
<a id="org3a0ea63"></a>
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
This Matlab function is accessible <a href="src/initializeFramesPositions.m">here</a>.
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgb31e49e" class="outline-3">
|
||
|
<h3 id="orgb31e49e"><span class="section-number-3">3.1</span> Function description</h3>
|
||
|
<div class="outline-text-3" id="text-3-1">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeFramesPositions</span>(<span class="org-variable-name">args</span>)
|
||
|
<span class="org-comment">% initializeFramesPositions - Initialize the positions of frames {A}, {B}, {F} and {M}</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Syntax: [stewart] = initializeFramesPositions(args)</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Inputs:</span>
|
||
|
<span class="org-comment">% - args - Can have the following fields:</span>
|
||
|
<span class="org-comment">% - H [1x1] - Total Height of the Stewart Platform (height from {F} to {M}) [m]</span>
|
||
|
<span class="org-comment">% - MO_B [1x1] - Height of the frame {B} with respect to {M} [m]</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Outputs:</span>
|
||
|
<span class="org-comment">% - stewart - A structure with the following fields:</span>
|
||
|
<span class="org-comment">% - H [1x1] - Total Height of the Stewart Platform [m]</span>
|
||
|
<span class="org-comment">% - FO_M [3x1] - Position of {M} with respect to {F} [m]</span>
|
||
|
<span class="org-comment">% - MO_B [3x1] - Position of {B} with respect to {M} [m]</span>
|
||
|
<span class="org-comment">% - FO_A [3x1] - Position of {A} with respect to {F} [m]</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org7b8e6cc" class="outline-3">
|
||
|
<h3 id="org7b8e6cc"><span class="section-number-3">3.2</span> Documentation</h3>
|
||
|
<div class="outline-text-3" id="text-3-2">
|
||
|
|
||
|
<div id="orga050617" class="figure">
|
||
|
<p><img src="figs/stewart-frames-position.png" alt="stewart-frames-position.png" />
|
||
|
</p>
|
||
|
<p><span class="figure-number">Figure 1: </span>Definition of the position of the frames</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgdeba6d8" class="outline-3">
|
||
|
<h3 id="orgdeba6d8"><span class="section-number-3">3.3</span> Optional Parameters</h3>
|
||
|
<div class="outline-text-3" id="text-3-3">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">arguments
|
||
|
args.H (1,1) double {mustBeNumeric, mustBePositive} = 90e<span class="org-type">-</span>3
|
||
|
args.MO_B (1,1) double {mustBeNumeric} = 50e<span class="org-type">-</span>3
|
||
|
<span class="org-keyword">end</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgc1bdcd1" class="outline-3">
|
||
|
<h3 id="orgc1bdcd1"><span class="section-number-3">3.4</span> Initialize the Stewart structure</h3>
|
||
|
<div class="outline-text-3" id="text-3-4">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart = struct();
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orga780117" class="outline-3">
|
||
|
<h3 id="orga780117"><span class="section-number-3">3.5</span> Compute the position of each frame</h3>
|
||
|
<div class="outline-text-3" id="text-3-5">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart.H = args.H; <span class="org-comment">% Total Height of the Stewart Platform [m]</span>
|
||
|
|
||
|
stewart.FO_M = [0; 0; stewart.H]; <span class="org-comment">% Position of {M} with respect to {F} [m]</span>
|
||
|
|
||
|
stewart.MO_B = [0; 0; args.MO_B]; <span class="org-comment">% Position of {B} with respect to {M} [m]</span>
|
||
|
|
||
|
stewart.FO_A = stewart.MO_B <span class="org-type">+</span> stewart.FO_M; <span class="org-comment">% Position of {A} with respect to {F} [m]</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org89ec5b4" class="outline-2">
|
||
|
<h2 id="org89ec5b4"><span class="section-number-2">4</span> Initialize the position of the Joints</h2>
|
||
|
<div class="outline-text-2" id="text-4">
|
||
|
</div>
|
||
|
<div id="outline-container-orgc3d5c40" class="outline-3">
|
||
|
<h3 id="orgc3d5c40"><span class="section-number-3">4.1</span> <code>generateCubicConfiguration</code>: Generate a Cubic Configuration</h3>
|
||
|
<div class="outline-text-3" id="text-4-1">
|
||
|
<p>
|
||
|
<a id="org0e617ce"></a>
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
This Matlab function is accessible <a href="src/generateCubicConfiguration.m">here</a>.
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgfbca2f8" class="outline-4">
|
||
|
<h4 id="orgfbca2f8"><span class="section-number-4">4.1.1</span> Function description</h4>
|
||
|
<div class="outline-text-4" id="text-4-1-1">
|
||
|
<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">generateCubicConfiguration</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
|
||
|
<span class="org-comment">% generateCubicConfiguration - Generate a Cubic Configuration</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Syntax: [stewart] = generateCubicConfiguration(stewart, args)</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Inputs:</span>
|
||
|
<span class="org-comment">% - stewart - A structure with the following fields</span>
|
||
|
<span class="org-comment">% - H [1x1] - Total height of the platform [m]</span>
|
||
|
<span class="org-comment">% - args - Can have the following fields:</span>
|
||
|
<span class="org-comment">% - Hc [1x1] - Height of the "useful" part of the cube [m]</span>
|
||
|
<span class="org-comment">% - FOc [1x1] - Height of the center of the cube with respect to {F} [m]</span>
|
||
|
<span class="org-comment">% - FHa [1x1] - Height of the plane joining the points ai with respect to the frame {F} [m]</span>
|
||
|
<span class="org-comment">% - MHb [1x1] - Height of the plane joining the points bi with respect to the frame {M} [m]</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Outputs:</span>
|
||
|
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
|
||
|
<span class="org-comment">% - Fa [3x6] - Its i'th column is the position vector of joint ai with respect to {F}</span>
|
||
|
<span class="org-comment">% - Mb [3x6] - Its i'th column is the position vector of joint bi with respect to {M}</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgfcd09a5" class="outline-4">
|
||
|
<h4 id="orgfcd09a5"><span class="section-number-4">4.1.2</span> Documentation</h4>
|
||
|
<div class="outline-text-4" id="text-4-1-2">
|
||
|
|
||
|
<div id="org7c2df93" class="figure">
|
||
|
<p><img src="figs/cubic-configuration-definition.png" alt="cubic-configuration-definition.png" />
|
||
|
</p>
|
||
|
<p><span class="figure-number">Figure 2: </span>Cubic Configuration</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org714652b" class="outline-4">
|
||
|
<h4 id="org714652b"><span class="section-number-4">4.1.3</span> Optional Parameters</h4>
|
||
|
<div class="outline-text-4" id="text-4-1-3">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">arguments
|
||
|
stewart
|
||
|
args.Hc (1,1) double {mustBeNumeric, mustBePositive} = 60e<span class="org-type">-</span>3
|
||
|
args.FOc (1,1) double {mustBeNumeric} = 50e<span class="org-type">-</span>3
|
||
|
args.FHa (1,1) double {mustBeNumeric, mustBePositive} = 15e<span class="org-type">-</span>3
|
||
|
args.MHb (1,1) double {mustBeNumeric, mustBePositive} = 15e<span class="org-type">-</span>3
|
||
|
<span class="org-keyword">end</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orga0c06c2" class="outline-4">
|
||
|
<h4 id="orga0c06c2"><span class="section-number-4">4.1.4</span> Position of the Cube</h4>
|
||
|
<div class="outline-text-4" id="text-4-1-4">
|
||
|
<p>
|
||
|
We define the useful points of the cube with respect to the Cube’s center.
|
||
|
\({}^{C}C\) are the 6 vertices of the cubes expressed in a frame {C} which is
|
||
|
located at the center of the cube and aligned with {F} and {M}.
|
||
|
</p>
|
||
|
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">sx = [ 2; <span class="org-type">-</span>1; <span class="org-type">-</span>1];
|
||
|
sy = [ 0; 1; <span class="org-type">-</span>1];
|
||
|
sz = [ 1; 1; 1];
|
||
|
|
||
|
R = [sx, sy, sz]<span class="org-type">./</span>vecnorm([sx, sy, sz]);
|
||
|
|
||
|
L = args.Hc<span class="org-type">*</span>sqrt(3);
|
||
|
|
||
|
Cc = R<span class="org-type">'*</span>[[0;0;L],[L;0;L],[L;0;0],[L;L;0],[0;L;0],[0;L;L]] <span class="org-type">-</span> [0;0;1.5<span class="org-type">*</span>args.Hc];
|
||
|
|
||
|
CCf = [Cc(<span class="org-type">:</span>,1), Cc(<span class="org-type">:</span>,3), Cc(<span class="org-type">:</span>,3), Cc(<span class="org-type">:</span>,5), Cc(<span class="org-type">:</span>,5), Cc(<span class="org-type">:</span>,1)]; <span class="org-comment">% CCf(:,i) corresponds to the bottom cube's vertice corresponding to the i'th leg</span>
|
||
|
CCm = [Cc(<span class="org-type">:</span>,2), Cc(<span class="org-type">:</span>,2), Cc(<span class="org-type">:</span>,4), Cc(<span class="org-type">:</span>,4), Cc(<span class="org-type">:</span>,6), Cc(<span class="org-type">:</span>,6)]; <span class="org-comment">% CCm(:,i) corresponds to the top cube's vertice corresponding to the i'th leg</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org8b1cfb2" class="outline-4">
|
||
|
<h4 id="org8b1cfb2"><span class="section-number-4">4.1.5</span> Compute the pose</h4>
|
||
|
<div class="outline-text-4" id="text-4-1-5">
|
||
|
<p>
|
||
|
We can compute the vector of each leg \({}^{C}\hat{\bm{s}}_{i}\) (unit vector from \({}^{C}C_{f}\) to \({}^{C}C_{m}\)).
|
||
|
</p>
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">CSi = (CCm <span class="org-type">-</span> CCf)<span class="org-type">./</span>vecnorm(CCm <span class="org-type">-</span> CCf);
|
||
|
</pre>
|
||
|
</div>
|
||
|
|
||
|
<p>
|
||
|
We now which to compute the position of the joints \(a_{i}\) and \(b_{i}\).
|
||
|
</p>
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart.Fa = CCf <span class="org-type">+</span> [0; 0; args.FOc] <span class="org-type">+</span> ((args.FHa<span class="org-type">-</span>(args.FOc<span class="org-type">-</span>args.Hc<span class="org-type">/</span>2))<span class="org-type">./</span>CSi(3,<span class="org-type">:</span>))<span class="org-type">.*</span>CSi;
|
||
|
stewart.Mb = CCf <span class="org-type">+</span> [0; 0; args.FOc<span class="org-type">-</span>stewart.H] <span class="org-type">+</span> ((stewart.H<span class="org-type">-</span>args.MHb<span class="org-type">-</span>(args.FOc<span class="org-type">-</span>args.Hc<span class="org-type">/</span>2))<span class="org-type">./</span>CSi(3,<span class="org-type">:</span>))<span class="org-type">.*</span>CSi;
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org32836d0" class="outline-3">
|
||
|
<h3 id="org32836d0"><span class="section-number-3">4.2</span> <code>generateGeneralConfiguration</code>: Generate a Very General Configuration</h3>
|
||
|
<div class="outline-text-3" id="text-4-2">
|
||
|
<p>
|
||
|
<a id="orgf5e3752"></a>
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
This Matlab function is accessible <a href="src/generateGeneralConfiguration.m">here</a>.
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org511b6d1" class="outline-4">
|
||
|
<h4 id="org511b6d1"><span class="section-number-4">4.2.1</span> Function description</h4>
|
||
|
<div class="outline-text-4" id="text-4-2-1">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">generateGeneralConfiguration</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
|
||
|
<span class="org-comment">% generateGeneralConfiguration - Generate a Very General Configuration</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Syntax: [stewart] = generateGeneralConfiguration(stewart, args)</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Inputs:</span>
|
||
|
<span class="org-comment">% - args - Can have the following fields:</span>
|
||
|
<span class="org-comment">% - FH [1x1] - Height of the position of the fixed joints with respect to the frame {F} [m]</span>
|
||
|
<span class="org-comment">% - FR [1x1] - Radius of the position of the fixed joints in the X-Y [m]</span>
|
||
|
<span class="org-comment">% - FTh [6x1] - Angles of the fixed joints in the X-Y plane with respect to the X axis [rad]</span>
|
||
|
<span class="org-comment">% - MH [1x1] - Height of the position of the mobile joints with respect to the frame {M} [m]</span>
|
||
|
<span class="org-comment">% - FR [1x1] - Radius of the position of the mobile joints in the X-Y [m]</span>
|
||
|
<span class="org-comment">% - MTh [6x1] - Angles of the mobile joints in the X-Y plane with respect to the X axis [rad]</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Outputs:</span>
|
||
|
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
|
||
|
<span class="org-comment">% - Fa [3x6] - Its i'th column is the position vector of joint ai with respect to {F}</span>
|
||
|
<span class="org-comment">% - Mb [3x6] - Its i'th column is the position vector of joint bi with respect to {M}</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgb637703" class="outline-4">
|
||
|
<h4 id="orgb637703"><span class="section-number-4">4.2.2</span> Documentation</h4>
|
||
|
<div class="outline-text-4" id="text-4-2-2">
|
||
|
<p>
|
||
|
Joints are positions on a circle centered with the Z axis of {F} and {M} and at a chosen distance from {F} and {M}.
|
||
|
The radius of the circles can be chosen as well as the angles where the joints are located.
|
||
|
</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgabdf6ba" class="outline-4">
|
||
|
<h4 id="orgabdf6ba"><span class="section-number-4">4.2.3</span> Optional Parameters</h4>
|
||
|
<div class="outline-text-4" id="text-4-2-3">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">arguments
|
||
|
stewart
|
||
|
args.FH (1,1) double {mustBeNumeric, mustBePositive} = 15e<span class="org-type">-</span>3
|
||
|
args.FR (1,1) double {mustBeNumeric, mustBePositive} = 115e<span class="org-type">-</span>3;
|
||
|
args.FTh (6,1) double {mustBeNumeric} = [<span class="org-type">-</span>10, 10, 120<span class="org-type">-</span>10, 120<span class="org-type">+</span>10, 240<span class="org-type">-</span>10, 240<span class="org-type">+</span>10]<span class="org-type">*</span>(<span class="org-constant">pi</span><span class="org-type">/</span>180);
|
||
|
args.MH (1,1) double {mustBeNumeric, mustBePositive} = 15e<span class="org-type">-</span>3
|
||
|
args.MR (1,1) double {mustBeNumeric, mustBePositive} = 90e<span class="org-type">-</span>3;
|
||
|
args.MTh (6,1) double {mustBeNumeric} = [<span class="org-type">-</span>60<span class="org-type">+</span>10, 60<span class="org-type">-</span>10, 60<span class="org-type">+</span>10, 180<span class="org-type">-</span>10, 180<span class="org-type">+</span>10, <span class="org-type">-</span>60<span class="org-type">-</span>10]<span class="org-type">*</span>(<span class="org-constant">pi</span><span class="org-type">/</span>180);
|
||
|
<span class="org-keyword">end</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgf08cc15" class="outline-4">
|
||
|
<h4 id="orgf08cc15"><span class="section-number-4">4.2.4</span> Compute the pose</h4>
|
||
|
<div class="outline-text-4" id="text-4-2-4">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart.Fa = zeros(3,6);
|
||
|
stewart.Mb = zeros(3,6);
|
||
|
</pre>
|
||
|
</div>
|
||
|
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab"><span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
|
||
|
stewart.Fa(<span class="org-type">:</span>,<span class="org-constant">i</span>) = [args.FR<span class="org-type">*</span>cos(args.FTh(<span class="org-constant">i</span>)); args.FR<span class="org-type">*</span>sin(args.FTh(<span class="org-constant">i</span>)); args.FH];
|
||
|
stewart.Mb(<span class="org-type">:</span>,<span class="org-constant">i</span>) = [args.MR<span class="org-type">*</span>cos(args.MTh(<span class="org-constant">i</span>)); args.MR<span class="org-type">*</span>sin(args.MTh(<span class="org-constant">i</span>)); <span class="org-type">-</span>args.MH];
|
||
|
<span class="org-keyword">end</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org8d06987" class="outline-2">
|
||
|
<h2 id="org8d06987"><span class="section-number-2">5</span> <code>computeJointsPose</code>: Compute the Pose of the Joints</h2>
|
||
|
<div class="outline-text-2" id="text-5">
|
||
|
<p>
|
||
|
<a id="org89bede3"></a>
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
This Matlab function is accessible <a href="src/computeJointsPose.m">here</a>.
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orga74be1e" class="outline-3">
|
||
|
<h3 id="orga74be1e"><span class="section-number-3">5.1</span> Function description</h3>
|
||
|
<div class="outline-text-3" id="text-5-1">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">computeJointsPose</span>(<span class="org-variable-name">stewart</span>)
|
||
|
<span class="org-comment">% computeJointsPose -</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Syntax: [stewart] = computeJointsPose(stewart)</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Inputs:</span>
|
||
|
<span class="org-comment">% - stewart - A structure with the following fields</span>
|
||
|
<span class="org-comment">% - Fa [3x6] - Its i'th column is the position vector of joint ai with respect to {F}</span>
|
||
|
<span class="org-comment">% - Mb [3x6] - Its i'th column is the position vector of joint bi with respect to {M}</span>
|
||
|
<span class="org-comment">% - FO_A [3x1] - Position of {A} with respect to {F}</span>
|
||
|
<span class="org-comment">% - MO_B [3x1] - Position of {B} with respect to {M}</span>
|
||
|
<span class="org-comment">% - FO_M [3x1] - Position of {M} with respect to {F}</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Outputs:</span>
|
||
|
<span class="org-comment">% - stewart - A structure with the following added fields</span>
|
||
|
<span class="org-comment">% - Aa [3x6] - The i'th column is the position of ai with respect to {A}</span>
|
||
|
<span class="org-comment">% - Ab [3x6] - The i'th column is the position of bi with respect to {A}</span>
|
||
|
<span class="org-comment">% - Ba [3x6] - The i'th column is the position of ai with respect to {B}</span>
|
||
|
<span class="org-comment">% - Bb [3x6] - The i'th column is the position of bi with respect to {B}</span>
|
||
|
<span class="org-comment">% - l [6x1] - The i'th element is the initial length of strut i</span>
|
||
|
<span class="org-comment">% - As [3x6] - The i'th column is the unit vector of strut i expressed in {A}</span>
|
||
|
<span class="org-comment">% - Bs [3x6] - The i'th column is the unit vector of strut i expressed in {B}</span>
|
||
|
<span class="org-comment">% - FRa [3x3x6] - The i'th 3x3 array is the rotation matrix to orientate the bottom of the i'th strut from {F}</span>
|
||
|
<span class="org-comment">% - MRb [3x3x6] - The i'th 3x3 array is the rotation matrix to orientate the top of the i'th strut from {M}</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orged612e9" class="outline-3">
|
||
|
<h3 id="orged612e9"><span class="section-number-3">5.2</span> Documentation</h3>
|
||
|
<div class="outline-text-3" id="text-5-2">
|
||
|
|
||
|
<div id="org722b220" class="figure">
|
||
|
<p><img src="figs/stewart-struts.png" alt="stewart-struts.png" />
|
||
|
</p>
|
||
|
<p><span class="figure-number">Figure 3: </span>Position and orientation of the struts</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgdbc3b9e" class="outline-3">
|
||
|
<h3 id="orgdbc3b9e"><span class="section-number-3">5.3</span> Compute the position of the Joints</h3>
|
||
|
<div class="outline-text-3" id="text-5-3">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart.Aa = stewart.Fa <span class="org-type">-</span> repmat(stewart.FO_A, [1, 6]);
|
||
|
stewart.Bb = stewart.Mb <span class="org-type">-</span> repmat(stewart.MO_B, [1, 6]);
|
||
|
|
||
|
stewart.Ab = stewart.Bb <span class="org-type">-</span> repmat(<span class="org-type">-</span>stewart.MO_B<span class="org-type">-</span>stewart.FO_M<span class="org-type">+</span>stewart.FO_A, [1, 6]);
|
||
|
stewart.Ba = stewart.Aa <span class="org-type">-</span> repmat( stewart.MO_B<span class="org-type">+</span>stewart.FO_M<span class="org-type">-</span>stewart.FO_A, [1, 6]);
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org6636b9c" class="outline-3">
|
||
|
<h3 id="org6636b9c"><span class="section-number-3">5.4</span> Compute the strut length and orientation</h3>
|
||
|
<div class="outline-text-3" id="text-5-4">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart.As = (stewart.Ab <span class="org-type">-</span> stewart.Aa)<span class="org-type">./</span>vecnorm(stewart.Ab <span class="org-type">-</span> stewart.Aa); <span class="org-comment">% As_i is the i'th vector of As</span>
|
||
|
|
||
|
stewart.l = vecnorm(stewart.Ab <span class="org-type">-</span> stewart.Aa)<span class="org-type">'</span>;
|
||
|
</pre>
|
||
|
</div>
|
||
|
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart.Bs = (stewart.Bb <span class="org-type">-</span> stewart.Ba)<span class="org-type">./</span>vecnorm(stewart.Bb <span class="org-type">-</span> stewart.Ba);
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orge378fdd" class="outline-3">
|
||
|
<h3 id="orge378fdd"><span class="section-number-3">5.5</span> Compute the orientation of the Joints</h3>
|
||
|
<div class="outline-text-3" id="text-5-5">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart.FRa = zeros(3,3,6);
|
||
|
stewart.MRb = zeros(3,3,6);
|
||
|
|
||
|
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
|
||
|
stewart.FRa(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = [cross([0;1;0], stewart.As(<span class="org-type">:</span>,<span class="org-constant">i</span>)) , cross(stewart.As(<span class="org-type">:</span>,<span class="org-constant">i</span>), cross([0;1;0], stewart.As(<span class="org-type">:</span>,<span class="org-constant">i</span>))) , stewart.As(<span class="org-type">:</span>,<span class="org-constant">i</span>)];
|
||
|
stewart.FRa(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = stewart.FRa(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>)<span class="org-type">./</span>vecnorm(stewart.FRa(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>));
|
||
|
|
||
|
stewart.MRb(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = [cross([0;1;0], stewart.Bs(<span class="org-type">:</span>,<span class="org-constant">i</span>)) , cross(stewart.Bs(<span class="org-type">:</span>,<span class="org-constant">i</span>), cross([0;1;0], stewart.Bs(<span class="org-type">:</span>,<span class="org-constant">i</span>))) , stewart.Bs(<span class="org-type">:</span>,<span class="org-constant">i</span>)];
|
||
|
stewart.MRb(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = stewart.MRb(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>)<span class="org-type">./</span>vecnorm(stewart.MRb(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>));
|
||
|
<span class="org-keyword">end</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orge020103" class="outline-2">
|
||
|
<h2 id="orge020103"><span class="section-number-2">6</span> <code>initializeStrutDynamics</code>: Add Stiffness and Damping properties of each strut</h2>
|
||
|
<div class="outline-text-2" id="text-6">
|
||
|
<p>
|
||
|
<a id="org46dc7c1"></a>
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
This Matlab function is accessible <a href="src/initializeStrutDynamics.m">here</a>.
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgaf4897c" class="outline-3">
|
||
|
<h3 id="orgaf4897c"><span class="section-number-3">6.1</span> Function description</h3>
|
||
|
<div class="outline-text-3" id="text-6-1">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeStrutDynamics</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
|
||
|
<span class="org-comment">% initializeStrutDynamics - Add Stiffness and Damping properties of each strut</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Syntax: [stewart] = initializeStrutDynamics(args)</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Inputs:</span>
|
||
|
<span class="org-comment">% - args - Structure with the following fields:</span>
|
||
|
<span class="org-comment">% - Ki [6x1] - Stiffness of each strut [N/m]</span>
|
||
|
<span class="org-comment">% - Ci [6x1] - Damping of each strut [N/(m/s)]</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Outputs:</span>
|
||
|
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
|
||
|
<span class="org-comment">% - Ki [6x1] - Stiffness of each strut [N/m]</span>
|
||
|
<span class="org-comment">% - Ci [6x1] - Damping of each strut [N/(m/s)]</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org5335f58" class="outline-3">
|
||
|
<h3 id="org5335f58"><span class="section-number-3">6.2</span> Optional Parameters</h3>
|
||
|
<div class="outline-text-3" id="text-6-2">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">arguments
|
||
|
stewart
|
||
|
args.Ki (6,1) double {mustBeNumeric, mustBePositive} = 1e6<span class="org-type">*</span>ones(6,1)
|
||
|
args.Ci (6,1) double {mustBeNumeric, mustBePositive} = 1e1<span class="org-type">*</span>ones(6,1)
|
||
|
<span class="org-keyword">end</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org3fd0b36" class="outline-3">
|
||
|
<h3 id="org3fd0b36"><span class="section-number-3">6.3</span> Add Stiffness and Damping properties of each strut</h3>
|
||
|
<div class="outline-text-3" id="text-6-3">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart.Ki = args.Ki;
|
||
|
stewart.Ci = args.Ci;
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org2b181fd" class="outline-2">
|
||
|
<h2 id="org2b181fd"><span class="section-number-2">7</span> <code>computeJacobian</code>: Compute the Jacobian Matrix</h2>
|
||
|
<div class="outline-text-2" id="text-7">
|
||
|
<p>
|
||
|
<a id="orge220dba"></a>
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
This Matlab function is accessible <a href="src/computeJacobian.m">here</a>.
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org7ede423" class="outline-3">
|
||
|
<h3 id="org7ede423"><span class="section-number-3">7.1</span> Function description</h3>
|
||
|
<div class="outline-text-3" id="text-7-1">
|
||
|
<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">computeJacobian</span>(<span class="org-variable-name">stewart</span>)
|
||
|
<span class="org-comment">% computeJacobian -</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Syntax: [stewart] = computeJacobian(stewart)</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Inputs:</span>
|
||
|
<span class="org-comment">% - stewart - With at least the following fields:</span>
|
||
|
<span class="org-comment">% - As [3x6] - The 6 unit vectors for each strut expressed in {A}</span>
|
||
|
<span class="org-comment">% - Ab [3x6] - The 6 position of the joints bi expressed in {A}</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Outputs:</span>
|
||
|
<span class="org-comment">% - stewart - With the 3 added field:</span>
|
||
|
<span class="org-comment">% - J [6x6] - The Jacobian Matrix</span>
|
||
|
<span class="org-comment">% - K [6x6] - The Stiffness Matrix</span>
|
||
|
<span class="org-comment">% - C [6x6] - The Compliance Matrix</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org5097124" class="outline-3">
|
||
|
<h3 id="org5097124"><span class="section-number-3">7.2</span> Compute Jacobian Matrix</h3>
|
||
|
<div class="outline-text-3" id="text-7-2">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart.J = [stewart.As<span class="org-type">'</span> , cross(stewart.Ab, stewart.As)<span class="org-type">'</span>];
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org99481a5" class="outline-3">
|
||
|
<h3 id="org99481a5"><span class="section-number-3">7.3</span> Compute Stiffness Matrix</h3>
|
||
|
<div class="outline-text-3" id="text-7-3">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart.K = stewart.J<span class="org-type">'*</span>diag(stewart.Ki)<span class="org-type">*</span>stewart.J;
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org472b8f6" class="outline-3">
|
||
|
<h3 id="org472b8f6"><span class="section-number-3">7.4</span> Compute Compliance Matrix</h3>
|
||
|
<div class="outline-text-3" id="text-7-4">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart.C = inv(stewart.K);
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org42f859e" class="outline-2">
|
||
|
<h2 id="org42f859e"><span class="section-number-2">8</span> Initialize the Geometry of the Mechanical Elements</h2>
|
||
|
<div class="outline-text-2" id="text-8">
|
||
|
</div>
|
||
|
<div id="outline-container-org15ddf0b" class="outline-3">
|
||
|
<h3 id="org15ddf0b"><span class="section-number-3">8.1</span> <code>initializeCylindricalPlatforms</code>: Initialize the geometry of the Fixed and Mobile Platforms</h3>
|
||
|
<div class="outline-text-3" id="text-8-1">
|
||
|
<p>
|
||
|
<a id="orgfbeef82"></a>
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
This Matlab function is accessible <a href="src/initializeCylindricalPlatforms.m">here</a>.
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgf91e9a9" class="outline-4">
|
||
|
<h4 id="orgf91e9a9"><span class="section-number-4">8.1.1</span> Function description</h4>
|
||
|
<div class="outline-text-4" id="text-8-1-1">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeCylindricalPlatforms</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
|
||
|
<span class="org-comment">% initializeCylindricalPlatforms - Initialize the geometry of the Fixed and Mobile Platforms</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Syntax: [stewart] = initializeCylindricalPlatforms(args)</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Inputs:</span>
|
||
|
<span class="org-comment">% - args - Structure with the following fields:</span>
|
||
|
<span class="org-comment">% - Fpm [1x1] - Fixed Platform Mass [kg]</span>
|
||
|
<span class="org-comment">% - Fph [1x1] - Fixed Platform Height [m]</span>
|
||
|
<span class="org-comment">% - Fpr [1x1] - Fixed Platform Radius [m]</span>
|
||
|
<span class="org-comment">% - Mpm [1x1] - Mobile Platform Mass [kg]</span>
|
||
|
<span class="org-comment">% - Mph [1x1] - Mobile Platform Height [m]</span>
|
||
|
<span class="org-comment">% - Mpr [1x1] - Mobile Platform Radius [m]</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Outputs:</span>
|
||
|
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
|
||
|
<span class="org-comment">% - platforms [struct] - structure with the following fields:</span>
|
||
|
<span class="org-comment">% - Fpm [1x1] - Fixed Platform Mass [kg]</span>
|
||
|
<span class="org-comment">% - Msi [3x3] - Mobile Platform Inertia matrix [kg*m^2]</span>
|
||
|
<span class="org-comment">% - Fph [1x1] - Fixed Platform Height [m]</span>
|
||
|
<span class="org-comment">% - Fpr [1x1] - Fixed Platform Radius [m]</span>
|
||
|
<span class="org-comment">% - Mpm [1x1] - Mobile Platform Mass [kg]</span>
|
||
|
<span class="org-comment">% - Fsi [3x3] - Fixed Platform Inertia matrix [kg*m^2]</span>
|
||
|
<span class="org-comment">% - Mph [1x1] - Mobile Platform Height [m]</span>
|
||
|
<span class="org-comment">% - Mpr [1x1] - Mobile Platform Radius [m]</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org174fb57" class="outline-4">
|
||
|
<h4 id="org174fb57"><span class="section-number-4">8.1.2</span> Optional Parameters</h4>
|
||
|
<div class="outline-text-4" id="text-8-1-2">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">arguments
|
||
|
stewart
|
||
|
args.Fpm (1,1) double {mustBeNumeric, mustBePositive} = 1
|
||
|
args.Fph (1,1) double {mustBeNumeric, mustBePositive} = 10e<span class="org-type">-</span>3
|
||
|
args.Fpr (1,1) double {mustBeNumeric, mustBePositive} = 125e<span class="org-type">-</span>3
|
||
|
args.Mpm (1,1) double {mustBeNumeric, mustBePositive} = 1
|
||
|
args.Mph (1,1) double {mustBeNumeric, mustBePositive} = 10e<span class="org-type">-</span>3
|
||
|
args.Mpr (1,1) double {mustBeNumeric, mustBePositive} = 100e<span class="org-type">-</span>3
|
||
|
<span class="org-keyword">end</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org20a37fd" class="outline-4">
|
||
|
<h4 id="org20a37fd"><span class="section-number-4">8.1.3</span> Create the <code>platforms</code> struct</h4>
|
||
|
<div class="outline-text-4" id="text-8-1-3">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">platforms = struct();
|
||
|
|
||
|
platforms.Fpm = args.Fpm;
|
||
|
platforms.Fph = args.Fph;
|
||
|
platforms.Fpr = args.Fpr;
|
||
|
platforms.Fpi = diag([1<span class="org-type">/</span>12 <span class="org-type">*</span> platforms.Fpm <span class="org-type">*</span> (3<span class="org-type">*</span>platforms.Fpr<span class="org-type">^</span>2 <span class="org-type">+</span> platforms.Fph<span class="org-type">^</span>2), ...
|
||
|
1<span class="org-type">/</span>12 <span class="org-type">*</span> platforms.Fpm <span class="org-type">*</span> (3<span class="org-type">*</span>platforms.Fpr<span class="org-type">^</span>2 <span class="org-type">+</span> platforms.Fph<span class="org-type">^</span>2), ...
|
||
|
1<span class="org-type">/</span>2 <span class="org-type">*</span> platforms.Fpm <span class="org-type">*</span> platforms.Fpr<span class="org-type">^</span>2]);
|
||
|
|
||
|
platforms.Mpm = args.Mpm;
|
||
|
platforms.Mph = args.Mph;
|
||
|
platforms.Mpr = args.Mpr;
|
||
|
platforms.Mpi = diag([1<span class="org-type">/</span>12 <span class="org-type">*</span> platforms.Mpm <span class="org-type">*</span> (3<span class="org-type">*</span>platforms.Mpr<span class="org-type">^</span>2 <span class="org-type">+</span> platforms.Mph<span class="org-type">^</span>2), ...
|
||
|
1<span class="org-type">/</span>12 <span class="org-type">*</span> platforms.Mpm <span class="org-type">*</span> (3<span class="org-type">*</span>platforms.Mpr<span class="org-type">^</span>2 <span class="org-type">+</span> platforms.Mph<span class="org-type">^</span>2), ...
|
||
|
1<span class="org-type">/</span>2 <span class="org-type">*</span> platforms.Mpm <span class="org-type">*</span> platforms.Mpr<span class="org-type">^</span>2]);
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org23aeb2f" class="outline-4">
|
||
|
<h4 id="org23aeb2f"><span class="section-number-4">8.1.4</span> Save the <code>platforms</code> struct</h4>
|
||
|
<div class="outline-text-4" id="text-8-1-4">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart.platforms = platforms;
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org08b9351" class="outline-3">
|
||
|
<h3 id="org08b9351"><span class="section-number-3">8.2</span> <code>initializeCylindricalStruts</code>: Define the mass and moment of inertia of cylindrical struts</h3>
|
||
|
<div class="outline-text-3" id="text-8-2">
|
||
|
<p>
|
||
|
<a id="org9a66ea5"></a>
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
This Matlab function is accessible <a href="src/initializeCylindricalStruts.m">here</a>.
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgcbfa79e" class="outline-4">
|
||
|
<h4 id="orgcbfa79e"><span class="section-number-4">8.2.1</span> Function description</h4>
|
||
|
<div class="outline-text-4" id="text-8-2-1">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeCylindricalStruts</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
|
||
|
<span class="org-comment">% initializeCylindricalStruts - Define the mass and moment of inertia of cylindrical struts</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Syntax: [stewart] = initializeCylindricalStruts(args)</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Inputs:</span>
|
||
|
<span class="org-comment">% - args - Structure with the following fields:</span>
|
||
|
<span class="org-comment">% - Fsm [1x1] - Mass of the Fixed part of the struts [kg]</span>
|
||
|
<span class="org-comment">% - Fsh [1x1] - Height of cylinder for the Fixed part of the struts [m]</span>
|
||
|
<span class="org-comment">% - Fsr [1x1] - Radius of cylinder for the Fixed part of the struts [m]</span>
|
||
|
<span class="org-comment">% - Msm [1x1] - Mass of the Mobile part of the struts [kg]</span>
|
||
|
<span class="org-comment">% - Msh [1x1] - Height of cylinder for the Mobile part of the struts [m]</span>
|
||
|
<span class="org-comment">% - Msr [1x1] - Radius of cylinder for the Mobile part of the struts [m]</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Outputs:</span>
|
||
|
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
|
||
|
<span class="org-comment">% - struts [struct] - structure with the following fields:</span>
|
||
|
<span class="org-comment">% - Fsm [6x1] - Mass of the Fixed part of the struts [kg]</span>
|
||
|
<span class="org-comment">% - Fsi [3x3x6] - Moment of Inertia for the Fixed part of the struts [kg*m^2]</span>
|
||
|
<span class="org-comment">% - Msm [6x1] - Mass of the Mobile part of the struts [kg]</span>
|
||
|
<span class="org-comment">% - Msi [3x3x6] - Moment of Inertia for the Mobile part of the struts [kg*m^2]</span>
|
||
|
<span class="org-comment">% - Fsh [6x1] - Height of cylinder for the Fixed part of the struts [m]</span>
|
||
|
<span class="org-comment">% - Fsr [6x1] - Radius of cylinder for the Fixed part of the struts [m]</span>
|
||
|
<span class="org-comment">% - Msh [6x1] - Height of cylinder for the Mobile part of the struts [m]</span>
|
||
|
<span class="org-comment">% - Msr [6x1] - Radius of cylinder for the Mobile part of the struts [m]</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org0555b5f" class="outline-4">
|
||
|
<h4 id="org0555b5f"><span class="section-number-4">8.2.2</span> Optional Parameters</h4>
|
||
|
<div class="outline-text-4" id="text-8-2-2">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">arguments
|
||
|
stewart
|
||
|
args.Fsm (1,1) double {mustBeNumeric, mustBePositive} = 0.1
|
||
|
args.Fsh (1,1) double {mustBeNumeric, mustBePositive} = 50e<span class="org-type">-</span>3
|
||
|
args.Fsr (1,1) double {mustBeNumeric, mustBePositive} = 5e<span class="org-type">-</span>3
|
||
|
args.Msm (1,1) double {mustBeNumeric, mustBePositive} = 0.1
|
||
|
args.Msh (1,1) double {mustBeNumeric, mustBePositive} = 50e<span class="org-type">-</span>3
|
||
|
args.Msr (1,1) double {mustBeNumeric, mustBePositive} = 5e<span class="org-type">-</span>3
|
||
|
<span class="org-keyword">end</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org295542d" class="outline-4">
|
||
|
<h4 id="org295542d"><span class="section-number-4">8.2.3</span> Create the <code>struts</code> structure</h4>
|
||
|
<div class="outline-text-4" id="text-8-2-3">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">struts = struct();
|
||
|
|
||
|
struts.Fsm = ones(6,1)<span class="org-type">.*</span>args.Fsm;
|
||
|
struts.Msm = ones(6,1)<span class="org-type">.*</span>args.Msm;
|
||
|
|
||
|
struts.Fsh = ones(6,1)<span class="org-type">.*</span>args.Fsh;
|
||
|
struts.Fsr = ones(6,1)<span class="org-type">.*</span>args.Fsr;
|
||
|
struts.Msh = ones(6,1)<span class="org-type">.*</span>args.Msh;
|
||
|
struts.Msr = ones(6,1)<span class="org-type">.*</span>args.Msr;
|
||
|
|
||
|
struts.Fsi = zeros(3, 3, 6);
|
||
|
struts.Msi = zeros(3, 3, 6);
|
||
|
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:6</span>
|
||
|
struts.Fsi(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = diag([1<span class="org-type">/</span>12 <span class="org-type">*</span> struts.Fsm(<span class="org-constant">i</span>) <span class="org-type">*</span> (3<span class="org-type">*</span>struts.Fsr(<span class="org-constant">i</span>)<span class="org-type">^</span>2 <span class="org-type">+</span> struts.Fsh(<span class="org-constant">i</span>)<span class="org-type">^</span>2), ...
|
||
|
1<span class="org-type">/</span>12 <span class="org-type">*</span> struts.Fsm(<span class="org-constant">i</span>) <span class="org-type">*</span> (3<span class="org-type">*</span>struts.Fsr(<span class="org-constant">i</span>)<span class="org-type">^</span>2 <span class="org-type">+</span> struts.Fsh(<span class="org-constant">i</span>)<span class="org-type">^</span>2), ...
|
||
|
1<span class="org-type">/</span>2 <span class="org-type">*</span> struts.Fsm(<span class="org-constant">i</span>) <span class="org-type">*</span> struts.Fsr(<span class="org-constant">i</span>)<span class="org-type">^</span>2]);
|
||
|
struts.Msi(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = diag([1<span class="org-type">/</span>12 <span class="org-type">*</span> struts.Msm(<span class="org-constant">i</span>) <span class="org-type">*</span> (3<span class="org-type">*</span>struts.Msr(<span class="org-constant">i</span>)<span class="org-type">^</span>2 <span class="org-type">+</span> struts.Msh(<span class="org-constant">i</span>)<span class="org-type">^</span>2), ...
|
||
|
1<span class="org-type">/</span>12 <span class="org-type">*</span> struts.Msm(<span class="org-constant">i</span>) <span class="org-type">*</span> (3<span class="org-type">*</span>struts.Msr(<span class="org-constant">i</span>)<span class="org-type">^</span>2 <span class="org-type">+</span> struts.Msh(<span class="org-constant">i</span>)<span class="org-type">^</span>2), ...
|
||
|
1<span class="org-type">/</span>2 <span class="org-type">*</span> struts.Msm(<span class="org-constant">i</span>) <span class="org-type">*</span> struts.Msr(<span class="org-constant">i</span>)<span class="org-type">^</span>2]);
|
||
|
<span class="org-keyword">end</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">stewart.struts = struts;
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgb5f49ec" class="outline-2">
|
||
|
<h2 id="orgb5f49ec"><span class="section-number-2">9</span> <code>initializeStewartPose</code>: Determine the initial stroke in each leg to have the wanted pose</h2>
|
||
|
<div class="outline-text-2" id="text-9">
|
||
|
<p>
|
||
|
<a id="org5d4c1df"></a>
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
This Matlab function is accessible <a href="src/initializeStewartPose.m">here</a>.
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org16bc1b7" class="outline-3">
|
||
|
<h3 id="org16bc1b7"><span class="section-number-3">9.1</span> Function description</h3>
|
||
|
<div class="outline-text-3" id="text-9-1">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[stewart]</span> = <span class="org-function-name">initializeStewartPose</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
|
||
|
<span class="org-comment">% initializeStewartPose - Determine the initial stroke in each leg to have the wanted pose</span>
|
||
|
<span class="org-comment">% It uses the inverse kinematic</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Syntax: [stewart] = initializeStewartPose(stewart, args)</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Inputs:</span>
|
||
|
<span class="org-comment">% - stewart - A structure with the following fields</span>
|
||
|
<span class="org-comment">% - Aa [3x6] - The positions ai expressed in {A}</span>
|
||
|
<span class="org-comment">% - Bb [3x6] - The positions bi expressed in {B}</span>
|
||
|
<span class="org-comment">% - args - Can have the following fields:</span>
|
||
|
<span class="org-comment">% - AP [3x1] - The wanted position of {B} with respect to {A}</span>
|
||
|
<span class="org-comment">% - ARB [3x3] - The rotation matrix that gives the wanted orientation of {B} with respect to {A}</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Outputs:</span>
|
||
|
<span class="org-comment">% - stewart - updated Stewart structure with the added fields:</span>
|
||
|
<span class="org-comment">% - dLi[6x1] - The 6 needed displacement of the struts from the initial position in [m] to have the wanted pose of {B} w.r.t. {A}</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgdcc1638" class="outline-3">
|
||
|
<h3 id="orgdcc1638"><span class="section-number-3">9.2</span> Optional Parameters</h3>
|
||
|
<div class="outline-text-3" id="text-9-2">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">arguments
|
||
|
stewart
|
||
|
args.AP (3,1) double {mustBeNumeric} = zeros(3,1)
|
||
|
args.ARB (3,3) double {mustBeNumeric} = eye(3)
|
||
|
<span class="org-keyword">end</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org79580d6" class="outline-3">
|
||
|
<h3 id="org79580d6"><span class="section-number-3">9.3</span> Use the Inverse Kinematic function</h3>
|
||
|
<div class="outline-text-3" id="text-9-3">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">[Li, dLi] = inverseKinematics(stewart, <span class="org-string">'AP'</span>, args.AP, <span class="org-string">'ARB'</span>, args.ARB);
|
||
|
|
||
|
stewart.dLi = dLi;
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org7f49db4" class="outline-2">
|
||
|
<h2 id="org7f49db4"><span class="section-number-2">10</span> Utility Functions</h2>
|
||
|
<div class="outline-text-2" id="text-10">
|
||
|
</div>
|
||
|
<div id="outline-container-org5e1e7a4" class="outline-3">
|
||
|
<h3 id="org5e1e7a4"><span class="section-number-3">10.1</span> <code>inverseKinematics</code>: Compute Inverse Kinematics</h3>
|
||
|
<div class="outline-text-3" id="text-10-1">
|
||
|
<p>
|
||
|
<a id="org4c68b98"></a>
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
This Matlab function is accessible <a href="src/inverseKinematics.m">here</a>.
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org4a5b7c1" class="outline-4">
|
||
|
<h4 id="org4a5b7c1"><span class="section-number-4">10.1.1</span> Function description</h4>
|
||
|
<div class="outline-text-4" id="text-10-1-1">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[Li, dLi]</span> = <span class="org-function-name">inverseKinematics</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
|
||
|
<span class="org-comment">% inverseKinematics - Compute the needed length of each strut to have the wanted position and orientation of {B} with respect to {A}</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Syntax: [stewart] = inverseKinematics(stewart)</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Inputs:</span>
|
||
|
<span class="org-comment">% - stewart - A structure with the following fields</span>
|
||
|
<span class="org-comment">% - Aa [3x6] - The positions ai expressed in {A}</span>
|
||
|
<span class="org-comment">% - Bb [3x6] - The positions bi expressed in {B}</span>
|
||
|
<span class="org-comment">% - args - Can have the following fields:</span>
|
||
|
<span class="org-comment">% - AP [3x1] - The wanted position of {B} with respect to {A}</span>
|
||
|
<span class="org-comment">% - ARB [3x3] - The rotation matrix that gives the wanted orientation of {B} with respect to {A}</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Outputs:</span>
|
||
|
<span class="org-comment">% - Li [6x1] - The 6 needed length of the struts in [m] to have the wanted pose of {B} w.r.t. {A}</span>
|
||
|
<span class="org-comment">% - dLi [6x1] - The 6 needed displacement of the struts from the initial position in [m] to have the wanted pose of {B} w.r.t. {A}</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org16c2586" class="outline-4">
|
||
|
<h4 id="org16c2586"><span class="section-number-4">10.1.2</span> Optional Parameters</h4>
|
||
|
<div class="outline-text-4" id="text-10-1-2">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">arguments
|
||
|
stewart
|
||
|
args.AP (3,1) double {mustBeNumeric} = zeros(3,1)
|
||
|
args.ARB (3,3) double {mustBeNumeric} = eye(3)
|
||
|
<span class="org-keyword">end</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orgd1d1be1" class="outline-4">
|
||
|
<h4 id="orgd1d1be1"><span class="section-number-4">10.1.3</span> Theory</h4>
|
||
|
<div class="outline-text-4" id="text-10-1-3">
|
||
|
<p>
|
||
|
For inverse kinematic analysis, it is assumed that the position \({}^A\bm{P}\) and orientation of the moving platform \({}^A\bm{R}_B\) are given and the problem is to obtain the joint variables, namely, \(\bm{L} = [l_1, l_2, \dots, l_6]^T\).
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
From the geometry of the manipulator, the loop closure for each limb, \(i = 1, 2, \dots, 6\) can be written as
|
||
|
</p>
|
||
|
\begin{align*}
|
||
|
l_i {}^A\hat{\bm{s}}_i &= {}^A\bm{A} + {}^A\bm{b}_i - {}^A\bm{a}_i \\
|
||
|
&= {}^A\bm{A} + {}^A\bm{R}_b {}^B\bm{b}_i - {}^A\bm{a}_i
|
||
|
\end{align*}
|
||
|
|
||
|
<p>
|
||
|
To obtain the length of each actuator and eliminate \(\hat{\bm{s}}_i\), it is sufficient to dot multiply each side by itself:
|
||
|
</p>
|
||
|
\begin{equation}
|
||
|
l_i^2 \left[ {}^A\hat{\bm{s}}_i^T {}^A\hat{\bm{s}}_i \right] = \left[ {}^A\bm{P} + {}^A\bm{R}_B {}^B\bm{b}_i - {}^A\bm{a}_i \right]^T \left[ {}^A\bm{P} + {}^A\bm{R}_B {}^B\bm{b}_i - {}^A\bm{a}_i \right]
|
||
|
\end{equation}
|
||
|
|
||
|
<p>
|
||
|
Hence, for \(i = 1, 2, \dots, 6\), each limb length can be uniquely determined by:
|
||
|
</p>
|
||
|
\begin{equation}
|
||
|
l_i = \sqrt{{}^A\bm{P}^T {}^A\bm{P} + {}^B\bm{b}_i^T {}^B\bm{b}_i + {}^A\bm{a}_i^T {}^A\bm{a}_i - 2 {}^A\bm{P}^T {}^A\bm{a}_i + 2 {}^A\bm{P}^T \left[{}^A\bm{R}_B {}^B\bm{b}_i\right] - 2 \left[{}^A\bm{R}_B {}^B\bm{b}_i\right]^T {}^A\bm{a}_i}
|
||
|
\end{equation}
|
||
|
|
||
|
<p>
|
||
|
If the position and orientation of the moving platform lie in the feasible workspace of the manipulator, one unique solution to the limb length is determined by the above equation.
|
||
|
Otherwise, when the limbs’ lengths derived yield complex numbers, then the position or orientation of the moving platform is not reachable.
|
||
|
</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org8c782f7" class="outline-4">
|
||
|
<h4 id="org8c782f7"><span class="section-number-4">10.1.4</span> Compute</h4>
|
||
|
<div class="outline-text-4" id="text-10-1-4">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">Li = sqrt(args.AP<span class="org-type">'*</span>args.AP <span class="org-type">+</span> diag(stewart.Bb<span class="org-type">'*</span>stewart.Bb) <span class="org-type">+</span> diag(stewart.Aa<span class="org-type">'*</span>stewart.Aa) <span class="org-type">-</span> (2<span class="org-type">*</span>args.AP<span class="org-type">'*</span>stewart.Aa)<span class="org-type">'</span> <span class="org-type">+</span> (2<span class="org-type">*</span>args.AP<span class="org-type">'*</span>(args.ARB<span class="org-type">*</span>stewart.Bb))<span class="org-type">'</span> <span class="org-type">-</span> diag(2<span class="org-type">*</span>(args.ARB<span class="org-type">*</span>stewart.Bb)<span class="org-type">'*</span>stewart.Aa));
|
||
|
</pre>
|
||
|
</div>
|
||
|
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">dLi = Li<span class="org-type">-</span>stewart.l;
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org0570ed5" class="outline-3">
|
||
|
<h3 id="org0570ed5"><span class="section-number-3">10.2</span> <code>forwardKinematicsApprox</code>: Compute the Forward Kinematics</h3>
|
||
|
<div class="outline-text-3" id="text-10-2">
|
||
|
<p>
|
||
|
<a id="orgb4e6dcc"></a>
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
This Matlab function is accessible <a href="src/forwardKinematicsApprox.m">here</a>.
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org23b424f" class="outline-4">
|
||
|
<h4 id="org23b424f"><span class="section-number-4">10.2.1</span> Function description</h4>
|
||
|
<div class="outline-text-4" id="text-10-2-1">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[P, R]</span> = <span class="org-function-name">forwardKinematicsApprox</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
|
||
|
<span class="org-comment">% forwardKinematicsApprox - Computed the approximate pose of {B} with respect to {A} from the length of each strut and using</span>
|
||
|
<span class="org-comment">% the Jacobian Matrix</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Syntax: [P, R] = forwardKinematicsApprox(stewart, args)</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Inputs:</span>
|
||
|
<span class="org-comment">% - stewart - A structure with the following fields</span>
|
||
|
<span class="org-comment">% - J [6x6] - The Jacobian Matrix</span>
|
||
|
<span class="org-comment">% - args - Can have the following fields:</span>
|
||
|
<span class="org-comment">% - dL [6x1] - Displacement of each strut [m]</span>
|
||
|
<span class="org-comment">%</span>
|
||
|
<span class="org-comment">% Outputs:</span>
|
||
|
<span class="org-comment">% - P [3x1] - The estimated position of {B} with respect to {A}</span>
|
||
|
<span class="org-comment">% - R [3x3] - The estimated rotation matrix that gives the orientation of {B} with respect to {A}</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org66c7154" class="outline-4">
|
||
|
<h4 id="org66c7154"><span class="section-number-4">10.2.2</span> Optional Parameters</h4>
|
||
|
<div class="outline-text-4" id="text-10-2-2">
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">arguments
|
||
|
stewart
|
||
|
args.dL (6,1) double {mustBeNumeric} = zeros(6,1)
|
||
|
<span class="org-keyword">end</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-orge00b1b5" class="outline-4">
|
||
|
<h4 id="orge00b1b5"><span class="section-number-4">10.2.3</span> Computation</h4>
|
||
|
<div class="outline-text-4" id="text-10-2-3">
|
||
|
<p>
|
||
|
From a small displacement of each strut \(d\bm{\mathcal{L}}\), we can compute the
|
||
|
position and orientation of {B} with respect to {A} using the following formula:
|
||
|
\[ d \bm{\mathcal{X}} = \bm{J}^{-1} d\bm{\mathcal{L}} \]
|
||
|
</p>
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">X = stewart.J<span class="org-type">\</span>args.dL;
|
||
|
</pre>
|
||
|
</div>
|
||
|
|
||
|
<p>
|
||
|
The position vector corresponds to the first 3 elements.
|
||
|
</p>
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">P = X(1<span class="org-type">:</span>3);
|
||
|
</pre>
|
||
|
</div>
|
||
|
|
||
|
<p>
|
||
|
The next 3 elements are the orientation of {B} with respect to {A} expressed
|
||
|
using the screw axis.
|
||
|
</p>
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">theta = norm(X(4<span class="org-type">:</span>6));
|
||
|
s = X(4<span class="org-type">:</span>6)<span class="org-type">/</span>theta;
|
||
|
</pre>
|
||
|
</div>
|
||
|
|
||
|
<p>
|
||
|
We then compute the corresponding rotation matrix.
|
||
|
</p>
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab">R = [s(1)<span class="org-type">^</span>2<span class="org-type">*</span>(1<span class="org-type">-</span>cos(theta)) <span class="org-type">+</span> cos(theta) , s(1)<span class="org-type">*</span>s(2)<span class="org-type">*</span>(1<span class="org-type">-</span>cos(theta)) <span class="org-type">-</span> s(3)<span class="org-type">*</span>sin(theta), s(1)<span class="org-type">*</span>s(3)<span class="org-type">*</span>(1<span class="org-type">-</span>cos(theta)) <span class="org-type">+</span> s(2)<span class="org-type">*</span>sin(theta);
|
||
|
s<span class="org-type">(2)*s(1)*(1-cos(theta)) + s(3)*sin(theta), s(2)^2*(1-cos(theta)) + cos(theta), s(2)*s(3)*(1-cos(theta)) - s(1)*sin(theta);</span>
|
||
|
s<span class="org-type">(3)*s(1)*(1-cos(theta)) - s(2)*sin(theta), s(3)*s(2)*(1-cos(theta)) + s(1)*sin(theta), s(3)^2*(1-cos(theta)) + cos(theta)];</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org2a131cd" class="outline-2">
|
||
|
<h2 id="org2a131cd"><span class="section-number-2">11</span> Other Elements</h2>
|
||
|
<div class="outline-text-2" id="text-11">
|
||
|
</div>
|
||
|
<div id="outline-container-org0150942" class="outline-3">
|
||
|
<h3 id="org0150942"><span class="section-number-3">11.1</span> Z-Axis Geophone</h3>
|
||
|
<div class="outline-text-3" id="text-11-1">
|
||
|
<p>
|
||
|
<a id="orga98eaf8"></a>
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
This Matlab function is accessible <a href="../src/initializeZAxisGeophone.m">here</a>.
|
||
|
</p>
|
||
|
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[geophone]</span> = <span class="org-function-name">initializeZAxisGeophone</span>(<span class="org-variable-name">args</span>)
|
||
|
arguments
|
||
|
args.mass (1,1) double {mustBeNumeric, mustBePositive} = 1e<span class="org-type">-</span>3 <span class="org-comment">% [kg]</span>
|
||
|
args.freq (1,1) double {mustBeNumeric, mustBePositive} = 1 <span class="org-comment">% [Hz]</span>
|
||
|
<span class="org-keyword">end</span>
|
||
|
|
||
|
<span class="org-matlab-cellbreak"><span class="org-comment">%%</span></span>
|
||
|
geophone.m = args.mass;
|
||
|
|
||
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% The Stiffness is set to have the damping resonance frequency</span></span>
|
||
|
geophone.k = geophone.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;
|
||
|
|
||
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% We set the damping value to have critical damping</span></span>
|
||
|
geophone.c = 2<span class="org-type">*</span>sqrt(geophone.m <span class="org-type">*</span> geophone.k);
|
||
|
|
||
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% Save</span></span>
|
||
|
save(<span class="org-string">'./mat/geophone_z_axis.mat'</span>, <span class="org-string">'geophone'</span>);
|
||
|
<span class="org-keyword">end</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div id="outline-container-org502059d" class="outline-3">
|
||
|
<h3 id="org502059d"><span class="section-number-3">11.2</span> Z-Axis Accelerometer</h3>
|
||
|
<div class="outline-text-3" id="text-11-2">
|
||
|
<p>
|
||
|
<a id="org3dfdc07"></a>
|
||
|
</p>
|
||
|
|
||
|
<p>
|
||
|
This Matlab function is accessible <a href="../src/initializeZAxisAccelerometer.m">here</a>.
|
||
|
</p>
|
||
|
|
||
|
<div class="org-src-container">
|
||
|
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[accelerometer]</span> = <span class="org-function-name">initializeZAxisAccelerometer</span>(<span class="org-variable-name">args</span>)
|
||
|
arguments
|
||
|
args.mass (1,1) double {mustBeNumeric, mustBePositive} = 1e<span class="org-type">-</span>3 <span class="org-comment">% [kg]</span>
|
||
|
args.freq (1,1) double {mustBeNumeric, mustBePositive} = 5e3 <span class="org-comment">% [Hz]</span>
|
||
|
<span class="org-keyword">end</span>
|
||
|
|
||
|
<span class="org-matlab-cellbreak"><span class="org-comment">%%</span></span>
|
||
|
accelerometer.m = args.mass;
|
||
|
|
||
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% The Stiffness is set to have the damping resonance frequency</span></span>
|
||
|
accelerometer.k = accelerometer.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;
|
||
|
|
||
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% We set the damping value to have critical damping</span></span>
|
||
|
accelerometer.c = 2<span class="org-type">*</span>sqrt(accelerometer.m <span class="org-type">*</span> accelerometer.k);
|
||
|
|
||
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% Gain correction of the accelerometer to have a unity gain until the resonance</span></span>
|
||
|
accelerometer.gain = <span class="org-type">-</span>accelerometer.k<span class="org-type">/</span>accelerometer.m;
|
||
|
|
||
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% Save</span></span>
|
||
|
save(<span class="org-string">'./mat/accelerometer_z_axis.mat'</span>, <span class="org-string">'accelerometer'</span>);
|
||
|
<span class="org-keyword">end</span>
|
||
|
</pre>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="postamble" class="status">
|
||
|
<p class="author">Author: Dehaeze Thomas</p>
|
||
|
<p class="date">Created: 2020-01-27 lun. 17:41</p>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|