nass-simscape/docs/kinematics.html

371 lines
14 KiB
HTML
Raw Permalink Normal View History

2019-10-08 11:13:38 +02:00
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
2021-02-20 23:09:27 +01:00
<!-- 2021-02-20 sam. 23:08 -->
2019-10-08 11:13:38 +02:00
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Kinematics of the station</title>
<meta name="generator" content="Org mode" />
<meta name="author" content="Dehaeze Thomas" />
2021-02-20 23:09:27 +01:00
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
<script>
MathJax = {
svg: {
scale: 1,
fontCache: "global"
},
tex: {
tags: "ams",
multlineWidth: "%MULTLINEWIDTH",
tagSide: "right",
macros: {bm: ["\\boldsymbol{#1}",1],},
tagIndent: ".8em"
}
};
</script>
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
2019-10-08 11:13:38 +02:00
</head>
<body>
<div id="org-div-home-and-up">
2020-02-25 18:21:17 +01:00
<a accesskey="h" href="./index.html"> UP </a>
2019-10-08 11:13:38 +02:00
|
2021-02-20 23:09:27 +01:00
<a accesskey="H" href="../../index.html"> HOME </a>
2019-10-08 11:13:38 +02:00
</div><div id="content">
<h1 class="title">Kinematics of the station</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
2021-02-20 23:09:27 +01:00
<li><a href="#org4ed4783">1. Micro Hexapod</a>
<ul>
2021-02-20 23:09:27 +01:00
<li><a href="#org129001c">1.1. How the Symetrie Hexapod is controlled on the micro station</a></li>
<li><a href="#org310b222">1.2. Control of the Micro-Hexapod using Simscape</a>
<ul>
2021-02-20 23:09:27 +01:00
<li><a href="#org8a60dbb">1.2.1. Using Bushing Joint</a></li>
<li><a href="#org207d470">1.2.2. Using Inverse Kinematics and Leg Actuators</a>
<ul>
2021-02-20 23:09:27 +01:00
<li><a href="#org1f70ebc">1.2.2.1. Theory</a></li>
<li><a href="#org8974896">1.2.2.2. Matlab Implementation</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
2019-10-08 11:13:38 +02:00
<p>
In this document, we discuss the way the motion of each stage is defined.
</p>
2021-02-20 23:09:27 +01:00
<div id="outline-container-org4ed4783" class="outline-2">
<h2 id="org4ed4783"><span class="section-number-2">1</span> Micro Hexapod</h2>
<div class="outline-text-2" id="text-1">
</div>
2021-02-20 23:09:27 +01:00
<div id="outline-container-org129001c" class="outline-3">
<h3 id="org129001c"><span class="section-number-3">1.1</span> How the Symetrie Hexapod is controlled on the micro station</h3>
<div class="outline-text-3" id="text-1-1">
<p>
For the Micro-Hexapod, the convention for the angles are defined in <code>MAN_A_Software API_4.0.150918_EN.pdf</code> on page 13 (section 2.4 - Rotation Vectors):
2019-10-08 11:13:38 +02:00
</p>
<blockquote>
<p>
The <b>Euler type II convention</b> is used to express the rotation vector.
This convention is mainly used in the aeronautics field (standard ISO 1151 concerning flight mechanics).
</p>
<p>
This convention uses the concepts of rotation of vehicles (ship, car and plane).
Generally, we consider that the main movement of the vehicle is following the X-axis and the Z-axis is parallel to the axis of gravity (at the initial position).
The roll rotation is around the X-axis, the pitch is around the Y-axis and yaw is the rotation around the Z-axis.
<b>The order of rotation is: Rx, Ry and then Rz.</b>
</p>
<p>
In most case, rotations are related to a reference with fixed axis; thus we say the rotations are around fixed axes.
The combination of these three rotations enables to write a rotation matrix.
This writing is unique and equal to:
\[ \bm{R} = \bm{R}_z(\gamma) \cdot \bm{R}_y(\beta) \cdot \bm{R}_x(\alpha) \]
</p>
<p>
The Euler type II convention corresponding to the <b>succession of rotations with respect to fixed axes</b>: first around X0, then Y0 and Z0.
This is equivalent to the succession of rotations with respect to mobile axes: first around Z0, then Y1&rsquo; and X2&rsquo;.
</p>
</blockquote>
<p>
More generally on the Control of the Micro-Hexapod:
</p>
<blockquote>
<p>
Note that for all control modes, <b>the rotation center coincides with Object coordinate system origin</b>.
Moreover, the movements are controlled with <b>translation components at first</b> (Tx, Ty, Tz) <b>then rotation components</b> (Rx, Ry, Rz).
</p>
</blockquote>
<p>
Thus, it does the translations and then the rotation around the new translated frame.
</p>
</div>
</div>
2021-02-20 23:09:27 +01:00
<div id="outline-container-org310b222" class="outline-3">
<h3 id="org310b222"><span class="section-number-3">1.2</span> Control of the Micro-Hexapod using Simscape</h3>
<div class="outline-text-3" id="text-1-2">
<p>
We can think of two main ways to position the Micro-Hexapod using Simscape.
</p>
<p>
The first one is to use only one Bushing Joint between the base and the mobile platform.
The advantage is that it is very easy to impose the wanted displacement, however, we loose the dynamical properties of the Hexapod.
</p>
<p>
The second way is to specify the wanted length of the legs of the Hexapod in order to have the wanted position of the mobile platform.
This require a little bit more of mathematical derivations but this is the chosen solution.
</p>
</div>
2021-02-20 23:09:27 +01:00
<div id="outline-container-org8a60dbb" class="outline-4">
<h4 id="org8a60dbb"><span class="section-number-4">1.2.1</span> Using Bushing Joint</h4>
<div class="outline-text-4" id="text-1-2-1">
<p>
2021-02-20 23:09:27 +01:00
In the documentation of the Bushing Joint (<code>doc "Bushing Joint"</code>) that is used to position the Hexapods, it is mention that the following frame is positioned with respect to the base frame in a way shown in figure <a href="#org0c4632e">1</a>.
</p>
2021-02-20 23:09:27 +01:00
<div id="org0c4632e" class="figure">
<p><img src="figs/bushing_joint_transform.png" alt="bushing_joint_transform.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Joint Transformation Sequence for the Bushing Joint</p>
</div>
<p>
Basically, it performs the translations, and then the rotation along the X, Y and Z axis of the moving frame.
The three rotations that we define thus corresponds to the Euler U-V-W angles.
</p>
<p>
We should have the <b>same behavior</b> for the Micro-Hexapod on Simscape (same inputs at least).
However, the Bushing Joint makes rotations around mobiles axes (X, Y&rsquo; and then Z&rsquo;&rsquo;) and not fixed axes (X, Y and Z).
</p>
</div>
</div>
2021-02-20 23:09:27 +01:00
<div id="outline-container-org207d470" class="outline-4">
<h4 id="org207d470"><span class="section-number-4">1.2.2</span> Using Inverse Kinematics and Leg Actuators</h4>
<div class="outline-text-4" id="text-1-2-2">
<p>
Here, we can use the Inverse Kinematic of the Hexapod to determine the length of each leg in order to obtain some defined translation and rotation of the mobile platform.
</p>
<p>
The advantages are:
</p>
<ul class="org-ul">
<li>we can position the Hexapod as we want by specifying a rotation matrix</li>
<li>the hexapod keeps its full flexibility as we don&rsquo;t specify any wanted displacements, only leg&rsquo;s rest position</li>
</ul>
2019-12-11 14:47:14 +01:00
<p>
However:
</p>
<ul class="org-ul">
<li>even though the rest position of each leg (the position where the stiffness force is zero) is set correctly, the hexapod will we deflected due to gravity</li>
</ul>
<p>
Thus, for this simulation, we <b>remove the gravity</b>.
</p>
</div>
2021-02-20 23:09:27 +01:00
<div id="outline-container-org1f70ebc" class="outline-5">
<h5 id="org1f70ebc"><span class="section-number-5">1.2.2.1</span> Theory</h5>
<div class="outline-text-5" id="text-1-2-2-1">
<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 \\
2019-12-12 12:49:03 +01:00
&= {}^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&rsquo; lengths derived yield complex numbers, then the position or orientation of the moving platform is not reachable.
</p>
</div>
</div>
2021-02-20 23:09:27 +01:00
<div id="outline-container-org8974896" class="outline-5">
<h5 id="org8974896"><span class="section-number-5">1.2.2.2</span> Matlab Implementation</h5>
<div class="outline-text-5" id="text-1-2-2-2">
2019-12-11 14:47:14 +01:00
<p>
We open the Simulink file.
</p>
<div class="org-src-container">
2021-02-20 23:09:27 +01:00
<pre class="src src-matlab"> open(<span class="org-string">'nass_model.slx'</span>)
</pre>
</div>
2019-12-11 14:47:14 +01:00
<p>
We load the configuration and set a small <code>StopTime</code>.
</p>
<div class="org-src-container">
2021-02-20 23:09:27 +01:00
<pre class="src src-matlab"> load(<span class="org-string">'mat/conf_simulink.mat'</span>);
<span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-variable-name">conf_simulink</span>, <span class="org-string">'StopTime'</span>, <span class="org-string">'0.1'</span>);
</pre>
</div>
2019-12-11 14:47:14 +01:00
<p>
We define the wanted position/orientation of the Hexapod under study.
</p>
<div class="org-src-container">
2021-02-20 23:09:27 +01:00
<pre class="src src-matlab"> tx = 0.05; <span class="org-comment">% [rad]</span>
ty = 0.1; <span class="org-comment">% [rad]</span>
tz = 0.02; <span class="org-comment">% [rad]</span>
2021-02-20 23:09:27 +01:00
Rx = [1 0 0;
0 cos(tx) <span class="org-type">-</span>sin(tx);
0 sin(tx) cos(tx)];
2021-02-20 23:09:27 +01:00
Ry = [ cos(ty) 0 sin(ty);
0 1 0;
<span class="org-type">-</span>sin(ty) 0 cos(ty)];
2021-02-20 23:09:27 +01:00
Rz = [cos(tz) <span class="org-type">-</span>sin(tz) 0;
sin(tz) cos(tz) 0;
0 0 1];
2021-02-20 23:09:27 +01:00
ARB = Rz<span class="org-type">*</span>Ry<span class="org-type">*</span>Rx;
AP = [0.1; 0.005; 0.01]; <span class="org-comment">% [m]</span>
</pre>
</div>
<div class="org-src-container">
2021-02-20 23:09:27 +01:00
<pre class="src src-matlab"> initializeSimscapeConfiguration(<span class="org-string">'gravity'</span>, <span class="org-constant">false</span>);
initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
initializeGranite(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
initializeTy(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
initializeRy(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
initializeRz(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
initializeMicroHexapod(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'AP'</span>, AP, <span class="org-string">'ARB'</span>, ARB);
initializeAxisc(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
initializeMirror(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
initializeNanoHexapod(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
initializeSample(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
initializeLoggingConfiguration(<span class="org-string">'log'</span>, <span class="org-string">'all'</span>);
</pre>
</div>
2019-12-11 14:47:14 +01:00
<p>
We run the simulation.
</p>
<div class="org-src-container">
2021-02-20 23:09:27 +01:00
<pre class="src src-matlab"> <span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'nass_model'</span>);
</pre>
</div>
<p>
And we verify that we indeed succeed to go to the wanted position.
</p>
<div class="org-src-container">
2021-02-20 23:09:27 +01:00
<pre class="src src-matlab"> [simout.Dhm.x.Data(end) ; simout.Dhm.y.Data(end) ; simout.Dhm.z.Data(end)] <span class="org-type">-</span> AP
</pre>
</div>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-right" />
</colgroup>
<tbody>
<tr>
<td class="org-right">8.4655e-16</td>
</tr>
<tr>
<td class="org-right">1.5586e-15</td>
</tr>
<tr>
<td class="org-right">-2.1337e-16</td>
</tr>
</tbody>
</table>
<div class="org-src-container">
2021-02-20 23:09:27 +01:00
<pre class="src src-matlab"> simout.Dhm.R.Data(<span class="org-type">:</span>, <span class="org-type">:</span>, end)<span class="org-type">-</span>ARB
</pre>
</div>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-right" />
<col class="org-right" />
<col class="org-right" />
</colgroup>
<tbody>
<tr>
<td class="org-right">-1.1102e-16</td>
<td class="org-right">-1.36e-15</td>
<td class="org-right">4.2744e-15</td>
</tr>
<tr>
<td class="org-right">1.0651e-15</td>
<td class="org-right">6.6613e-16</td>
<td class="org-right">5.1278e-15</td>
</tr>
<tr>
<td class="org-right">-4.2882e-15</td>
<td class="org-right">-4.9336e-15</td>
<td class="org-right">1.1102e-16</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
2019-10-08 11:13:38 +02:00
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
2021-02-20 23:09:27 +01:00
<p class="date">Created: 2021-02-20 sam. 23:08</p>
2019-10-08 11:13:38 +02:00
</div>
</body>
</html>