stewart-simscape/docs/simscape-model.html

631 lines
22 KiB
HTML
Raw Normal View History

<?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-08-05 13:28:14 +02:00
<!-- 2020-08-05 mer. 13:27 -->
<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>
2020-08-05 13:28:14 +02:00
<script>MathJax = {
tex: {
tags: 'ams',
macros: {bm: ["\\boldsymbol{#1}",1],}
}
2020-02-11 15:27:39 +01:00
};
</script>
2020-08-05 13:28:14 +02:00
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
</head>
<body>
<div id="org-div-home-and-up">
<a accesskey="h" href="./index.html"> UP </a>
|
<a accesskey="H" href="./index.html"> HOME </a>
</div><div id="content">
<h1 class="title">Stewart Platform - Simscape Model</h1>
2020-01-28 17:37:55 +01:00
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
2020-02-11 15:50:52 +01:00
<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>
2020-03-11 19:00:22 +01:00
<li><a href="#org9d4af75">5. Subsystem - Struts</a></li>
2020-02-11 15:50:52 +01:00
<li><a href="#org7e2c432">6. Other Elements</a>
2020-01-29 12:02:22 +01:00
<ul>
<li><a href="#org3535b6d">6.1. Payload</a>
2020-01-29 12:02:22 +01:00
<ul>
2020-08-05 13:28:14 +02:00
<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>
2020-01-29 12:02:22 +01:00
</ul>
</li>
<li><a href="#orgaaed406">6.2. Ground</a>
2020-01-28 17:37:55 +01:00
<ul>
2020-08-05 13:28:14 +02:00
<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>
</ul>
</li>
2020-01-28 17:37:55 +01:00
</ul>
</li>
2020-03-11 19:00:22 +01:00
<li><a href="#orgae6907a">7. Initialize Disturbances</a>
<ul>
2020-08-05 13:28:14 +02:00
<li><a href="#orge2fa859">Function Declaration and Documentation</a></li>
<li><a href="#org6adb628">Optional Parameters</a></li>
2020-03-11 19:00:22 +01:00
<li><a href="#org30dc07c">Structure initialization</a></li>
<li><a href="#org0755155">Ground Motion</a></li>
<li><a href="#org7617a55">Direct Forces</a></li>
</ul>
</li>
<li><a href="#orgd45a07f">8. Initialize References</a>
<ul>
2020-08-05 13:28:14 +02:00
<li><a href="#orge5deaa1">Function Declaration and Documentation</a></li>
<li><a href="#orgeebb364">Optional Parameters</a></li>
2020-03-11 19:00:22 +01:00
<li><a href="#orgc274320">8.1. Compute the corresponding strut length</a></li>
<li><a href="#org36ac3fa">References</a></li>
</ul>
</li>
2020-01-28 17:37:55 +01:00
</ul>
</div>
</div>
2020-01-29 12:02:22 +01:00
<p>
In this document is explained how the Simscape model of the Stewart Platform is implemented.
</p>
<p>
It is divided in the following sections:
</p>
<ul class="org-ul">
2020-02-11 15:50:52 +01:00
<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, &#x2026;) 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, &#x2026;) are saved in separate files and imported in Simulink files using &ldquo;subsystem referenced&rdquo;.</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>
2020-01-29 12:02:22 +01:00
</ul>
2020-02-11 15:27:39 +01:00
<div id="outline-container-orgc6e0b93" class="outline-2">
2020-02-11 15:50:52 +01:00
<h2 id="orgc6e0b93"><span class="section-number-2">1</span> Parameters used for the Simscape Model</h2>
<div class="outline-text-2" id="text-1">
2020-01-29 12:02:22 +01:00
<p>
2020-02-11 15:27:39 +01:00
<a id="org8d965c3"></a>
2020-01-29 12:02:22 +01:00
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>
<p>
All the geometry and inertia of the mechanical elements are defined in the <code>stewart</code> structure.
</p>
<p>
By updating the <code>stewart</code> structure in the workspace, the Simscape model will be automatically updated.
</p>
<p>
Thus, nothing should be changed by hand inside the Simscape model.
</p>
<p>
The main advantage to have all the parameters defined in one structure (and not hard-coded in some simulink blocs) it that we can easily change the Stewart architecture/parameters in a Matlab script to perform some parametric study for instance.
</p>
</div>
2020-01-28 17:37:55 +01:00
</div>
2020-02-11 15:27:39 +01:00
<div id="outline-container-org66977e8" class="outline-2">
2020-02-11 15:50:52 +01:00
<h2 id="org66977e8"><span class="section-number-2">2</span> Simulation Configuration - Configuration reference</h2>
<div class="outline-text-2" id="text-2">
2020-01-28 17:37:55 +01:00
<p>
2020-02-11 15:27:39 +01:00
<a id="org354bfdb"></a>
2020-01-29 12:02:22 +01:00
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.
2020-01-28 17:37:55 +01:00
</p>
<p>
2020-01-29 12:02:22 +01:00
This is done using something called &ldquo;<b>Configuration Reference</b>&rdquo; (<a href="https://fr.mathworks.com/help/simulink/ug/more-about-configuration-references.html">documentation</a>).
2020-01-28 17:37:55 +01:00
</p>
<p>
Basically, the configuration is stored in a mat file <code>conf_simscape.mat</code> and then loaded in the workspace for it to be accessible to all the simulink models.
It is automatically loaded when the Simulink project is open. It can be loaded manually with the command:
</p>
<div class="org-src-container">
2020-08-05 13:28:14 +02:00
<pre class="src src-matlab">load('mat/conf_simscape.mat');
2020-01-28 17:37:55 +01:00
</pre>
</div>
<p>
2020-01-29 12:02:22 +01:00
It is however possible to modify specific parameters just for one simulation using the <code>set_param</code> command:
2020-01-28 17:37:55 +01:00
</p>
<div class="org-src-container">
2020-08-05 13:28:14 +02:00
<pre class="src src-matlab">set_param(conf_simscape, 'StopTime', 1);
2020-01-28 17:37:55 +01:00
</pre>
</div>
</div>
</div>
2020-02-11 15:27:39 +01:00
<div id="outline-container-orgb2362eb" class="outline-2">
2020-02-11 15:50:52 +01:00
<h2 id="orgb2362eb"><span class="section-number-2">3</span> Subsystem Reference</h2>
<div class="outline-text-2" id="text-3">
2020-01-28 17:37:55 +01:00
<p>
2020-02-11 15:27:39 +01:00
<a id="org66bbae2"></a>
2020-01-28 17:37:55 +01:00
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>
<p>
However, all the Simscape models share some subsystems using the <b>Subsystem Reference</b> Simulink block (<a href="https://fr.mathworks.com/help/simulink/ug/referenced-subsystem-1.html">documentation</a>).
</p>
<p>
These shared subsystems are:
</p>
<ul class="org-ul">
<li><code>Fixed_Based.slx</code> - Fixed base of the Stewart Platform</li>
<li><code>Mobile_Platform.slx</code> - Mobile platform of the Stewart Platform</li>
<li><code>stewart_strut.slx</code> - One strut containing two spherical/universal joints, the actuator as well as the included sensors. A parameter <code>i</code> is initialized to determine what it the &ldquo;number&rdquo; of the strut.</li>
</ul>
<p>
2020-02-11 15:27:39 +01:00
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.
2020-01-29 12:02:22 +01:00
This subsystem is then referenced in other simulink models for various purposes (control, analysis, simulation, &#x2026;).
</p>
2020-02-11 15:27:39 +01:00
<div id="orgf687c71" class="figure">
2020-01-29 12:02:22 +01:00
<p><img src="figs/simscape_stewart_platform.png" alt="simscape_stewart_platform.png" />
2020-01-28 17:37:55 +01:00
</p>
2020-01-29 12:02:22 +01:00
<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>
2020-01-28 17:37:55 +01:00
</div>
</div>
2020-01-29 12:02:22 +01:00
</div>
2020-02-11 15:27:39 +01:00
<div id="outline-container-orgdfad86d" class="outline-2">
2020-02-11 15:50:52 +01:00
<h2 id="orgdfad86d"><span class="section-number-2">4</span> Subsystem - Fixed base and Mobile Platform</h2>
<div class="outline-text-2" id="text-4">
2020-01-29 12:02:22 +01:00
<p>
2020-02-11 15:27:39 +01:00
<a id="orga4915c4"></a>
2020-01-29 12:02:22 +01:00
Both the fixed base and the mobile platform simscape models share many similarities.
</p>
<p>
Their are both composed of:
</p>
<ul class="org-ul">
<li>a solid body representing the platform</li>
<li>6 rigid transform blocks to go from the frame \(\{F\}\) (resp. \(\{M\}\)) to the location of the joints.
These rigid transform are using \({}^F\bm{a}_i\) (resp. \({}^M\bm{b}_i\)) for the position of the joint and \({}^F\bm{R}_{a_i}\) (resp. \({}^M\bm{R}_{b_i}\)) for the orientation of the joint.</li>
</ul>
2020-01-28 17:37:55 +01:00
2020-01-29 12:02:22 +01:00
<p>
As always, the parameters that define the geometry are taken from the <code>stewart</code> structure.
</p>
2020-02-11 15:27:39 +01:00
<div id="org858f0b4" class="figure">
2020-01-29 12:02:22 +01:00
<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>
2020-01-28 17:37:55 +01:00
</div>
2020-01-29 12:02:22 +01:00
2020-02-11 15:27:39 +01:00
<div id="org4b31aa3" class="figure">
2020-01-29 12:02:22 +01:00
<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>
</div>
</div>
2020-01-28 17:37:55 +01:00
</div>
2020-02-11 15:27:39 +01:00
<div id="outline-container-org9d4af75" class="outline-2">
2020-02-11 15:50:52 +01:00
<h2 id="org9d4af75"><span class="section-number-2">5</span> Subsystem - Struts</h2>
<div class="outline-text-2" id="text-5">
2020-01-29 12:02:22 +01:00
<p>
2020-02-11 15:27:39 +01:00
<a id="orgdb5206f"></a>
2020-01-29 12:02:22 +01:00
For the Stewart platform, the 6 struts are identical.
2020-02-11 15:27:39 +01:00
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>.
2020-01-29 12:02:22 +01:00
</p>
<p>
2020-03-11 19:00:22 +01:00
This strut has the following structure:
2020-01-29 12:02:22 +01:00
</p>
<ul class="org-ul">
2020-03-11 19:00:22 +01:00
<li><b>Universal Joint</b> connected on the Fixed base</li>
<li><b>Prismatic Joint</b> for the actuator</li>
<li><b>Spherical Joint</b> connected on the Mobile platform</li>
2020-01-29 12:02:22 +01:00
</ul>
2020-01-28 17:37:55 +01:00
<p>
2020-01-29 12:02:22 +01:00
This configuration is called <b>UPS</b>.
</p>
<p>
The other common configuration <b>SPS</b> has the disadvantage of having additional passive degrees-of-freedom corresponding to the rotation of the strut around its main axis.
This is why the <b>UPS</b> configuration is used, but other configuration can be easily implemented.
</p>
2020-02-11 15:27:39 +01:00
<div id="org1dc8fce" class="figure">
2020-01-29 12:02:22 +01:00
<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&rsquo;s strut</p>
</div>
<p>
Several sensors are included in the strut that may or may not be used for control:
</p>
<ul class="org-ul">
<li>Relative Displacement sensor: gives the relative displacement of the strut.</li>
<li>Force sensor: measure the total force applied by the force actuator, the stiffness and damping forces in the direction of the strut.</li>
<li>Inertial sensor: measure the absolute motion (velocity) of the top part of the strut in the direction of the strut.</li>
</ul>
<p>
There is two main types of inertial sensor that can be used to measure the absolute motion of the top part of the strut in the direction of the strut:
</p>
<ul class="org-ul">
<li>a geophone that measures the absolute velocity above some frequency</li>
<li>an accelerometer that measures the absolute acceleration below some frequency</li>
</ul>
<p>
Both inertial sensors are described bellow.
</p>
</div>
</div>
2020-02-11 15:27:39 +01:00
<div id="outline-container-org7e2c432" class="outline-2">
2020-02-11 15:50:52 +01:00
<h2 id="org7e2c432"><span class="section-number-2">6</span> Other Elements</h2>
<div class="outline-text-2" id="text-6">
2020-02-11 15:27:39 +01:00
</div>
<div id="outline-container-org3535b6d" class="outline-3">
<h3 id="org3535b6d"><span class="section-number-3">6.1</span> Payload</h3>
2020-02-11 15:50:52 +01:00
<div class="outline-text-3" id="text-6-1">
<p>
<a id="org3a56808"></a>
</p>
<p>
This Matlab function is accessible <a href="../src/initializePayload.m">here</a>.
</p>
</div>
2020-08-05 13:28:14 +02:00
<div id="outline-container-orgd38089d" class="outline-4">
<h4 id="orgd38089d">Function description</h4>
<div class="outline-text-4" id="text-orgd38089d">
<div class="org-src-container">
2020-08-05 13:28:14 +02:00
<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>
</div>
</div>
</div>
2020-08-05 13:28:14 +02:00
<div id="outline-container-org5518a84" class="outline-4">
<h4 id="org5518a84">Optional Parameters</h4>
<div class="outline-text-4" id="text-org5518a84">
<div class="org-src-container">
<pre class="src src-matlab">arguments
2020-08-05 13:28:14 +02:00
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
2020-08-05 13:28:14 +02:00
args.I (3,3) double {mustBeNumeric, mustBeNonnegative} = 1*eye(3)
end
</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 class="org-src-container">
2020-08-05 13:28:14 +02:00
<pre class="src src-matlab">switch args.type
case 'none'
payload.type = 1;
2020-08-05 13:28:14 +02:00
case 'rigid'
payload.type = 2;
2020-08-05 13:28:14 +02:00
case 'flexible'
payload.type = 3;
2020-08-05 13:28:14 +02:00
case 'cartesian'
payload.type = 4;
2020-08-05 13:28:14 +02:00
end
</pre>
</div>
</div>
2020-01-29 12:02:22 +01:00
</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 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;
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 class="outline-text-3" id="text-6-2">
<p>
<a id="orge64ba82"></a>
</p>
<p>
This Matlab function is accessible <a href="../src/initializeGround.m">here</a>.
</p>
</div>
2020-08-05 13:28:14 +02:00
<div id="outline-container-org7732939" class="outline-4">
<h4 id="org7732939">Function description</h4>
<div class="outline-text-4" id="text-org7732939">
<div class="org-src-container">
2020-08-05 13:28:14 +02:00
<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>
</div>
</div>
</div>
2020-08-05 13:28:14 +02:00
<div id="outline-container-org480f36e" class="outline-4">
<h4 id="org480f36e">Optional Parameters</h4>
<div class="outline-text-4" id="text-org480f36e">
<div class="org-src-container">
<pre class="src src-matlab">arguments
2020-08-05 13:28:14 +02:00
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'none'
args.rot_point (3,1) double {mustBeNumeric} = zeros(3,1)
2020-08-05 13:28:14 +02:00
args.K (3,1) double {mustBeNumeric, mustBeNonnegative} = 1e8*ones(3,1)
args.C (3,1) double {mustBeNumeric, mustBeNonnegative} = 1e1*ones(3,1)
end
</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 class="org-src-container">
2020-08-05 13:28:14 +02:00
<pre class="src src-matlab">switch args.type
case 'none'
ground.type = 1;
2020-08-05 13:28:14 +02:00
case 'rigid'
ground.type = 2;
2020-08-05 13:28:14 +02:00
case 'flexible'
ground.type = 3;
2020-08-05 13:28:14 +02:00
end
</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 class="org-src-container">
<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 class="org-src-container">
<pre class="src src-matlab">ground.rot_point = args.rot_point;
</pre>
</div>
</div>
</div>
</div>
</div>
2020-03-11 19:00:22 +01:00
<div id="outline-container-orgae6907a" class="outline-2">
<h2 id="orgae6907a"><span class="section-number-2">7</span> Initialize Disturbances</h2>
<div class="outline-text-2" id="text-7">
<p>
<a id="org96254bf"></a>
</p>
</div>
2020-08-05 13:28:14 +02:00
<div id="outline-container-orge2fa859" class="outline-3">
<h3 id="orge2fa859">Function Declaration and Documentation</h3>
<div class="outline-text-3" id="text-orge2fa859">
2020-03-11 19:00:22 +01:00
<div class="org-src-container">
2020-08-05 13:28:14 +02:00
<pre class="src src-matlab">function [disturbances] = initializeDisturbances(args)
% initializeDisturbances - Initialize the disturbances
%
% Syntax: [disturbances] = initializeDisturbances(args)
%
% Inputs:
% - args -
2020-03-11 19:00:22 +01:00
</pre>
</div>
</div>
</div>
2020-08-05 13:28:14 +02:00
<div id="outline-container-org6adb628" class="outline-3">
<h3 id="org6adb628">Optional Parameters</h3>
<div class="outline-text-3" id="text-org6adb628">
2020-03-11 19:00:22 +01:00
<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
2020-08-05 13:28:14 +02:00
end
2020-03-11 19:00:22 +01:00
</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 class="org-src-container">
<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 class="org-src-container">
<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 class="org-src-container">
<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 class="outline-text-2" id="text-8">
<p>
<a id="org7e762f4"></a>
</p>
</div>
2020-08-05 13:28:14 +02:00
<div id="outline-container-orge5deaa1" class="outline-3">
<h3 id="orge5deaa1">Function Declaration and Documentation</h3>
<div class="outline-text-3" id="text-orge5deaa1">
2020-03-11 19:00:22 +01:00
<div class="org-src-container">
2020-08-05 13:28:14 +02:00
<pre class="src src-matlab">function [references] = initializeReferences(stewart, args)
% initializeReferences - Initialize the references
%
% Syntax: [references] = initializeReferences(args)
%
% Inputs:
% - args -
2020-03-11 19:00:22 +01:00
</pre>
</div>
</div>
</div>
2020-08-05 13:28:14 +02:00
<div id="outline-container-orgeebb364" class="outline-3">
<h3 id="orgeebb364">Optional Parameters</h3>
<div class="outline-text-3" id="text-orgeebb364">
2020-03-11 19:00:22 +01:00
<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)
2020-08-05 13:28:14 +02:00
end
2020-03-11 19:00:22 +01:00
</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 class="outline-text-3" id="text-8-1">
<div class="org-src-container">
<pre class="src src-matlab">rL = zeros(6, length(args.t));
2020-08-05 13:28:14 +02:00
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));
2020-03-11 19:00:22 +01:00
0 1 0;
2020-08-05 13:28:14 +02:00
-sin(args.r(5,i)) 0 cos(args.r(5,i))] * ...
2020-03-11 19:00:22 +01:00
[1 0 0;
2020-08-05 13:28:14 +02:00
0 cos(args.r(4,i)) -sin(args.r(4,i));
0 sin(args.r(4,i)) cos(args.r(4,i))];
2020-03-11 19:00:22 +01:00
2020-08-05 13:28:14 +02:00
[Li, dLi] = inverseKinematics(stewart, 'AP', [args.r(1,i); args.r(2,i); args.r(3,i)], 'ARB', R);
rL(:, i) = dLi;
end
2020-03-11 19:00:22 +01:00
</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 class="org-src-container">
<pre class="src src-matlab">references.r = timeseries(args.r, args.t);
references.rL = timeseries(rL, args.t);
</pre>
</div>
</div>
</div>
</div>
2020-01-29 12:02:22 +01:00
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
2020-08-05 13:28:14 +02:00
<p class="date">Created: 2020-08-05 mer. 13:27</p>
</div>
</body>
</html>