Change CSS/JS location + publish all
This commit is contained in:
		@@ -3,25 +3,30 @@
 | 
			
		||||
"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-08-05 mer. 13:27 -->
 | 
			
		||||
<!-- 2021-01-08 ven. 15:29 -->
 | 
			
		||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 | 
			
		||||
<title>Stewart Platform - Simscape Model</title>
 | 
			
		||||
<meta name="generator" content="Org mode" />
 | 
			
		||||
<meta name="author" content="Dehaeze Thomas" />
 | 
			
		||||
<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>MathJax = {
 | 
			
		||||
          tex: {
 | 
			
		||||
            tags: 'ams',
 | 
			
		||||
            macros: {bm: ["\\boldsymbol{#1}",1],}
 | 
			
		||||
            }
 | 
			
		||||
          };
 | 
			
		||||
          </script>
 | 
			
		||||
          <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
 | 
			
		||||
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
 | 
			
		||||
<script>
 | 
			
		||||
           MathJax = {
 | 
			
		||||
             svg: {
 | 
			
		||||
               scale: 1,
 | 
			
		||||
               fontCache: "global"
 | 
			
		||||
             },
 | 
			
		||||
             tex: {
 | 
			
		||||
               tags: "ams",
 | 
			
		||||
               multlineWidth: "%MULTLINEWIDTH",
 | 
			
		||||
               tagSide: "right",
 | 
			
		||||
                       macros: {bm: ["\\boldsymbol{#1}",1],},
 | 
			
		||||
               tagIndent: ".8em"
 | 
			
		||||
             }
 | 
			
		||||
           };
 | 
			
		||||
           </script>
 | 
			
		||||
           <script id="MathJax-script" async
 | 
			
		||||
             src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
<div id="org-div-home-and-up">
 | 
			
		||||
@@ -34,47 +39,47 @@
 | 
			
		||||
<h2>Table of Contents</h2>
 | 
			
		||||
<div id="text-table-of-contents">
 | 
			
		||||
<ul>
 | 
			
		||||
<li><a href="#orgc6e0b93">1. Parameters used for the Simscape Model</a></li>
 | 
			
		||||
<li><a href="#org66977e8">2. Simulation Configuration - Configuration reference</a></li>
 | 
			
		||||
<li><a href="#orgb2362eb">3. Subsystem Reference</a></li>
 | 
			
		||||
<li><a href="#orgdfad86d">4. Subsystem - Fixed base and Mobile Platform</a></li>
 | 
			
		||||
<li><a href="#org9d4af75">5. Subsystem - Struts</a></li>
 | 
			
		||||
<li><a href="#org7e2c432">6. Other Elements</a>
 | 
			
		||||
<li><a href="#org79eeba1">1. Parameters used for the Simscape Model</a></li>
 | 
			
		||||
<li><a href="#org677dd01">2. Simulation Configuration - Configuration reference</a></li>
 | 
			
		||||
<li><a href="#orge89e3e7">3. Subsystem Reference</a></li>
 | 
			
		||||
<li><a href="#org5f42d80">4. Subsystem - Fixed base and Mobile Platform</a></li>
 | 
			
		||||
<li><a href="#orgbec2976">5. Subsystem - Struts</a></li>
 | 
			
		||||
<li><a href="#org806ecc3">6. Other Elements</a>
 | 
			
		||||
<ul>
 | 
			
		||||
<li><a href="#org3535b6d">6.1. Payload</a>
 | 
			
		||||
<li><a href="#orgf4bef70">6.1. Payload</a>
 | 
			
		||||
<ul>
 | 
			
		||||
<li><a href="#orgd38089d">Function description</a></li>
 | 
			
		||||
<li><a href="#org5518a84">Optional Parameters</a></li>
 | 
			
		||||
<li><a href="#orgeeb8d35">Add Payload Type</a></li>
 | 
			
		||||
<li><a href="#org6d52ffc">Add Stiffness, Damping and Mass properties of the Payload</a></li>
 | 
			
		||||
<li><a href="#org9c0e404">Function description</a></li>
 | 
			
		||||
<li><a href="#orgabc81c1">Optional Parameters</a></li>
 | 
			
		||||
<li><a href="#org4ef4a9f">Add Payload Type</a></li>
 | 
			
		||||
<li><a href="#org3243d76">Add Stiffness, Damping and Mass properties of the Payload</a></li>
 | 
			
		||||
</ul>
 | 
			
		||||
</li>
 | 
			
		||||
<li><a href="#orgaaed406">6.2. Ground</a>
 | 
			
		||||
<li><a href="#orgd9e12ef">6.2. Ground</a>
 | 
			
		||||
<ul>
 | 
			
		||||
<li><a href="#org7732939">Function description</a></li>
 | 
			
		||||
<li><a href="#org480f36e">Optional Parameters</a></li>
 | 
			
		||||
<li><a href="#orgef7035d">Add Ground Type</a></li>
 | 
			
		||||
<li><a href="#org95633e8">Add Stiffness and Damping properties of the Ground</a></li>
 | 
			
		||||
<li><a href="#org14ff2fc">Rotation Point</a></li>
 | 
			
		||||
<li><a href="#org920bdd0">Function description</a></li>
 | 
			
		||||
<li><a href="#orgfa4bbf4">Optional Parameters</a></li>
 | 
			
		||||
<li><a href="#org2d22970">Add Ground Type</a></li>
 | 
			
		||||
<li><a href="#orgf76def4">Add Stiffness and Damping properties of the Ground</a></li>
 | 
			
		||||
<li><a href="#orgdb67a68">Rotation Point</a></li>
 | 
			
		||||
</ul>
 | 
			
		||||
</li>
 | 
			
		||||
</ul>
 | 
			
		||||
</li>
 | 
			
		||||
<li><a href="#orgae6907a">7. Initialize Disturbances</a>
 | 
			
		||||
<li><a href="#org6d3b61e">7. Initialize Disturbances</a>
 | 
			
		||||
<ul>
 | 
			
		||||
<li><a href="#orge2fa859">Function Declaration and Documentation</a></li>
 | 
			
		||||
<li><a href="#org6adb628">Optional Parameters</a></li>
 | 
			
		||||
<li><a href="#org30dc07c">Structure initialization</a></li>
 | 
			
		||||
<li><a href="#org0755155">Ground Motion</a></li>
 | 
			
		||||
<li><a href="#org7617a55">Direct Forces</a></li>
 | 
			
		||||
<li><a href="#orgf14752d">Function Declaration and Documentation</a></li>
 | 
			
		||||
<li><a href="#orga64679c">Optional Parameters</a></li>
 | 
			
		||||
<li><a href="#org0f7e4dd">Structure initialization</a></li>
 | 
			
		||||
<li><a href="#org1a28fcd">Ground Motion</a></li>
 | 
			
		||||
<li><a href="#org90b72d6">Direct Forces</a></li>
 | 
			
		||||
</ul>
 | 
			
		||||
</li>
 | 
			
		||||
<li><a href="#orgd45a07f">8. Initialize References</a>
 | 
			
		||||
<li><a href="#org93f2d30">8. Initialize References</a>
 | 
			
		||||
<ul>
 | 
			
		||||
<li><a href="#orge5deaa1">Function Declaration and Documentation</a></li>
 | 
			
		||||
<li><a href="#orgeebb364">Optional Parameters</a></li>
 | 
			
		||||
<li><a href="#orgc274320">8.1. Compute the corresponding strut length</a></li>
 | 
			
		||||
<li><a href="#org36ac3fa">References</a></li>
 | 
			
		||||
<li><a href="#orgf124972">Function Declaration and Documentation</a></li>
 | 
			
		||||
<li><a href="#orgbc7950f">Optional Parameters</a></li>
 | 
			
		||||
<li><a href="#org6f05adc">8.1. Compute the corresponding strut length</a></li>
 | 
			
		||||
<li><a href="#orgda73a50">References</a></li>
 | 
			
		||||
</ul>
 | 
			
		||||
</li>
 | 
			
		||||
</ul>
 | 
			
		||||
@@ -89,18 +94,18 @@ In this document is explained how the Simscape model of the Stewart Platform is
 | 
			
		||||
It is divided in the following sections:
 | 
			
		||||
</p>
 | 
			
		||||
<ul class="org-ul">
 | 
			
		||||
<li>section <a href="#org8d965c3">1</a>: is explained how the parameters of the Stewart platform are set for the Simscape model</li>
 | 
			
		||||
<li>section <a href="#org354bfdb">2</a>: the Simulink configuration (solver, simulation time, …) is shared among all the Simulink files. It is explain how this is done.</li>
 | 
			
		||||
<li>section <a href="#org66bbae2">3</a>: All the elements (platforms, struts, sensors, …) are saved in separate files and imported in Simulink files using “subsystem referenced”.</li>
 | 
			
		||||
<li>section <a href="#orga4915c4">4</a>: The simscape model for the fixed base and mobile platform are described in this section.</li>
 | 
			
		||||
<li>section <a href="#orgdb5206f">5</a>: The simscape model for the Stewart platform struts is described in this section.</li>
 | 
			
		||||
<li>section <a href="#orge8daba9">1</a>: is explained how the parameters of the Stewart platform are set for the Simscape model</li>
 | 
			
		||||
<li>section <a href="#org11ed7ef">2</a>: the Simulink configuration (solver, simulation time, …) is shared among all the Simulink files. It is explain how this is done.</li>
 | 
			
		||||
<li>section <a href="#org1a0307c">3</a>: All the elements (platforms, struts, sensors, …) are saved in separate files and imported in Simulink files using “subsystem referenced”.</li>
 | 
			
		||||
<li>section <a href="#org5fac181">4</a>: The simscape model for the fixed base and mobile platform are described in this section.</li>
 | 
			
		||||
<li>section <a href="#org793a5c7">5</a>: The simscape model for the Stewart platform struts is described in this section.</li>
 | 
			
		||||
</ul>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-orgc6e0b93" class="outline-2">
 | 
			
		||||
<h2 id="orgc6e0b93"><span class="section-number-2">1</span> Parameters used for the Simscape Model</h2>
 | 
			
		||||
<div id="outline-container-org79eeba1" class="outline-2">
 | 
			
		||||
<h2 id="org79eeba1"><span class="section-number-2">1</span> Parameters used for the Simscape Model</h2>
 | 
			
		||||
<div class="outline-text-2" id="text-1">
 | 
			
		||||
<p>
 | 
			
		||||
<a id="org8d965c3"></a>
 | 
			
		||||
<a id="orge8daba9"></a>
 | 
			
		||||
The Simscape Model of the Stewart Platform is working with the <code>stewart</code> structure generated using the functions described <a href="stewart-architecture.html">here</a>.
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
@@ -122,11 +127,11 @@ The main advantage to have all the parameters defined in one structure (and not
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-org66977e8" class="outline-2">
 | 
			
		||||
<h2 id="org66977e8"><span class="section-number-2">2</span> Simulation Configuration - Configuration reference</h2>
 | 
			
		||||
<div id="outline-container-org677dd01" class="outline-2">
 | 
			
		||||
<h2 id="org677dd01"><span class="section-number-2">2</span> Simulation Configuration - Configuration reference</h2>
 | 
			
		||||
<div class="outline-text-2" id="text-2">
 | 
			
		||||
<p>
 | 
			
		||||
<a id="org354bfdb"></a>
 | 
			
		||||
<a id="org11ed7ef"></a>
 | 
			
		||||
As multiple simulink files will be used for simulation and tests, it is very useful to determine good simulation configuration that will be <b>shared</b> among all the simulink files.
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
@@ -139,7 +144,7 @@ Basically, the configuration is stored in a mat file <code>conf_simscape.mat</co
 | 
			
		||||
It is automatically loaded when the Simulink project is open. It can be loaded manually with the command:
 | 
			
		||||
</p>
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">load('mat/conf_simscape.mat');
 | 
			
		||||
<pre class="src src-matlab">  load(<span class="org-string">'mat/conf_simscape.mat'</span>);
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
@@ -147,17 +152,17 @@ It is automatically loaded when the Simulink project is open. It can be loaded m
 | 
			
		||||
It is however possible to modify specific parameters just for one simulation using the <code>set_param</code> command:
 | 
			
		||||
</p>
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">set_param(conf_simscape, 'StopTime', 1);
 | 
			
		||||
<pre class="src src-matlab">  <span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-variable-name">conf_simscape</span>, <span class="org-string">'StopTime'</span>, 1);
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-orgb2362eb" class="outline-2">
 | 
			
		||||
<h2 id="orgb2362eb"><span class="section-number-2">3</span> Subsystem Reference</h2>
 | 
			
		||||
<div id="outline-container-orge89e3e7" class="outline-2">
 | 
			
		||||
<h2 id="orge89e3e7"><span class="section-number-2">3</span> Subsystem Reference</h2>
 | 
			
		||||
<div class="outline-text-2" id="text-3">
 | 
			
		||||
<p>
 | 
			
		||||
<a id="org66bbae2"></a>
 | 
			
		||||
<a id="org1a0307c"></a>
 | 
			
		||||
Several Stewart platform models are used, for instance one is use to study the dynamics while the other is used to apply active damping techniques.
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
@@ -175,12 +180,12 @@ These shared subsystems are:
 | 
			
		||||
</ul>
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
These subsystems are referenced from another subsystem called <code>Stewart_Platform.slx</code> shown in figure <a href="#orgf687c71">1</a>, that basically connect them correctly.
 | 
			
		||||
These subsystems are referenced from another subsystem called <code>Stewart_Platform.slx</code> shown in figure <a href="#org18dcfb1">1</a>, that basically connect them correctly.
 | 
			
		||||
This subsystem is then referenced in other simulink models for various purposes (control, analysis, simulation, …).
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<div id="orgf687c71" class="figure">
 | 
			
		||||
<div id="org18dcfb1" class="figure">
 | 
			
		||||
<p><img src="figs/simscape_stewart_platform.png" alt="simscape_stewart_platform.png" />
 | 
			
		||||
</p>
 | 
			
		||||
<p><span class="figure-number">Figure 1: </span>Simscape Subsystem of the Stewart platform. Encapsulate the Subsystems corresponding to the fixed base, mobile platform and all the struts.</p>
 | 
			
		||||
@@ -188,11 +193,11 @@ This subsystem is then referenced in other simulink models for various purposes
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-orgdfad86d" class="outline-2">
 | 
			
		||||
<h2 id="orgdfad86d"><span class="section-number-2">4</span> Subsystem - Fixed base and Mobile Platform</h2>
 | 
			
		||||
<div id="outline-container-org5f42d80" class="outline-2">
 | 
			
		||||
<h2 id="org5f42d80"><span class="section-number-2">4</span> Subsystem - Fixed base and Mobile Platform</h2>
 | 
			
		||||
<div class="outline-text-2" id="text-4">
 | 
			
		||||
<p>
 | 
			
		||||
<a id="orga4915c4"></a>
 | 
			
		||||
<a id="org5fac181"></a>
 | 
			
		||||
Both the fixed base and the mobile platform simscape models share many similarities.
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
@@ -210,14 +215,14 @@ As always, the parameters that define the geometry are taken from the <code>stew
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<div id="org858f0b4" class="figure">
 | 
			
		||||
<div id="org7b43415" class="figure">
 | 
			
		||||
<p><img src="figs/simscape_fixed_base.png" alt="simscape_fixed_base.png" width="1000px" />
 | 
			
		||||
</p>
 | 
			
		||||
<p><span class="figure-number">Figure 2: </span>Simscape Model of the Fixed base</p>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<div id="org4b31aa3" class="figure">
 | 
			
		||||
<div id="org7ed0d98" class="figure">
 | 
			
		||||
<p><img src="figs/simscape_mobile_platform.png" alt="simscape_mobile_platform.png" width="800px" />
 | 
			
		||||
</p>
 | 
			
		||||
<p><span class="figure-number">Figure 3: </span>Simscape Model of the Mobile platform</p>
 | 
			
		||||
@@ -225,13 +230,13 @@ As always, the parameters that define the geometry are taken from the <code>stew
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-org9d4af75" class="outline-2">
 | 
			
		||||
<h2 id="org9d4af75"><span class="section-number-2">5</span> Subsystem - Struts</h2>
 | 
			
		||||
<div id="outline-container-orgbec2976" class="outline-2">
 | 
			
		||||
<h2 id="orgbec2976"><span class="section-number-2">5</span> Subsystem - Struts</h2>
 | 
			
		||||
<div class="outline-text-2" id="text-5">
 | 
			
		||||
<p>
 | 
			
		||||
<a id="orgdb5206f"></a>
 | 
			
		||||
<a id="org793a5c7"></a>
 | 
			
		||||
For the Stewart platform, the 6 struts are identical.
 | 
			
		||||
Thus, all the struts used in the Stewart platform are referring to the same subsystem called <code>stewart_strut.slx</code> and shown in Figure <a href="#org1dc8fce">4</a>.
 | 
			
		||||
Thus, all the struts used in the Stewart platform are referring to the same subsystem called <code>stewart_strut.slx</code> and shown in Figure <a href="#org96a73eb">4</a>.
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
@@ -253,7 +258,7 @@ This is why the <b>UPS</b> configuration is used, but other configuration can be
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<div id="org1dc8fce" class="figure">
 | 
			
		||||
<div id="org96a73eb" class="figure">
 | 
			
		||||
<p><img src="figs/simscape_strut.png" alt="simscape_strut.png" width="800px" />
 | 
			
		||||
</p>
 | 
			
		||||
<p><span class="figure-number">Figure 4: </span>Simscape model of the Stewart platform’s strut</p>
 | 
			
		||||
@@ -282,15 +287,15 @@ Both inertial sensors are described bellow.
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-org7e2c432" class="outline-2">
 | 
			
		||||
<h2 id="org7e2c432"><span class="section-number-2">6</span> Other Elements</h2>
 | 
			
		||||
<div id="outline-container-org806ecc3" class="outline-2">
 | 
			
		||||
<h2 id="org806ecc3"><span class="section-number-2">6</span> Other Elements</h2>
 | 
			
		||||
<div class="outline-text-2" id="text-6">
 | 
			
		||||
</div>
 | 
			
		||||
<div id="outline-container-org3535b6d" class="outline-3">
 | 
			
		||||
<h3 id="org3535b6d"><span class="section-number-3">6.1</span> Payload</h3>
 | 
			
		||||
<div id="outline-container-orgf4bef70" class="outline-3">
 | 
			
		||||
<h3 id="orgf4bef70"><span class="section-number-3">6.1</span> Payload</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-6-1">
 | 
			
		||||
<p>
 | 
			
		||||
<a id="org3a56808"></a>
 | 
			
		||||
<a id="orgdd9802d"></a>
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
@@ -298,95 +303,95 @@ This Matlab function is accessible <a href="../src/initializePayload.m">here</a>
 | 
			
		||||
</p>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-orgd38089d" class="outline-4">
 | 
			
		||||
<h4 id="orgd38089d">Function description</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-orgd38089d">
 | 
			
		||||
<div id="outline-container-org9c0e404" class="outline-4">
 | 
			
		||||
<h4 id="org9c0e404">Function description</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-org9c0e404">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">function [payload] = initializePayload(args)
 | 
			
		||||
% initializePayload - Initialize the Payload that can then be used for simulations and analysis
 | 
			
		||||
%
 | 
			
		||||
% Syntax: [payload] = initializePayload(args)
 | 
			
		||||
%
 | 
			
		||||
% Inputs:
 | 
			
		||||
%    - args - Structure with the following fields:
 | 
			
		||||
%        - type - 'none', 'rigid', 'flexible', 'cartesian'
 | 
			
		||||
%        - h [1x1] - Height of the CoM of the payload w.r.t {M} [m]
 | 
			
		||||
%                    This also the position where K and C are defined
 | 
			
		||||
%        - K [6x1] - Stiffness of the Payload [N/m, N/rad]
 | 
			
		||||
%        - C [6x1] - Damping of the Payload [N/(m/s), N/(rad/s)]
 | 
			
		||||
%        - m [1x1] - Mass of the Payload [kg]
 | 
			
		||||
%        - I [3x3] - Inertia matrix for the Payload [kg*m2]
 | 
			
		||||
%
 | 
			
		||||
% Outputs:
 | 
			
		||||
%    - payload - Struture with the following properties:
 | 
			
		||||
%        - type - 1 (none), 2 (rigid), 3 (flexible)
 | 
			
		||||
%        - h [1x1] - Height of the CoM of the payload w.r.t {M} [m]
 | 
			
		||||
%        - K [6x1] - Stiffness of the Payload [N/m, N/rad]
 | 
			
		||||
%        - C [6x1] - Stiffness of the Payload [N/(m/s), N/(rad/s)]
 | 
			
		||||
%        - m [1x1] - Mass of the Payload [kg]
 | 
			
		||||
%        - I [3x3] - Inertia matrix for the Payload [kg*m2]
 | 
			
		||||
<pre class="src src-matlab">  <span class="org-keyword">function</span> <span class="org-variable-name">[payload]</span> = <span class="org-function-name">initializePayload</span>(<span class="org-variable-name">args</span>)
 | 
			
		||||
  <span class="org-comment">% initializePayload - Initialize the Payload that can then be used for simulations and analysis</span>
 | 
			
		||||
  <span class="org-comment">%</span>
 | 
			
		||||
  <span class="org-comment">% Syntax: [payload] = initializePayload(args)</span>
 | 
			
		||||
  <span class="org-comment">%</span>
 | 
			
		||||
  <span class="org-comment">% Inputs:</span>
 | 
			
		||||
  <span class="org-comment">%    - args - Structure with the following fields:</span>
 | 
			
		||||
  <span class="org-comment">%        - type - 'none', 'rigid', 'flexible', 'cartesian'</span>
 | 
			
		||||
  <span class="org-comment">%        - h [1x1] - Height of the CoM of the payload w.r.t {M} [m]</span>
 | 
			
		||||
  <span class="org-comment">%                    This also the position where K and C are defined</span>
 | 
			
		||||
  <span class="org-comment">%        - K [6x1] - Stiffness of the Payload [N/m, N/rad]</span>
 | 
			
		||||
  <span class="org-comment">%        - C [6x1] - Damping of the Payload [N/(m/s), N/(rad/s)]</span>
 | 
			
		||||
  <span class="org-comment">%        - m [1x1] - Mass of the Payload [kg]</span>
 | 
			
		||||
  <span class="org-comment">%        - I [3x3] - Inertia matrix for the Payload [kg*m2]</span>
 | 
			
		||||
  <span class="org-comment">%</span>
 | 
			
		||||
  <span class="org-comment">% Outputs:</span>
 | 
			
		||||
  <span class="org-comment">%    - payload - Struture with the following properties:</span>
 | 
			
		||||
  <span class="org-comment">%        - type - 1 (none), 2 (rigid), 3 (flexible)</span>
 | 
			
		||||
  <span class="org-comment">%        - h [1x1] - Height of the CoM of the payload w.r.t {M} [m]</span>
 | 
			
		||||
  <span class="org-comment">%        - K [6x1] - Stiffness of the Payload [N/m, N/rad]</span>
 | 
			
		||||
  <span class="org-comment">%        - C [6x1] - Stiffness of the Payload [N/(m/s), N/(rad/s)]</span>
 | 
			
		||||
  <span class="org-comment">%        - m [1x1] - Mass of the Payload [kg]</span>
 | 
			
		||||
  <span class="org-comment">%        - I [3x3] - Inertia matrix for the Payload [kg*m2]</span>
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-org5518a84" class="outline-4">
 | 
			
		||||
<h4 id="org5518a84">Optional Parameters</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-org5518a84">
 | 
			
		||||
<div id="outline-container-orgabc81c1" class="outline-4">
 | 
			
		||||
<h4 id="orgabc81c1">Optional Parameters</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-orgabc81c1">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">arguments
 | 
			
		||||
  args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'cartesian'})} = 'none'
 | 
			
		||||
  args.K (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e8*ones(6,1)
 | 
			
		||||
  args.C (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e1*ones(6,1)
 | 
			
		||||
  args.h (1,1) double {mustBeNumeric, mustBeNonnegative} = 100e-3
 | 
			
		||||
  args.m (1,1) double {mustBeNumeric, mustBeNonnegative} = 10
 | 
			
		||||
  args.I (3,3) double {mustBeNumeric, mustBeNonnegative} = 1*eye(3)
 | 
			
		||||
end
 | 
			
		||||
<pre class="src src-matlab">    <span class="org-keyword">arguments</span>
 | 
			
		||||
      <span class="org-variable-name">args</span>.type char {mustBeMember(args.type,{<span class="org-string">'none'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'cartesian'</span>})} = <span class="org-string">'none'</span>
 | 
			
		||||
      <span class="org-variable-name">args</span>.K (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e8<span class="org-type">*</span>ones(6,1)
 | 
			
		||||
      <span class="org-variable-name">args</span>.C (6,1) double {mustBeNumeric, mustBeNonnegative} = 1e1<span class="org-type">*</span>ones(6,1)
 | 
			
		||||
      <span class="org-variable-name">args</span>.h (1,1) double {mustBeNumeric, mustBeNonnegative} = 100e<span class="org-type">-</span>3
 | 
			
		||||
      <span class="org-variable-name">args</span>.m (1,1) double {mustBeNumeric, mustBeNonnegative} = 10
 | 
			
		||||
      <span class="org-variable-name">args</span>.I (3,3) double {mustBeNumeric, mustBeNonnegative} = 1<span class="org-type">*</span>eye(3)
 | 
			
		||||
    <span class="org-keyword">end</span>
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-orgeeb8d35" class="outline-4">
 | 
			
		||||
<h4 id="orgeeb8d35">Add Payload Type</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-orgeeb8d35">
 | 
			
		||||
<div id="outline-container-org4ef4a9f" class="outline-4">
 | 
			
		||||
<h4 id="org4ef4a9f">Add Payload Type</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-org4ef4a9f">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">switch args.type
 | 
			
		||||
  case 'none'
 | 
			
		||||
    payload.type = 1;
 | 
			
		||||
  case 'rigid'
 | 
			
		||||
    payload.type = 2;
 | 
			
		||||
  case 'flexible'
 | 
			
		||||
    payload.type = 3;
 | 
			
		||||
  case 'cartesian'
 | 
			
		||||
    payload.type = 4;
 | 
			
		||||
end
 | 
			
		||||
<pre class="src src-matlab">  <span class="org-keyword">switch</span> <span class="org-constant">args.type</span>
 | 
			
		||||
    <span class="org-keyword">case</span> <span class="org-string">'none'</span>
 | 
			
		||||
      payload.type = 1;
 | 
			
		||||
    <span class="org-keyword">case</span> <span class="org-string">'rigid'</span>
 | 
			
		||||
      payload.type = 2;
 | 
			
		||||
    <span class="org-keyword">case</span> <span class="org-string">'flexible'</span>
 | 
			
		||||
      payload.type = 3;
 | 
			
		||||
    <span class="org-keyword">case</span> <span class="org-string">'cartesian'</span>
 | 
			
		||||
      payload.type = 4;
 | 
			
		||||
  <span class="org-keyword">end</span>
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-org6d52ffc" class="outline-4">
 | 
			
		||||
<h4 id="org6d52ffc">Add Stiffness, Damping and Mass properties of the Payload</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-org6d52ffc">
 | 
			
		||||
<div id="outline-container-org3243d76" class="outline-4">
 | 
			
		||||
<h4 id="org3243d76">Add Stiffness, Damping and Mass properties of the Payload</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-org3243d76">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">payload.K = args.K;
 | 
			
		||||
payload.C = args.C;
 | 
			
		||||
payload.m = args.m;
 | 
			
		||||
payload.I = args.I;
 | 
			
		||||
<pre class="src src-matlab">  payload.K = args.K;
 | 
			
		||||
  payload.C = args.C;
 | 
			
		||||
  payload.m = args.m;
 | 
			
		||||
  payload.I = args.I;
 | 
			
		||||
 | 
			
		||||
payload.h = args.h;
 | 
			
		||||
  payload.h = args.h;
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-orgaaed406" class="outline-3">
 | 
			
		||||
<h3 id="orgaaed406"><span class="section-number-3">6.2</span> Ground</h3>
 | 
			
		||||
<div id="outline-container-orgd9e12ef" class="outline-3">
 | 
			
		||||
<h3 id="orgd9e12ef"><span class="section-number-3">6.2</span> Ground</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-6-2">
 | 
			
		||||
<p>
 | 
			
		||||
<a id="orge64ba82"></a>
 | 
			
		||||
<a id="org140423a"></a>
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
@@ -394,228 +399,228 @@ This Matlab function is accessible <a href="../src/initializeGround.m">here</a>.
 | 
			
		||||
</p>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-org7732939" class="outline-4">
 | 
			
		||||
<h4 id="org7732939">Function description</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-org7732939">
 | 
			
		||||
<div id="outline-container-org920bdd0" class="outline-4">
 | 
			
		||||
<h4 id="org920bdd0">Function description</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-org920bdd0">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">function [ground] = initializeGround(args)
 | 
			
		||||
% initializeGround - Initialize the Ground that can then be used for simulations and analysis
 | 
			
		||||
%
 | 
			
		||||
% Syntax: [ground] = initializeGround(args)
 | 
			
		||||
%
 | 
			
		||||
% Inputs:
 | 
			
		||||
%    - args - Structure with the following fields:
 | 
			
		||||
%        - type - 'none', 'solid', 'flexible'
 | 
			
		||||
%        - rot_point [3x1] - Rotation point for the ground motion [m]
 | 
			
		||||
%        - K [3x1] - Translation Stiffness of the Ground [N/m]
 | 
			
		||||
%        - C [3x1] - Translation Damping of the Ground [N/(m/s)]
 | 
			
		||||
%
 | 
			
		||||
% Outputs:
 | 
			
		||||
%    - ground - Struture with the following properties:
 | 
			
		||||
%        - type - 1 (none), 2 (rigid), 3 (flexible)
 | 
			
		||||
%        - K [3x1] - Translation Stiffness of the Ground [N/m]
 | 
			
		||||
%        - C [3x1] - Translation Damping of the Ground [N/(m/s)]
 | 
			
		||||
<pre class="src src-matlab">  <span class="org-keyword">function</span> <span class="org-variable-name">[ground]</span> = <span class="org-function-name">initializeGround</span>(<span class="org-variable-name">args</span>)
 | 
			
		||||
  <span class="org-comment">% initializeGround - Initialize the Ground that can then be used for simulations and analysis</span>
 | 
			
		||||
  <span class="org-comment">%</span>
 | 
			
		||||
  <span class="org-comment">% Syntax: [ground] = initializeGround(args)</span>
 | 
			
		||||
  <span class="org-comment">%</span>
 | 
			
		||||
  <span class="org-comment">% Inputs:</span>
 | 
			
		||||
  <span class="org-comment">%    - args - Structure with the following fields:</span>
 | 
			
		||||
  <span class="org-comment">%        - type - 'none', 'solid', 'flexible'</span>
 | 
			
		||||
  <span class="org-comment">%        - rot_point [3x1] - Rotation point for the ground motion [m]</span>
 | 
			
		||||
  <span class="org-comment">%        - K [3x1] - Translation Stiffness of the Ground [N/m]</span>
 | 
			
		||||
  <span class="org-comment">%        - C [3x1] - Translation Damping of the Ground [N/(m/s)]</span>
 | 
			
		||||
  <span class="org-comment">%</span>
 | 
			
		||||
  <span class="org-comment">% Outputs:</span>
 | 
			
		||||
  <span class="org-comment">%    - ground - Struture with the following properties:</span>
 | 
			
		||||
  <span class="org-comment">%        - type - 1 (none), 2 (rigid), 3 (flexible)</span>
 | 
			
		||||
  <span class="org-comment">%        - K [3x1] - Translation Stiffness of the Ground [N/m]</span>
 | 
			
		||||
  <span class="org-comment">%        - C [3x1] - Translation Damping of the Ground [N/(m/s)]</span>
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-org480f36e" class="outline-4">
 | 
			
		||||
<h4 id="org480f36e">Optional Parameters</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-org480f36e">
 | 
			
		||||
<div id="outline-container-orgfa4bbf4" class="outline-4">
 | 
			
		||||
<h4 id="orgfa4bbf4">Optional Parameters</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-orgfa4bbf4">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">arguments
 | 
			
		||||
  args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'none'
 | 
			
		||||
  args.rot_point (3,1) double {mustBeNumeric} = zeros(3,1)
 | 
			
		||||
  args.K (3,1) double {mustBeNumeric, mustBeNonnegative} = 1e8*ones(3,1)
 | 
			
		||||
  args.C (3,1) double {mustBeNumeric, mustBeNonnegative} = 1e1*ones(3,1)
 | 
			
		||||
end
 | 
			
		||||
<pre class="src src-matlab">  <span class="org-keyword">arguments</span>
 | 
			
		||||
    <span class="org-variable-name">args</span>.type char {mustBeMember(args.type,{<span class="org-string">'none'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'flexible'</span>})} = <span class="org-string">'none'</span>
 | 
			
		||||
    <span class="org-variable-name">args</span>.rot_point (3,1) double {mustBeNumeric} = zeros(3,1)
 | 
			
		||||
    <span class="org-variable-name">args</span>.K (3,1) double {mustBeNumeric, mustBeNonnegative} = 1e8<span class="org-type">*</span>ones(3,1)
 | 
			
		||||
    <span class="org-variable-name">args</span>.C (3,1) double {mustBeNumeric, mustBeNonnegative} = 1e1<span class="org-type">*</span>ones(3,1)
 | 
			
		||||
  <span class="org-keyword">end</span>
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-orgef7035d" class="outline-4">
 | 
			
		||||
<h4 id="orgef7035d">Add Ground Type</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-orgef7035d">
 | 
			
		||||
<div id="outline-container-org2d22970" class="outline-4">
 | 
			
		||||
<h4 id="org2d22970">Add Ground Type</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-org2d22970">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">switch args.type
 | 
			
		||||
  case 'none'
 | 
			
		||||
    ground.type = 1;
 | 
			
		||||
  case 'rigid'
 | 
			
		||||
    ground.type = 2;
 | 
			
		||||
  case 'flexible'
 | 
			
		||||
    ground.type = 3;
 | 
			
		||||
end
 | 
			
		||||
<pre class="src src-matlab">  <span class="org-keyword">switch</span> <span class="org-constant">args.type</span>
 | 
			
		||||
    <span class="org-keyword">case</span> <span class="org-string">'none'</span>
 | 
			
		||||
      ground.type = 1;
 | 
			
		||||
    <span class="org-keyword">case</span> <span class="org-string">'rigid'</span>
 | 
			
		||||
      ground.type = 2;
 | 
			
		||||
    <span class="org-keyword">case</span> <span class="org-string">'flexible'</span>
 | 
			
		||||
      ground.type = 3;
 | 
			
		||||
  <span class="org-keyword">end</span>
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-org95633e8" class="outline-4">
 | 
			
		||||
<h4 id="org95633e8">Add Stiffness and Damping properties of the Ground</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-org95633e8">
 | 
			
		||||
<div id="outline-container-orgf76def4" class="outline-4">
 | 
			
		||||
<h4 id="orgf76def4">Add Stiffness and Damping properties of the Ground</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-orgf76def4">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">ground.K = args.K;
 | 
			
		||||
ground.C = args.C;
 | 
			
		||||
<pre class="src src-matlab">  ground.K = args.K;
 | 
			
		||||
  ground.C = args.C;
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-org14ff2fc" class="outline-4">
 | 
			
		||||
<h4 id="org14ff2fc">Rotation Point</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-org14ff2fc">
 | 
			
		||||
<div id="outline-container-orgdb67a68" class="outline-4">
 | 
			
		||||
<h4 id="orgdb67a68">Rotation Point</h4>
 | 
			
		||||
<div class="outline-text-4" id="text-orgdb67a68">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">ground.rot_point = args.rot_point;
 | 
			
		||||
<pre class="src src-matlab">  ground.rot_point = args.rot_point;
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
<div id="outline-container-orgae6907a" class="outline-2">
 | 
			
		||||
<h2 id="orgae6907a"><span class="section-number-2">7</span> Initialize Disturbances</h2>
 | 
			
		||||
<div id="outline-container-org6d3b61e" class="outline-2">
 | 
			
		||||
<h2 id="org6d3b61e"><span class="section-number-2">7</span> Initialize Disturbances</h2>
 | 
			
		||||
<div class="outline-text-2" id="text-7">
 | 
			
		||||
<p>
 | 
			
		||||
<a id="org96254bf"></a>
 | 
			
		||||
<a id="org5c942ea"></a>
 | 
			
		||||
</p>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-orge2fa859" class="outline-3">
 | 
			
		||||
<h3 id="orge2fa859">Function Declaration and Documentation</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-orge2fa859">
 | 
			
		||||
<div id="outline-container-orgf14752d" class="outline-3">
 | 
			
		||||
<h3 id="orgf14752d">Function Declaration and Documentation</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-orgf14752d">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">function [disturbances] = initializeDisturbances(args)
 | 
			
		||||
% initializeDisturbances - Initialize the disturbances
 | 
			
		||||
%
 | 
			
		||||
% Syntax: [disturbances] = initializeDisturbances(args)
 | 
			
		||||
%
 | 
			
		||||
% Inputs:
 | 
			
		||||
%    - args -
 | 
			
		||||
<pre class="src src-matlab">  <span class="org-keyword">function</span> <span class="org-variable-name">[disturbances]</span> = <span class="org-function-name">initializeDisturbances</span>(<span class="org-variable-name">args</span>)
 | 
			
		||||
  <span class="org-comment">% initializeDisturbances - Initialize the disturbances</span>
 | 
			
		||||
  <span class="org-comment">%</span>
 | 
			
		||||
  <span class="org-comment">% Syntax: [disturbances] = initializeDisturbances(args)</span>
 | 
			
		||||
  <span class="org-comment">%</span>
 | 
			
		||||
  <span class="org-comment">% Inputs:</span>
 | 
			
		||||
  <span class="org-comment">%    - args -</span>
 | 
			
		||||
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-org6adb628" class="outline-3">
 | 
			
		||||
<h3 id="org6adb628">Optional Parameters</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-org6adb628">
 | 
			
		||||
<div id="outline-container-orga64679c" class="outline-3">
 | 
			
		||||
<h3 id="orga64679c">Optional Parameters</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-orga64679c">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">arguments
 | 
			
		||||
  args.Fd     double  {mustBeNumeric, mustBeReal} = zeros(6,1)
 | 
			
		||||
  args.Fd_t   double  {mustBeNumeric, mustBeReal} = 0
 | 
			
		||||
  args.Dw     double  {mustBeNumeric, mustBeReal} = zeros(6,1)
 | 
			
		||||
  args.Dw_t   double  {mustBeNumeric, mustBeReal} = 0
 | 
			
		||||
end
 | 
			
		||||
<pre class="src src-matlab">  <span class="org-keyword">arguments</span>
 | 
			
		||||
    <span class="org-variable-name">args</span>.Fd     double  {mustBeNumeric, mustBeReal} = zeros(6,1)
 | 
			
		||||
    <span class="org-variable-name">args</span>.Fd_t   double  {mustBeNumeric, mustBeReal} = 0
 | 
			
		||||
    <span class="org-variable-name">args</span>.Dw     double  {mustBeNumeric, mustBeReal} = zeros(6,1)
 | 
			
		||||
    <span class="org-variable-name">args</span>.Dw_t   double  {mustBeNumeric, mustBeReal} = 0
 | 
			
		||||
  <span class="org-keyword">end</span>
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-org30dc07c" class="outline-3">
 | 
			
		||||
<h3 id="org30dc07c">Structure initialization</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-org30dc07c">
 | 
			
		||||
<div id="outline-container-org0f7e4dd" class="outline-3">
 | 
			
		||||
<h3 id="org0f7e4dd">Structure initialization</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-org0f7e4dd">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">disturbances = struct();
 | 
			
		||||
<pre class="src src-matlab">  disturbances = struct();
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-org0755155" class="outline-3">
 | 
			
		||||
<h3 id="org0755155">Ground Motion</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-org0755155">
 | 
			
		||||
<div id="outline-container-org1a28fcd" class="outline-3">
 | 
			
		||||
<h3 id="org1a28fcd">Ground Motion</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-org1a28fcd">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">disturbances.Dw = timeseries([args.Dw], args.Dw_t);
 | 
			
		||||
<pre class="src src-matlab">  disturbances.Dw = timeseries([args.Dw], args.Dw_t);
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-org7617a55" class="outline-3">
 | 
			
		||||
<h3 id="org7617a55">Direct Forces</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-org7617a55">
 | 
			
		||||
<div id="outline-container-org90b72d6" class="outline-3">
 | 
			
		||||
<h3 id="org90b72d6">Direct Forces</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-org90b72d6">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">disturbances.Fd = timeseries([args.Fd], args.Fd_t);
 | 
			
		||||
<pre class="src src-matlab">  disturbances.Fd = timeseries([args.Fd], args.Fd_t);
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-orgd45a07f" class="outline-2">
 | 
			
		||||
<h2 id="orgd45a07f"><span class="section-number-2">8</span> Initialize References</h2>
 | 
			
		||||
<div id="outline-container-org93f2d30" class="outline-2">
 | 
			
		||||
<h2 id="org93f2d30"><span class="section-number-2">8</span> Initialize References</h2>
 | 
			
		||||
<div class="outline-text-2" id="text-8">
 | 
			
		||||
<p>
 | 
			
		||||
<a id="org7e762f4"></a>
 | 
			
		||||
<a id="orge24eeb5"></a>
 | 
			
		||||
</p>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-orge5deaa1" class="outline-3">
 | 
			
		||||
<h3 id="orge5deaa1">Function Declaration and Documentation</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-orge5deaa1">
 | 
			
		||||
<div id="outline-container-orgf124972" class="outline-3">
 | 
			
		||||
<h3 id="orgf124972">Function Declaration and Documentation</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-orgf124972">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">function [references] = initializeReferences(stewart, args)
 | 
			
		||||
% initializeReferences - Initialize the references
 | 
			
		||||
%
 | 
			
		||||
% Syntax: [references] = initializeReferences(args)
 | 
			
		||||
%
 | 
			
		||||
% Inputs:
 | 
			
		||||
%    - args -
 | 
			
		||||
<pre class="src src-matlab">  <span class="org-keyword">function</span> <span class="org-variable-name">[references]</span> = <span class="org-function-name">initializeReferences</span>(<span class="org-variable-name">stewart</span>, <span class="org-variable-name">args</span>)
 | 
			
		||||
  <span class="org-comment">% initializeReferences - Initialize the references</span>
 | 
			
		||||
  <span class="org-comment">%</span>
 | 
			
		||||
  <span class="org-comment">% Syntax: [references] = initializeReferences(args)</span>
 | 
			
		||||
  <span class="org-comment">%</span>
 | 
			
		||||
  <span class="org-comment">% Inputs:</span>
 | 
			
		||||
  <span class="org-comment">%    - args -</span>
 | 
			
		||||
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-orgeebb364" class="outline-3">
 | 
			
		||||
<h3 id="orgeebb364">Optional Parameters</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-orgeebb364">
 | 
			
		||||
<div id="outline-container-orgbc7950f" class="outline-3">
 | 
			
		||||
<h3 id="orgbc7950f">Optional Parameters</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-orgbc7950f">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">arguments
 | 
			
		||||
  stewart
 | 
			
		||||
  args.t double {mustBeNumeric, mustBeReal} = 0
 | 
			
		||||
  args.r double {mustBeNumeric, mustBeReal} = zeros(6, 1)
 | 
			
		||||
end
 | 
			
		||||
<pre class="src src-matlab">  <span class="org-keyword">arguments</span>
 | 
			
		||||
    <span class="org-variable-name">stewart</span>
 | 
			
		||||
    <span class="org-variable-name">args</span>.t double {mustBeNumeric, mustBeReal} = 0
 | 
			
		||||
    <span class="org-variable-name">args</span>.r double {mustBeNumeric, mustBeReal} = zeros(6, 1)
 | 
			
		||||
  <span class="org-keyword">end</span>
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-orgc274320" class="outline-3">
 | 
			
		||||
<h3 id="orgc274320"><span class="section-number-3">8.1</span> Compute the corresponding strut length</h3>
 | 
			
		||||
<div id="outline-container-org6f05adc" class="outline-3">
 | 
			
		||||
<h3 id="org6f05adc"><span class="section-number-3">8.1</span> Compute the corresponding strut length</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-8-1">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">rL = zeros(6, length(args.t));
 | 
			
		||||
<pre class="src src-matlab">  rL = zeros(6, length(args.t));
 | 
			
		||||
 | 
			
		||||
for i = 1:length(args.t)
 | 
			
		||||
  R = [cos(args.r(6,i)) -sin(args.r(6,i))  0;
 | 
			
		||||
       sin(args.r(6,i))  cos(args.r(6,i))  0;
 | 
			
		||||
       0           0           1] * ...
 | 
			
		||||
      [cos(args.r(5,i))  0           sin(args.r(5,i));
 | 
			
		||||
       0           1           0;
 | 
			
		||||
      -sin(args.r(5,i))  0           cos(args.r(5,i))] * ...
 | 
			
		||||
      [1           0           0;
 | 
			
		||||
       0           cos(args.r(4,i)) -sin(args.r(4,i));
 | 
			
		||||
       0           sin(args.r(4,i))  cos(args.r(4,i))];
 | 
			
		||||
  <span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(args.t)</span>
 | 
			
		||||
    R = [cos(args.r(6,<span class="org-constant">i</span>)) <span class="org-type">-</span>sin(args.r(6,<span class="org-constant">i</span>))  0;
 | 
			
		||||
         sin(args.r(6,<span class="org-constant">i</span>))  cos(args.r(6,<span class="org-constant">i</span>))  0;
 | 
			
		||||
         0           0           1] <span class="org-type">*</span> ...
 | 
			
		||||
        [cos(args.r(5,<span class="org-constant">i</span>))  0           sin(args.r(5,<span class="org-constant">i</span>));
 | 
			
		||||
         0           1           0;
 | 
			
		||||
        <span class="org-type">-</span>sin(args.r(5,<span class="org-constant">i</span>))  0           cos(args.r(5,<span class="org-constant">i</span>))] <span class="org-type">*</span> ...
 | 
			
		||||
        [1           0           0;
 | 
			
		||||
         0           cos(args.r(4,<span class="org-constant">i</span>)) <span class="org-type">-</span>sin(args.r(4,<span class="org-constant">i</span>));
 | 
			
		||||
         0           sin(args.r(4,<span class="org-constant">i</span>))  cos(args.r(4,<span class="org-constant">i</span>))];
 | 
			
		||||
 | 
			
		||||
 [Li, dLi] = inverseKinematics(stewart, 'AP', [args.r(1,i); args.r(2,i); args.r(3,i)], 'ARB', R);
 | 
			
		||||
 rL(:, i) = dLi;
 | 
			
		||||
end
 | 
			
		||||
   [Li, dLi] = inverseKinematics(stewart, <span class="org-string">'AP'</span>, [args.r(1,<span class="org-constant">i</span>); args.r(2,<span class="org-constant">i</span>); args.r(3,<span class="org-constant">i</span>)], <span class="org-string">'ARB'</span>, R);
 | 
			
		||||
   rL(<span class="org-type">:</span>, <span class="org-constant">i</span>) = dLi;
 | 
			
		||||
  <span class="org-keyword">end</span>
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<div id="outline-container-org36ac3fa" class="outline-3">
 | 
			
		||||
<h3 id="org36ac3fa">References</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-org36ac3fa">
 | 
			
		||||
<div id="outline-container-orgda73a50" class="outline-3">
 | 
			
		||||
<h3 id="orgda73a50">References</h3>
 | 
			
		||||
<div class="outline-text-3" id="text-orgda73a50">
 | 
			
		||||
<div class="org-src-container">
 | 
			
		||||
<pre class="src src-matlab">references.r  = timeseries(args.r, args.t);
 | 
			
		||||
references.rL = timeseries(rL, args.t);
 | 
			
		||||
<pre class="src src-matlab">  references.r  = timeseries(args.r, args.t);
 | 
			
		||||
  references.rL = timeseries(rL, args.t);
 | 
			
		||||
</pre>
 | 
			
		||||
</div>
 | 
			
		||||
</div>
 | 
			
		||||
@@ -624,7 +629,7 @@ references.rL = timeseries(rL, args.t);
 | 
			
		||||
</div>
 | 
			
		||||
<div id="postamble" class="status">
 | 
			
		||||
<p class="author">Author: Dehaeze Thomas</p>
 | 
			
		||||
<p class="date">Created: 2020-08-05 mer. 13:27</p>
 | 
			
		||||
<p class="date">Created: 2021-01-08 ven. 15:29</p>
 | 
			
		||||
</div>
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user