Change all indentation

This commit is contained in:
Thomas Dehaeze 2021-01-08 15:54:58 +01:00
parent f5922ca970
commit ed0c18829b
29 changed files with 8682 additions and 8683 deletions

View File

@ -3,7 +3,7 @@
"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-01-08 ven. 15:30 -->
<!-- 2021-01-08 ven. 15:53 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Stewart Platform - Decentralized Active Damping</title>
<meta name="generator" content="Org mode" />
@ -42,25 +42,25 @@
<li><a href="#orgddaf52f">1. Inertial Control</a>
<ul>
<li><a href="#org933440d">1.1. Identification of the Dynamics</a></li>
<li><a href="#orged6d23c">1.2. Effect of the Flexible Joint stiffness and Actuator amplification on the Dynamics</a></li>
<li><a href="#org533c409">1.3. Obtained Damping</a></li>
<li><a href="#orgc76021e">1.4. Conclusion</a></li>
<li><a href="#org2875dd1">1.2. Effect of the Flexible Joint stiffness and Actuator amplification on the Dynamics</a></li>
<li><a href="#org0cea759">1.3. Obtained Damping</a></li>
<li><a href="#orga866100">1.4. Conclusion</a></li>
</ul>
</li>
<li><a href="#orgf8ed544">2. Integral Force Feedback</a>
<ul>
<li><a href="#org7b81fe5">2.1. Identification of the Dynamics with perfect Joints</a></li>
<li><a href="#org3dca396">2.2. Effect of the Flexible Joint stiffness and Actuator amplification on the Dynamics</a></li>
<li><a href="#org7044ed4">2.3. Obtained Damping</a></li>
<li><a href="#org9c769b9">2.4. Conclusion</a></li>
<li><a href="#orga2d019b">2.1. Identification of the Dynamics with perfect Joints</a></li>
<li><a href="#org6ac04ee">2.2. Effect of the Flexible Joint stiffness and Actuator amplification on the Dynamics</a></li>
<li><a href="#org06e1086">2.3. Obtained Damping</a></li>
<li><a href="#orgfa832d6">2.4. Conclusion</a></li>
</ul>
</li>
<li><a href="#orgabec4e1">3. Direct Velocity Feedback</a>
<ul>
<li><a href="#orga2d019b">3.1. Identification of the Dynamics with perfect Joints</a></li>
<li><a href="#org2875dd1">3.2. Effect of the Flexible Joint stiffness and Actuator amplification on the Dynamics</a></li>
<li><a href="#org0cea759">3.3. Obtained Damping</a></li>
<li><a href="#orga866100">3.4. Conclusion</a></li>
<li><a href="#org19cbcee">3.1. Identification of the Dynamics with perfect Joints</a></li>
<li><a href="#org0fabf01">3.2. Effect of the Flexible Joint stiffness and Actuator amplification on the Dynamics</a></li>
<li><a href="#org6c74c9a">3.3. Obtained Damping</a></li>
<li><a href="#org81b2156">3.4. Conclusion</a></li>
</ul>
</li>
<li><a href="#orgc7e2089">4. Compliance and Transmissibility Comparison</a>
@ -90,7 +90,7 @@ The following decentralized active damping techniques are briefly studied:
<a id="org709d56c"></a>
</p>
<div class="note" id="org8a14d8c">
<div class="note" id="org1ae7526">
<p>
The Matlab script corresponding to this section is accessible <a href="../matlab/active_damping_inertial.m">here</a>.
</p>
@ -106,44 +106,44 @@ To run the script, open the Simulink Project, and type <code>run active_damping_
<h3 id="org933440d"><span class="section-number-3">1.1</span> Identification of the Dynamics</h3>
<div class="outline-text-3" id="text-1-1">
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'accelerometer'</span>, <span class="org-string">'freq'</span>, 5e3);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'accelerometer'</span>, <span class="org-string">'freq'</span>, 5e3);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'rot_point'</span>, stewart.platform_F.FO_A);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'rot_point'</span>, stewart.platform_F.FO_A);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'Vm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Absolute velocity of each leg [m/s]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'Vm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Absolute velocity of each leg [m/s]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Vm1'</span>, <span class="org-string">'Vm2'</span>, <span class="org-string">'Vm3'</span>, <span class="org-string">'Vm4'</span>, <span class="org-string">'Vm5'</span>, <span class="org-string">'Vm6'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Vm1'</span>, <span class="org-string">'Vm2'</span>, <span class="org-string">'Vm3'</span>, <span class="org-string">'Vm4'</span>, <span class="org-string">'Vm5'</span>, <span class="org-string">'Vm6'</span>};
</pre>
</div>
@ -159,17 +159,17 @@ The transfer function from actuator forces to force sensors is shown in Figure <
</div>
</div>
<div id="outline-container-orged6d23c" class="outline-3">
<h3 id="orged6d23c"><span class="section-number-3">1.2</span> Effect of the Flexible Joint stiffness and Actuator amplification on the Dynamics</h3>
<div id="outline-container-org2875dd1" class="outline-3">
<h3 id="org2875dd1"><span class="section-number-3">1.2</span> Effect of the Flexible Joint stiffness and Actuator amplification on the Dynamics</h3>
<div class="outline-text-3" id="text-1-2">
<p>
We add some stiffness and damping in the flexible joints and we re-identify the dynamics.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</span>);
Gf = linearize(mdl, io, options);
Gf.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gf.OutputName = {<span class="org-string">'Vm1'</span>, <span class="org-string">'Vm2'</span>, <span class="org-string">'Vm3'</span>, <span class="org-string">'Vm4'</span>, <span class="org-string">'Vm5'</span>, <span class="org-string">'Vm6'</span>};
<pre class="src src-matlab">stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</span>);
Gf = linearize(mdl, io, options);
Gf.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gf.OutputName = {<span class="org-string">'Vm1'</span>, <span class="org-string">'Vm2'</span>, <span class="org-string">'Vm3'</span>, <span class="org-string">'Vm4'</span>, <span class="org-string">'Vm5'</span>, <span class="org-string">'Vm6'</span>};
</pre>
</div>
@ -177,10 +177,10 @@ We add some stiffness and damping in the flexible joints and we re-identify the
We now use the amplified actuators and re-identify the dynamics
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeAmplifiedStrutDynamics(stewart);
Ga = linearize(mdl, io, options);
Ga.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Ga.OutputName = {<span class="org-string">'Vm1'</span>, <span class="org-string">'Vm2'</span>, <span class="org-string">'Vm3'</span>, <span class="org-string">'Vm4'</span>, <span class="org-string">'Vm5'</span>, <span class="org-string">'Vm6'</span>};
<pre class="src src-matlab">stewart = initializeAmplifiedStrutDynamics(stewart);
Ga = linearize(mdl, io, options);
Ga.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Ga.OutputName = {<span class="org-string">'Vm1'</span>, <span class="org-string">'Vm2'</span>, <span class="org-string">'Vm3'</span>, <span class="org-string">'Vm4'</span>, <span class="org-string">'Vm5'</span>, <span class="org-string">'Vm6'</span>};
</pre>
</div>
@ -196,8 +196,8 @@ The new dynamics from force actuator to force sensor is shown in Figure <a href=
</div>
</div>
<div id="outline-container-org533c409" class="outline-3">
<h3 id="org533c409"><span class="section-number-3">1.3</span> Obtained Damping</h3>
<div id="outline-container-org0cea759" class="outline-3">
<h3 id="org0cea759"><span class="section-number-3">1.3</span> Obtained Damping</h3>
<div class="outline-text-3" id="text-1-3">
<p>
The control is a performed in a decentralized manner.
@ -222,10 +222,10 @@ The root locus is shown in figure <a href="#orgaea8656">3</a>.
</div>
</div>
<div id="outline-container-orgc76021e" class="outline-3">
<h3 id="orgc76021e"><span class="section-number-3">1.4</span> Conclusion</h3>
<div id="outline-container-orga866100" class="outline-3">
<h3 id="orga866100"><span class="section-number-3">1.4</span> Conclusion</h3>
<div class="outline-text-3" id="text-1-4">
<div class="important" id="org37b8ef0">
<div class="important" id="org91c21ee">
<p>
We do not have guaranteed stability with Inertial control. This is because of the flexibility inside the internal sensor.
</p>
@ -242,7 +242,7 @@ We do not have guaranteed stability with Inertial control. This is because of th
<a id="org1f0d316"></a>
</p>
<div class="note" id="org54cec4b">
<div class="note" id="org30f755d">
<p>
The Matlab script corresponding to this section is accessible <a href="../matlab/active_damping_iff.m">here</a>.
</p>
@ -254,31 +254,31 @@ To run the script, open the Simulink Project, and type <code>run active_damping_
</div>
</div>
<div id="outline-container-org7b81fe5" class="outline-3">
<h3 id="org7b81fe5"><span class="section-number-3">2.1</span> Identification of the Dynamics with perfect Joints</h3>
<div id="outline-container-orga2d019b" class="outline-3">
<h3 id="orga2d019b"><span class="section-number-3">2.1</span> Identification of the Dynamics with perfect Joints</h3>
<div class="outline-text-3" id="text-2-1">
<p>
We first initialize the Stewart platform without joint stiffness.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'rot_point'</span>, stewart.platform_F.FO_A);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'rot_point'</span>, stewart.platform_F.FO_A);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
@ -286,18 +286,18 @@ We first initialize the Stewart platform without joint stiffness.
And we identify the dynamics from force actuators to force sensors.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'Taum'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Force Sensor Outputs [N]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'Taum'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Force Sensor Outputs [N]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
</pre>
</div>
@ -313,17 +313,17 @@ The transfer function from actuator forces to force sensors is shown in Figure <
</div>
</div>
<div id="outline-container-org3dca396" class="outline-3">
<h3 id="org3dca396"><span class="section-number-3">2.2</span> Effect of the Flexible Joint stiffness and Actuator amplification on the Dynamics</h3>
<div id="outline-container-org6ac04ee" class="outline-3">
<h3 id="org6ac04ee"><span class="section-number-3">2.2</span> Effect of the Flexible Joint stiffness and Actuator amplification on the Dynamics</h3>
<div class="outline-text-3" id="text-2-2">
<p>
We add some stiffness and damping in the flexible joints and we re-identify the dynamics.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</span>);
Gf = linearize(mdl, io);
Gf.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gf.OutputName = {<span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
<pre class="src src-matlab">stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</span>);
Gf = linearize(mdl, io);
Gf.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gf.OutputName = {<span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
</pre>
</div>
@ -331,10 +331,10 @@ We add some stiffness and damping in the flexible joints and we re-identify the
We now use the amplified actuators and re-identify the dynamics
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeAmplifiedStrutDynamics(stewart);
Ga = linearize(mdl, io);
Ga.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Ga.OutputName = {<span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
<pre class="src src-matlab">stewart = initializeAmplifiedStrutDynamics(stewart);
Ga = linearize(mdl, io);
Ga.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Ga.OutputName = {<span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
</pre>
</div>
@ -350,8 +350,8 @@ The new dynamics from force actuator to force sensor is shown in Figure <a href=
</div>
</div>
<div id="outline-container-org7044ed4" class="outline-3">
<h3 id="org7044ed4"><span class="section-number-3">2.3</span> Obtained Damping</h3>
<div id="outline-container-org06e1086" class="outline-3">
<h3 id="org06e1086"><span class="section-number-3">2.3</span> Obtained Damping</h3>
<div class="outline-text-3" id="text-2-3">
<p>
The control is a performed in a decentralized manner.
@ -383,10 +383,10 @@ The root locus is shown in figure <a href="#orgce5d8d8">6</a> and the obtained p
</div>
</div>
<div id="outline-container-org9c769b9" class="outline-3">
<h3 id="org9c769b9"><span class="section-number-3">2.4</span> Conclusion</h3>
<div id="outline-container-orgfa832d6" class="outline-3">
<h3 id="orgfa832d6"><span class="section-number-3">2.4</span> Conclusion</h3>
<div class="outline-text-3" id="text-2-4">
<div class="important" id="orged36719">
<div class="important" id="orgad0c17b">
<p>
The joint stiffness has a huge impact on the attainable active damping performance when using force sensors.
Thus, if Integral Force Feedback is to be used in a Stewart platform with flexible joints, the rotational stiffness of the joints should be minimized.
@ -404,7 +404,7 @@ Thus, if Integral Force Feedback is to be used in a Stewart platform with flexib
<a id="org63027d0"></a>
</p>
<div class="note" id="orgfb739d8">
<div class="note" id="orgadea9d6">
<p>
The Matlab script corresponding to this section is accessible <a href="../matlab/active_damping_dvf.m">here</a>.
</p>
@ -416,31 +416,31 @@ To run the script, open the Simulink Project, and type <code>run active_damping_
</div>
</div>
<div id="outline-container-orga2d019b" class="outline-3">
<h3 id="orga2d019b"><span class="section-number-3">3.1</span> Identification of the Dynamics with perfect Joints</h3>
<div id="outline-container-org19cbcee" class="outline-3">
<h3 id="org19cbcee"><span class="section-number-3">3.1</span> Identification of the Dynamics with perfect Joints</h3>
<div class="outline-text-3" id="text-3-1">
<p>
We first initialize the Stewart platform without joint stiffness.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'rot_point'</span>, stewart.platform_F.FO_A);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'rot_point'</span>, stewart.platform_F.FO_A);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
@ -448,22 +448,22 @@ We first initialize the Stewart platform without joint stiffness.
And we identify the dynamics from force actuators to force sensors.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'dLm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'dLm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>};
</pre>
</div>
@ -480,17 +480,17 @@ The transfer function from actuator forces to relative motion sensors is shown i
</div>
<div id="outline-container-org2875dd1" class="outline-3">
<h3 id="org2875dd1"><span class="section-number-3">3.2</span> Effect of the Flexible Joint stiffness and Actuator amplification on the Dynamics</h3>
<div id="outline-container-org0fabf01" class="outline-3">
<h3 id="org0fabf01"><span class="section-number-3">3.2</span> Effect of the Flexible Joint stiffness and Actuator amplification on the Dynamics</h3>
<div class="outline-text-3" id="text-3-2">
<p>
We add some stiffness and damping in the flexible joints and we re-identify the dynamics.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</span>);
Gf = linearize(mdl, io, options);
Gf.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gf.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>};
<pre class="src src-matlab">stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</span>);
Gf = linearize(mdl, io, options);
Gf.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gf.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>};
</pre>
</div>
@ -498,10 +498,10 @@ We add some stiffness and damping in the flexible joints and we re-identify the
We now use the amplified actuators and re-identify the dynamics
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeAmplifiedStrutDynamics(stewart);
Ga = linearize(mdl, io, options);
Ga.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Ga.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>};
<pre class="src src-matlab">stewart = initializeAmplifiedStrutDynamics(stewart);
Ga = linearize(mdl, io, options);
Ga.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Ga.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>};
</pre>
</div>
@ -517,8 +517,8 @@ The new dynamics from force actuator to relative motion sensor is shown in Figur
</div>
</div>
<div id="outline-container-org0cea759" class="outline-3">
<h3 id="org0cea759"><span class="section-number-3">3.3</span> Obtained Damping</h3>
<div id="outline-container-org6c74c9a" class="outline-3">
<h3 id="org6c74c9a"><span class="section-number-3">3.3</span> Obtained Damping</h3>
<div class="outline-text-3" id="text-3-3">
<p>
The control is a performed in a decentralized manner.
@ -543,10 +543,10 @@ The root locus is shown in figure <a href="#org0436b4d">10</a>.
</div>
</div>
<div id="outline-container-orga866100" class="outline-3">
<h3 id="orga866100"><span class="section-number-3">3.4</span> Conclusion</h3>
<div id="outline-container-org81b2156" class="outline-3">
<h3 id="org81b2156"><span class="section-number-3">3.4</span> Conclusion</h3>
<div class="outline-text-3" id="text-3-4">
<div class="important" id="org2640d3c">
<div class="important" id="orgb486ca9">
<p>
Joint stiffness does increase the resonance frequencies of the system but does not change the attainable damping when using relative motion sensors.
</p>
@ -567,17 +567,17 @@ Joint stiffness does increase the resonance frequencies of the system but does n
We first initialize the Stewart platform without joint stiffness.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
</pre>
</div>
@ -585,9 +585,9 @@ We first initialize the Stewart platform without joint stiffness.
The rotation point of the ground is located at the origin of frame \(\{A\}\).
</p>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'rot_point'</span>, stewart.platform_F.FO_A);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'rot_point'</span>, stewart.platform_F.FO_A);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
</div>
@ -600,9 +600,9 @@ The rotation point of the ground is located at the origin of frame \(\{A\}\).
Let&rsquo;s first identify the transmissibility and compliance in the open-loop case.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
[T_ol, T_norm_ol, freqs] = computeTransmissibility();
[C_ol, C_norm_ol, freqs] = computeCompliance();
<pre class="src src-matlab">controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
[T_ol, T_norm_ol, freqs] = computeTransmissibility();
[C_ol, C_norm_ol, freqs] = computeCompliance();
</pre>
</div>
@ -610,11 +610,11 @@ Let&rsquo;s first identify the transmissibility and compliance in the open-loop
Now, let&rsquo;s identify the transmissibility and compliance for the Integral Force Feedback architecture.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'iff'</span>);
K_iff = (1e4<span class="org-type">/</span>s)<span class="org-type">*</span>eye(6);
<pre class="src src-matlab">controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'iff'</span>);
K_iff = (1e4<span class="org-type">/</span>s)<span class="org-type">*</span>eye(6);
[T_iff, T_norm_iff, <span class="org-type">~</span>] = computeTransmissibility();
[C_iff, C_norm_iff, <span class="org-type">~</span>] = computeCompliance();
[T_iff, T_norm_iff, <span class="org-type">~</span>] = computeTransmissibility();
[C_iff, C_norm_iff, <span class="org-type">~</span>] = computeCompliance();
</pre>
</div>
@ -622,11 +622,11 @@ Now, let&rsquo;s identify the transmissibility and compliance for the Integral F
And for the Direct Velocity Feedback.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'dvf'</span>);
K_dvf = 1e4<span class="org-type">*</span>s<span class="org-type">/</span>(1<span class="org-type">+</span>s<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">/</span>5000)<span class="org-type">*</span>eye(6);
<pre class="src src-matlab">controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'dvf'</span>);
K_dvf = 1e4<span class="org-type">*</span>s<span class="org-type">/</span>(1<span class="org-type">+</span>s<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">/</span>5000)<span class="org-type">*</span>eye(6);
[T_dvf, T_norm_dvf, <span class="org-type">~</span>] = computeTransmissibility();
[C_dvf, C_norm_dvf, <span class="org-type">~</span>] = computeCompliance();
[T_dvf, T_norm_dvf, <span class="org-type">~</span>] = computeTransmissibility();
[C_dvf, C_norm_dvf, <span class="org-type">~</span>] = computeCompliance();
</pre>
</div>
</div>
@ -661,7 +661,7 @@ And for the Direct Velocity Feedback.
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-01-08 ven. 15:30</p>
<p class="date">Created: 2021-01-08 ven. 15:53</p>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
"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-01-08 ven. 15:30 -->
<!-- 2021-01-08 ven. 15:52 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Cubic configuration for the Stewart Platform</title>
<meta name="generator" content="Org mode" />
@ -45,34 +45,34 @@
<li><a href="#org6359f2f">1.2. Cubic Stewart platform centered with the cube center - Jacobian not estimated at the cube center</a></li>
<li><a href="#org5c37be2">1.3. Cubic Stewart platform not centered with the cube center - Jacobian estimated at the cube center</a></li>
<li><a href="#org32ac59a">1.4. Cubic Stewart platform not centered with the cube center - Jacobian estimated at the Stewart platform center</a></li>
<li><a href="#org4e88cdb">1.5. Conclusion</a></li>
<li><a href="#orgeb8ae82">1.5. Conclusion</a></li>
</ul>
</li>
<li><a href="#org312b7d4">2. Configuration with the Cube&rsquo;s center above the mobile platform</a>
<ul>
<li><a href="#org4983654">2.1. Having Cube&rsquo;s center above the top platform</a></li>
<li><a href="#orge53b7f6">2.2. Size of the platforms</a></li>
<li><a href="#org561a2bc">2.3. Conclusion</a></li>
<li><a href="#org52825e8">2.3. Conclusion</a></li>
</ul>
</li>
<li><a href="#org2387b96">3. Cubic size analysis</a>
<ul>
<li><a href="#org3647f9f">3.1. Analysis</a></li>
<li><a href="#org948a425">3.2. Conclusion</a></li>
<li><a href="#org701701b">3.2. Conclusion</a></li>
</ul>
</li>
<li><a href="#org174af3a">4. Dynamic Coupling in the Cartesian Frame</a>
<ul>
<li><a href="#orgdb33aa6">4.1. Cube&rsquo;s center at the Center of Mass of the mobile platform</a></li>
<li><a href="#org49b330b">4.2. Cube&rsquo;s center not coincident with the Mass of the Mobile platform</a></li>
<li><a href="#org7d50eae">4.3. Conclusion</a></li>
<li><a href="#orgf407e4d">4.3. Conclusion</a></li>
</ul>
</li>
<li><a href="#org7831cff">5. Dynamic Coupling between actuators and sensors of each strut</a>
<ul>
<li><a href="#org38e9e8f">5.1. Coupling between the actuators and sensors - Cubic Architecture</a></li>
<li><a href="#org21d40d3">5.2. Coupling between the actuators and sensors - Non-Cubic Architecture</a></li>
<li><a href="#orgeb8ae82">5.3. Conclusion</a></li>
<li><a href="#org0348380">5.3. Conclusion</a></li>
</ul>
</li>
<li><a href="#org3ce1c89">6. Functions</a>
@ -128,7 +128,7 @@ In this document, the cubic architecture is analyzed:
<a id="org6bc5f56"></a>
</p>
<div class="note" id="org6a03293">
<div class="note" id="org783c5d6">
<p>
The Matlab script corresponding to this section is accessible <a href="../matlab/cubic_conf_stiffnessl.m">here</a>.
</p>
@ -182,21 +182,21 @@ The Jacobian matrix is estimated at the location of the center of the cube.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> H = 100e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = <span class="org-type">-</span>H<span class="org-type">/</span>2; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
Hc = H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
<pre class="src src-matlab">H = 100e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = <span class="org-type">-</span>H<span class="org-type">/</span>2; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
Hc = H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateCubicConfiguration(stewart, <span class="org-string">'Hc'</span>, Hc, <span class="org-string">'FOc'</span>, FOc, <span class="org-string">'FHa'</span>, 0, <span class="org-string">'MHb'</span>, 0);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, ones(6,1));
stewart = computeJacobian(stewart);
stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 175e<span class="org-type">-</span>3, <span class="org-string">'Mpr'</span>, 150e<span class="org-type">-</span>3);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateCubicConfiguration(stewart, <span class="org-string">'Hc'</span>, Hc, <span class="org-string">'FOc'</span>, FOc, <span class="org-string">'FHa'</span>, 0, <span class="org-string">'MHb'</span>, 0);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, ones(6,1));
stewart = computeJacobian(stewart);
stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 175e<span class="org-type">-</span>3, <span class="org-string">'Mpr'</span>, 150e<span class="org-type">-</span>3);
</pre>
</div>
@ -291,21 +291,21 @@ The Jacobian matrix is not estimated at the location of the center of the cube.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> H = 100e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = 20e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
Hc = H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H<span class="org-type">/</span>2; <span class="org-comment">% Center of the cube with respect to {F}</span>
<pre class="src src-matlab">H = 100e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = 20e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
Hc = H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H<span class="org-type">/</span>2; <span class="org-comment">% Center of the cube with respect to {F}</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateCubicConfiguration(stewart, <span class="org-string">'Hc'</span>, Hc, <span class="org-string">'FOc'</span>, FOc, <span class="org-string">'FHa'</span>, 0, <span class="org-string">'MHb'</span>, 0);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, ones(6,1));
stewart = computeJacobian(stewart);
stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 175e<span class="org-type">-</span>3, <span class="org-string">'Mpr'</span>, 150e<span class="org-type">-</span>3);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateCubicConfiguration(stewart, <span class="org-string">'Hc'</span>, Hc, <span class="org-string">'FOc'</span>, FOc, <span class="org-string">'FHa'</span>, 0, <span class="org-string">'MHb'</span>, 0);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, ones(6,1));
stewart = computeJacobian(stewart);
stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 175e<span class="org-type">-</span>3, <span class="org-string">'Mpr'</span>, 150e<span class="org-type">-</span>3);
</pre>
</div>
@ -400,21 +400,21 @@ The Jacobian is estimated at the cube center.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> H = 80e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = <span class="org-type">-</span>30e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
Hc = 100e<span class="org-type">-</span>3; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
<pre class="src src-matlab">H = 80e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = <span class="org-type">-</span>30e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
Hc = 100e<span class="org-type">-</span>3; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateCubicConfiguration(stewart, <span class="org-string">'Hc'</span>, Hc, <span class="org-string">'FOc'</span>, FOc, <span class="org-string">'FHa'</span>, 0, <span class="org-string">'MHb'</span>, 0);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, ones(6,1));
stewart = computeJacobian(stewart);
stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 175e<span class="org-type">-</span>3, <span class="org-string">'Mpr'</span>, 150e<span class="org-type">-</span>3);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateCubicConfiguration(stewart, <span class="org-string">'Hc'</span>, Hc, <span class="org-string">'FOc'</span>, FOc, <span class="org-string">'FHa'</span>, 0, <span class="org-string">'MHb'</span>, 0);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, ones(6,1));
stewart = computeJacobian(stewart);
stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 175e<span class="org-type">-</span>3, <span class="org-string">'Mpr'</span>, 150e<span class="org-type">-</span>3);
</pre>
</div>
@ -520,21 +520,21 @@ The center of the cube from the top platform is at \(z = 110 - 175 = -65\).
</p>
<div class="org-src-container">
<pre class="src src-matlab"> H = 100e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = <span class="org-type">-</span>H<span class="org-type">/</span>2; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
Hc = 1.5<span class="org-type">*</span>H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H<span class="org-type">/</span>2 <span class="org-type">+</span> 10e<span class="org-type">-</span>3; <span class="org-comment">% Center of the cube with respect to {F}</span>
<pre class="src src-matlab">H = 100e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = <span class="org-type">-</span>H<span class="org-type">/</span>2; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
Hc = 1.5<span class="org-type">*</span>H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H<span class="org-type">/</span>2 <span class="org-type">+</span> 10e<span class="org-type">-</span>3; <span class="org-comment">% Center of the cube with respect to {F}</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateCubicConfiguration(stewart, <span class="org-string">'Hc'</span>, Hc, <span class="org-string">'FOc'</span>, FOc, <span class="org-string">'FHa'</span>, 0, <span class="org-string">'MHb'</span>, 0);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, ones(6,1));
stewart = computeJacobian(stewart);
stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 215e<span class="org-type">-</span>3, <span class="org-string">'Mpr'</span>, 195e<span class="org-type">-</span>3);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateCubicConfiguration(stewart, <span class="org-string">'Hc'</span>, Hc, <span class="org-string">'FOc'</span>, FOc, <span class="org-string">'FHa'</span>, 0, <span class="org-string">'MHb'</span>, 0);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, ones(6,1));
stewart = computeJacobian(stewart);
stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 215e<span class="org-type">-</span>3, <span class="org-string">'Mpr'</span>, 195e<span class="org-type">-</span>3);
</pre>
</div>
@ -620,10 +620,10 @@ The center of the cube from the top platform is at \(z = 110 - 175 = -65\).
</div>
</div>
<div id="outline-container-org4e88cdb" class="outline-3">
<h3 id="org4e88cdb"><span class="section-number-3">1.5</span> Conclusion</h3>
<div id="outline-container-orgeb8ae82" class="outline-3">
<h3 id="orgeb8ae82"><span class="section-number-3">1.5</span> Conclusion</h3>
<div class="outline-text-3" id="text-1-5">
<div class="important" id="org2fc62c4">
<div class="important" id="orgb449c4a">
<p>
Here are the conclusion about the Stiffness matrix for the Cubic configuration:
</p>
@ -644,7 +644,7 @@ Here are the conclusion about the Stiffness matrix for the Cubic configuration:
<a id="org419cdb0"></a>
</p>
<div class="note" id="orgd5c0d4d">
<div class="note" id="orge405fbc">
<p>
The Matlab script corresponding to this section is accessible <a href="../matlab/cubic_conf_above_platforml.m">here</a>.
</p>
@ -676,8 +676,8 @@ Thus, we want the cube&rsquo;s center to be located above the top center.
Let&rsquo;s fix the Height of the Stewart platform and the position of frames \(\{A\}\) and \(\{B\}\):
</p>
<div class="org-src-container">
<pre class="src src-matlab"> H = 100e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = 20e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
<pre class="src src-matlab">H = 100e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = 20e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
</pre>
</div>
@ -697,8 +697,8 @@ However, the rotational stiffnesses are increasing with the cube&rsquo;s size bu
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Hc = 0.4<span class="org-type">*</span>H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
<pre class="src src-matlab">Hc = 0.4<span class="org-type">*</span>H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
</pre>
</div>
@ -783,8 +783,8 @@ However, the rotational stiffnesses are increasing with the cube&rsquo;s size bu
</table>
<div class="org-src-container">
<pre class="src src-matlab"> Hc = 1.5<span class="org-type">*</span>H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
<pre class="src src-matlab">Hc = 1.5<span class="org-type">*</span>H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
</pre>
</div>
@ -870,8 +870,8 @@ However, the rotational stiffnesses are increasing with the cube&rsquo;s size bu
</table>
<div class="org-src-container">
<pre class="src src-matlab"> Hc = 2.5<span class="org-type">*</span>H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
<pre class="src src-matlab">Hc = 2.5<span class="org-type">*</span>H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
</pre>
</div>
@ -1049,10 +1049,10 @@ For a small cube:
</div>
</div>
<div id="outline-container-org561a2bc" class="outline-3">
<h3 id="org561a2bc"><span class="section-number-3">2.3</span> Conclusion</h3>
<div id="outline-container-org52825e8" class="outline-3">
<h3 id="org52825e8"><span class="section-number-3">2.3</span> Conclusion</h3>
<div class="outline-text-3" id="text-2-3">
<div class="important" id="orga24e443">
<div class="important" id="orgc3fb4db">
<p>
We found that we can have a diagonal stiffness matrix using the cubic architecture when \(\{A\}\) and \(\{B\}\) are located above the top platform.
Depending on the cube&rsquo;s size, we obtain 3 different configurations.
@ -1102,7 +1102,7 @@ Depending on the cube&rsquo;s size, we obtain 3 different configurations.
<a id="org53ade24"></a>
</p>
<div class="note" id="orgfd32e5a">
<div class="note" id="org6ff8a60">
<p>
The Matlab script corresponding to this section is accessible <a href="../matlab/cubic_conf_size_analysisl.m">here</a>.
</p>
@ -1132,8 +1132,8 @@ We only vary the size of the cube.
We initialize the wanted cube&rsquo;s size.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Hcs = 1e<span class="org-type">-</span>3<span class="org-type">*</span>[250<span class="org-type">:</span>20<span class="org-type">:</span>350]; <span class="org-comment">% Heights for the Cube [m]</span>
Ks = zeros(6, 6, length(Hcs));
<pre class="src src-matlab">Hcs = 1e<span class="org-type">-</span>3<span class="org-type">*</span>[250<span class="org-type">:</span>20<span class="org-type">:</span>350]; <span class="org-comment">% Heights for the Cube [m]</span>
Ks = zeros(6, 6, length(Hcs));
</pre>
</div>
@ -1141,7 +1141,7 @@ We initialize the wanted cube&rsquo;s size.
The height of the Stewart platform is fixed:
</p>
<div class="org-src-container">
<pre class="src src-matlab"> H = 100e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
<pre class="src src-matlab">H = 100e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
</pre>
</div>
@ -1149,8 +1149,8 @@ The height of the Stewart platform is fixed:
The frames \(\{A\}\) and \(\{B\}\) are positioned at the Stewart platform center as well as the cube&rsquo;s center:
</p>
<div class="org-src-container">
<pre class="src src-matlab"> MO_B = <span class="org-type">-</span>50e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
<pre class="src src-matlab">MO_B = <span class="org-type">-</span>50e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
</pre>
</div>
@ -1168,14 +1168,14 @@ We also find that \(k_{\theta_x} = k_{\theta_y}\) and \(k_{\theta_z}\) are varyi
</div>
</div>
<div id="outline-container-org948a425" class="outline-3">
<h3 id="org948a425"><span class="section-number-3">3.2</span> Conclusion</h3>
<div id="outline-container-org701701b" class="outline-3">
<h3 id="org701701b"><span class="section-number-3">3.2</span> Conclusion</h3>
<div class="outline-text-3" id="text-3-2">
<p>
We observe that \(k_{\theta_x} = k_{\theta_y}\) and \(k_{\theta_z}\) increase linearly with the cube size.
</p>
<div class="important" id="org60cc507">
<div class="important" id="org93b8347">
<p>
In order to maximize the rotational stiffness of the Stewart platform, the size of the cube should be the highest possible.
</p>
@ -1192,7 +1192,7 @@ In order to maximize the rotational stiffness of the Stewart platform, the size
<a id="org3507b2b"></a>
</p>
<div class="note" id="org5934a9c">
<div class="note" id="org265afc7">
<p>
The Matlab script corresponding to this section is accessible <a href="../matlab/cubic_conf_coupling_cartesianl.m">here</a>.
</p>
@ -1256,8 +1256,8 @@ Let&rsquo;s create a Cubic Stewart Platform where the <b>Center of Mass of the m
We define the size of the Stewart platform and the position of frames \(\{A\}\) and \(\{B\}\).
</p>
<div class="org-src-container">
<pre class="src src-matlab"> H = 200e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = <span class="org-type">-</span>10e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
<pre class="src src-matlab">H = 200e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = <span class="org-type">-</span>10e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
</pre>
</div>
@ -1265,20 +1265,20 @@ We define the size of the Stewart platform and the position of frames \(\{A\}\)
Now, we set the cube&rsquo;s parameters such that the center of the cube is coincident with \(\{A\}\) and \(\{B\}\).
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Hc = 2.5<span class="org-type">*</span>H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
<pre class="src src-matlab">Hc = 2.5<span class="org-type">*</span>H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateCubicConfiguration(stewart, <span class="org-string">'Hc'</span>, Hc, <span class="org-string">'FOc'</span>, FOc, <span class="org-string">'FHa'</span>, 25e<span class="org-type">-</span>3, <span class="org-string">'MHb'</span>, 25e<span class="org-type">-</span>3);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, 1e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'C'</span>, 1e1<span class="org-type">*</span>ones(6,1));
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateCubicConfiguration(stewart, <span class="org-string">'Hc'</span>, Hc, <span class="org-string">'FOc'</span>, FOc, <span class="org-string">'FHa'</span>, 25e<span class="org-type">-</span>3, <span class="org-string">'MHb'</span>, 25e<span class="org-type">-</span>3);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, 1e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'C'</span>, 1e1<span class="org-type">*</span>ones(6,1));
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
</pre>
</div>
@ -1286,10 +1286,10 @@ Now, we set the cube&rsquo;s parameters such that the center of the cube is coin
Now we set the geometry and mass of the mobile platform such that its center of mass is coincident with \(\{A\}\) and \(\{B\}\).
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_F.Fa)), ...
<span class="org-string">'Mpm'</span>, 10, ...
<span class="org-string">'Mph'</span>, 20e<span class="org-type">-</span>3, ...
<span class="org-string">'Mpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_M.Mb)));
<pre class="src src-matlab">stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_F.Fa)), ...
<span class="org-string">'Mpm'</span>, 10, ...
<span class="org-string">'Mph'</span>, 20e<span class="org-type">-</span>3, ...
<span class="org-string">'Mpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_M.Mb)));
</pre>
</div>
@ -1297,8 +1297,8 @@ Now we set the geometry and mass of the mobile platform such that its center of
And we set small mass for the struts.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeCylindricalStruts(stewart, <span class="org-string">'Fsm'</span>, 1e<span class="org-type">-</span>3, <span class="org-string">'Msm'</span>, 1e<span class="org-type">-</span>3);
stewart = initializeInertialSensor(stewart);
<pre class="src src-matlab">stewart = initializeCylindricalStruts(stewart, <span class="org-string">'Fsm'</span>, 1e<span class="org-type">-</span>3, <span class="org-string">'Msm'</span>, 1e<span class="org-type">-</span>3);
stewart = initializeInertialSensor(stewart);
</pre>
</div>
@ -1306,9 +1306,9 @@ And we set small mass for the struts.
No flexibility below the Stewart platform and no payload.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
@ -1327,24 +1327,24 @@ The obtain geometry is shown in figure <a href="#orgb6b060a">10</a>.
We now identify the dynamics from forces applied in each strut \(\bm{\tau}\) to the displacement of each strut \(d \bm{\mathcal{L}}\).
</p>
<div class="org-src-container">
<pre class="src src-matlab"> open(<span class="org-string">'stewart_platform_model.slx'</span>)
<pre class="src src-matlab">open(<span class="org-string">'stewart_platform_model.slx'</span>)
<span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'dLm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'dLm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>};
</pre>
</div>
@ -1352,10 +1352,10 @@ We now identify the dynamics from forces applied in each strut \(\bm{\tau}\) to
Now, thanks to the Jacobian (Figure <a href="#org2137f5a">9</a>), we compute the transfer function from \(\bm{\mathcal{F}}\) to \(\bm{\mathcal{X}}\).
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Gc = inv(stewart.kinematics.J)<span class="org-type">*</span>G<span class="org-type">*</span>inv(stewart.kinematics.J<span class="org-type">'</span>);
Gc = inv(stewart.kinematics.J)<span class="org-type">*</span>G<span class="org-type">*</span>stewart.kinematics.J;
Gc.InputName = {<span class="org-string">'Fx'</span>, <span class="org-string">'Fy'</span>, <span class="org-string">'Fz'</span>, <span class="org-string">'Mx'</span>, <span class="org-string">'My'</span>, <span class="org-string">'Mz'</span>};
Gc.OutputName = {<span class="org-string">'Dx'</span>, <span class="org-string">'Dy'</span>, <span class="org-string">'Dz'</span>, <span class="org-string">'Rx'</span>, <span class="org-string">'Ry'</span>, <span class="org-string">'Rz'</span>};
<pre class="src src-matlab">Gc = inv(stewart.kinematics.J)<span class="org-type">*</span>G<span class="org-type">*</span>inv(stewart.kinematics.J<span class="org-type">'</span>);
Gc = inv(stewart.kinematics.J)<span class="org-type">*</span>G<span class="org-type">*</span>stewart.kinematics.J;
Gc.InputName = {<span class="org-string">'Fx'</span>, <span class="org-string">'Fy'</span>, <span class="org-string">'Fz'</span>, <span class="org-string">'Mx'</span>, <span class="org-string">'My'</span>, <span class="org-string">'Mz'</span>};
Gc.OutputName = {<span class="org-string">'Dx'</span>, <span class="org-string">'Dy'</span>, <span class="org-string">'Dz'</span>, <span class="org-string">'Rx'</span>, <span class="org-string">'Ry'</span>, <span class="org-string">'Rz'</span>};
</pre>
</div>
@ -1381,7 +1381,7 @@ It is interesting to note here that the system shown in Figure <a href="#org9d84
<p><span class="figure-number">Figure 12: </span>Alternative way to decouple the system</p>
</div>
<div class="important" id="org489ed3b">
<div class="important" id="orgd31482e">
<p>
The dynamics is well decoupled at all frequencies.
</p>
@ -1413,8 +1413,8 @@ This is because the Mass, Damping and Stiffness matrices are all diagonal.
Let&rsquo;s create a Stewart platform with a cubic architecture where the cube&rsquo;s center is at the center of the Stewart platform.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> H = 200e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = <span class="org-type">-</span>100e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
<pre class="src src-matlab">H = 200e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = <span class="org-type">-</span>100e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
</pre>
</div>
@ -1422,20 +1422,20 @@ Let&rsquo;s create a Stewart platform with a cubic architecture where the cube&r
Now, we set the cube&rsquo;s parameters such that the center of the cube is coincident with \(\{A\}\) and \(\{B\}\).
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Hc = 2.5<span class="org-type">*</span>H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
<pre class="src src-matlab">Hc = 2.5<span class="org-type">*</span>H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateCubicConfiguration(stewart, <span class="org-string">'Hc'</span>, Hc, <span class="org-string">'FOc'</span>, FOc, <span class="org-string">'FHa'</span>, 25e<span class="org-type">-</span>3, <span class="org-string">'MHb'</span>, 25e<span class="org-type">-</span>3);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, 1e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'C'</span>, 1e1<span class="org-type">*</span>ones(6,1));
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateCubicConfiguration(stewart, <span class="org-string">'Hc'</span>, Hc, <span class="org-string">'FOc'</span>, FOc, <span class="org-string">'FHa'</span>, 25e<span class="org-type">-</span>3, <span class="org-string">'MHb'</span>, 25e<span class="org-type">-</span>3);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, 1e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'C'</span>, 1e1<span class="org-type">*</span>ones(6,1));
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
</pre>
</div>
@ -1443,10 +1443,10 @@ Now, we set the cube&rsquo;s parameters such that the center of the cube is coin
However, the Center of Mass of the mobile platform is <b>not</b> located at the cube&rsquo;s center.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_F.Fa)), ...
<span class="org-string">'Mpm'</span>, 10, ...
<span class="org-string">'Mph'</span>, 20e<span class="org-type">-</span>3, ...
<span class="org-string">'Mpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_M.Mb)));
<pre class="src src-matlab">stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_F.Fa)), ...
<span class="org-string">'Mpm'</span>, 10, ...
<span class="org-string">'Mph'</span>, 20e<span class="org-type">-</span>3, ...
<span class="org-string">'Mpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_M.Mb)));
</pre>
</div>
@ -1454,8 +1454,8 @@ However, the Center of Mass of the mobile platform is <b>not</b> located at the
And we set small mass for the struts.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeCylindricalStruts(stewart, <span class="org-string">'Fsm'</span>, 1e<span class="org-type">-</span>3, <span class="org-string">'Msm'</span>, 1e<span class="org-type">-</span>3);
stewart = initializeInertialSensor(stewart);
<pre class="src src-matlab">stewart = initializeCylindricalStruts(stewart, <span class="org-string">'Fsm'</span>, 1e<span class="org-type">-</span>3, <span class="org-string">'Msm'</span>, 1e<span class="org-type">-</span>3);
stewart = initializeInertialSensor(stewart);
</pre>
</div>
@ -1463,9 +1463,9 @@ And we set small mass for the struts.
No flexibility below the Stewart platform and no payload.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
@ -1483,24 +1483,24 @@ The obtain geometry is shown in figure <a href="#orgc57dcd2">13</a>.
We now identify the dynamics from forces applied in each strut \(\bm{\tau}\) to the displacement of each strut \(d \bm{\mathcal{L}}\).
</p>
<div class="org-src-container">
<pre class="src src-matlab"> open(<span class="org-string">'stewart_platform_model.slx'</span>)
<pre class="src src-matlab">open(<span class="org-string">'stewart_platform_model.slx'</span>)
<span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'dLm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'dLm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>};
</pre>
</div>
@ -1508,9 +1508,9 @@ We now identify the dynamics from forces applied in each strut \(\bm{\tau}\) to
And we use the Jacobian to compute the transfer function from \(\bm{\mathcal{F}}\) to \(\bm{\mathcal{X}}\).
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Gc = inv(stewart.kinematics.J)<span class="org-type">*</span>G<span class="org-type">*</span>inv(stewart.kinematics.J<span class="org-type">'</span>);
Gc.InputName = {<span class="org-string">'Fx'</span>, <span class="org-string">'Fy'</span>, <span class="org-string">'Fz'</span>, <span class="org-string">'Mx'</span>, <span class="org-string">'My'</span>, <span class="org-string">'Mz'</span>};
Gc.OutputName = {<span class="org-string">'Dx'</span>, <span class="org-string">'Dy'</span>, <span class="org-string">'Dz'</span>, <span class="org-string">'Rx'</span>, <span class="org-string">'Ry'</span>, <span class="org-string">'Rz'</span>};
<pre class="src src-matlab">Gc = inv(stewart.kinematics.J)<span class="org-type">*</span>G<span class="org-type">*</span>inv(stewart.kinematics.J<span class="org-type">'</span>);
Gc.InputName = {<span class="org-string">'Fx'</span>, <span class="org-string">'Fy'</span>, <span class="org-string">'Fz'</span>, <span class="org-string">'Mx'</span>, <span class="org-string">'My'</span>, <span class="org-string">'Mz'</span>};
Gc.OutputName = {<span class="org-string">'Dx'</span>, <span class="org-string">'Dy'</span>, <span class="org-string">'Dz'</span>, <span class="org-string">'Rx'</span>, <span class="org-string">'Ry'</span>, <span class="org-string">'Rz'</span>};
</pre>
</div>
@ -1525,7 +1525,7 @@ The obtain dynamics \(\bm{G}_{c}(s) = \bm{J}^{-T} \bm{G}(s) \bm{J}^{-1}\) is sho
<p><span class="figure-number">Figure 14: </span>Obtained Dynamics from \(\bm{\mathcal{F}}\) to \(\bm{\mathcal{X}}\) (<a href="./figs/stewart_conf_coupling_mass_matrix.png">png</a>, <a href="./figs/stewart_conf_coupling_mass_matrix.pdf">pdf</a>)</p>
</div>
<div class="important" id="org798e5c6">
<div class="important" id="orgc60cb20">
<p>
The system is decoupled at low frequency (the Stiffness matrix being diagonal), but it is <b>not</b> decoupled at all frequencies.
</p>
@ -1538,10 +1538,10 @@ This was expected as the mass matrix is not diagonal (the Center of Mass of the
</div>
</div>
<div id="outline-container-org7d50eae" class="outline-3">
<h3 id="org7d50eae"><span class="section-number-3">4.3</span> Conclusion</h3>
<div id="outline-container-orgf407e4d" class="outline-3">
<h3 id="orgf407e4d"><span class="section-number-3">4.3</span> Conclusion</h3>
<div class="outline-text-3" id="text-4-3">
<div class="important" id="org9b1be89">
<div class="important" id="org982344b">
<p>
Some conclusions can be drawn from the above analysis:
</p>
@ -1562,7 +1562,7 @@ Some conclusions can be drawn from the above analysis:
<a id="org7b3ed31"></a>
</p>
<div class="note" id="org7a9b096">
<div class="note" id="org96fba24">
<p>
The Matlab script corresponding to this section is accessible <a href="../matlab/cubic_conf_coupling_strutsl.m">here</a>.
</p>
@ -1593,28 +1593,28 @@ Let&rsquo;s generate a Cubic architecture where the cube&rsquo;s center and the
</p>
<div class="org-src-container">
<pre class="src src-matlab"> H = 200e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = <span class="org-type">-</span>10e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
Hc = 2.5<span class="org-type">*</span>H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
<pre class="src src-matlab">H = 200e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = <span class="org-type">-</span>10e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
Hc = 2.5<span class="org-type">*</span>H; <span class="org-comment">% Size of the useful part of the cube [m]</span>
FOc = H <span class="org-type">+</span> MO_B; <span class="org-comment">% Center of the cube with respect to {F}</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateCubicConfiguration(stewart, <span class="org-string">'Hc'</span>, Hc, <span class="org-string">'FOc'</span>, FOc, <span class="org-string">'FHa'</span>, 25e<span class="org-type">-</span>3, <span class="org-string">'MHb'</span>, 25e<span class="org-type">-</span>3);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, 1e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'C'</span>, 1e1<span class="org-type">*</span>ones(6,1));
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_F.Fa)), ...
<span class="org-string">'Mpm'</span>, 10, ...
<span class="org-string">'Mph'</span>, 20e<span class="org-type">-</span>3, ...
<span class="org-string">'Mpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_M.Mb)));
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'Fsm'</span>, 1e<span class="org-type">-</span>3, <span class="org-string">'Msm'</span>, 1e<span class="org-type">-</span>3);
stewart = initializeInertialSensor(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateCubicConfiguration(stewart, <span class="org-string">'Hc'</span>, Hc, <span class="org-string">'FOc'</span>, FOc, <span class="org-string">'FHa'</span>, 25e<span class="org-type">-</span>3, <span class="org-string">'MHb'</span>, 25e<span class="org-type">-</span>3);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, 1e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'C'</span>, 1e1<span class="org-type">*</span>ones(6,1));
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_F.Fa)), ...
<span class="org-string">'Mpm'</span>, 10, ...
<span class="org-string">'Mph'</span>, 20e<span class="org-type">-</span>3, ...
<span class="org-string">'Mpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_M.Mb)));
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'Fsm'</span>, 1e<span class="org-type">-</span>3, <span class="org-string">'Msm'</span>, 1e<span class="org-type">-</span>3);
stewart = initializeInertialSensor(stewart);
</pre>
</div>
@ -1622,15 +1622,15 @@ Let&rsquo;s generate a Cubic architecture where the cube&rsquo;s center and the
No flexibility below the Stewart platform and no payload.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> disturbances = initializeDisturbances();
references = initializeReferences(stewart);
<pre class="src src-matlab">disturbances = initializeDisturbances();
references = initializeReferences(stewart);
</pre>
</div>
@ -1669,26 +1669,26 @@ Now we generate a Stewart platform which is not cubic but with approximately the
</p>
<div class="org-src-container">
<pre class="src src-matlab"> H = 200e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = <span class="org-type">-</span>10e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
<pre class="src src-matlab">H = 200e<span class="org-type">-</span>3; <span class="org-comment">% height of the Stewart platform [m]</span>
MO_B = <span class="org-type">-</span>10e<span class="org-type">-</span>3; <span class="org-comment">% Position {B} with respect to {M} [m]</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateGeneralConfiguration(stewart, <span class="org-string">'FR'</span>, 250e<span class="org-type">-</span>3, <span class="org-string">'MR'</span>, 150e<span class="org-type">-</span>3);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, 1e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'C'</span>, 1e1<span class="org-type">*</span>ones(6,1));
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_F.Fa)), ...
<span class="org-string">'Mpm'</span>, 10, ...
<span class="org-string">'Mph'</span>, 20e<span class="org-type">-</span>3, ...
<span class="org-string">'Mpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_M.Mb)));
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'Fsm'</span>, 1e<span class="org-type">-</span>3, <span class="org-string">'Msm'</span>, 1e<span class="org-type">-</span>3);
stewart = initializeInertialSensor(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, H, <span class="org-string">'MO_B'</span>, MO_B);
stewart = generateGeneralConfiguration(stewart, <span class="org-string">'FR'</span>, 250e<span class="org-type">-</span>3, <span class="org-string">'MR'</span>, 150e<span class="org-type">-</span>3);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, <span class="org-string">'K'</span>, 1e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'C'</span>, 1e1<span class="org-type">*</span>ones(6,1));
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_F.Fa)), ...
<span class="org-string">'Mpm'</span>, 10, ...
<span class="org-string">'Mph'</span>, 20e<span class="org-type">-</span>3, ...
<span class="org-string">'Mpr'</span>, 1.2<span class="org-type">*</span>max(vecnorm(stewart.platform_M.Mb)));
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'Fsm'</span>, 1e<span class="org-type">-</span>3, <span class="org-string">'Msm'</span>, 1e<span class="org-type">-</span>3);
stewart = initializeInertialSensor(stewart);
</pre>
</div>
@ -1696,9 +1696,9 @@ Now we generate a Stewart platform which is not cubic but with approximately the
No flexibility below the Stewart platform and no payload.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
@ -1729,10 +1729,10 @@ And we identify the dynamics from the actuator forces \(\tau_{i}\) to the relati
</div>
</div>
<div id="outline-container-orgeb8ae82" class="outline-3">
<h3 id="orgeb8ae82"><span class="section-number-3">5.3</span> Conclusion</h3>
<div id="outline-container-org0348380" class="outline-3">
<h3 id="org0348380"><span class="section-number-3">5.3</span> Conclusion</h3>
<div class="outline-text-3" id="text-5-3">
<div class="important" id="org74729c6">
<div class="important" id="orgd92f0ac">
<p>
The Cubic architecture seems to not have any significant effect on the coupling between actuator and sensors of each strut and thus provides no advantages for decentralized control.
</p>
@ -1766,24 +1766,24 @@ This Matlab function is accessible <a href="../src/generateCubicConfiguration.m"
<h4 id="org2cafc68">Function description</h4>
<div class="outline-text-4" id="text-org2cafc68">
<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">% - geometry.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">% - platform_F.Fa [3x6] - Its i'th column is the position vector of joint ai with respect to {F}</span>
<span class="org-comment">% - platform_M.Mb [3x6] - Its i'th column is the position vector of joint bi with respect to {M}</span>
<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">% - geometry.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">% - platform_F.Fa [3x6] - Its i'th column is the position vector of joint ai with respect to {F}</span>
<span class="org-comment">% - platform_M.Mb [3x6] - Its i'th column is the position vector of joint bi with respect to {M}</span>
</pre>
</div>
</div>
@ -1805,13 +1805,13 @@ This Matlab function is accessible <a href="../src/generateCubicConfiguration.m"
<h4 id="org4fd2c96">Optional Parameters</h4>
<div class="outline-text-4" id="text-org4fd2c96">
<div class="org-src-container">
<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>.Hc (1,1) double {mustBeNumeric, mustBePositive} = 60e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.FOc (1,1) double {mustBeNumeric} = 50e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.FHa (1,1) double {mustBeNumeric, mustBeNonnegative} = 15e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.MHb (1,1) double {mustBeNumeric, mustBeNonnegative} = 15e<span class="org-type">-</span>3
<span class="org-keyword">end</span>
<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>.Hc (1,1) double {mustBeNumeric, mustBePositive} = 60e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.FOc (1,1) double {mustBeNumeric} = 50e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.FHa (1,1) double {mustBeNumeric, mustBeNonnegative} = 15e<span class="org-type">-</span>3
<span class="org-variable-name">args</span>.MHb (1,1) double {mustBeNumeric, mustBeNonnegative} = 15e<span class="org-type">-</span>3
<span class="org-keyword">end</span>
</pre>
</div>
</div>
@ -1821,8 +1821,8 @@ This Matlab function is accessible <a href="../src/generateCubicConfiguration.m"
<h4 id="orgac26a8b">Check the <code>stewart</code> structure elements</h4>
<div class="outline-text-4" id="text-orgac26a8b">
<div class="org-src-container">
<pre class="src src-matlab"> assert(isfield(stewart.geometry, <span class="org-string">'H'</span>), <span class="org-string">'stewart.geometry should have attribute H'</span>)
H = stewart.geometry.H;
<pre class="src src-matlab">assert(isfield(stewart.geometry, <span class="org-string">'H'</span>), <span class="org-string">'stewart.geometry should have attribute H'</span>)
H = stewart.geometry.H;
</pre>
</div>
</div>
@ -1837,18 +1837,18 @@ We define the useful points of the cube with respect to the Cube&rsquo;s center.
</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];
<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]);
R = [sx, sy, sz]<span class="org-type">./</span>vecnorm([sx, sy, sz]);
L = args.Hc<span class="org-type">*</span>sqrt(3);
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];
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>
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>
@ -1861,7 +1861,7 @@ We define the useful points of the cube with respect to the Cube&rsquo;s center.
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 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>
@ -1869,8 +1869,8 @@ We can compute the vector of each leg \({}^{C}\hat{\bm{s}}_{i}\) (unit vector fr
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"> 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;
Mb = CCf <span class="org-type">+</span> [0; 0; args.FOc<span class="org-type">-</span>H] <span class="org-type">+</span> ((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 class="src src-matlab">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;
Mb = CCf <span class="org-type">+</span> [0; 0; args.FOc<span class="org-type">-</span>H] <span class="org-type">+</span> ((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>
@ -1880,8 +1880,8 @@ We now which to compute the position of the joints \(a_{i}\) and \(b_{i}\).
<h4 id="org153763b">Populate the <code>stewart</code> structure</h4>
<div class="outline-text-4" id="text-org153763b">
<div class="org-src-container">
<pre class="src src-matlab"> stewart.platform_F.Fa = Fa;
stewart.platform_M.Mb = Mb;
<pre class="src src-matlab">stewart.platform_F.Fa = Fa;
stewart.platform_M.Mb = Mb;
</pre>
</div>
</div>
@ -1905,7 +1905,7 @@ We now which to compute the position of the joints \(a_{i}\) and \(b_{i}\).
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-01-08 ven. 15:30</p>
<p class="date">Created: 2021-01-08 ven. 15:52</p>
</div>
</body>
</html>

View File

@ -3,7 +3,7 @@
"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-01-08 ven. 15:30 -->
<!-- 2021-01-08 ven. 15:52 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Stewart Platform - Dynamics Study</title>
<meta name="generator" content="Org mode" />
@ -43,13 +43,13 @@
<ul>
<li><a href="#orgc730bef">1.1. Comparison with fixed support</a></li>
<li><a href="#orgefde538">1.2. Comparison with a flexible support</a></li>
<li><a href="#org53765b8">1.3. Conclusion</a></li>
<li><a href="#orga9eb2fd">1.3. Conclusion</a></li>
</ul>
</li>
<li><a href="#orgb6a1ef7">2. Comparison of the static transfer function and the Compliance matrix</a>
<ul>
<li><a href="#org3f1c253">2.1. Analysis</a></li>
<li><a href="#orga9eb2fd">2.2. Conclusion</a></li>
<li><a href="#orge261263">2.2. Conclusion</a></li>
</ul>
</li>
</ul>
@ -71,17 +71,17 @@ In this section, we wish to compare the effect of forces/torques applied by the
Let&rsquo;s generate a Stewart platform.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
</pre>
</div>
@ -90,9 +90,9 @@ We don&rsquo;t put any flexibility below the Stewart platform such that <b>its b
We also don&rsquo;t put any payload on top of the Stewart platform.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
@ -100,22 +100,22 @@ We also don&rsquo;t put any payload on top of the Stewart platform.
The transfer function from actuator forces \(\bm{\tau}\) to the relative displacement of the mobile platform \(\mathcal{\bm{X}}\) is extracted.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Position/Orientation of {B} w.r.t. {A}</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Position/Orientation of {B} w.r.t. {A}</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
</pre>
</div>
@ -123,8 +123,8 @@ The transfer function from actuator forces \(\bm{\tau}\) to the relative displac
Using the Jacobian matrix, we compute the transfer function from force/torques applied by the actuators on the frame \(\{B\}\) fixed to the mobile platform:
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Gc = minreal(G<span class="org-type">*</span>inv(stewart.kinematics.J<span class="org-type">'</span>));
Gc.InputName = {<span class="org-string">'Fnx'</span>, <span class="org-string">'Fny'</span>, <span class="org-string">'Fnz'</span>, <span class="org-string">'Mnx'</span>, <span class="org-string">'Mny'</span>, <span class="org-string">'Mnz'</span>};
<pre class="src src-matlab">Gc = minreal(G<span class="org-type">*</span>inv(stewart.kinematics.J<span class="org-type">'</span>));
Gc.InputName = {<span class="org-string">'Fnx'</span>, <span class="org-string">'Fny'</span>, <span class="org-string">'Fnz'</span>, <span class="org-string">'Mnx'</span>, <span class="org-string">'Mny'</span>, <span class="org-string">'Mnz'</span>};
</pre>
</div>
@ -132,15 +132,15 @@ Using the Jacobian matrix, we compute the transfer function from force/torques a
We also extract the transfer function from external forces \(\bm{\mathcal{F}}_{\text{ext}}\) on the frame \(\{B\}\) fixed to the mobile platform to the relative displacement \(\mathcal{\bm{X}}\) of \(\{B\}\) with respect to frame \(\{A\}\):
</p>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances'</span>], 1, <span class="org-string">'openinput'</span>, [], <span class="org-string">'F_ext'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% External forces/torques applied on {B}</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Position/Orientation of {B} w.r.t. {A}</span>
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances'</span>], 1, <span class="org-string">'openinput'</span>, [], <span class="org-string">'F_ext'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% External forces/torques applied on {B}</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Position/Orientation of {B} w.r.t. {A}</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
Gd = linearize(mdl, io, options);
Gd.InputName = {<span class="org-string">'Fex'</span>, <span class="org-string">'Fey'</span>, <span class="org-string">'Fez'</span>, <span class="org-string">'Mex'</span>, <span class="org-string">'Mey'</span>, <span class="org-string">'Mez'</span>};
Gd.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
Gd = linearize(mdl, io, options);
Gd.InputName = {<span class="org-string">'Fex'</span>, <span class="org-string">'Fey'</span>, <span class="org-string">'Fez'</span>, <span class="org-string">'Mex'</span>, <span class="org-string">'Mey'</span>, <span class="org-string">'Mez'</span>};
Gd.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
</pre>
</div>
@ -175,7 +175,7 @@ This can be understood from figure <a href="#orgd6db375">2</a> where \(\mathcal{
We now add a flexible support under the Stewart platform.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'flexible'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'flexible'</span>);
</pre>
</div>
@ -183,28 +183,28 @@ We now add a flexible support under the Stewart platform.
And we perform again the identification.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Position/Orientation of {B} w.r.t. {A}</span>
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Position/Orientation of {B} w.r.t. {A}</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
Gc = minreal(G<span class="org-type">*</span>inv(stewart.kinematics.J<span class="org-type">'</span>));
Gc.InputName = {<span class="org-string">'Fnx'</span>, <span class="org-string">'Fny'</span>, <span class="org-string">'Fnz'</span>, <span class="org-string">'Mnx'</span>, <span class="org-string">'Mny'</span>, <span class="org-string">'Mnz'</span>};
Gc = minreal(G<span class="org-type">*</span>inv(stewart.kinematics.J<span class="org-type">'</span>));
Gc.InputName = {<span class="org-string">'Fnx'</span>, <span class="org-string">'Fny'</span>, <span class="org-string">'Fnz'</span>, <span class="org-string">'Mnx'</span>, <span class="org-string">'Mny'</span>, <span class="org-string">'Mnz'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances'</span>], 1, <span class="org-string">'openinput'</span>, [], <span class="org-string">'F_ext'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% External forces/torques applied on {B}</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Position/Orientation of {B} w.r.t. {A}</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances'</span>], 1, <span class="org-string">'openinput'</span>, [], <span class="org-string">'F_ext'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% External forces/torques applied on {B}</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Position/Orientation of {B} w.r.t. {A}</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
Gd = linearize(mdl, io, options);
Gd.InputName = {<span class="org-string">'Fex'</span>, <span class="org-string">'Fey'</span>, <span class="org-string">'Fez'</span>, <span class="org-string">'Mex'</span>, <span class="org-string">'Mey'</span>, <span class="org-string">'Mez'</span>};
Gd.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
Gd = linearize(mdl, io, options);
Gd.InputName = {<span class="org-string">'Fex'</span>, <span class="org-string">'Fey'</span>, <span class="org-string">'Fez'</span>, <span class="org-string">'Mex'</span>, <span class="org-string">'Mey'</span>, <span class="org-string">'Mez'</span>};
Gd.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
</pre>
</div>
@ -235,10 +235,10 @@ And thus \(\mathcal{F}_{x}\) and \(\mathcal{F}_{x,\text{ext}}\) have clearly <b>
</div>
<div id="outline-container-org53765b8" class="outline-3">
<h3 id="org53765b8"><span class="section-number-3">1.3</span> Conclusion</h3>
<div id="outline-container-orga9eb2fd" class="outline-3">
<h3 id="orga9eb2fd"><span class="section-number-3">1.3</span> Conclusion</h3>
<div class="outline-text-3" id="text-1-3">
<div class="important" id="org35e4b5f">
<div class="important" id="org4878fef">
<p>
The transfer function from forces/torques applied by the actuators on the payload \(\bm{\mathcal{F}} = \bm{J}^T \bm{\tau}\) to the pose of the mobile platform \(\bm{\mathcal{X}}\) is the same as the transfer function from external forces/torques to \(\bm{\mathcal{X}}\) as long as the Stewart platform&rsquo;s base is fixed.
</p>
@ -263,17 +263,17 @@ In this section, we see how the Compliance matrix of the Stewart platform is lin
Initialization of the Stewart platform.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
</pre>
</div>
@ -281,9 +281,9 @@ Initialization of the Stewart platform.
No flexibility below the Stewart platform and no payload.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
@ -291,28 +291,28 @@ No flexibility below the Stewart platform and no payload.
Estimation of the transfer function from \(\mathcal{\bm{F}}\) to \(\mathcal{\bm{X}}\):
</p>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Position/Orientation of {B} w.r.t. {A}</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Position/Orientation of {B} w.r.t. {A}</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> Gc = minreal(G<span class="org-type">*</span>inv(stewart.kinematics.J<span class="org-type">'</span>));
Gc.InputName = {<span class="org-string">'Fnx'</span>, <span class="org-string">'Fny'</span>, <span class="org-string">'Fnz'</span>, <span class="org-string">'Mnx'</span>, <span class="org-string">'Mny'</span>, <span class="org-string">'Mnz'</span>};
<pre class="src src-matlab">Gc = minreal(G<span class="org-type">*</span>inv(stewart.kinematics.J<span class="org-type">'</span>));
Gc.InputName = {<span class="org-string">'Fnx'</span>, <span class="org-string">'Fny'</span>, <span class="org-string">'Fnz'</span>, <span class="org-string">'Mnx'</span>, <span class="org-string">'Mny'</span>, <span class="org-string">'Mnz'</span>};
</pre>
</div>
@ -470,10 +470,10 @@ And now at the Compliance matrix.
</div>
</div>
<div id="outline-container-orga9eb2fd" class="outline-3">
<h3 id="orga9eb2fd"><span class="section-number-3">2.2</span> Conclusion</h3>
<div id="outline-container-orge261263" class="outline-3">
<h3 id="orge261263"><span class="section-number-3">2.2</span> Conclusion</h3>
<div class="outline-text-3" id="text-2-2">
<div class="important" id="orgcecc007">
<div class="important" id="org2428297">
<p>
The low frequency transfer function matrix from \(\mathcal{\bm{F}}\) to \(\mathcal{\bm{X}}\) corresponds to the compliance matrix of the Stewart platform.
</p>
@ -485,7 +485,7 @@ The low frequency transfer function matrix from \(\mathcal{\bm{F}}\) to \(\mathc
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-01-08 ven. 15:30</p>
<p class="date">Created: 2021-01-08 ven. 15:52</p>
</div>
</body>
</html>

View File

@ -3,7 +3,7 @@
"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-01-08 ven. 15:29 -->
<!-- 2021-01-08 ven. 15:52 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Stewart Platform with Flexible Elements</title>
<meta name="generator" content="Org mode" />
@ -24,48 +24,48 @@
<ul>
<li><a href="#orgc309c7b">1. Simscape Model</a>
<ul>
<li><a href="#orgae23ac5">1.1. Flexible APA</a></li>
<li><a href="#org0e00e94">1.1. Flexible APA</a></li>
<li><a href="#orgf337fe9">1.2. Flexible Joint</a></li>
<li><a href="#orga8d83ce">1.3. Identification</a></li>
<li><a href="#orgc239ed1">1.3. Identification</a></li>
<li><a href="#org59e4972">1.4. No Flexible Elements</a></li>
<li><a href="#orgb06052a">1.5. Flexible joints</a></li>
<li><a href="#org0e00e94">1.6. Flexible APA</a></li>
<li><a href="#org4cccff6">1.6. Flexible APA</a></li>
<li><a href="#org4f41f14">1.7. Flexible Joints and APA</a></li>
<li><a href="#orga39e477">1.8. Save</a></li>
<li><a href="#org1e66228">1.9. Direct Velocity Feedback</a></li>
<li><a href="#orgef60bbc">1.10. Integral Force Feedback</a></li>
<li><a href="#org50fdd32">1.11. Procedure to include flexible elements into Simscape</a></li>
<li><a href="#org52c4099">1.12. Conclusion</a></li>
<li><a href="#org55fe34f">1.12. Conclusion</a></li>
</ul>
</li>
<li><a href="#org2d65f84">2. Control with flexible elements</a>
<ul>
<li><a href="#org7f0d75c">2.1. Flexible APA and Flexible Joint</a></li>
<li><a href="#orgc239ed1">2.2. Identification</a></li>
<li><a href="#org5f84aea">2.2. Identification</a></li>
<li><a href="#org5ae25be">2.3. Decentralized Direct Velocity Feedback</a></li>
<li><a href="#org3d014d0">2.4. HAC</a></li>
</ul>
</li>
<li><a href="#org2b937bc">3. Flexible Joint Specifications</a>
<ul>
<li><a href="#org166293c">3.1. Stewart Platform Initialization</a></li>
<li><a href="#org775a387">3.1. Stewart Platform Initialization</a></li>
<li><a href="#orgc430963">3.2. Effect of the Bending Stiffness</a></li>
<li><a href="#orgb29824b">3.3. Effect of the Torsion Stiffness</a></li>
<li><a href="#org6d029b0">3.4. Effect of the Axial Stiffness</a></li>
<li><a href="#org5177329">3.5. Effect of the Radial (Shear) Stiffness</a></li>
<li><a href="#orgd67ef9e">3.6. Comparison of perfect joint and worst specified joint</a></li>
<li><a href="#org55fe34f">3.7. Conclusion</a></li>
<li><a href="#orge0f8240">3.6. Comparison of perfect joint and worst specified joint</a></li>
<li><a href="#org79b6e2d">3.7. Conclusion</a></li>
</ul>
</li>
<li><a href="#org8798d60">4. Flexible Joint Specifications with the APA300ML</a>
<ul>
<li><a href="#org6fc554b">4.1. Stewart Platform Initialization</a></li>
<li><a href="#orge0f8240">4.2. Comparison of perfect joint and worst specified joint</a></li>
<li><a href="#org6d56b33">4.1. Stewart Platform Initialization</a></li>
<li><a href="#orgdc3d576">4.2. Comparison of perfect joint and worst specified joint</a></li>
</ul>
</li>
<li><a href="#orgbae1ad3">5. Relative Motion Sensors</a>
<ul>
<li><a href="#org775a387">5.1. Stewart Platform Initialization</a></li>
<li><a href="#org74f7ec9">5.1. Stewart Platform Initialization</a></li>
</ul>
</li>
<li><a href="#orgb454975">6. Struts with Encoders</a>
@ -82,11 +82,11 @@
<h2 id="orgc309c7b"><span class="section-number-2">1</span> Simscape Model</h2>
<div class="outline-text-2" id="text-1">
</div>
<div id="outline-container-orgae23ac5" class="outline-3">
<h3 id="orgae23ac5"><span class="section-number-3">1.1</span> Flexible APA</h3>
<div id="outline-container-org0e00e94" class="outline-3">
<h3 id="org0e00e94"><span class="section-number-3">1.1</span> Flexible APA</h3>
<div class="outline-text-3" id="text-1-1">
<div class="org-src-container">
<pre class="src src-matlab"> apa = load(<span class="org-string">'./mat/APA300ML.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
<pre class="src src-matlab">apa = load(<span class="org-string">'./mat/APA300ML.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
</pre>
</div>
@ -209,7 +209,7 @@
<h3 id="orgf337fe9"><span class="section-number-3">1.2</span> Flexible Joint</h3>
<div class="outline-text-3" id="text-1-2">
<div class="org-src-container">
<pre class="src src-matlab"> flex_joint = load(<span class="org-string">'./mat/flexor_025.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
<pre class="src src-matlab">flex_joint = load(<span class="org-string">'./mat/flexor_025.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
</pre>
</div>
@ -325,37 +325,37 @@
</div>
</div>
<div id="outline-container-orga8d83ce" class="outline-3">
<h3 id="orga8d83ce"><span class="section-number-3">1.3</span> Identification</h3>
<div id="outline-container-orgc239ed1" class="outline-3">
<h3 id="orgc239ed1"><span class="section-number-3">1.3</span> Identification</h3>
<div class="outline-text-3" id="text-1-3">
<p>
And we identify the dynamics from force actuators to force sensors.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'dLm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'Taum'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Force Sensors [N]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'dLm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'Taum'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Force Sensors [N]</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'m'</span>, 50);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'m'</span>, 50);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> disturbances = initializeDisturbances();
<pre class="src src-matlab">disturbances = initializeDisturbances();
</pre>
</div>
</div>
@ -365,36 +365,36 @@ And we identify the dynamics from force actuators to force sensors.
<h3 id="org59e4972"><span class="section-number-3">1.4</span> No Flexible Elements</h3>
<div class="outline-text-3" id="text-1-4">
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeAmplifiedStrutDynamics(stewart, <span class="org-string">'Ke'</span>, 1.5e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'Ka'</span>, 40.5e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'K1'</span>, 0.4e6<span class="org-type">*</span>ones(6,1));
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_3dof'</span>, ...
<span class="org-string">'Kr_M'</span>, flex_joint.K(1,1)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Ka_M'</span>, flex_joint.K(3,3)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kf_M'</span>, flex_joint.K(4,4)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kt_M'</span>, flex_joint.K(6,6)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'type_F'</span>, <span class="org-string">'universal_3dof'</span>, ...
<span class="org-string">'Kr_F'</span>, flex_joint.K(1,1)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Ka_F'</span>, flex_joint.K(3,3)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kf_F'</span>, flex_joint.K(4,4)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kt_F'</span>, flex_joint.K(6,6)<span class="org-type">*</span>ones(6,1));
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeAmplifiedStrutDynamics(stewart, <span class="org-string">'Ke'</span>, 1.5e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'Ka'</span>, 40.5e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'K1'</span>, 0.4e6<span class="org-type">*</span>ones(6,1));
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_3dof'</span>, ...
<span class="org-string">'Kr_M'</span>, flex_joint.K(1,1)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Ka_M'</span>, flex_joint.K(3,3)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kf_M'</span>, flex_joint.K(4,4)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kt_M'</span>, flex_joint.K(6,6)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'type_F'</span>, <span class="org-string">'universal_3dof'</span>, ...
<span class="org-string">'Kr_F'</span>, flex_joint.K(1,1)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Ka_F'</span>, flex_joint.K(3,3)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kf_F'</span>, flex_joint.K(4,4)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kt_F'</span>, flex_joint.K(6,6)<span class="org-type">*</span>ones(6,1));
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
references = initializeReferences(stewart);
references = initializeReferences(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>, <span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>, <span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
</pre>
</div>
</div>
@ -411,32 +411,32 @@ And we identify the dynamics from force actuators to force sensors.
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeAmplifiedStrutDynamics(stewart, <span class="org-string">'Ke'</span>, 1.5e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'Ka'</span>, 40.5e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'K1'</span>, 0.4e6<span class="org-type">*</span>ones(6,1));
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_F'</span>, flex_joint.K, <span class="org-string">'M_F'</span>, flex_joint.M, <span class="org-string">'n_xyz_F'</span>, flex_joint.n_xyz, <span class="org-string">'xi_F'</span>, 0.1, <span class="org-string">'step_file_F'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_M'</span>, flex_joint.K, <span class="org-string">'M_M'</span>, flex_joint.M, <span class="org-string">'n_xyz_M'</span>, flex_joint.n_xyz, <span class="org-string">'xi_M'</span>, 0.1, <span class="org-string">'step_file_M'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeAmplifiedStrutDynamics(stewart, <span class="org-string">'Ke'</span>, 1.5e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'Ka'</span>, 40.5e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'K1'</span>, 0.4e6<span class="org-type">*</span>ones(6,1));
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_F'</span>, flex_joint.K, <span class="org-string">'M_F'</span>, flex_joint.M, <span class="org-string">'n_xyz_F'</span>, flex_joint.n_xyz, <span class="org-string">'xi_F'</span>, 0.1, <span class="org-string">'step_file_F'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_M'</span>, flex_joint.K, <span class="org-string">'M_M'</span>, flex_joint.M, <span class="org-string">'n_xyz_M'</span>, flex_joint.n_xyz, <span class="org-string">'xi_M'</span>, 0.1, <span class="org-string">'step_file_M'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
Gj = linearize(mdl, io, options);
Gj.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gj.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>, <span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
Gj = linearize(mdl, io, options);
Gj.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gj.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>, <span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
</pre>
</div>
</div>
</div>
<div id="outline-container-org0e00e94" class="outline-3">
<h3 id="org0e00e94"><span class="section-number-3">1.6</span> Flexible APA</h3>
<div id="outline-container-org4cccff6" class="outline-3">
<h3 id="org4cccff6"><span class="section-number-3">1.6</span> Flexible APA</h3>
<div class="outline-text-3" id="text-1-6">
<div id="org6abb282" class="figure">
@ -446,34 +446,34 @@ And we identify the dynamics from force actuators to force sensors.
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeFlexibleStrutDynamics(stewart, <span class="org-string">'H'</span>, 0.03, <span class="org-string">'K'</span>, apa.K, <span class="org-string">'M'</span>, apa.M, <span class="org-string">'n_xyz'</span>, apa.n_xyz, <span class="org-string">'xi'</span>, 0.1, <span class="org-string">'Gf'</span>, <span class="org-type">-</span>2.65e7, <span class="org-string">'step_file'</span>, <span class="org-string">'mat/APA300ML.STEP'</span>);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_3dof'</span>, ...
<span class="org-string">'Kr_M'</span>, flex_joint.K(1,1)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Ka_M'</span>, flex_joint.K(3,3)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kf_M'</span>, flex_joint.K(4,4)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kt_M'</span>, flex_joint.K(6,6)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'type_F'</span>, <span class="org-string">'universal_3dof'</span>, ...
<span class="org-string">'Kr_F'</span>, flex_joint.K(1,1)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Ka_F'</span>, flex_joint.K(3,3)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kf_F'</span>, flex_joint.K(4,4)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kt_F'</span>, flex_joint.K(6,6)<span class="org-type">*</span>ones(6,1));
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'none'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'none'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeFlexibleStrutDynamics(stewart, <span class="org-string">'H'</span>, 0.03, <span class="org-string">'K'</span>, apa.K, <span class="org-string">'M'</span>, apa.M, <span class="org-string">'n_xyz'</span>, apa.n_xyz, <span class="org-string">'xi'</span>, 0.1, <span class="org-string">'Gf'</span>, <span class="org-type">-</span>2.65e7, <span class="org-string">'step_file'</span>, <span class="org-string">'mat/APA300ML.STEP'</span>);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_3dof'</span>, ...
<span class="org-string">'Kr_M'</span>, flex_joint.K(1,1)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Ka_M'</span>, flex_joint.K(3,3)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kf_M'</span>, flex_joint.K(4,4)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kt_M'</span>, flex_joint.K(6,6)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'type_F'</span>, <span class="org-string">'universal_3dof'</span>, ...
<span class="org-string">'Kr_F'</span>, flex_joint.K(1,1)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Ka_F'</span>, flex_joint.K(3,3)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kf_F'</span>, flex_joint.K(4,4)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kt_F'</span>, flex_joint.K(6,6)<span class="org-type">*</span>ones(6,1));
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'none'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'none'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
Ga = <span class="org-type">-</span>linearize(mdl, io, options);
Ga.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Ga.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>, <span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
Ga = <span class="org-type">-</span>linearize(mdl, io, options);
Ga.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Ga.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>, <span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
</pre>
</div>
</div>
@ -490,24 +490,24 @@ And we identify the dynamics from force actuators to force sensors.
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeFlexibleStrutDynamics(stewart, <span class="org-string">'H'</span>, 0.03, <span class="org-string">'K'</span>, apa.K, <span class="org-string">'M'</span>, apa.M, <span class="org-string">'n_xyz'</span>, apa.n_xyz, <span class="org-string">'xi'</span>, 0.1, <span class="org-string">'Gf'</span>, <span class="org-type">-</span>2.65e7, <span class="org-string">'step_file'</span>, <span class="org-string">'mat/APA300ML.STEP'</span>);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_F'</span>, flex_joint.K, <span class="org-string">'M_F'</span>, flex_joint.M, <span class="org-string">'n_xyz_F'</span>, flex_joint.n_xyz, <span class="org-string">'xi_F'</span>, 0.1, <span class="org-string">'step_file_F'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_M'</span>, flex_joint.K, <span class="org-string">'M_M'</span>, flex_joint.M, <span class="org-string">'n_xyz_M'</span>, flex_joint.n_xyz, <span class="org-string">'xi_M'</span>, 0.1, <span class="org-string">'step_file_M'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'none'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'none'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeFlexibleStrutDynamics(stewart, <span class="org-string">'H'</span>, 0.03, <span class="org-string">'K'</span>, apa.K, <span class="org-string">'M'</span>, apa.M, <span class="org-string">'n_xyz'</span>, apa.n_xyz, <span class="org-string">'xi'</span>, 0.1, <span class="org-string">'Gf'</span>, <span class="org-type">-</span>2.65e7, <span class="org-string">'step_file'</span>, <span class="org-string">'mat/APA300ML.STEP'</span>);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_F'</span>, flex_joint.K, <span class="org-string">'M_F'</span>, flex_joint.M, <span class="org-string">'n_xyz_F'</span>, flex_joint.n_xyz, <span class="org-string">'xi_F'</span>, 0.1, <span class="org-string">'step_file_F'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_M'</span>, flex_joint.K, <span class="org-string">'M_M'</span>, flex_joint.M, <span class="org-string">'n_xyz_M'</span>, flex_joint.n_xyz, <span class="org-string">'xi_M'</span>, 0.1, <span class="org-string">'step_file_M'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'none'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'none'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> Gf = <span class="org-type">-</span>linearize(mdl, io, options);
Gf.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gf.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>, <span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
<pre class="src src-matlab">Gf = <span class="org-type">-</span>linearize(mdl, io, options);
Gf.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
Gf.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>, <span class="org-string">'Fm1'</span>, <span class="org-string">'Fm2'</span>, <span class="org-string">'Fm3'</span>, <span class="org-string">'Fm4'</span>, <span class="org-string">'Fm5'</span>, <span class="org-string">'Fm6'</span>};
</pre>
</div>
</div>
@ -517,7 +517,7 @@ And we identify the dynamics from force actuators to force sensors.
<h3 id="orga39e477"><span class="section-number-3">1.8</span> Save</h3>
<div class="outline-text-3" id="text-1-8">
<div class="org-src-container">
<pre class="src src-matlab"> save(<span class="org-string">'./mat/flexible_stewart_platform.mat'</span>, <span class="org-string">'G'</span>, <span class="org-string">'Gj'</span>, <span class="org-string">'Ga'</span>, <span class="org-string">'Gf'</span>);
<pre class="src src-matlab">save(<span class="org-string">'./mat/flexible_stewart_platform.mat'</span>, <span class="org-string">'G'</span>, <span class="org-string">'Gj'</span>, <span class="org-string">'Ga'</span>, <span class="org-string">'Gf'</span>);
</pre>
</div>
</div>
@ -566,10 +566,10 @@ In order to model a flexible element with only few mass-spring-damper elements:
</div>
</div>
<div id="outline-container-org52c4099" class="outline-3">
<h3 id="org52c4099"><span class="section-number-3">1.12</span> Conclusion</h3>
<div id="outline-container-org55fe34f" class="outline-3">
<h3 id="org55fe34f"><span class="section-number-3">1.12</span> Conclusion</h3>
<div class="outline-text-3" id="text-1-12">
<div class="important" id="org7acf160">
<div class="important" id="orgba069e0">
<p>
The results seems to indicate that the model is well represented with only few degrees of freedom.
This permit to have a relatively sane number of states for the model.
@ -588,66 +588,66 @@ This permit to have a relatively sane number of states for the model.
<h3 id="org7f0d75c"><span class="section-number-3">2.1</span> Flexible APA and Flexible Joint</h3>
<div class="outline-text-3" id="text-2-1">
<div class="org-src-container">
<pre class="src src-matlab"> apa = load(<span class="org-string">'./mat/APA300ML.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
flex_joint = load(<span class="org-string">'./mat/flexor_ID16.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
<pre class="src src-matlab">apa = load(<span class="org-string">'./mat/APA300ML.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
flex_joint = load(<span class="org-string">'./mat/flexor_ID16.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeFlexibleStrutDynamics(stewart, <span class="org-string">'H'</span>, 0.03, <span class="org-string">'K'</span>, apa.K, <span class="org-string">'M'</span>, apa.M, <span class="org-string">'n_xyz'</span>, apa.n_xyz, <span class="org-string">'xi'</span>, 0.1, <span class="org-string">'step_file'</span>, <span class="org-string">'mat/APA300ML.STEP'</span>);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_F'</span>, flex_joint.K, <span class="org-string">'M_F'</span>, flex_joint.M, <span class="org-string">'n_xyz_F'</span>, flex_joint.n_xyz, <span class="org-string">'xi_F'</span>, 0.1, <span class="org-string">'step_file_F'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_M'</span>, flex_joint.K, <span class="org-string">'M_M'</span>, flex_joint.M, <span class="org-string">'n_xyz_M'</span>, flex_joint.n_xyz, <span class="org-string">'xi_M'</span>, 0.1, <span class="org-string">'step_file_M'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'none'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'none'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeFlexibleStrutDynamics(stewart, <span class="org-string">'H'</span>, 0.03, <span class="org-string">'K'</span>, apa.K, <span class="org-string">'M'</span>, apa.M, <span class="org-string">'n_xyz'</span>, apa.n_xyz, <span class="org-string">'xi'</span>, 0.1, <span class="org-string">'step_file'</span>, <span class="org-string">'mat/APA300ML.STEP'</span>);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_F'</span>, flex_joint.K, <span class="org-string">'M_F'</span>, flex_joint.M, <span class="org-string">'n_xyz_F'</span>, flex_joint.n_xyz, <span class="org-string">'xi_F'</span>, 0.1, <span class="org-string">'step_file_F'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_M'</span>, flex_joint.K, <span class="org-string">'M_M'</span>, flex_joint.M, <span class="org-string">'n_xyz_M'</span>, flex_joint.n_xyz, <span class="org-string">'xi_M'</span>, 0.1, <span class="org-string">'step_file_M'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'none'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'none'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'m'</span>, 50);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'m'</span>, 50);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> disturbances = initializeDisturbances();
references = initializeReferences(stewart);
<pre class="src src-matlab">disturbances = initializeDisturbances();
references = initializeReferences(stewart);
</pre>
</div>
</div>
</div>
<div id="outline-container-orgc239ed1" class="outline-3">
<h3 id="orgc239ed1"><span class="section-number-3">2.2</span> Identification</h3>
<div id="outline-container-org5f84aea" class="outline-3">
<h3 id="org5f84aea"><span class="section-number-3">2.2</span> Identification</h3>
<div class="outline-text-3" id="text-2-2">
<p>
And we identify the dynamics from force actuators to force sensors.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'dLm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'dLm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> G = <span class="org-type">-</span>linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>};
<pre class="src src-matlab">G = <span class="org-type">-</span>linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>};
</pre>
</div>
</div>
@ -660,12 +660,12 @@ And we identify the dynamics from force actuators to force sensors.
Controller Design
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Kl = <span class="org-type">-</span>1e5<span class="org-type">*</span>s<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">/</span>2e2)<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">/</span>5e2) <span class="org-type">*</span> eye(6);
<pre class="src src-matlab">Kl = <span class="org-type">-</span>1e5<span class="org-type">*</span>s<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">/</span>2e2)<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">/</span>5e2) <span class="org-type">*</span> eye(6);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> isstable(feedback(G(1<span class="org-type">:</span>6,1<span class="org-type">:</span>6)<span class="org-type">*</span>Kl, eye(6), <span class="org-type">-</span>1))
<pre class="src src-matlab">isstable(feedback(G(1<span class="org-type">:</span>6,1<span class="org-type">:</span>6)<span class="org-type">*</span>Kl, eye(6), <span class="org-type">-</span>1))
</pre>
</div>
@ -679,37 +679,37 @@ Controller Design
<h3 id="org3d014d0"><span class="section-number-3">2.4</span> HAC</h3>
<div class="outline-text-3" id="text-2-4">
<div class="org-src-container">
<pre class="src src-matlab"> Kx = tf(zeros(6));
<pre class="src src-matlab">Kx = tf(zeros(6));
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'ref-track-hac-dvf'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'ref-track-hac-dvf'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'input'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'input'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Dx'</span>, <span class="org-string">'Dy'</span>, <span class="org-string">'Dz'</span>, <span class="org-string">'Rx'</span>, <span class="org-string">'Ry'</span>, <span class="org-string">'Rz'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Dx'</span>, <span class="org-string">'Dy'</span>, <span class="org-string">'Dz'</span>, <span class="org-string">'Rx'</span>, <span class="org-string">'Ry'</span>, <span class="org-string">'Rz'</span>};
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> Gl = <span class="org-type">-</span>stewart.kinematics.J<span class="org-type">*</span>G;
Gl.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
<pre class="src src-matlab">Gl = <span class="org-type">-</span>stewart.kinematics.J<span class="org-type">*</span>G;
Gl.OutputName = {<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> wc = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>300;
Kl = diag(1<span class="org-type">./</span>diag(abs(freqresp(Gl, wc)))) <span class="org-type">*</span> wc<span class="org-type">/</span>s <span class="org-type">*</span> 1<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>3<span class="org-type">/</span>wc);
<pre class="src src-matlab">wc = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>300;
Kl = diag(1<span class="org-type">./</span>diag(abs(freqresp(Gl, wc)))) <span class="org-type">*</span> wc<span class="org-type">/</span>s <span class="org-type">*</span> 1<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>3<span class="org-type">/</span>wc);
</pre>
</div>
</div>
@ -720,39 +720,39 @@ Controller Design
<h2 id="org2b937bc"><span class="section-number-2">3</span> Flexible Joint Specifications</h2>
<div class="outline-text-2" id="text-3">
</div>
<div id="outline-container-org166293c" class="outline-3">
<h3 id="org166293c"><span class="section-number-3">3.1</span> Stewart Platform Initialization</h3>
<div id="outline-container-org775a387" class="outline-3">
<h3 id="org775a387"><span class="section-number-3">3.1</span> Stewart Platform Initialization</h3>
<div class="outline-text-3" id="text-3-1">
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeAmplifiedStrutDynamics(stewart, <span class="org-string">'Ke'</span>, 1.5e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'Ka'</span>, 43e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'K1'</span>, 0.4e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'C1'</span>, 10<span class="org-type">*</span>ones(6,1));
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeAmplifiedStrutDynamics(stewart, <span class="org-string">'Ke'</span>, 1.5e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'Ka'</span>, 43e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'K1'</span>, 0.4e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'C1'</span>, 10<span class="org-type">*</span>ones(6,1));
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
references = initializeReferences(stewart);
references = initializeReferences(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'m'</span>, 50);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'m'</span>, 50);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> disturbances = initializeDisturbances();
<pre class="src src-matlab">disturbances = initializeDisturbances();
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> open(<span class="org-string">'stewart_platform_model.slx'</span>)
<pre class="src src-matlab">open(<span class="org-string">'stewart_platform_model.slx'</span>)
</pre>
</div>
</div>
@ -762,7 +762,7 @@ Controller Design
<h3 id="orgc430963"><span class="section-number-3">3.2</span> Effect of the Bending Stiffness</h3>
<div class="outline-text-3" id="text-3-2">
<div class="org-src-container">
<pre class="src src-matlab"> Kfs = [1, 10, 100, 1000]; <span class="org-comment">% [Nm/rad]</span>
<pre class="src src-matlab">Kfs = [1, 10, 100, 1000]; <span class="org-comment">% [Nm/rad]</span>
</pre>
</div>
</div>
@ -772,7 +772,7 @@ Controller Design
<h3 id="orgb29824b"><span class="section-number-3">3.3</span> Effect of the Torsion Stiffness</h3>
<div class="outline-text-3" id="text-3-3">
<div class="org-src-container">
<pre class="src src-matlab"> Kts = [10, 100, 500, 1000]; <span class="org-comment">% [Nm/rad]</span>
<pre class="src src-matlab">Kts = [10, 100, 500, 1000]; <span class="org-comment">% [Nm/rad]</span>
</pre>
</div>
</div>
@ -782,7 +782,7 @@ Controller Design
<h3 id="org6d029b0"><span class="section-number-3">3.4</span> Effect of the Axial Stiffness</h3>
<div class="outline-text-3" id="text-3-4">
<div class="org-src-container">
<pre class="src src-matlab"> Kas = [1e6, 1e7, 1e8, 5e8, 1e9]; <span class="org-comment">% [N/m]</span>
<pre class="src src-matlab">Kas = [1e6, 1e7, 1e8, 5e8, 1e9]; <span class="org-comment">% [N/m]</span>
</pre>
</div>
</div>
@ -792,17 +792,17 @@ Controller Design
<h3 id="org5177329"><span class="section-number-3">3.5</span> Effect of the Radial (Shear) Stiffness</h3>
<div class="outline-text-3" id="text-3-5">
<div class="org-src-container">
<pre class="src src-matlab"> Krs = [1e4, 1e5, 1e6, 1e7]; <span class="org-comment">% [N/m]</span>
<pre class="src src-matlab">Krs = [1e4, 1e5, 1e6, 1e7]; <span class="org-comment">% [N/m]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgd67ef9e" class="outline-3">
<h3 id="orgd67ef9e"><span class="section-number-3">3.6</span> Comparison of perfect joint and worst specified joint</h3>
<div id="outline-container-orge0f8240" class="outline-3">
<h3 id="orge0f8240"><span class="section-number-3">3.6</span> Comparison of perfect joint and worst specified joint</h3>
</div>
<div id="outline-container-org55fe34f" class="outline-3">
<h3 id="org55fe34f"><span class="section-number-3">3.7</span> Conclusion</h3>
<div id="outline-container-org79b6e2d" class="outline-3">
<h3 id="org79b6e2d"><span class="section-number-3">3.7</span> Conclusion</h3>
<div class="outline-text-3" id="text-3-7">
<p>
Qualitatively:
@ -891,118 +891,118 @@ Quantitatively:
<h2 id="org8798d60"><span class="section-number-2">4</span> Flexible Joint Specifications with the APA300ML</h2>
<div class="outline-text-2" id="text-4">
</div>
<div id="outline-container-org6fc554b" class="outline-3">
<h3 id="org6fc554b"><span class="section-number-3">4.1</span> Stewart Platform Initialization</h3>
<div id="outline-container-org6d56b33" class="outline-3">
<h3 id="org6d56b33"><span class="section-number-3">4.1</span> Stewart Platform Initialization</h3>
<div class="outline-text-3" id="text-4-1">
<div class="org-src-container">
<pre class="src src-matlab"> apa = load(<span class="org-string">'./mat/APA300ML.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
<pre class="src src-matlab">apa = load(<span class="org-string">'./mat/APA300ML.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeFlexibleStrutDynamics(stewart, <span class="org-string">'H'</span>, 0.03, <span class="org-string">'K'</span>, apa.K, <span class="org-string">'M'</span>, apa.M, <span class="org-string">'n_xyz'</span>, apa.n_xyz, <span class="org-string">'xi'</span>, 0.1, <span class="org-string">'step_file'</span>, <span class="org-string">'mat/APA300ML.STEP'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'none'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'none'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeFlexibleStrutDynamics(stewart, <span class="org-string">'H'</span>, 0.03, <span class="org-string">'K'</span>, apa.K, <span class="org-string">'M'</span>, apa.M, <span class="org-string">'n_xyz'</span>, apa.n_xyz, <span class="org-string">'xi'</span>, 0.1, <span class="org-string">'step_file'</span>, <span class="org-string">'mat/APA300ML.STEP'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'none'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'none'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
references = initializeReferences(stewart);
references = initializeReferences(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'m'</span>, 50);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'m'</span>, 50);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> disturbances = initializeDisturbances();
<pre class="src src-matlab">disturbances = initializeDisturbances();
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> open(<span class="org-string">'stewart_platform_model.slx'</span>)
<pre class="src src-matlab">open(<span class="org-string">'stewart_platform_model.slx'</span>)
</pre>
</div>
</div>
</div>
<div id="outline-container-orge0f8240" class="outline-3">
<h3 id="orge0f8240"><span class="section-number-3">4.2</span> Comparison of perfect joint and worst specified joint</h3>
<div id="outline-container-orgdc3d576" class="outline-3">
<h3 id="orgdc3d576"><span class="section-number-3">4.2</span> Comparison of perfect joint and worst specified joint</h3>
</div>
</div>
<div id="outline-container-orgbae1ad3" class="outline-2">
<h2 id="orgbae1ad3"><span class="section-number-2">5</span> Relative Motion Sensors</h2>
<div class="outline-text-2" id="text-5">
</div>
<div id="outline-container-org775a387" class="outline-3">
<h3 id="org775a387"><span class="section-number-3">5.1</span> Stewart Platform Initialization</h3>
<div id="outline-container-org74f7ec9" class="outline-3">
<h3 id="org74f7ec9"><span class="section-number-3">5.1</span> Stewart Platform Initialization</h3>
<div class="outline-text-3" id="text-5-1">
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> apa = load(<span class="org-string">'./mat/APA300ML.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
stewart = initializeAmplifiedStrutDynamics(stewart, <span class="org-string">'Ke'</span>, 1.5e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'Ka'</span>, 40.5e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'K1'</span>, 0.4e6<span class="org-type">*</span>ones(6,1));
<span class="org-comment">% stewart = initializeFlexibleStrutDynamics(stewart, 'H', 0.03, 'K', apa.K, 'M', apa.M, 'n_xyz', apa.n_xyz, 'xi', 0.1, 'step_file', 'mat/APA300ML.STEP');</span>
<pre class="src src-matlab">apa = load(<span class="org-string">'./mat/APA300ML.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
stewart = initializeAmplifiedStrutDynamics(stewart, <span class="org-string">'Ke'</span>, 1.5e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'Ka'</span>, 40.5e6<span class="org-type">*</span>ones(6,1), <span class="org-string">'K1'</span>, 0.4e6<span class="org-type">*</span>ones(6,1));
<span class="org-comment">% stewart = initializeFlexibleStrutDynamics(stewart, 'H', 0.03, 'K', apa.K, 'M', apa.M, 'n_xyz', apa.n_xyz, 'xi', 0.1, 'step_file', 'mat/APA300ML.STEP');</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> flex_joint = load(<span class="org-string">'./mat/flexor_025.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_3dof'</span>, ...
<span class="org-string">'Kr_M'</span>, flex_joint.K(1,1)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Ka_M'</span>, flex_joint.K(3,3)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kf_M'</span>, flex_joint.K(4,4)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kt_M'</span>, flex_joint.K(6,6)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'type_F'</span>, <span class="org-string">'universal_3dof'</span>, ...
<span class="org-string">'Kr_F'</span>, flex_joint.K(1,1)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Ka_F'</span>, flex_joint.K(3,3)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kf_F'</span>, flex_joint.K(4,4)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kt_F'</span>, flex_joint.K(6,6)<span class="org-type">*</span>ones(6,1));
<pre class="src src-matlab">flex_joint = load(<span class="org-string">'./mat/flexor_025.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_3dof'</span>, ...
<span class="org-string">'Kr_M'</span>, flex_joint.K(1,1)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Ka_M'</span>, flex_joint.K(3,3)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kf_M'</span>, flex_joint.K(4,4)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kt_M'</span>, flex_joint.K(6,6)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'type_F'</span>, <span class="org-string">'universal_3dof'</span>, ...
<span class="org-string">'Kr_F'</span>, flex_joint.K(1,1)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Ka_F'</span>, flex_joint.K(3,3)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kf_F'</span>, flex_joint.K(4,4)<span class="org-type">*</span>ones(6,1), ...
<span class="org-string">'Kt_F'</span>, flex_joint.K(6,6)<span class="org-type">*</span>ones(6,1));
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeCylindricalPlatforms(stewart);
<pre class="src src-matlab">stewart = initializeCylindricalPlatforms(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeCylindricalStruts(stewart);
<pre class="src src-matlab">stewart = initializeCylindricalStruts(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
<pre class="src src-matlab">stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
references = initializeReferences(stewart);
references = initializeReferences(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'m'</span>, 50);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'m'</span>, 50);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> disturbances = initializeDisturbances();
<pre class="src src-matlab">disturbances = initializeDisturbances();
</pre>
</div>
</div>
@ -1017,7 +1017,7 @@ Quantitatively:
<h3 id="org6bde940"><span class="section-number-3">6.1</span> Flexible Strut</h3>
<div class="outline-text-3" id="text-6-1">
<div class="org-src-container">
<pre class="src src-matlab"> apa = load(<span class="org-string">'./mat/strut_encoder.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
<pre class="src src-matlab">apa = load(<span class="org-string">'./mat/strut_encoder.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
</pre>
</div>
@ -1148,60 +1148,60 @@ Quantitatively:
<h3 id="org4b369e6"><span class="section-number-3">6.2</span> Stewart Platform</h3>
<div class="outline-text-3" id="text-6-2">
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 95e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 220e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart, <span class="org-string">'FH'</span>, 22.5e<span class="org-type">-</span>3, <span class="org-string">'FR'</span>, 114e<span class="org-type">-</span>3, <span class="org-string">'FTh'</span>, [ <span class="org-type">-</span>11, 11, 120<span class="org-type">-</span>11, 120<span class="org-type">+</span>11, 240<span class="org-type">-</span>11, 240<span class="org-type">+</span>11]<span class="org-type">*</span>(<span class="org-constant">pi</span><span class="org-type">/</span>180), ...
<span class="org-string">'MH'</span>, 22.5e<span class="org-type">-</span>3, <span class="org-string">'MR'</span>, 110e<span class="org-type">-</span>3, <span class="org-string">'MTh'</span>, [<span class="org-type">-</span>60<span class="org-type">+</span>15, 60<span class="org-type">-</span>15, 60<span class="org-type">+</span>15, 180<span class="org-type">-</span>15, 180<span class="org-type">+</span>15, <span class="org-type">-</span>60<span class="org-type">-</span>15]<span class="org-type">*</span>(<span class="org-constant">pi</span><span class="org-type">/</span>180));
stewart = computeJointsPose(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 95e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 220e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart, <span class="org-string">'FH'</span>, 22.5e<span class="org-type">-</span>3, <span class="org-string">'FR'</span>, 114e<span class="org-type">-</span>3, <span class="org-string">'FTh'</span>, [ <span class="org-type">-</span>11, 11, 120<span class="org-type">-</span>11, 120<span class="org-type">+</span>11, 240<span class="org-type">-</span>11, 240<span class="org-type">+</span>11]<span class="org-type">*</span>(<span class="org-constant">pi</span><span class="org-type">/</span>180), ...
<span class="org-string">'MH'</span>, 22.5e<span class="org-type">-</span>3, <span class="org-string">'MR'</span>, 110e<span class="org-type">-</span>3, <span class="org-string">'MTh'</span>, [<span class="org-type">-</span>60<span class="org-type">+</span>15, 60<span class="org-type">-</span>15, 60<span class="org-type">+</span>15, 180<span class="org-type">-</span>15, 180<span class="org-type">+</span>15, <span class="org-type">-</span>60<span class="org-type">-</span>15]<span class="org-type">*</span>(<span class="org-constant">pi</span><span class="org-type">/</span>180));
stewart = computeJointsPose(stewart);
stewart = initializeFlexibleStrutAndJointDynamics(stewart, <span class="org-string">'H'</span>, (apa.int_xyz(1,3) <span class="org-type">-</span> apa.int_xyz(2,3)), ...
<span class="org-string">'K'</span>, apa.K, ...
<span class="org-string">'M'</span>, apa.M, ...
<span class="org-string">'n_xyz'</span>, apa.n_xyz, ...
<span class="org-string">'xi'</span>, 0.1, ...
<span class="org-string">'Gf'</span>, <span class="org-type">-</span>2.65e7, ...
<span class="org-string">'step_file'</span>, <span class="org-string">'mat/APA300ML.STEP'</span>);
stewart = initializeFlexibleStrutAndJointDynamics(stewart, <span class="org-string">'H'</span>, (apa.int_xyz(1,3) <span class="org-type">-</span> apa.int_xyz(2,3)), ...
<span class="org-string">'K'</span>, apa.K, ...
<span class="org-string">'M'</span>, apa.M, ...
<span class="org-string">'n_xyz'</span>, apa.n_xyz, ...
<span class="org-string">'xi'</span>, 0.1, ...
<span class="org-string">'Gf'</span>, <span class="org-type">-</span>2.65e7, ...
<span class="org-string">'step_file'</span>, <span class="org-string">'mat/APA300ML.STEP'</span>);
stewart = initializeSolidPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'none'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'none'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
stewart = initializeSolidPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'none'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'none'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> disturbances = initializeDisturbances();
ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'m'</span>, 1);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
references = initializeReferences(stewart);
<pre class="src src-matlab">disturbances = initializeDisturbances();
ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'m'</span>, 1);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
references = initializeReferences(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'dLm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'Lm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Force Sensors [N]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'dLm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'Lm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Force Sensors [N]</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>, ...
<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io, options);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'Dm1'</span>, <span class="org-string">'Dm2'</span>, <span class="org-string">'Dm3'</span>, <span class="org-string">'Dm4'</span>, <span class="org-string">'Dm5'</span>, <span class="org-string">'Dm6'</span>, ...
<span class="org-string">'D1'</span>, <span class="org-string">'D2'</span>, <span class="org-string">'D3'</span>, <span class="org-string">'D4'</span>, <span class="org-string">'D5'</span>, <span class="org-string">'D6'</span>};
</pre>
</div>
@ -1216,7 +1216,7 @@ Quantitatively:
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-01-08 ven. 15:29</p>
<p class="date">Created: 2021-01-08 ven. 15:52</p>
</div>
</body>
</html>

View File

@ -3,7 +3,7 @@
"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-01-08 ven. 15:29 -->
<!-- 2021-01-08 ven. 15:52 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Identification of the Stewart Platform using Simscape</title>
<meta name="generator" content="Org mode" />
@ -50,13 +50,13 @@
</li>
<li><a href="#orgfeed9a3">2. Transmissibility Analysis</a>
<ul>
<li><a href="#org7c6996a">2.1. Initialize the Stewart platform</a></li>
<li><a href="#org5ba3096">2.1. Initialize the Stewart platform</a></li>
<li><a href="#org279dcc8">2.2. Transmissibility</a></li>
</ul>
</li>
<li><a href="#org3ad92e9">3. Compliance Analysis</a>
<ul>
<li><a href="#org5ba3096">3.1. Initialize the Stewart platform</a></li>
<li><a href="#orgc957431">3.1. Initialize the Stewart platform</a></li>
<li><a href="#org26cb46a">3.2. Compliance</a></li>
</ul>
</li>
@ -64,18 +64,18 @@
<ul>
<li><a href="#org25ca725">4.1. Compute the Transmissibility</a>
<ul>
<li><a href="#orgeae7abf">Function description</a></li>
<li><a href="#orge4c0895">Optional Parameters</a></li>
<li><a href="#orgafb57d0">Function description</a></li>
<li><a href="#orga00af61">Optional Parameters</a></li>
<li><a href="#org17a8811">Identification of the Transmissibility Matrix</a></li>
<li><a href="#orgfd96322">Computation of the Frobenius norm</a></li>
<li><a href="#orgbc9a383">Computation of the Frobenius norm</a></li>
</ul>
</li>
<li><a href="#orgb6e05b3">4.2. Compute the Compliance</a>
<ul>
<li><a href="#orgafb57d0">Function description</a></li>
<li><a href="#orga00af61">Optional Parameters</a></li>
<li><a href="#org210c0ca">Function description</a></li>
<li><a href="#org24feeb1">Optional Parameters</a></li>
<li><a href="#org2c35042">Identification of the Compliance Matrix</a></li>
<li><a href="#orgbc9a383">Computation of the Frobenius norm</a></li>
<li><a href="#orgb002200">Computation of the Frobenius norm</a></li>
</ul>
</li>
</ul>
@ -105,24 +105,24 @@ In this document, we discuss the various methods to identify the behavior of the
<h3 id="org40f9c57"><span class="section-number-3">1.1</span> Initialize the Stewart Platform</h3>
<div class="outline-text-3" id="text-1-1">
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
</div>
@ -132,23 +132,23 @@ In this document, we discuss the various methods to identify the behavior of the
<h3 id="orgd9529ee"><span class="section-number-3">1.2</span> Identification</h3>
<div class="outline-text-3" id="text-1-2">
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Position/Orientation of {B} w.r.t. {A}</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 2, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Velocity of {B} w.r.t. {A}</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Position/Orientation of {B} w.r.t. {A}</span>
io(io_i) = linio([mdl, <span class="org-string">'/Relative Motion Sensor'</span>], 2, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Velocity of {B} w.r.t. {A}</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io);
<span class="org-comment">% G.InputName = {'tau1', 'tau2', 'tau3', 'tau4', 'tau5', 'tau6'};</span>
<span class="org-comment">% G.OutputName = {'Xdx', 'Xdy', 'Xdz', 'Xrx', 'Xry', 'Xrz', 'Vdx', 'Vdy', 'Vdz', 'Vrx', 'Vry', 'Vrz'};</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io);
<span class="org-comment">% G.InputName = {'tau1', 'tau2', 'tau3', 'tau4', 'tau5', 'tau6'};</span>
<span class="org-comment">% G.OutputName = {'Xdx', 'Xdy', 'Xdz', 'Xrx', 'Xry', 'Xrz', 'Vdx', 'Vdy', 'Vdz', 'Vrx', 'Vry', 'Vrz'};</span>
</pre>
</div>
@ -156,7 +156,7 @@ In this document, we discuss the various methods to identify the behavior of the
Let&rsquo;s check the size of <code>G</code>:
</p>
<div class="org-src-container">
<pre class="src src-matlab"> size(G)
<pre class="src src-matlab">size(G)
</pre>
</div>
@ -173,7 +173,7 @@ ans =
We expect to have only 12 states (corresponding to the 6dof of the mobile platform).
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Gm = minreal(G);
<pre class="src src-matlab">Gm = minreal(G);
</pre>
</div>
@ -196,7 +196,7 @@ And indeed, we obtain 12 states.
We can perform the following transformation using the <code>ss2ss</code> command.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Gt = ss2ss(Gm, Gm.C);
<pre class="src src-matlab">Gt = ss2ss(Gm, Gm.C);
</pre>
</div>
@ -212,14 +212,14 @@ The measurements are the 6 displacement and 6 velocities of mobile platform with
We could perform the transformation by hand:
</p>
<div class="org-src-container">
<pre class="src src-matlab"> At = Gm.C<span class="org-type">*</span>Gm.A<span class="org-type">*</span>pinv(Gm.C);
<pre class="src src-matlab">At = Gm.C<span class="org-type">*</span>Gm.A<span class="org-type">*</span>pinv(Gm.C);
Bt = Gm.C<span class="org-type">*</span>Gm.B;
Bt = Gm.C<span class="org-type">*</span>Gm.B;
Ct = eye(12);
Dt = zeros(12, 6);
Ct = eye(12);
Dt = zeros(12, 6);
Gt = ss(At, Bt, Ct, Dt);
Gt = ss(At, Bt, Ct, Dt);
</pre>
</div>
</div>
@ -229,7 +229,7 @@ We could perform the transformation by hand:
<h3 id="org11e3698"><span class="section-number-3">1.4</span> Analysis</h3>
<div class="outline-text-3" id="text-1-4">
<div class="org-src-container">
<pre class="src src-matlab"> [V,D] = eig(Gt.A);
<pre class="src src-matlab">[V,D] = eig(Gt.A);
</pre>
</div>
@ -306,28 +306,28 @@ To visualize the i&rsquo;th mode, we may excite the system using the inputs \(U_
Let&rsquo;s first sort the modes and just take the modes corresponding to a eigenvalue with a positive imaginary part.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> ws = imag(diag(D));
[ws,I] = sort(ws)
ws = ws(7<span class="org-type">:</span>end); I = I(7<span class="org-type">:</span>end);
<pre class="src src-matlab">ws = imag(diag(D));
[ws,I] = sort(ws)
ws = ws(7<span class="org-type">:</span>end); I = I(7<span class="org-type">:</span>end);
</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:length(ws)</span>
<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:length(ws)</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> i_mode = I(<span class="org-constant">i</span>); <span class="org-comment">% the argument is the i'th mode</span>
<pre class="src src-matlab">i_mode = I(<span class="org-constant">i</span>); <span class="org-comment">% the argument is the i'th mode</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> lambda_i = D(i_mode, i_mode);
xi_i = V(<span class="org-type">:</span>,i_mode);
<pre class="src src-matlab">lambda_i = D(i_mode, i_mode);
xi_i = V(<span class="org-type">:</span>,i_mode);
a_i = real(lambda_i);
b_i = imag(lambda_i);
a_i = real(lambda_i);
b_i = imag(lambda_i);
</pre>
</div>
@ -335,13 +335,13 @@ Let&rsquo;s first sort the modes and just take the modes corresponding to a eige
Let do 10 periods of the mode.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> t = linspace(0, 10<span class="org-type">/</span>(imag(lambda_i)<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span>), 1000);
U_i = pinv(Gt.B) <span class="org-type">*</span> real(xi_i <span class="org-type">*</span> lambda_i <span class="org-type">*</span> (cos(b_i <span class="org-type">*</span> t) <span class="org-type">+</span> 1<span class="org-constant">i</span><span class="org-type">*</span>sin(b_i <span class="org-type">*</span> t)));
<pre class="src src-matlab">t = linspace(0, 10<span class="org-type">/</span>(imag(lambda_i)<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span>), 1000);
U_i = pinv(Gt.B) <span class="org-type">*</span> real(xi_i <span class="org-type">*</span> lambda_i <span class="org-type">*</span> (cos(b_i <span class="org-type">*</span> t) <span class="org-type">+</span> 1<span class="org-constant">i</span><span class="org-type">*</span>sin(b_i <span class="org-type">*</span> t)));
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> U = timeseries(U_i, t);
<pre class="src src-matlab">U = timeseries(U_i, t);
</pre>
</div>
@ -349,9 +349,9 @@ Let do 10 periods of the mode.
Simulation:
</p>
<div class="org-src-container">
<pre class="src src-matlab"> load(<span class="org-string">'mat/conf_simscape.mat'</span>);
<span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-variable-name">conf_simscape</span>, <span class="org-string">'StopTime'</span>, num2str(t(<span class="org-variable-name">end</span>)));
<span class="org-matlab-simulink-keyword">sim</span>(mdl);
<pre class="src src-matlab">load(<span class="org-string">'mat/conf_simscape.mat'</span>);
<span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-variable-name">conf_simscape</span>, <span class="org-string">'StopTime'</span>, num2str(t(<span class="org-variable-name">end</span>)));
<span class="org-matlab-simulink-keyword">sim</span>(mdl);
</pre>
</div>
@ -359,15 +359,15 @@ Simulation:
Save the movie of the mode shape.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> smwritevideo(mdl, sprintf(<span class="org-string">'figs/mode%i'</span>, <span class="org-constant">i</span>), ...
<span class="org-string">'PlaybackSpeedRatio'</span>, 1<span class="org-type">/</span>(b_i<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span>), ...
<span class="org-string">'FrameRate'</span>, 30, ...
<span class="org-string">'FrameSize'</span>, [800, 400]);
<pre class="src src-matlab">smwritevideo(mdl, sprintf(<span class="org-string">'figs/mode%i'</span>, <span class="org-constant">i</span>), ...
<span class="org-string">'PlaybackSpeedRatio'</span>, 1<span class="org-type">/</span>(b_i<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span>), ...
<span class="org-string">'FrameRate'</span>, 30, ...
<span class="org-string">'FrameSize'</span>, [800, 400]);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-keyword">end</span>
<pre class="src src-matlab"><span class="org-keyword">end</span>
</pre>
</div>
@ -402,21 +402,21 @@ Save the movie of the mode shape.
<a id="org5213401"></a>
</p>
</div>
<div id="outline-container-org7c6996a" class="outline-3">
<h3 id="org7c6996a"><span class="section-number-3">2.1</span> Initialize the Stewart platform</h3>
<div id="outline-container-org5ba3096" class="outline-3">
<h3 id="org5ba3096"><span class="section-number-3">2.1</span> Initialize the Stewart platform</h3>
<div class="outline-text-3" id="text-2-1">
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'accelerometer'</span>, <span class="org-string">'freq'</span>, 5e3);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'accelerometer'</span>, <span class="org-string">'freq'</span>, 5e3);
</pre>
</div>
@ -424,9 +424,9 @@ Save the movie of the mode shape.
We set the rotation point of the ground to be at the same point at frames \(\{A\}\) and \(\{B\}\).
</p>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'rot_point'</span>, stewart.platform_F.FO_A);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'rot_point'</span>, stewart.platform_F.FO_A);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
</div>
@ -436,45 +436,45 @@ We set the rotation point of the ground to be at the same point at frames \(\{A\
<h3 id="org279dcc8"><span class="section-number-3">2.2</span> Transmissibility</h3>
<div class="outline-text-3" id="text-2-2">
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances/D_w'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Base Motion [m, rad]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Absolute Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Absolute Motion [m, rad]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances/D_w'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Base Motion [m, rad]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Absolute Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Absolute Motion [m, rad]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
T = linearize(mdl, io, options);
T.InputName = {<span class="org-string">'Wdx'</span>, <span class="org-string">'Wdy'</span>, <span class="org-string">'Wdz'</span>, <span class="org-string">'Wrx'</span>, <span class="org-string">'Wry'</span>, <span class="org-string">'Wrz'</span>};
T.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
T = linearize(mdl, io, options);
T.InputName = {<span class="org-string">'Wdx'</span>, <span class="org-string">'Wdy'</span>, <span class="org-string">'Wdz'</span>, <span class="org-string">'Wrx'</span>, <span class="org-string">'Wry'</span>, <span class="org-string">'Wrz'</span>};
T.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> freqs = logspace(1, 4, 1000);
<pre class="src src-matlab">freqs = logspace(1, 4, 1000);
<span class="org-type">figure</span>;
<span class="org-keyword">for</span> <span class="org-variable-name">ix</span> = <span class="org-constant">1:6</span>
<span class="org-type">figure</span>;
<span class="org-keyword">for</span> <span class="org-variable-name">ix</span> = <span class="org-constant">1:6</span>
<span class="org-keyword">for</span> <span class="org-variable-name">iy</span> = <span class="org-constant">1:6</span>
subplot(6, 6, (ix<span class="org-type">-</span>1)<span class="org-type">*</span>6 <span class="org-type">+</span> iy);
hold on;
plot(freqs, abs(squeeze(freqresp(T(ix, iy), freqs, <span class="org-string">'Hz'</span>))), <span class="org-string">'k-'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
ylim([1e<span class="org-type">-</span>5, 10]);
xlim([freqs(1), freqs(end)]);
<span class="org-keyword">if</span> ix <span class="org-type">&lt;</span> 6
xticklabels({});
<span class="org-keyword">end</span>
<span class="org-keyword">if</span> iy <span class="org-type">&gt;</span> 1
yticklabels({});
<span class="org-keyword">end</span>
subplot(6, 6, (ix<span class="org-type">-</span>1)<span class="org-type">*</span>6 <span class="org-type">+</span> iy);
hold on;
plot(freqs, abs(squeeze(freqresp(T(ix, iy), freqs, <span class="org-string">'Hz'</span>))), <span class="org-string">'k-'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
ylim([1e<span class="org-type">-</span>5, 10]);
xlim([freqs(1), freqs(end)]);
<span class="org-keyword">if</span> ix <span class="org-type">&lt;</span> 6
xticklabels({});
<span class="org-keyword">end</span>
<span class="org-keyword">if</span> iy <span class="org-type">&gt;</span> 1
yticklabels({});
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
@ -487,13 +487,13 @@ From (<a href="#citeproc_bib_item_1">Preumont et al. 2007</a>), one can use the
\end{align*}
<div class="org-src-container">
<pre class="src src-matlab"> freqs = logspace(1, 4, 1000);
<pre class="src src-matlab">freqs = logspace(1, 4, 1000);
T_norm = zeros(length(freqs), 1);
T_norm = zeros(length(freqs), 1);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(freqs)</span>
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(freqs)</span>
T_norm(<span class="org-constant">i</span>) = sqrt(trace(freqresp(T, freqs(<span class="org-constant">i</span>), <span class="org-string">'Hz'</span>)<span class="org-type">*</span>freqresp(T, freqs(<span class="org-constant">i</span>), <span class="org-string">'Hz'</span>)<span class="org-type">'</span>));
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
@ -503,14 +503,14 @@ And we normalize by a factor \(\sqrt{6}\) to obtain a performance metric compara
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Gamma = T_norm<span class="org-type">/</span>sqrt(6);
<pre class="src src-matlab">Gamma = T_norm<span class="org-type">/</span>sqrt(6);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-type">figure</span>;
plot(freqs, Gamma)
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
<pre class="src src-matlab"><span class="org-type">figure</span>;
plot(freqs, Gamma)
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
</pre>
</div>
</div>
@ -524,21 +524,21 @@ And we normalize by a factor \(\sqrt{6}\) to obtain a performance metric compara
<a id="org39baa25"></a>
</p>
</div>
<div id="outline-container-org5ba3096" class="outline-3">
<h3 id="org5ba3096"><span class="section-number-3">3.1</span> Initialize the Stewart platform</h3>
<div id="outline-container-orgc957431" class="outline-3">
<h3 id="orgc957431"><span class="section-number-3">3.1</span> Initialize the Stewart platform</h3>
<div class="outline-text-3" id="text-3-1">
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'accelerometer'</span>, <span class="org-string">'freq'</span>, 5e3);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'accelerometer'</span>, <span class="org-string">'freq'</span>, 5e3);
</pre>
</div>
@ -546,9 +546,9 @@ And we normalize by a factor \(\sqrt{6}\) to obtain a performance metric compara
We set the rotation point of the ground to be at the same point at frames \(\{A\}\) and \(\{B\}\).
</p>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
</div>
@ -558,45 +558,45 @@ We set the rotation point of the ground to be at the same point at frames \(\{A\
<h3 id="org26cb46a"><span class="section-number-3">3.2</span> Compliance</h3>
<div class="outline-text-3" id="text-3-2">
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances/F_ext'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Base Motion [m, rad]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Absolute Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Absolute Motion [m, rad]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances/F_ext'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Base Motion [m, rad]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Absolute Motion Sensor'</span>], 1, <span class="org-string">'openoutput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Absolute Motion [m, rad]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
C = linearize(mdl, io, options);
C.InputName = {<span class="org-string">'Fdx'</span>, <span class="org-string">'Fdy'</span>, <span class="org-string">'Fdz'</span>, <span class="org-string">'Mdx'</span>, <span class="org-string">'Mdy'</span>, <span class="org-string">'Mdz'</span>};
C.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
C = linearize(mdl, io, options);
C.InputName = {<span class="org-string">'Fdx'</span>, <span class="org-string">'Fdy'</span>, <span class="org-string">'Fdz'</span>, <span class="org-string">'Mdx'</span>, <span class="org-string">'Mdy'</span>, <span class="org-string">'Mdz'</span>};
C.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> freqs = logspace(1, 4, 1000);
<pre class="src src-matlab">freqs = logspace(1, 4, 1000);
<span class="org-type">figure</span>;
<span class="org-keyword">for</span> <span class="org-variable-name">ix</span> = <span class="org-constant">1:6</span>
<span class="org-type">figure</span>;
<span class="org-keyword">for</span> <span class="org-variable-name">ix</span> = <span class="org-constant">1:6</span>
<span class="org-keyword">for</span> <span class="org-variable-name">iy</span> = <span class="org-constant">1:6</span>
subplot(6, 6, (ix<span class="org-type">-</span>1)<span class="org-type">*</span>6 <span class="org-type">+</span> iy);
hold on;
plot(freqs, abs(squeeze(freqresp(C(ix, iy), freqs, <span class="org-string">'Hz'</span>))), <span class="org-string">'k-'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
ylim([1e<span class="org-type">-</span>10, 1e<span class="org-type">-</span>3]);
xlim([freqs(1), freqs(end)]);
<span class="org-keyword">if</span> ix <span class="org-type">&lt;</span> 6
xticklabels({});
<span class="org-keyword">end</span>
<span class="org-keyword">if</span> iy <span class="org-type">&gt;</span> 1
yticklabels({});
<span class="org-keyword">end</span>
subplot(6, 6, (ix<span class="org-type">-</span>1)<span class="org-type">*</span>6 <span class="org-type">+</span> iy);
hold on;
plot(freqs, abs(squeeze(freqresp(C(ix, iy), freqs, <span class="org-string">'Hz'</span>))), <span class="org-string">'k-'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
ylim([1e<span class="org-type">-</span>10, 1e<span class="org-type">-</span>3]);
xlim([freqs(1), freqs(end)]);
<span class="org-keyword">if</span> ix <span class="org-type">&lt;</span> 6
xticklabels({});
<span class="org-keyword">end</span>
<span class="org-keyword">if</span> iy <span class="org-type">&gt;</span> 1
yticklabels({});
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
@ -605,20 +605,20 @@ We can try to use the Frobenius norm to obtain a scalar value representing the 6
</p>
<div class="org-src-container">
<pre class="src src-matlab"> freqs = logspace(1, 4, 1000);
<pre class="src src-matlab">freqs = logspace(1, 4, 1000);
C_norm = zeros(length(freqs), 1);
C_norm = zeros(length(freqs), 1);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(freqs)</span>
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(freqs)</span>
C_norm(<span class="org-constant">i</span>) = sqrt(trace(freqresp(C, freqs(<span class="org-constant">i</span>), <span class="org-string">'Hz'</span>)<span class="org-type">*</span>freqresp(C, freqs(<span class="org-constant">i</span>), <span class="org-string">'Hz'</span>)<span class="org-type">'</span>));
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-type">figure</span>;
plot(freqs, C_norm)
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
<pre class="src src-matlab"><span class="org-type">figure</span>;
plot(freqs, C_norm)
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
</pre>
</div>
</div>
@ -637,42 +637,42 @@ We can try to use the Frobenius norm to obtain a scalar value representing the 6
</p>
</div>
<div id="outline-container-orgeae7abf" class="outline-4">
<h4 id="orgeae7abf">Function description</h4>
<div class="outline-text-4" id="text-orgeae7abf">
<div id="outline-container-orgafb57d0" class="outline-4">
<h4 id="orgafb57d0">Function description</h4>
<div class="outline-text-4" id="text-orgafb57d0">
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-keyword">function</span> <span class="org-variable-name">[T, T_norm, freqs]</span> = <span class="org-function-name">computeTransmissibility</span>(<span class="org-variable-name">args</span>)
<span class="org-comment">% computeTransmissibility -</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [T, T_norm, freqs] = computeTransmissibility(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">% - plots [true/false] - Should plot the transmissilibty matrix and its Frobenius norm</span>
<span class="org-comment">% - freqs [] - Frequency vector to estimate the Frobenius norm</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - T [6x6 ss] - Transmissibility matrix</span>
<span class="org-comment">% - T_norm [length(freqs)x1] - Frobenius norm of the Transmissibility matrix</span>
<span class="org-comment">% - freqs [length(freqs)x1] - Frequency vector in [Hz]</span>
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[T, T_norm, freqs]</span> = <span class="org-function-name">computeTransmissibility</span>(<span class="org-variable-name">args</span>)
<span class="org-comment">% computeTransmissibility -</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [T, T_norm, freqs] = computeTransmissibility(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">% - plots [true/false] - Should plot the transmissilibty matrix and its Frobenius norm</span>
<span class="org-comment">% - freqs [] - Frequency vector to estimate the Frobenius norm</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - T [6x6 ss] - Transmissibility matrix</span>
<span class="org-comment">% - T_norm [length(freqs)x1] - Frobenius norm of the Transmissibility matrix</span>
<span class="org-comment">% - freqs [length(freqs)x1] - Frequency vector in [Hz]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orge4c0895" class="outline-4">
<h4 id="orge4c0895">Optional Parameters</h4>
<div class="outline-text-4" id="text-orge4c0895">
<div id="outline-container-orga00af61" class="outline-4">
<h4 id="orga00af61">Optional Parameters</h4>
<div class="outline-text-4" id="text-orga00af61">
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-keyword">arguments</span>
<span class="org-variable-name">args</span>.plots logical {mustBeNumericOrLogical} = <span class="org-constant">false</span>
<span class="org-variable-name">args</span>.freqs double {mustBeNumeric, mustBeNonnegative} = logspace(1,4,1000)
<span class="org-keyword">end</span>
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">args</span>.plots logical {mustBeNumericOrLogical} = <span class="org-constant">false</span>
<span class="org-variable-name">args</span>.freqs double {mustBeNumeric, mustBeNonnegative} = logspace(1,4,1000)
<span class="org-keyword">end</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> freqs = args.freqs;
<pre class="src src-matlab">freqs = args.freqs;
</pre>
</div>
</div>
@ -682,22 +682,22 @@ We can try to use the Frobenius norm to obtain a scalar value representing the 6
<h4 id="org17a8811">Identification of the Transmissibility Matrix</h4>
<div class="outline-text-4" id="text-org17a8811">
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances/D_w'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Base Motion [m, rad]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Absolute Motion Sensor'</span>], 1, <span class="org-string">'output'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Absolute Motion [m, rad]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances/D_w'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Base Motion [m, rad]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Absolute Motion Sensor'</span>], 1, <span class="org-string">'output'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Absolute Motion [m, rad]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
T = linearize(mdl, io, options);
T.InputName = {<span class="org-string">'Wdx'</span>, <span class="org-string">'Wdy'</span>, <span class="org-string">'Wdz'</span>, <span class="org-string">'Wrx'</span>, <span class="org-string">'Wry'</span>, <span class="org-string">'Wrz'</span>};
T.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
T = linearize(mdl, io, options);
T.InputName = {<span class="org-string">'Wdx'</span>, <span class="org-string">'Wdy'</span>, <span class="org-string">'Wdz'</span>, <span class="org-string">'Wrx'</span>, <span class="org-string">'Wry'</span>, <span class="org-string">'Wrz'</span>};
T.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
</pre>
</div>
@ -705,23 +705,23 @@ We can try to use the Frobenius norm to obtain a scalar value representing the 6
If wanted, the 6x6 transmissibility matrix is plotted.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> p_handle = zeros(6<span class="org-type">*</span>6,1);
<pre class="src src-matlab">p_handle = zeros(6<span class="org-type">*</span>6,1);
<span class="org-keyword">if</span> args.plots
<span class="org-keyword">if</span> args.plots
fig = <span class="org-type">figure</span>;
<span class="org-keyword">for</span> <span class="org-variable-name">ix</span> = <span class="org-constant">1:6</span>
<span class="org-keyword">for</span> <span class="org-variable-name">iy</span> = <span class="org-constant">1:6</span>
p_handle((ix<span class="org-type">-</span>1)<span class="org-type">*</span>6 <span class="org-type">+</span> iy) = subplot(6, 6, (ix<span class="org-type">-</span>1)<span class="org-type">*</span>6 <span class="org-type">+</span> iy);
hold on;
plot(freqs, abs(squeeze(freqresp(T(ix, iy), freqs, <span class="org-string">'Hz'</span>))), <span class="org-string">'k-'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
<span class="org-keyword">if</span> ix <span class="org-type">&lt;</span> 6
xticklabels({});
<span class="org-keyword">for</span> <span class="org-variable-name">iy</span> = <span class="org-constant">1:6</span>
p_handle((ix<span class="org-type">-</span>1)<span class="org-type">*</span>6 <span class="org-type">+</span> iy) = subplot(6, 6, (ix<span class="org-type">-</span>1)<span class="org-type">*</span>6 <span class="org-type">+</span> iy);
hold on;
plot(freqs, abs(squeeze(freqresp(T(ix, iy), freqs, <span class="org-string">'Hz'</span>))), <span class="org-string">'k-'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
<span class="org-keyword">if</span> ix <span class="org-type">&lt;</span> 6
xticklabels({});
<span class="org-keyword">end</span>
<span class="org-keyword">if</span> iy <span class="org-type">&gt;</span> 1
yticklabels({});
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
<span class="org-keyword">if</span> iy <span class="org-type">&gt;</span> 1
yticklabels({});
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
linkaxes(p_handle, <span class="org-string">'xy'</span>)
@ -733,37 +733,37 @@ If wanted, the 6x6 transmissibility matrix is plotted.
han.YLabel.Visible = <span class="org-string">'on'</span>;
xlabel(han, <span class="org-string">'Frequency [Hz]'</span>);
ylabel(han, <span class="org-string">'Transmissibility [m/m]'</span>);
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgfd96322" class="outline-4">
<h4 id="orgfd96322">Computation of the Frobenius norm</h4>
<div class="outline-text-4" id="text-orgfd96322">
<div id="outline-container-orgbc9a383" class="outline-4">
<h4 id="orgbc9a383">Computation of the Frobenius norm</h4>
<div class="outline-text-4" id="text-orgbc9a383">
<div class="org-src-container">
<pre class="src src-matlab"> T_norm = zeros(length(freqs), 1);
<pre class="src src-matlab">T_norm = zeros(length(freqs), 1);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(freqs)</span>
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(freqs)</span>
T_norm(<span class="org-constant">i</span>) = sqrt(trace(freqresp(T, freqs(<span class="org-constant">i</span>), <span class="org-string">'Hz'</span>)<span class="org-type">*</span>freqresp(T, freqs(<span class="org-constant">i</span>), <span class="org-string">'Hz'</span>)<span class="org-type">'</span>));
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> T_norm = T_norm<span class="org-type">/</span>sqrt(6);
<pre class="src src-matlab">T_norm = T_norm<span class="org-type">/</span>sqrt(6);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-keyword">if</span> args.plots
<pre class="src src-matlab"><span class="org-keyword">if</span> args.plots
<span class="org-type">figure</span>;
plot(freqs, T_norm)
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
xlabel(<span class="org-string">'Frequency [Hz]'</span>);
ylabel(<span class="org-string">'Transmissibility - Frobenius Norm'</span>);
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
</div>
@ -778,42 +778,42 @@ If wanted, the 6x6 transmissibility matrix is plotted.
</p>
</div>
<div id="outline-container-orgafb57d0" class="outline-4">
<h4 id="orgafb57d0">Function description</h4>
<div class="outline-text-4" id="text-orgafb57d0">
<div id="outline-container-org210c0ca" class="outline-4">
<h4 id="org210c0ca">Function description</h4>
<div class="outline-text-4" id="text-org210c0ca">
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-keyword">function</span> <span class="org-variable-name">[C, C_norm, freqs]</span> = <span class="org-function-name">computeCompliance</span>(<span class="org-variable-name">args</span>)
<span class="org-comment">% computeCompliance -</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [C, C_norm, freqs] = computeCompliance(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">% - plots [true/false] - Should plot the transmissilibty matrix and its Frobenius norm</span>
<span class="org-comment">% - freqs [] - Frequency vector to estimate the Frobenius norm</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - C [6x6 ss] - Compliance matrix</span>
<span class="org-comment">% - C_norm [length(freqs)x1] - Frobenius norm of the Compliance matrix</span>
<span class="org-comment">% - freqs [length(freqs)x1] - Frequency vector in [Hz]</span>
<pre class="src src-matlab"><span class="org-keyword">function</span> <span class="org-variable-name">[C, C_norm, freqs]</span> = <span class="org-function-name">computeCompliance</span>(<span class="org-variable-name">args</span>)
<span class="org-comment">% computeCompliance -</span>
<span class="org-comment">%</span>
<span class="org-comment">% Syntax: [C, C_norm, freqs] = computeCompliance(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">% - plots [true/false] - Should plot the transmissilibty matrix and its Frobenius norm</span>
<span class="org-comment">% - freqs [] - Frequency vector to estimate the Frobenius norm</span>
<span class="org-comment">%</span>
<span class="org-comment">% Outputs:</span>
<span class="org-comment">% - C [6x6 ss] - Compliance matrix</span>
<span class="org-comment">% - C_norm [length(freqs)x1] - Frobenius norm of the Compliance matrix</span>
<span class="org-comment">% - freqs [length(freqs)x1] - Frequency vector in [Hz]</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orga00af61" class="outline-4">
<h4 id="orga00af61">Optional Parameters</h4>
<div class="outline-text-4" id="text-orga00af61">
<div id="outline-container-org24feeb1" class="outline-4">
<h4 id="org24feeb1">Optional Parameters</h4>
<div class="outline-text-4" id="text-org24feeb1">
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-keyword">arguments</span>
<span class="org-variable-name">args</span>.plots logical {mustBeNumericOrLogical} = <span class="org-constant">false</span>
<span class="org-variable-name">args</span>.freqs double {mustBeNumeric, mustBeNonnegative} = logspace(1,4,1000)
<span class="org-keyword">end</span>
<pre class="src src-matlab"><span class="org-keyword">arguments</span>
<span class="org-variable-name">args</span>.plots logical {mustBeNumericOrLogical} = <span class="org-constant">false</span>
<span class="org-variable-name">args</span>.freqs double {mustBeNumeric, mustBeNonnegative} = logspace(1,4,1000)
<span class="org-keyword">end</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> freqs = args.freqs;
<pre class="src src-matlab">freqs = args.freqs;
</pre>
</div>
</div>
@ -823,22 +823,22 @@ If wanted, the 6x6 transmissibility matrix is plotted.
<h4 id="org2c35042">Identification of the Compliance Matrix</h4>
<div class="outline-text-4" id="text-org2c35042">
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Options for Linearized</span></span>
options = linearizeOptions;
options.SampleTime = 0;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances/F_ext'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% External forces [N, N*m]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Absolute Motion Sensor'</span>], 1, <span class="org-string">'output'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Absolute Motion [m, rad]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Disturbances/F_ext'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% External forces [N, N*m]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Absolute Motion Sensor'</span>], 1, <span class="org-string">'output'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Absolute Motion [m, rad]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
C = linearize(mdl, io, options);
C.InputName = {<span class="org-string">'Fdx'</span>, <span class="org-string">'Fdy'</span>, <span class="org-string">'Fdz'</span>, <span class="org-string">'Mdx'</span>, <span class="org-string">'Mdy'</span>, <span class="org-string">'Mdz'</span>};
C.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
C = linearize(mdl, io, options);
C.InputName = {<span class="org-string">'Fdx'</span>, <span class="org-string">'Fdy'</span>, <span class="org-string">'Fdz'</span>, <span class="org-string">'Mdx'</span>, <span class="org-string">'Mdy'</span>, <span class="org-string">'Mdz'</span>};
C.OutputName = {<span class="org-string">'Edx'</span>, <span class="org-string">'Edy'</span>, <span class="org-string">'Edz'</span>, <span class="org-string">'Erx'</span>, <span class="org-string">'Ery'</span>, <span class="org-string">'Erz'</span>};
</pre>
</div>
@ -846,23 +846,23 @@ If wanted, the 6x6 transmissibility matrix is plotted.
If wanted, the 6x6 transmissibility matrix is plotted.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> p_handle = zeros(6<span class="org-type">*</span>6,1);
<pre class="src src-matlab">p_handle = zeros(6<span class="org-type">*</span>6,1);
<span class="org-keyword">if</span> args.plots
<span class="org-keyword">if</span> args.plots
fig = <span class="org-type">figure</span>;
<span class="org-keyword">for</span> <span class="org-variable-name">ix</span> = <span class="org-constant">1:6</span>
<span class="org-keyword">for</span> <span class="org-variable-name">iy</span> = <span class="org-constant">1:6</span>
p_handle((ix<span class="org-type">-</span>1)<span class="org-type">*</span>6 <span class="org-type">+</span> iy) = subplot(6, 6, (ix<span class="org-type">-</span>1)<span class="org-type">*</span>6 <span class="org-type">+</span> iy);
hold on;
plot(freqs, abs(squeeze(freqresp(C(ix, iy), freqs, <span class="org-string">'Hz'</span>))), <span class="org-string">'k-'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
<span class="org-keyword">if</span> ix <span class="org-type">&lt;</span> 6
xticklabels({});
<span class="org-keyword">for</span> <span class="org-variable-name">iy</span> = <span class="org-constant">1:6</span>
p_handle((ix<span class="org-type">-</span>1)<span class="org-type">*</span>6 <span class="org-type">+</span> iy) = subplot(6, 6, (ix<span class="org-type">-</span>1)<span class="org-type">*</span>6 <span class="org-type">+</span> iy);
hold on;
plot(freqs, abs(squeeze(freqresp(C(ix, iy), freqs, <span class="org-string">'Hz'</span>))), <span class="org-string">'k-'</span>);
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
<span class="org-keyword">if</span> ix <span class="org-type">&lt;</span> 6
xticklabels({});
<span class="org-keyword">end</span>
<span class="org-keyword">if</span> iy <span class="org-type">&gt;</span> 1
yticklabels({});
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
<span class="org-keyword">if</span> iy <span class="org-type">&gt;</span> 1
yticklabels({});
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
linkaxes(p_handle, <span class="org-string">'xy'</span>)
@ -873,34 +873,34 @@ If wanted, the 6x6 transmissibility matrix is plotted.
han.YLabel.Visible = <span class="org-string">'on'</span>;
xlabel(han, <span class="org-string">'Frequency [Hz]'</span>);
ylabel(han, <span class="org-string">'Compliance [m/N, rad/(N*m)]'</span>);
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgbc9a383" class="outline-4">
<h4 id="orgbc9a383">Computation of the Frobenius norm</h4>
<div class="outline-text-4" id="text-orgbc9a383">
<div id="outline-container-orgb002200" class="outline-4">
<h4 id="orgb002200">Computation of the Frobenius norm</h4>
<div class="outline-text-4" id="text-orgb002200">
<div class="org-src-container">
<pre class="src src-matlab"> freqs = args.freqs;
<pre class="src src-matlab">freqs = args.freqs;
C_norm = zeros(length(freqs), 1);
C_norm = zeros(length(freqs), 1);
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(freqs)</span>
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(freqs)</span>
C_norm(<span class="org-constant">i</span>) = sqrt(trace(freqresp(C, freqs(<span class="org-constant">i</span>), <span class="org-string">'Hz'</span>)<span class="org-type">*</span>freqresp(C, freqs(<span class="org-constant">i</span>), <span class="org-string">'Hz'</span>)<span class="org-type">'</span>));
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-keyword">if</span> args.plots
<pre class="src src-matlab"><span class="org-keyword">if</span> args.plots
<span class="org-type">figure</span>;
plot(freqs, C_norm)
<span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'XScale'</span>, <span class="org-string">'log'</span>); <span class="org-type">set</span>(<span class="org-variable-name">gca</span>, <span class="org-string">'YScale'</span>, <span class="org-string">'log'</span>);
xlabel(<span class="org-string">'Frequency [Hz]'</span>);
ylabel(<span class="org-string">'Compliance - Frobenius Norm'</span>);
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
@ -915,7 +915,7 @@ If wanted, the 6x6 transmissibility matrix is plotted.
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-01-08 ven. 15:29</p>
<p class="date">Created: 2021-01-08 ven. 15:52</p>
</div>
</body>
</html>

View File

@ -3,7 +3,7 @@
"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-01-08 ven. 15:17 -->
<!-- 2021-01-08 ven. 15:52 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Kinematic Study of the Stewart Platform</title>
<meta name="generator" content="Org mode" />
@ -11,22 +11,22 @@
<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>
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">
@ -60,14 +60,14 @@
</li>
<li><a href="#orgbb09f83">4. Estimation of the range validity of the approximate inverse kinematics</a>
<ul>
<li><a href="#org78ce060">4.1. Stewart architecture definition</a></li>
<li><a href="#orga79cde2">4.1. Stewart architecture definition</a></li>
<li><a href="#org34777fa">4.2. Comparison for &ldquo;pure&rdquo; translations</a></li>
<li><a href="#org76d9fc1">4.3. Conclusion</a></li>
</ul>
</li>
<li><a href="#org091e857">5. Estimated required actuator stroke from specified platform mobility</a>
<ul>
<li><a href="#org34f6e0e">5.1. Stewart architecture definition</a></li>
<li><a href="#org7b16d1f">5.1. Stewart architecture definition</a></li>
<li><a href="#org82ba572">5.2. Wanted translations and rotations</a></li>
<li><a href="#org5897eab">5.3. Needed stroke for &ldquo;pure&rdquo; rotations or translations</a></li>
<li><a href="#org1674055">5.4. Needed stroke for &ldquo;combined&rdquo; rotations or translations</a></li>
@ -75,7 +75,7 @@
</li>
<li><a href="#orgb685a81">6. Estimated platform mobility from specified actuator stroke</a>
<ul>
<li><a href="#orga79cde2">6.1. Stewart architecture definition</a></li>
<li><a href="#org555f3a5">6.1. Stewart architecture definition</a></li>
<li><a href="#orga6e12fe">6.2. Pure translations</a></li>
</ul>
</li>
@ -96,8 +96,8 @@
<ul>
<li><a href="#org7a0813a">8.1. <code>computeJacobian</code>: Compute the Jacobian Matrix</a>
<ul>
<li><a href="#org7f0fcca">Function description</a></li>
<li><a href="#orgf06bd47">Check the <code>stewart</code> structure elements</a></li>
<li><a href="#org8a3d2ba">Function description</a></li>
<li><a href="#org5f6ad77">Check the <code>stewart</code> structure elements</a></li>
<li><a href="#org01f1158">Compute Jacobian Matrix</a></li>
<li><a href="#org91d652d">Compute Stiffness Matrix</a></li>
<li><a href="#org323b34e">Compute Compliance Matrix</a></li>
@ -107,17 +107,17 @@
<li><a href="#org710c2c8">8.2. <code>inverseKinematics</code>: Compute Inverse Kinematics</a>
<ul>
<li><a href="#orge7e6266">Theory</a></li>
<li><a href="#org39a0af1">Function description</a></li>
<li><a href="#orgcb9b73a">Optional Parameters</a></li>
<li><a href="#org31e89c1">Check the <code>stewart</code> structure elements</a></li>
<li><a href="#org6586e8a">Function description</a></li>
<li><a href="#orgf078a15">Optional Parameters</a></li>
<li><a href="#org4151034">Check the <code>stewart</code> structure elements</a></li>
<li><a href="#org7189e65">Compute</a></li>
</ul>
</li>
<li><a href="#orgdc218cd">8.3. <code>forwardKinematicsApprox</code>: Compute the Approximate Forward Kinematics</a>
<ul>
<li><a href="#org8a3d2ba">Function description</a></li>
<li><a href="#orgf078a15">Optional Parameters</a></li>
<li><a href="#org5f6ad77">Check the <code>stewart</code> structure elements</a></li>
<li><a href="#org9b19ae7">Function description</a></li>
<li><a href="#orgdf60206">Optional Parameters</a></li>
<li><a href="#org2c19f08">Check the <code>stewart</code> structure elements</a></li>
<li><a href="#orga496714">Computation</a></li>
</ul>
</li>
@ -442,7 +442,7 @@ The function <code>forwardKinematicsApprox</code> (described <a href="#orgb960ae
<a id="org5f8c5ea"></a>
</p>
<div class="note" id="org919aba4">
<div class="note" id="org9501cc6">
<p>
The Matlab script corresponding to this section is accessible <a href="../matlab/kinematic_study_approximation_validity.m">here</a>.
</p>
@ -464,23 +464,23 @@ This will also gives us the range for which the approximate forward kinematic is
</p>
</div>
<div id="outline-container-org78ce060" class="outline-3">
<h3 id="org78ce060"><span class="section-number-3">4.1</span> Stewart architecture definition</h3>
<div id="outline-container-orga79cde2" class="outline-3">
<h3 id="orga79cde2"><span class="section-number-3">4.1</span> Stewart architecture definition</h3>
<div class="outline-text-3" id="text-4-1">
<p>
We first define some general Stewart architecture.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart);
stewart = computeJacobian(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart);
stewart = computeJacobian(stewart);
</pre>
</div>
</div>
@ -499,16 +499,16 @@ The estimate required strut stroke for both the approximate and exact solutions
The relative strut length displacement is shown in Figure <a href="#orgb451b90">2</a>.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Xrs = logspace(<span class="org-type">-</span>6, <span class="org-type">-</span>1, 100); <span class="org-comment">% Wanted X translation of the mobile platform [m]</span>
<pre class="src src-matlab">Xrs = logspace(<span class="org-type">-</span>6, <span class="org-type">-</span>1, 100); <span class="org-comment">% Wanted X translation of the mobile platform [m]</span>
Ls_approx = zeros(6, length(Xrs));
Ls_exact = zeros(6, length(Xrs));
Ls_approx = zeros(6, length(Xrs));
Ls_exact = zeros(6, length(Xrs));
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(Xrs)</span>
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(Xrs)</span>
Xr = Xrs(<span class="org-constant">i</span>);
L_approx(<span class="org-type">:</span>, <span class="org-constant">i</span>) = stewart.kinematics.J<span class="org-type">*</span>[Xr; 0; 0; 0; 0; 0;];
[<span class="org-type">~</span>, L_exact(<span class="org-type">:</span>, <span class="org-constant">i</span>)] = inverseKinematics(stewart, <span class="org-string">'AP'</span>, [Xr; 0; 0]);
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
@ -531,7 +531,7 @@ The relative strut length displacement is shown in Figure <a href="#orgb451b90">
<div id="outline-container-org76d9fc1" class="outline-3">
<h3 id="org76d9fc1"><span class="section-number-3">4.3</span> Conclusion</h3>
<div class="outline-text-3" id="text-4-3">
<div class="important" id="org3d5a817">
<div class="important" id="orgfe0578a">
<p>
For small wanted displacements (up to \(\approx 1\%\) of the size of the Hexapod), the approximate inverse kinematic solution using the Jacobian matrix is quite correct.
</p>
@ -548,7 +548,7 @@ For small wanted displacements (up to \(\approx 1\%\) of the size of the Hexapod
<a id="orgb1464b6"></a>
</p>
<div class="note" id="org7858fd4">
<div class="note" id="org4fab0bc">
<p>
The Matlab script corresponding to this section is accessible <a href="../matlab/kinematic_study_required_actuator_stroke.m">here</a>.
</p>
@ -565,23 +565,23 @@ This is what is analyzed in this section.
</p>
</div>
<div id="outline-container-org34f6e0e" class="outline-3">
<h3 id="org34f6e0e"><span class="section-number-3">5.1</span> Stewart architecture definition</h3>
<div id="outline-container-org7b16d1f" class="outline-3">
<h3 id="org7b16d1f"><span class="section-number-3">5.1</span> Stewart architecture definition</h3>
<div class="outline-text-3" id="text-5-1">
<p>
Let&rsquo;s first define the Stewart platform architecture that we want to study.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart);
stewart = computeJacobian(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart);
stewart = computeJacobian(stewart);
</pre>
</div>
</div>
@ -594,12 +594,12 @@ Let&rsquo;s first define the Stewart platform architecture that we want to study
Let&rsquo;s now define the wanted extreme translations and rotations.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Tx_max = 50e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Ty_max = 50e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Tz_max = 50e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Rx_max = 30e<span class="org-type">-</span>6; <span class="org-comment">% Rotation [rad]</span>
Ry_max = 30e<span class="org-type">-</span>6; <span class="org-comment">% Rotation [rad]</span>
Rz_max = 0; <span class="org-comment">% Rotation [rad]</span>
<pre class="src src-matlab">Tx_max = 50e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Ty_max = 50e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Tz_max = 50e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Rx_max = 30e<span class="org-type">-</span>6; <span class="org-comment">% Rotation [rad]</span>
Ry_max = 30e<span class="org-type">-</span>6; <span class="org-comment">% Rotation [rad]</span>
Rz_max = 0; <span class="org-comment">% Rotation [rad]</span>
</pre>
</div>
</div>
@ -614,12 +614,12 @@ We do that using either the Inverse Kinematic solution or the Jacobian matrix as
</p>
<div class="org-src-container">
<pre class="src src-matlab"> LTx = stewart.kinematics.J<span class="org-type">*</span>[Tx_max 0 0 0 0 0]<span class="org-type">'</span>;
LTy = stewart.kinematics.J<span class="org-type">*</span>[0 Ty_max 0 0 0 0]<span class="org-type">'</span>;
LTz = stewart.kinematics.J<span class="org-type">*</span>[0 0 Tz_max 0 0 0]<span class="org-type">'</span>;
LRx = stewart.kinematics.J<span class="org-type">*</span>[0 0 0 Rx_max 0 0]<span class="org-type">'</span>;
LRy = stewart.kinematics.J<span class="org-type">*</span>[0 0 0 0 Ry_max 0]<span class="org-type">'</span>;
LRz = stewart.kinematics.J<span class="org-type">*</span>[0 0 0 0 0 Rz_max]<span class="org-type">'</span>;
<pre class="src src-matlab">LTx = stewart.kinematics.J<span class="org-type">*</span>[Tx_max 0 0 0 0 0]<span class="org-type">'</span>;
LTy = stewart.kinematics.J<span class="org-type">*</span>[0 Ty_max 0 0 0 0]<span class="org-type">'</span>;
LTz = stewart.kinematics.J<span class="org-type">*</span>[0 0 Tz_max 0 0 0]<span class="org-type">'</span>;
LRx = stewart.kinematics.J<span class="org-type">*</span>[0 0 0 Rx_max 0 0]<span class="org-type">'</span>;
LRy = stewart.kinematics.J<span class="org-type">*</span>[0 0 0 0 Ry_max 0]<span class="org-type">'</span>;
LRz = stewart.kinematics.J<span class="org-type">*</span>[0 0 0 0 0 Rz_max]<span class="org-type">'</span>;
</pre>
</div>
@ -652,7 +652,7 @@ To do so, we may estimate the required actuator stroke for all possible combinat
Let&rsquo;s first generate all the possible combination of maximum translation and rotations.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Ps = [2<span class="org-type">*</span>(dec2bin(0<span class="org-type">:</span>5<span class="org-type">^</span>2<span class="org-type">-</span>1,5)<span class="org-type">-</span><span class="org-string">'0'</span>)<span class="org-type">-</span>1, zeros(5<span class="org-type">^</span>2, 1)]<span class="org-type">.*</span>[Tx_max Ty_max Tz_max Rx_max Ry_max Rz_max];
<pre class="src src-matlab">Ps = [2<span class="org-type">*</span>(dec2bin(0<span class="org-type">:</span>5<span class="org-type">^</span>2<span class="org-type">-</span>1,5)<span class="org-type">-</span><span class="org-string">'0'</span>)<span class="org-type">-</span>1, zeros(5<span class="org-type">^</span>2, 1)]<span class="org-type">.*</span>[Tx_max Ty_max Tz_max Rx_max Ry_max Rz_max];
</pre>
</div>
@ -914,17 +914,17 @@ Let&rsquo;s first generate all the possible combination of maximum translation a
For all possible combination, we compute the required actuator stroke using the inverse kinematic solution.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> L_min = 0;
L_max = 0;
<pre class="src src-matlab">L_min = 0;
L_max = 0;
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:size(Ps,1)</span>
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:size(Ps,1)</span>
Rx = [1 0 0;
0 cos(Ps(<span class="org-constant">i</span>, 4)) <span class="org-type">-</span>sin(Ps(<span class="org-constant">i</span>, 4));
0 sin(Ps(<span class="org-constant">i</span>, 4)) cos(Ps(<span class="org-constant">i</span>, 4))];
Ry = [ cos(Ps(<span class="org-constant">i</span>, 5)) 0 sin(Ps(<span class="org-constant">i</span>, 5));
0 1 0;
<span class="org-type">-</span>sin(Ps(<span class="org-constant">i</span>, 5)) 0 cos(Ps(<span class="org-constant">i</span>, 5))];
0 1 0;
<span class="org-type">-</span>sin(Ps(<span class="org-constant">i</span>, 5)) 0 cos(Ps(<span class="org-constant">i</span>, 5))];
Rz = [cos(Ps(<span class="org-constant">i</span>, 6)) <span class="org-type">-</span>sin(Ps(<span class="org-constant">i</span>, 6)) 0;
sin(Ps(<span class="org-constant">i</span>, 6)) cos(Ps(<span class="org-constant">i</span>, 6)) 0;
@ -934,12 +934,12 @@ For all possible combination, we compute the required actuator stroke using the
[<span class="org-type">~</span>, Ls] = inverseKinematics(stewart, <span class="org-string">'AP'</span>, Ps(<span class="org-constant">i</span>, 1<span class="org-type">:</span>3)<span class="org-type">'</span>, <span class="org-string">'ARB'</span>, ARB);
<span class="org-keyword">if</span> min(Ls) <span class="org-type">&lt;</span> L_min
L_min = min(Ls)
L_min = min(Ls)
<span class="org-keyword">end</span>
<span class="org-keyword">if</span> max(Ls) <span class="org-type">&gt;</span> L_max
L_max = max(Ls)
L_max = max(Ls)
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
@ -965,7 +965,7 @@ This is probably a much realistic estimation of the required actuator stroke.
<a id="orge61164c"></a>
</p>
<div class="note" id="orge5bfdd7">
<div class="note" id="orgc9ecb6b">
<p>
The Matlab script corresponding to this section is accessible <a href="../matlab/kinematic_study_mobility.m">here</a>.
</p>
@ -985,23 +985,23 @@ However, for small displacements, we can use the Jacobian as an approximate solu
</p>
</div>
<div id="outline-container-orga79cde2" class="outline-3">
<h3 id="orga79cde2"><span class="section-number-3">6.1</span> Stewart architecture definition</h3>
<div id="outline-container-org555f3a5" class="outline-3">
<h3 id="org555f3a5"><span class="section-number-3">6.1</span> Stewart architecture definition</h3>
<div class="outline-text-3" id="text-6-1">
<p>
Let&rsquo;s first define the Stewart platform architecture that we want to study.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart);
stewart = computeJacobian(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart);
stewart = computeJacobian(stewart);
</pre>
</div>
@ -1009,8 +1009,8 @@ Let&rsquo;s first define the Stewart platform architecture that we want to study
Let&rsquo;s now define the actuator stroke.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> L_min = <span class="org-type">-</span>50e<span class="org-type">-</span>6; <span class="org-comment">% [m]</span>
L_max = 50e<span class="org-type">-</span>6; <span class="org-comment">% [m]</span>
<pre class="src src-matlab">L_min = <span class="org-type">-</span>50e<span class="org-type">-</span>6; <span class="org-comment">% [m]</span>
L_max = 50e<span class="org-type">-</span>6; <span class="org-comment">% [m]</span>
</pre>
</div>
</div>
@ -1038,21 +1038,21 @@ To obtain the mobility &ldquo;volume&rdquo; attainable by the Stewart platform w
For each possible value of \((\theta, \phi)\), we compute the maximum radius \(r\) attainable with the constraint that the stroke of each actuator should be between <code>L_min</code> and <code>L_max</code>.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> thetas = linspace(0, <span class="org-constant">pi</span>, 50);
phis = linspace(0, 2<span class="org-type">*</span><span class="org-constant">pi</span>, 50);
rs = zeros(length(thetas), length(phis));
<pre class="src src-matlab">thetas = linspace(0, <span class="org-constant">pi</span>, 50);
phis = linspace(0, 2<span class="org-type">*</span><span class="org-constant">pi</span>, 50);
rs = zeros(length(thetas), length(phis));
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(thetas)</span>
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">i</span></span> = <span class="org-constant">1:length(thetas)</span>
<span class="org-keyword">for</span> <span class="org-variable-name"><span class="org-constant">j</span></span> = <span class="org-constant">1:length(phis)</span>
Tx = sin(thetas(<span class="org-constant">i</span>))<span class="org-type">*</span>cos(phis(<span class="org-constant">j</span>));
Ty = sin(thetas(<span class="org-constant">i</span>))<span class="org-type">*</span>sin(phis(<span class="org-constant">j</span>));
Tz = cos(thetas(<span class="org-constant">i</span>));
Tx = sin(thetas(<span class="org-constant">i</span>))<span class="org-type">*</span>cos(phis(<span class="org-constant">j</span>));
Ty = sin(thetas(<span class="org-constant">i</span>))<span class="org-type">*</span>sin(phis(<span class="org-constant">j</span>));
Tz = cos(thetas(<span class="org-constant">i</span>));
dL = stewart.kinematics.J<span class="org-type">*</span>[Tx; Ty; Tz; 0; 0; 0;]; <span class="org-comment">% dL required for 1m displacement in theta/phi direction</span>
dL = stewart.kinematics.J<span class="org-type">*</span>[Tx; Ty; Tz; 0; 0; 0;]; <span class="org-comment">% dL required for 1m displacement in theta/phi direction</span>
rs(<span class="org-constant">i</span>, <span class="org-constant">j</span>) = max([dL(dL<span class="org-type">&lt;</span>0)<span class="org-type">*</span>L_min; dL(dL<span class="org-type">&gt;</span>0)<span class="org-type">*</span>L_max]);
rs(<span class="org-constant">i</span>, <span class="org-constant">j</span>) = max([dL(dL<span class="org-type">&lt;</span>0)<span class="org-type">*</span>L_min; dL(dL<span class="org-type">&gt;</span>0)<span class="org-type">*</span>L_max]);
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
@ -1109,63 +1109,63 @@ We can also approximate the mobility by a sphere with a radius equal to the mini
Let&rsquo;s first define the Stewart Platform Geometry.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 150e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart, <span class="org-string">'AP'</span>, [0; 0; 0]);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 150e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart, <span class="org-string">'AP'</span>, [0; 0; 0]);
As_init = stewart.geometry.As;
As_init = stewart.geometry.As;
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> Tx_max = 60e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Ty_max = 60e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Tz_max = 60e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Rx_max = 30e<span class="org-type">-</span>6; <span class="org-comment">% Rotation [rad]</span>
Ry_max = 30e<span class="org-type">-</span>6; <span class="org-comment">% Rotation [rad]</span>
Rz_max = 0; <span class="org-comment">% Rotation [rad]</span>
<pre class="src src-matlab">Tx_max = 60e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Ty_max = 60e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Tz_max = 60e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Rx_max = 30e<span class="org-type">-</span>6; <span class="org-comment">% Rotation [rad]</span>
Ry_max = 30e<span class="org-type">-</span>6; <span class="org-comment">% Rotation [rad]</span>
Rz_max = 0; <span class="org-comment">% Rotation [rad]</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> Ps = [2<span class="org-type">*</span>(dec2bin(0<span class="org-type">:</span>5<span class="org-type">^</span>2<span class="org-type">-</span>1,5)<span class="org-type">-</span><span class="org-string">'0'</span>)<span class="org-type">-</span>1, zeros(5<span class="org-type">^</span>2, 1)]<span class="org-type">.*</span>[Tx_max Ty_max Tz_max Rx_max Ry_max Rz_max];
<pre class="src src-matlab">Ps = [2<span class="org-type">*</span>(dec2bin(0<span class="org-type">:</span>5<span class="org-type">^</span>2<span class="org-type">-</span>1,5)<span class="org-type">-</span><span class="org-string">'0'</span>)<span class="org-type">-</span>1, zeros(5<span class="org-type">^</span>2, 1)]<span class="org-type">.*</span>[Tx_max Ty_max Tz_max Rx_max Ry_max Rz_max];
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> flex_ang = zeros(size(Ps, 1), 6);
Rxs = zeros(size(Ps, 1), 6)
Rys = zeros(size(Ps, 1), 6)
Rzs = zeros(size(Ps, 1), 6)
<pre class="src src-matlab">flex_ang = zeros(size(Ps, 1), 6);
Rxs = zeros(size(Ps, 1), 6)
Rys = zeros(size(Ps, 1), 6)
Rzs = zeros(size(Ps, 1), 6)
<span class="org-keyword">for</span> <span class="org-variable-name">Ps_i</span> = <span class="org-constant">1:size(Ps, 1)</span>
Rx = [1 0 0;
0 cos(Ps(Ps_i, 4)) <span class="org-type">-</span>sin(Ps(Ps_i, 4));
0 sin(Ps(Ps_i, 4)) cos(Ps(Ps_i, 4))];
<span class="org-keyword">for</span> <span class="org-variable-name">Ps_i</span> = <span class="org-constant">1:size(Ps, 1)</span>
Rx = [1 0 0;
0 cos(Ps(Ps_i, 4)) <span class="org-type">-</span>sin(Ps(Ps_i, 4));
0 sin(Ps(Ps_i, 4)) cos(Ps(Ps_i, 4))];
Ry = [ cos(Ps(Ps_i, 5)) 0 sin(Ps(Ps_i, 5));
0 1 0;
<span class="org-type">-</span>sin(Ps(Ps_i, 5)) 0 cos(Ps(Ps_i, 5))];
Ry = [ cos(Ps(Ps_i, 5)) 0 sin(Ps(Ps_i, 5));
0 1 0;
<span class="org-type">-</span>sin(Ps(Ps_i, 5)) 0 cos(Ps(Ps_i, 5))];
Rz = [cos(Ps(Ps_i, 6)) <span class="org-type">-</span>sin(Ps(Ps_i, 6)) 0;
sin(Ps(Ps_i, 6)) cos(Ps(Ps_i, 6)) 0;
0 0 1];
Rz = [cos(Ps(Ps_i, 6)) <span class="org-type">-</span>sin(Ps(Ps_i, 6)) 0;
sin(Ps(Ps_i, 6)) cos(Ps(Ps_i, 6)) 0;
0 0 1];
ARB = Rz<span class="org-type">*</span>Ry<span class="org-type">*</span>Rx;
ARB = Rz<span class="org-type">*</span>Ry<span class="org-type">*</span>Rx;
stewart = computeJointsPose(stewart, <span class="org-string">'AP'</span>, Ps(Ps_i, 1<span class="org-type">:</span>3)<span class="org-type">'</span>, <span class="org-string">'ARB'</span>, ARB);
stewart = computeJointsPose(stewart, <span class="org-string">'AP'</span>, Ps(Ps_i, 1<span class="org-type">:</span>3)<span class="org-type">'</span>, <span class="org-string">'ARB'</span>, ARB);
flex_ang(Ps_i, <span class="org-type">:</span>) = acos(sum(As_init<span class="org-type">.*</span>stewart.geometry.As));
flex_ang(Ps_i, <span class="org-type">:</span>) = acos(sum(As_init<span class="org-type">.*</span>stewart.geometry.As));
<span class="org-keyword">for</span> <span class="org-variable-name">l_i</span> = <span class="org-constant">1:6</span>
MRf = stewart.platform_M.MRb(<span class="org-type">:</span>,<span class="org-type">:</span>,l_i)<span class="org-type">*</span>(ARB<span class="org-type">'</span>)<span class="org-type">*</span>(stewart.platform_F.FRa(<span class="org-type">:</span>,<span class="org-type">:</span>,l_i)<span class="org-type">'</span>);
<span class="org-keyword">for</span> <span class="org-variable-name">l_i</span> = <span class="org-constant">1:6</span>
MRf = stewart.platform_M.MRb(<span class="org-type">:</span>,<span class="org-type">:</span>,l_i)<span class="org-type">*</span>(ARB<span class="org-type">'</span>)<span class="org-type">*</span>(stewart.platform_F.FRa(<span class="org-type">:</span>,<span class="org-type">:</span>,l_i)<span class="org-type">'</span>);
Rys(Ps_i, l_i) = atan2(MRf(1,3), sqrt(MRf(1,1)<span class="org-type">^</span>2 <span class="org-type">+</span> MRf(2,2)<span class="org-type">^</span>2));
Rxs(Ps_i, l_i) = atan2(<span class="org-type">-</span>MRf(2,3)<span class="org-type">/</span>cos(Rys(Ps_i, l_i)), MRf(3,3)<span class="org-type">/</span>cos(Rys(Ps_i, l_i)));
Rzs(Ps_i, l_i) = atan2(<span class="org-type">-</span>MRf(1,2)<span class="org-type">/</span>cos(Rys(Ps_i, l_i)), MRf(1,1)<span class="org-type">/</span>cos(Rys(Ps_i, l_i)));
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
Rys(Ps_i, l_i) = atan2(MRf(1,3), sqrt(MRf(1,1)<span class="org-type">^</span>2 <span class="org-type">+</span> MRf(2,2)<span class="org-type">^</span>2));
Rxs(Ps_i, l_i) = atan2(<span class="org-type">-</span>MRf(2,3)<span class="org-type">/</span>cos(Rys(Ps_i, l_i)), MRf(3,3)<span class="org-type">/</span>cos(Rys(Ps_i, l_i)));
Rzs(Ps_i, l_i) = atan2(<span class="org-type">-</span>MRf(1,2)<span class="org-type">/</span>cos(Rys(Ps_i, l_i)), MRf(1,1)<span class="org-type">/</span>cos(Rys(Ps_i, l_i)));
<span class="org-keyword">end</span>
<span class="org-keyword">end</span>
</pre>
</div>
@ -1173,7 +1173,7 @@ Let&rsquo;s first define the Stewart Platform Geometry.
And the maximum bending of the flexible joints is: (in [mrad])
</p>
<div class="org-src-container">
<pre class="src src-matlab"> 1e3<span class="org-type">*</span>max(max(abs(flex_ang)))
<pre class="src src-matlab">1e3<span class="org-type">*</span>max(max(abs(flex_ang)))
</pre>
</div>
@ -1183,7 +1183,7 @@ And the maximum bending of the flexible joints is: (in [mrad])
<div class="org-src-container">
<pre class="src src-matlab"> 1e3<span class="org-type">*</span>max(max(sqrt(Rxs<span class="org-type">.^</span>2 <span class="org-type">+</span> Rys<span class="org-type">.^</span>2)))
<pre class="src src-matlab">1e3<span class="org-type">*</span>max(max(sqrt(Rxs<span class="org-type">.^</span>2 <span class="org-type">+</span> Rys<span class="org-type">.^</span>2)))
</pre>
</div>
@ -1193,7 +1193,7 @@ And the maximum bending of the flexible joints is: (in [mrad])
<div class="org-src-container">
<pre class="src src-matlab"> 1e3<span class="org-type">*</span>max(max(Rzs))
<pre class="src src-matlab">1e3<span class="org-type">*</span>max(max(Rzs))
</pre>
</div>
@ -1211,31 +1211,31 @@ And the maximum bending of the flexible joints is: (in [mrad])
<h4 id="org656927f"><span class="section-number-4">7.2.1</span> Model Init</h4>
<div class="outline-text-4" id="text-7-2-1">
<div class="org-src-container">
<pre class="src src-matlab"> open(<span class="org-string">'stewart_platform_model.slx'</span>)
<pre class="src src-matlab">open(<span class="org-string">'stewart_platform_model.slx'</span>)
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'accelerometer'</span>, <span class="org-string">'freq'</span>, 5e3);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 45e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'universal_p'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical_p'</span>);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, <span class="org-string">'type'</span>, <span class="org-string">'accelerometer'</span>, <span class="org-string">'freq'</span>, 5e3);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
disturbances = initializeDisturbances();
references = initializeReferences(stewart);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
disturbances = initializeDisturbances();
references = initializeReferences(stewart);
</pre>
</div>
</div>
@ -1245,29 +1245,29 @@ And the maximum bending of the flexible joints is: (in [mrad])
<h4 id="orgc18819c"><span class="section-number-4">7.2.2</span> Controller design to be close to the wanted displacement</h4>
<div class="outline-text-4" id="text-7-2-2">
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<pre class="src src-matlab"><span class="org-matlab-cellbreak"><span class="org-comment">%% Name of the Simulink File</span></span>
mdl = <span class="org-string">'stewart_platform_model'</span>;
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'dLm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Input/Output definition</span></span>
clear io; io_i = 1;
io(io_i) = linio([mdl, <span class="org-string">'/Controller'</span>], 1, <span class="org-string">'openinput'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Actuator Force Inputs [N]</span>
io(io_i) = linio([mdl, <span class="org-string">'/Stewart Platform'</span>], 1, <span class="org-string">'openoutput'</span>, [], <span class="org-string">'dLm'</span>); io_i = io_i <span class="org-type">+</span> 1; <span class="org-comment">% Relative Displacement Outputs [m]</span>
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'L1'</span>, <span class="org-string">'L2'</span>, <span class="org-string">'L3'</span>, <span class="org-string">'L4'</span>, <span class="org-string">'L5'</span>, <span class="org-string">'L6'</span>};
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
G = linearize(mdl, io);
G.InputName = {<span class="org-string">'F1'</span>, <span class="org-string">'F2'</span>, <span class="org-string">'F3'</span>, <span class="org-string">'F4'</span>, <span class="org-string">'F5'</span>, <span class="org-string">'F6'</span>};
G.OutputName = {<span class="org-string">'L1'</span>, <span class="org-string">'L2'</span>, <span class="org-string">'L3'</span>, <span class="org-string">'L4'</span>, <span class="org-string">'L5'</span>, <span class="org-string">'L6'</span>};
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> wc = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>30;
Kl = diag(1<span class="org-type">./</span>diag(abs(freqresp(G, wc)))) <span class="org-type">*</span> wc<span class="org-type">/</span>s <span class="org-type">*</span> 1<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>3<span class="org-type">/</span>wc);
<pre class="src src-matlab">wc = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>30;
Kl = diag(1<span class="org-type">./</span>diag(abs(freqresp(G, wc)))) <span class="org-type">*</span> wc<span class="org-type">/</span>s <span class="org-type">*</span> 1<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>3<span class="org-type">/</span>wc);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'ref-track-L'</span>);
<pre class="src src-matlab">controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'ref-track-L'</span>);
</pre>
</div>
</div>
@ -1277,34 +1277,34 @@ And the maximum bending of the flexible joints is: (in [mrad])
<h4 id="orgd125932"><span class="section-number-4">7.2.3</span> Simulations</h4>
<div class="outline-text-4" id="text-7-2-3">
<div class="org-src-container">
<pre class="src src-matlab"> Tx_max = 60e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Ty_max = 60e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Tz_max = 60e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Rx_max = 30e<span class="org-type">-</span>6; <span class="org-comment">% Rotation [rad]</span>
Ry_max = 30e<span class="org-type">-</span>6; <span class="org-comment">% Rotation [rad]</span>
Rz_max = 0; <span class="org-comment">% Rotation [rad]</span>
<pre class="src src-matlab">Tx_max = 60e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Ty_max = 60e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Tz_max = 60e<span class="org-type">-</span>6; <span class="org-comment">% Translation [m]</span>
Rx_max = 30e<span class="org-type">-</span>6; <span class="org-comment">% Rotation [rad]</span>
Ry_max = 30e<span class="org-type">-</span>6; <span class="org-comment">% Rotation [rad]</span>
Rz_max = 0; <span class="org-comment">% Rotation [rad]</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> Ps = [2<span class="org-type">*</span>(dec2bin(0<span class="org-type">:</span>5<span class="org-type">^</span>2<span class="org-type">-</span>1,5)<span class="org-type">-</span><span class="org-string">'0'</span>)<span class="org-type">-</span>1, zeros(5<span class="org-type">^</span>2, 1)]<span class="org-type">.*</span>[Tx_max Ty_max Tz_max Rx_max Ry_max Rz_max];
<pre class="src src-matlab">Ps = [2<span class="org-type">*</span>(dec2bin(0<span class="org-type">:</span>5<span class="org-type">^</span>2<span class="org-type">-</span>1,5)<span class="org-type">-</span><span class="org-string">'0'</span>)<span class="org-type">-</span>1, zeros(5<span class="org-type">^</span>2, 1)]<span class="org-type">.*</span>[Tx_max Ty_max Tz_max Rx_max Ry_max Rz_max];
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> cl_perf = zeros(size(Ps, 1), 1); <span class="org-comment">% Closed loop performance [percentage]</span>
Rs = zeros(size(Ps, 1), 5); <span class="org-comment">% Max Flexor angles for the 6 legs [mrad]</span>
<pre class="src src-matlab">cl_perf = zeros(size(Ps, 1), 1); <span class="org-comment">% Closed loop performance [percentage]</span>
Rs = zeros(size(Ps, 1), 5); <span class="org-comment">% Max Flexor angles for the 6 legs [mrad]</span>
<span class="org-keyword">for</span> <span class="org-variable-name">Ps_i</span> = <span class="org-constant">1:size(Ps, 1)</span>
fprintf(<span class="org-string">'Experiment %i over %i'</span>, Ps_i, size(Ps, 1));
<span class="org-keyword">for</span> <span class="org-variable-name">Ps_i</span> = <span class="org-constant">1:size(Ps, 1)</span>
fprintf(<span class="org-string">'Experiment %i over %i'</span>, Ps_i, size(Ps, 1));
references = initializeReferences(stewart, <span class="org-string">'t'</span>, 0, <span class="org-string">'r'</span>, Ps(Ps_i, <span class="org-type">:</span>)<span class="org-type">'</span>);
<span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-string">'stewart_platform_model'</span>,<span class="org-string">'StopTime'</span>,<span class="org-string">'0.1'</span>);
<span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'stewart_platform_model'</span>);
references = initializeReferences(stewart, <span class="org-string">'t'</span>, 0, <span class="org-string">'r'</span>, Ps(Ps_i, <span class="org-type">:</span>)<span class="org-type">'</span>);
<span class="org-matlab-simulink-keyword">set_param</span>(<span class="org-string">'stewart_platform_model'</span>,<span class="org-string">'StopTime'</span>,<span class="org-string">'0.1'</span>);
<span class="org-matlab-simulink-keyword">sim</span>(<span class="org-string">'stewart_platform_model'</span>);
cl_perf(Ps_i) = 100<span class="org-type">*</span>max(abs((simout.y.dLm.Data(end, <span class="org-type">:</span>) <span class="org-type">-</span> references.rL.Data(<span class="org-type">:</span>,1,1)<span class="org-type">'</span>)<span class="org-type">./</span>simout.y.dLm.Data(end, <span class="org-type">:</span>)));
Rs(Ps_i, <span class="org-type">:</span>) = [max(abs(1e3<span class="org-type">*</span>simout.y.Rf.Data(end, 1<span class="org-type">:</span>2<span class="org-type">:</span>end))), max(abs(1e3<span class="org-type">*</span>simout.y.Rf.Data(end, 2<span class="org-type">:</span>2<span class="org-type">:</span>end))), max(abs(1e3<span class="org-type">*</span>simout.y.Rm.Data(end, 1<span class="org-type">:</span>3<span class="org-type">:</span>end))), max(abs(1e3<span class="org-type">*</span>simout.y.Rm.Data(end, 2<span class="org-type">:</span>3<span class="org-type">:</span>end))), max(abs(1e3<span class="org-type">*</span>simout.y.Rm.Data(end, 3<span class="org-type">:</span>3<span class="org-type">:</span>end)))]<span class="org-type">'</span>;
<span class="org-keyword">end</span>
cl_perf(Ps_i) = 100<span class="org-type">*</span>max(abs((simout.y.dLm.Data(end, <span class="org-type">:</span>) <span class="org-type">-</span> references.rL.Data(<span class="org-type">:</span>,1,1)<span class="org-type">'</span>)<span class="org-type">./</span>simout.y.dLm.Data(end, <span class="org-type">:</span>)));
Rs(Ps_i, <span class="org-type">:</span>) = [max(abs(1e3<span class="org-type">*</span>simout.y.Rf.Data(end, 1<span class="org-type">:</span>2<span class="org-type">:</span>end))), max(abs(1e3<span class="org-type">*</span>simout.y.Rf.Data(end, 2<span class="org-type">:</span>2<span class="org-type">:</span>end))), max(abs(1e3<span class="org-type">*</span>simout.y.Rm.Data(end, 1<span class="org-type">:</span>3<span class="org-type">:</span>end))), max(abs(1e3<span class="org-type">*</span>simout.y.Rm.Data(end, 2<span class="org-type">:</span>3<span class="org-type">:</span>end))), max(abs(1e3<span class="org-type">*</span>simout.y.Rm.Data(end, 3<span class="org-type">:</span>3<span class="org-type">:</span>end)))]<span class="org-type">'</span>;
<span class="org-keyword">end</span>
</pre>
</div>
@ -1312,7 +1312,7 @@ And the maximum bending of the flexible joints is: (in [mrad])
Verify that the simulations are all correct:
</p>
<div class="org-src-container">
<pre class="src src-matlab"> max(cl_perf)
<pre class="src src-matlab">max(cl_perf)
</pre>
</div>
@ -1390,43 +1390,43 @@ This Matlab function is accessible <a href="../src/computeJacobian.m">here</a>.
</p>
</div>
<div id="outline-container-org7f0fcca" class="outline-4">
<h4 id="org7f0fcca">Function description</h4>
<div class="outline-text-4" id="text-org7f0fcca">
<div id="outline-container-org8a3d2ba" class="outline-4">
<h4 id="org8a3d2ba">Function description</h4>
<div class="outline-text-4" id="text-org8a3d2ba">
<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">% - geometry.As [3x6] - The 6 unit vectors for each strut expressed in {A}</span>
<span class="org-comment">% - geometry.Ab [3x6] - The 6 position of the joints bi expressed in {A}</span>
<span class="org-comment">% - actuators.K [6x1] - Total stiffness of the actuators</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">% - kinematics.J [6x6] - The Jacobian Matrix</span>
<span class="org-comment">% - kinematics.K [6x6] - The Stiffness Matrix</span>
<span class="org-comment">% - kinematics.C [6x6] - The Compliance Matrix</span>
<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">% - geometry.As [3x6] - The 6 unit vectors for each strut expressed in {A}</span>
<span class="org-comment">% - geometry.Ab [3x6] - The 6 position of the joints bi expressed in {A}</span>
<span class="org-comment">% - actuators.K [6x1] - Total stiffness of the actuators</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">% - kinematics.J [6x6] - The Jacobian Matrix</span>
<span class="org-comment">% - kinematics.K [6x6] - The Stiffness Matrix</span>
<span class="org-comment">% - kinematics.C [6x6] - The Compliance Matrix</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgf06bd47" class="outline-4">
<h4 id="orgf06bd47">Check the <code>stewart</code> structure elements</h4>
<div class="outline-text-4" id="text-orgf06bd47">
<div id="outline-container-org5f6ad77" class="outline-4">
<h4 id="org5f6ad77">Check the <code>stewart</code> structure elements</h4>
<div class="outline-text-4" id="text-org5f6ad77">
<div class="org-src-container">
<pre class="src src-matlab"> assert(isfield(stewart.geometry, <span class="org-string">'As'</span>), <span class="org-string">'stewart.geometry should have attribute As'</span>)
As = stewart.geometry.As;
<pre class="src src-matlab">assert(isfield(stewart.geometry, <span class="org-string">'As'</span>), <span class="org-string">'stewart.geometry should have attribute As'</span>)
As = stewart.geometry.As;
assert(isfield(stewart.geometry, <span class="org-string">'Ab'</span>), <span class="org-string">'stewart.geometry should have attribute Ab'</span>)
Ab = stewart.geometry.Ab;
assert(isfield(stewart.geometry, <span class="org-string">'Ab'</span>), <span class="org-string">'stewart.geometry should have attribute Ab'</span>)
Ab = stewart.geometry.Ab;
assert(isfield(stewart.actuators, <span class="org-string">'K'</span>), <span class="org-string">'stewart.actuators should have attribute K'</span>)
Ki = stewart.actuators.K;
assert(isfield(stewart.actuators, <span class="org-string">'K'</span>), <span class="org-string">'stewart.actuators should have attribute K'</span>)
Ki = stewart.actuators.K;
</pre>
</div>
</div>
@ -1437,7 +1437,7 @@ This Matlab function is accessible <a href="../src/computeJacobian.m">here</a>.
<h4 id="org01f1158">Compute Jacobian Matrix</h4>
<div class="outline-text-4" id="text-org01f1158">
<div class="org-src-container">
<pre class="src src-matlab"> J = [As<span class="org-type">'</span> , cross(Ab, As)<span class="org-type">'</span>];
<pre class="src src-matlab">J = [As<span class="org-type">'</span> , cross(Ab, As)<span class="org-type">'</span>];
</pre>
</div>
</div>
@ -1447,7 +1447,7 @@ This Matlab function is accessible <a href="../src/computeJacobian.m">here</a>.
<h4 id="org91d652d">Compute Stiffness Matrix</h4>
<div class="outline-text-4" id="text-org91d652d">
<div class="org-src-container">
<pre class="src src-matlab"> K = J<span class="org-type">'*</span>diag(Ki)<span class="org-type">*</span>J;
<pre class="src src-matlab">K = J<span class="org-type">'*</span>diag(Ki)<span class="org-type">*</span>J;
</pre>
</div>
</div>
@ -1457,7 +1457,7 @@ This Matlab function is accessible <a href="../src/computeJacobian.m">here</a>.
<h4 id="org323b34e">Compute Compliance Matrix</h4>
<div class="outline-text-4" id="text-org323b34e">
<div class="org-src-container">
<pre class="src src-matlab"> C = inv(K);
<pre class="src src-matlab">C = inv(K);
</pre>
</div>
</div>
@ -1467,9 +1467,9 @@ This Matlab function is accessible <a href="../src/computeJacobian.m">here</a>.
<h4 id="orgebce485">Populate the <code>stewart</code> structure</h4>
<div class="outline-text-4" id="text-orgebce485">
<div class="org-src-container">
<pre class="src src-matlab"> stewart.kinematics.J = J;
stewart.kinematics.K = K;
stewart.kinematics.C = C;
<pre class="src src-matlab">stewart.kinematics.J = J;
stewart.kinematics.K = K;
stewart.kinematics.C = C;
</pre>
</div>
</div>
@ -1525,58 +1525,58 @@ Otherwise, when the limbs&rsquo; lengths derived yield complex numbers, then the
</div>
</div>
<div id="outline-container-org39a0af1" class="outline-4">
<h4 id="org39a0af1">Function description</h4>
<div class="outline-text-4" id="text-org39a0af1">
<div id="outline-container-org6586e8a" class="outline-4">
<h4 id="org6586e8a">Function description</h4>
<div class="outline-text-4" id="text-org6586e8a">
<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">% - geometry.Aa [3x6] - The positions ai expressed in {A}</span>
<span class="org-comment">% - geometry.Bb [3x6] - The positions bi expressed in {B}</span>
<span class="org-comment">% - geometry.l [6x1] - Length of each strut</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 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">% - geometry.Aa [3x6] - The positions ai expressed in {A}</span>
<span class="org-comment">% - geometry.Bb [3x6] - The positions bi expressed in {B}</span>
<span class="org-comment">% - geometry.l [6x1] - Length of each strut</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-orgcb9b73a" class="outline-4">
<h4 id="orgcb9b73a">Optional Parameters</h4>
<div class="outline-text-4" id="text-orgcb9b73a">
<div id="outline-container-orgf078a15" class="outline-4">
<h4 id="orgf078a15">Optional Parameters</h4>
<div class="outline-text-4" id="text-orgf078a15">
<div class="org-src-container">
<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>.AP (3,1) double {mustBeNumeric} = zeros(3,1)
<span class="org-variable-name">args</span>.ARB (3,3) double {mustBeNumeric} = eye(3)
<span class="org-keyword">end</span>
<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>.AP (3,1) double {mustBeNumeric} = zeros(3,1)
<span class="org-variable-name">args</span>.ARB (3,3) double {mustBeNumeric} = eye(3)
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org31e89c1" class="outline-4">
<h4 id="org31e89c1">Check the <code>stewart</code> structure elements</h4>
<div class="outline-text-4" id="text-org31e89c1">
<div id="outline-container-org4151034" class="outline-4">
<h4 id="org4151034">Check the <code>stewart</code> structure elements</h4>
<div class="outline-text-4" id="text-org4151034">
<div class="org-src-container">
<pre class="src src-matlab"> assert(isfield(stewart.geometry, <span class="org-string">'Aa'</span>), <span class="org-string">'stewart.geometry should have attribute Aa'</span>)
Aa = stewart.geometry.Aa;
<pre class="src src-matlab">assert(isfield(stewart.geometry, <span class="org-string">'Aa'</span>), <span class="org-string">'stewart.geometry should have attribute Aa'</span>)
Aa = stewart.geometry.Aa;
assert(isfield(stewart.geometry, <span class="org-string">'Bb'</span>), <span class="org-string">'stewart.geometry should have attribute Bb'</span>)
Bb = stewart.geometry.Bb;
assert(isfield(stewart.geometry, <span class="org-string">'Bb'</span>), <span class="org-string">'stewart.geometry should have attribute Bb'</span>)
Bb = stewart.geometry.Bb;
assert(isfield(stewart.geometry, <span class="org-string">'l'</span>), <span class="org-string">'stewart.geometry should have attribute l'</span>)
l = stewart.geometry.l;
assert(isfield(stewart.geometry, <span class="org-string">'l'</span>), <span class="org-string">'stewart.geometry should have attribute l'</span>)
l = stewart.geometry.l;
</pre>
</div>
</div>
@ -1587,12 +1587,12 @@ Otherwise, when the limbs&rsquo; lengths derived yield complex numbers, then the
<h4 id="org7189e65">Compute</h4>
<div class="outline-text-4" id="text-org7189e65">
<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(Bb<span class="org-type">'*</span>Bb) <span class="org-type">+</span> diag(Aa<span class="org-type">'*</span>Aa) <span class="org-type">-</span> (2<span class="org-type">*</span>args.AP<span class="org-type">'*</span>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>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>Bb)<span class="org-type">'*</span>Aa));
<pre class="src src-matlab">Li = sqrt(args.AP<span class="org-type">'*</span>args.AP <span class="org-type">+</span> diag(Bb<span class="org-type">'*</span>Bb) <span class="org-type">+</span> diag(Aa<span class="org-type">'*</span>Aa) <span class="org-type">-</span> (2<span class="org-type">*</span>args.AP<span class="org-type">'*</span>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>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>Bb)<span class="org-type">'*</span>Aa));
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> dLi = Li<span class="org-type">-</span>l;
<pre class="src src-matlab">dLi = Li<span class="org-type">-</span>l;
</pre>
</div>
</div>
@ -1611,49 +1611,49 @@ This Matlab function is accessible <a href="../src/forwardKinematicsApprox.m">he
</p>
</div>
<div id="outline-container-org8a3d2ba" class="outline-4">
<h4 id="org8a3d2ba">Function description</h4>
<div class="outline-text-4" id="text-org8a3d2ba">
<div id="outline-container-org9b19ae7" class="outline-4">
<h4 id="org9b19ae7">Function description</h4>
<div class="outline-text-4" id="text-org9b19ae7">
<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">% - kinematics.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 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">% - kinematics.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-orgf078a15" class="outline-4">
<h4 id="orgf078a15">Optional Parameters</h4>
<div class="outline-text-4" id="text-orgf078a15">
<div id="outline-container-orgdf60206" class="outline-4">
<h4 id="orgdf60206">Optional Parameters</h4>
<div class="outline-text-4" id="text-orgdf60206">
<div class="org-src-container">
<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>.dL (6,1) double {mustBeNumeric} = zeros(6,1)
<span class="org-keyword">end</span>
<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>.dL (6,1) double {mustBeNumeric} = zeros(6,1)
<span class="org-keyword">end</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org5f6ad77" class="outline-4">
<h4 id="org5f6ad77">Check the <code>stewart</code> structure elements</h4>
<div class="outline-text-4" id="text-org5f6ad77">
<div id="outline-container-org2c19f08" class="outline-4">
<h4 id="org2c19f08">Check the <code>stewart</code> structure elements</h4>
<div class="outline-text-4" id="text-org2c19f08">
<div class="org-src-container">
<pre class="src src-matlab"> assert(isfield(stewart.kinematics, <span class="org-string">'J'</span>), <span class="org-string">'stewart.kinematics should have attribute J'</span>)
J = stewart.kinematics.J;
<pre class="src src-matlab">assert(isfield(stewart.kinematics, <span class="org-string">'J'</span>), <span class="org-string">'stewart.kinematics should have attribute J'</span>)
J = stewart.kinematics.J;
</pre>
</div>
</div>
@ -1668,7 +1668,7 @@ 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 = J<span class="org-type">\</span>args.dL;
<pre class="src src-matlab">X = J<span class="org-type">\</span>args.dL;
</pre>
</div>
@ -1676,7 +1676,7 @@ position and orientation of {B} with respect to {A} using the following formula:
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 class="src src-matlab">P = X(1<span class="org-type">:</span>3);
</pre>
</div>
@ -1685,8 +1685,8 @@ 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 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>
@ -1694,9 +1694,9 @@ using the screw axis.
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 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>
@ -1715,7 +1715,7 @@ We then compute the corresponding rotation matrix.
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-01-08 ven. 15:17</p>
<p class="date">Created: 2021-01-08 ven. 15:52</p>
</div>
</body>
</html>

View File

@ -3,7 +3,7 @@
"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-01-08 ven. 15:30 -->
<!-- 2021-01-08 ven. 15:53 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Stewart Platform - NASS</title>
<meta name="generator" content="Org mode" />
@ -39,36 +39,36 @@
<h3 id="org0167386"><span class="section-number-3">1.1</span> Identification of the Dynamics</h3>
<div class="outline-text-3" id="text-1-1">
<div class="org-src-container">
<pre class="src src-matlab"> apa = load(<span class="org-string">'./mat/APA300ML.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
flex_joint = load(<span class="org-string">'./mat/flexor_ID16.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
<pre class="src src-matlab">apa = load(<span class="org-string">'./mat/APA300ML.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
flex_joint = load(<span class="org-string">'./mat/flexor_ID16.mat'</span>, <span class="org-string">'int_xyz'</span>, <span class="org-string">'int_i'</span>, <span class="org-string">'n_xyz'</span>, <span class="org-string">'n_i'</span>, <span class="org-string">'nodes'</span>, <span class="org-string">'M'</span>, <span class="org-string">'K'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 175e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart, <span class="org-string">'FH'</span>, 20e<span class="org-type">-</span>3, <span class="org-string">'MH'</span>, 20e<span class="org-type">-</span>3, <span class="org-string">'FR'</span>, 228e<span class="org-type">-</span>3<span class="org-type">/</span>2, <span class="org-string">'MR'</span>, 220e<span class="org-type">-</span>3<span class="org-type">/</span>2, <span class="org-string">'FTh'</span>, [<span class="org-type">-</span>9, 9, 120<span class="org-type">-</span>9, 120<span class="org-type">+</span>9, 240<span class="org-type">-</span>9, 240<span class="org-type">+</span>9]<span class="org-type">*</span>(<span class="org-constant">pi</span><span class="org-type">/</span>180), <span class="org-string">'MTh'</span>, [<span class="org-type">-</span>60<span class="org-type">+</span>15, 60<span class="org-type">-</span>15, 60<span class="org-type">+</span>15, 180<span class="org-type">-</span>15, 180<span class="org-type">+</span>15, <span class="org-type">-</span>60<span class="org-type">-</span>15]<span class="org-type">*</span>(<span class="org-constant">pi</span><span class="org-type">/</span>180));
stewart = computeJointsPose(stewart);
stewart = initializeFlexibleStrutDynamics(stewart, <span class="org-string">'H'</span>, 0.03, <span class="org-string">'K'</span>, apa.K, <span class="org-string">'M'</span>, apa.M, <span class="org-string">'n_xyz'</span>, apa.n_xyz, <span class="org-string">'xi'</span>, 0.1, <span class="org-string">'step_file'</span>, <span class="org-string">'mat/APA300ML.STEP'</span>);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_F'</span>, flex_joint.K, <span class="org-string">'M_F'</span>, flex_joint.M, <span class="org-string">'n_xyz_F'</span>, flex_joint.n_xyz, <span class="org-string">'xi_F'</span>, 0.1, <span class="org-string">'step_file_F'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_M'</span>, flex_joint.K, <span class="org-string">'M_M'</span>, flex_joint.M, <span class="org-string">'n_xyz_M'</span>, flex_joint.n_xyz, <span class="org-string">'xi_M'</span>, 0.1, <span class="org-string">'step_file_M'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>);
stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 150e<span class="org-type">-</span>3, <span class="org-string">'Mpr'</span>, 125e<span class="org-type">-</span>3);
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'none'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'none'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
<pre class="src src-matlab">stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, <span class="org-string">'H'</span>, 90e<span class="org-type">-</span>3, <span class="org-string">'MO_B'</span>, 175e<span class="org-type">-</span>3);
stewart = generateGeneralConfiguration(stewart, <span class="org-string">'FH'</span>, 20e<span class="org-type">-</span>3, <span class="org-string">'MH'</span>, 20e<span class="org-type">-</span>3, <span class="org-string">'FR'</span>, 228e<span class="org-type">-</span>3<span class="org-type">/</span>2, <span class="org-string">'MR'</span>, 220e<span class="org-type">-</span>3<span class="org-type">/</span>2, <span class="org-string">'FTh'</span>, [<span class="org-type">-</span>9, 9, 120<span class="org-type">-</span>9, 120<span class="org-type">+</span>9, 240<span class="org-type">-</span>9, 240<span class="org-type">+</span>9]<span class="org-type">*</span>(<span class="org-constant">pi</span><span class="org-type">/</span>180), <span class="org-string">'MTh'</span>, [<span class="org-type">-</span>60<span class="org-type">+</span>15, 60<span class="org-type">-</span>15, 60<span class="org-type">+</span>15, 180<span class="org-type">-</span>15, 180<span class="org-type">+</span>15, <span class="org-type">-</span>60<span class="org-type">-</span>15]<span class="org-type">*</span>(<span class="org-constant">pi</span><span class="org-type">/</span>180));
stewart = computeJointsPose(stewart);
stewart = initializeFlexibleStrutDynamics(stewart, <span class="org-string">'H'</span>, 0.03, <span class="org-string">'K'</span>, apa.K, <span class="org-string">'M'</span>, apa.M, <span class="org-string">'n_xyz'</span>, apa.n_xyz, <span class="org-string">'xi'</span>, 0.1, <span class="org-string">'step_file'</span>, <span class="org-string">'mat/APA300ML.STEP'</span>);
stewart = initializeJointDynamics(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_F'</span>, flex_joint.K, <span class="org-string">'M_F'</span>, flex_joint.M, <span class="org-string">'n_xyz_F'</span>, flex_joint.n_xyz, <span class="org-string">'xi_F'</span>, 0.1, <span class="org-string">'step_file_F'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'flexible'</span>, <span class="org-string">'K_M'</span>, flex_joint.K, <span class="org-string">'M_M'</span>, flex_joint.M, <span class="org-string">'n_xyz_M'</span>, flex_joint.n_xyz, <span class="org-string">'xi_M'</span>, 0.1, <span class="org-string">'step_file_M'</span>, <span class="org-string">'mat/flexor_ID16.STEP'</span>);
stewart = initializeCylindricalPlatforms(stewart, <span class="org-string">'Fpr'</span>, 150e<span class="org-type">-</span>3, <span class="org-string">'Mpr'</span>, 125e<span class="org-type">-</span>3);
stewart = initializeCylindricalStruts(stewart, <span class="org-string">'type_F'</span>, <span class="org-string">'none'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'none'</span>);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'m'</span>, 50);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
<pre class="src src-matlab">ground = initializeGround(<span class="org-string">'type'</span>, <span class="org-string">'none'</span>);
payload = initializePayload(<span class="org-string">'type'</span>, <span class="org-string">'rigid'</span>, <span class="org-string">'m'</span>, 50);
controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'open-loop'</span>);
</pre>
</div>
<div class="org-src-container">
<pre class="src src-matlab"> disturbances = initializeDisturbances();
references = initializeReferences(stewart);
<pre class="src src-matlab">disturbances = initializeDisturbances();
references = initializeReferences(stewart);
</pre>
</div>
</div>
@ -77,7 +77,7 @@
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-01-08 ven. 15:30</p>
<p class="date">Created: 2021-01-08 ven. 15:53</p>
</div>
</body>
</html>

View File

@ -3,7 +3,7 @@
"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-01-08 ven. 15:29 -->
<!-- 2021-01-08 ven. 15:52 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Stewart Platform - Simscape Model</title>
<meta name="generator" content="Org mode" />
@ -48,16 +48,16 @@
<ul>
<li><a href="#orgf4bef70">6.1. Payload</a>
<ul>
<li><a href="#org9c0e404">Function description</a></li>
<li><a href="#orgabc81c1">Optional Parameters</a></li>
<li><a href="#org920bdd0">Function description</a></li>
<li><a href="#orgbc7950f">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="#orgd9e12ef">6.2. Ground</a>
<ul>
<li><a href="#org920bdd0">Function description</a></li>
<li><a href="#orgfa4bbf4">Optional Parameters</a></li>
<li><a href="#orgc300ecf">Function description</a></li>
<li><a href="#org1ee272a">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>
@ -67,8 +67,8 @@
</li>
<li><a href="#org6d3b61e">7. Initialize Disturbances</a>
<ul>
<li><a href="#orgf14752d">Function Declaration and Documentation</a></li>
<li><a href="#orga64679c">Optional Parameters</a></li>
<li><a href="#orgf124972">Function Declaration and Documentation</a></li>
<li><a href="#org668f4bb">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>
@ -76,8 +76,8 @@
</li>
<li><a href="#org93f2d30">8. Initialize References</a>
<ul>
<li><a href="#orgf124972">Function Declaration and Documentation</a></li>
<li><a href="#orgbc7950f">Optional Parameters</a></li>
<li><a href="#org81500bb">Function Declaration and Documentation</a></li>
<li><a href="#org05322ee">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>
@ -144,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(<span class="org-string">'mat/conf_simscape.mat'</span>);
<pre class="src src-matlab">load(<span class="org-string">'mat/conf_simscape.mat'</span>);
</pre>
</div>
@ -152,7 +152,7 @@ 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"> <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 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>
@ -303,50 +303,50 @@ This Matlab function is accessible <a href="../src/initializePayload.m">here</a>
</p>
</div>
<div id="outline-container-org9c0e404" class="outline-4">
<h4 id="org9c0e404">Function description</h4>
<div class="outline-text-4" id="text-org9c0e404">
<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"> <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 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-orgabc81c1" class="outline-4">
<h4 id="orgabc81c1">Optional Parameters</h4>
<div class="outline-text-4" id="text-orgabc81c1">
<div id="outline-container-orgbc7950f" class="outline-4">
<h4 id="orgbc7950f">Optional Parameters</h4>
<div class="outline-text-4" id="text-orgbc7950f">
<div class="org-src-container">
<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 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>
@ -356,16 +356,16 @@ This Matlab function is accessible <a href="../src/initializePayload.m">here</a>
<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"> <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 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>
@ -375,12 +375,12 @@ This Matlab function is accessible <a href="../src/initializePayload.m">here</a>
<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>
@ -399,42 +399,42 @@ This Matlab function is accessible <a href="../src/initializeGround.m">here</a>.
</p>
</div>
<div id="outline-container-org920bdd0" class="outline-4">
<h4 id="org920bdd0">Function description</h4>
<div class="outline-text-4" id="text-org920bdd0">
<div id="outline-container-orgc300ecf" class="outline-4">
<h4 id="orgc300ecf">Function description</h4>
<div class="outline-text-4" id="text-orgc300ecf">
<div class="org-src-container">
<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 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-orgfa4bbf4" class="outline-4">
<h4 id="orgfa4bbf4">Optional Parameters</h4>
<div class="outline-text-4" id="text-orgfa4bbf4">
<div id="outline-container-org1ee272a" class="outline-4">
<h4 id="org1ee272a">Optional Parameters</h4>
<div class="outline-text-4" id="text-org1ee272a">
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-keyword">arguments</span>
<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>
<span class="org-keyword">end</span>
</pre>
</div>
</div>
@ -444,14 +444,14 @@ This Matlab function is accessible <a href="../src/initializeGround.m">here</a>.
<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"> <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 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>
@ -461,8 +461,8 @@ This Matlab function is accessible <a href="../src/initializeGround.m">here</a>.
<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>
@ -472,7 +472,7 @@ This Matlab function is accessible <a href="../src/initializeGround.m">here</a>.
<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>
@ -487,33 +487,33 @@ This Matlab function is accessible <a href="../src/initializeGround.m">here</a>.
</p>
</div>
<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 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"> <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 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-orga64679c" class="outline-3">
<h3 id="orga64679c">Optional Parameters</h3>
<div class="outline-text-3" id="text-orga64679c">
<div id="outline-container-org668f4bb" class="outline-3">
<h3 id="org668f4bb">Optional Parameters</h3>
<div class="outline-text-3" id="text-org668f4bb">
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-keyword">arguments</span>
<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>
<span class="org-keyword">end</span>
</pre>
</div>
</div>
@ -524,7 +524,7 @@ This Matlab function is accessible <a href="../src/initializeGround.m">here</a>.
<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>
@ -534,7 +534,7 @@ This Matlab function is accessible <a href="../src/initializeGround.m">here</a>.
<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>
@ -544,7 +544,7 @@ This Matlab function is accessible <a href="../src/initializeGround.m">here</a>.
<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>
@ -559,32 +559,32 @@ This Matlab function is accessible <a href="../src/initializeGround.m">here</a>.
</p>
</div>
<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 id="outline-container-org81500bb" class="outline-3">
<h3 id="org81500bb">Function Declaration and Documentation</h3>
<div class="outline-text-3" id="text-org81500bb">
<div class="org-src-container">
<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 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-orgbc7950f" class="outline-3">
<h3 id="orgbc7950f">Optional Parameters</h3>
<div class="outline-text-3" id="text-orgbc7950f">
<div id="outline-container-org05322ee" class="outline-3">
<h3 id="org05322ee">Optional Parameters</h3>
<div class="outline-text-3" id="text-org05322ee">
<div class="org-src-container">
<pre class="src src-matlab"> <span class="org-keyword">arguments</span>
<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>
<span class="org-keyword">end</span>
</pre>
</div>
</div>
@ -594,22 +594,22 @@ This Matlab function is accessible <a href="../src/initializeGround.m">here</a>.
<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));
<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>
<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> ...
<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, <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>
[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>
@ -619,8 +619,8 @@ This Matlab function is accessible <a href="../src/initializeGround.m">here</a>.
<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>
@ -629,7 +629,7 @@ This Matlab function is accessible <a href="../src/initializeGround.m">here</a>.
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-01-08 ven. 15:29</p>
<p class="date">Created: 2021-01-08 ven. 15:52</p>
</div>
</body>
</html>

View File

@ -3,7 +3,7 @@
"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-01-08 ven. 15:30 -->
<!-- 2021-01-08 ven. 15:52 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Simulink Project for the Stewart Simscape folder</title>
<meta name="generator" content="Org mode" />
@ -45,7 +45,7 @@ The project can be opened using the <code>simulinkproject</code> function:
</p>
<div class="org-src-container">
<pre class="src src-matlab"> simulinkproject(<span class="org-string">'../'</span>);
<pre class="src src-matlab">simulinkproject(<span class="org-string">'../'</span>);
</pre>
</div>
@ -54,19 +54,19 @@ When the project opens, a startup script is ran.
The startup script is defined below and is exported to the <code>project_startup.m</code> script.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> project = simulinkproject;
projectRoot = project.RootFolder;
<pre class="src src-matlab">project = simulinkproject;
projectRoot = project.RootFolder;
myCacheFolder = fullfile(projectRoot, <span class="org-string">'.SimulinkCache'</span>);
myCodeFolder = fullfile(projectRoot, <span class="org-string">'.SimulinkCode'</span>);
myCacheFolder = fullfile(projectRoot, <span class="org-string">'.SimulinkCache'</span>);
myCodeFolder = fullfile(projectRoot, <span class="org-string">'.SimulinkCode'</span>);
Simulink.fileGenControl(<span class="org-string">'set'</span>,...
<span class="org-string">'CacheFolder'</span>, myCacheFolder,...
<span class="org-string">'CodeGenFolder'</span>, myCodeFolder,...
<span class="org-string">'createDir'</span>, <span class="org-constant">true</span>);
Simulink.fileGenControl(<span class="org-string">'set'</span>,...
<span class="org-string">'CacheFolder'</span>, myCacheFolder,...
<span class="org-string">'CodeGenFolder'</span>, myCodeFolder,...
<span class="org-string">'createDir'</span>, <span class="org-constant">true</span>);
<span class="org-matlab-cellbreak"><span class="org-comment">%% Load the Simscape Configuration</span></span>
load(<span class="org-string">'mat/conf_simscape.mat'</span>);
<span class="org-matlab-cellbreak"><span class="org-comment">%% Load the Simscape Configuration</span></span>
load(<span class="org-string">'mat/conf_simscape.mat'</span>);
</pre>
</div>
@ -74,7 +74,7 @@ The startup script is defined below and is exported to the <code>project_startup
When the project closes, it runs the <code>project_shutdown.m</code> script defined below.
</p>
<div class="org-src-container">
<pre class="src src-matlab"> Simulink.fileGenControl(<span class="org-string">'reset'</span>);
<pre class="src src-matlab">Simulink.fileGenControl(<span class="org-string">'reset'</span>);
</pre>
</div>
@ -84,7 +84,7 @@ The project also permits to automatically add defined folder to the path when th
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-01-08 ven. 15:30</p>
<p class="date">Created: 2021-01-08 ven. 15:52</p>
</div>
</body>
</html>

View File

@ -3,7 +3,7 @@
"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-01-08 ven. 15:30 -->
<!-- 2021-01-08 ven. 15:53 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Stewart Platform - Static Analysis</title>
<meta name="generator" content="Org mode" />
@ -74,7 +74,7 @@ Thus, the system is uncoupled if \(G\) and \(K\) are diagonal.
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-01-08 ven. 15:30</p>
<p class="date">Created: 2021-01-08 ven. 15:53</p>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -23,8 +23,9 @@ stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, 'type', 'none');
ground = initializeGround('type', 'none');
ground = initializeGround('type', 'rigid', 'rot_point', stewart.platform_F.FO_A);
payload = initializePayload('type', 'none');
controller = initializeController('type', 'open-loop');
@ -58,8 +59,8 @@ figure;
ax1 = subplot(2, 1, 1);
hold on;
for i = 2:6
set(gca,'ColorOrderIndex',2);
plot(freqs, abs(squeeze(freqresp(G(['Dm', num2str(i)], 'F1'), freqs, 'Hz'))));
set(gca,'ColorOrderIndex',2);
plot(freqs, abs(squeeze(freqresp(G(['Dm', num2str(i)], 'F1'), freqs, 'Hz'))));
end
set(gca,'ColorOrderIndex',1);
plot(freqs, abs(squeeze(freqresp(G('Dm1', 'F1'), freqs, 'Hz'))));
@ -70,8 +71,8 @@ ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
hold on;
for i = 2:6
set(gca,'ColorOrderIndex',2);
p2 = plot(freqs, 180/pi*angle(squeeze(freqresp(G(['Dm', num2str(i)], 'F1'), freqs, 'Hz'))));
set(gca,'ColorOrderIndex',2);
p2 = plot(freqs, 180/pi*angle(squeeze(freqresp(G(['Dm', num2str(i)], 'F1'), freqs, 'Hz'))));
end
set(gca,'ColorOrderIndex',1);
p1 = plot(freqs, 180/pi*angle(squeeze(freqresp(G('Dm1', 'F1'), freqs, 'Hz'))));
@ -156,17 +157,17 @@ plot(real(tzero(G)), imag(tzero(G)), 'o');
plot(real(tzero(Gf)), imag(tzero(Gf)), 'o');
plot(real(tzero(Ga)), imag(tzero(Gf)), 'o');
for i = 1:length(gains)
set(gca,'ColorOrderIndex',1);
cl_poles = pole(feedback(G, (gains(i)*s)*eye(6)));
p1 = plot(real(cl_poles), imag(cl_poles), '.');
set(gca,'ColorOrderIndex',1);
cl_poles = pole(feedback(G, (gains(i)*s)*eye(6)));
p1 = plot(real(cl_poles), imag(cl_poles), '.');
set(gca,'ColorOrderIndex',2);
cl_poles = pole(feedback(Gf, (gains(i)*s)*eye(6)));
p2 = plot(real(cl_poles), imag(cl_poles), '.');
set(gca,'ColorOrderIndex',2);
cl_poles = pole(feedback(Gf, (gains(i)*s)*eye(6)));
p2 = plot(real(cl_poles), imag(cl_poles), '.');
set(gca,'ColorOrderIndex',3);
cl_poles = pole(feedback(Ga, (gains(i)*s)*eye(6)));
p3 = plot(real(cl_poles), imag(cl_poles), '.');
set(gca,'ColorOrderIndex',3);
cl_poles = pole(feedback(Ga, (gains(i)*s)*eye(6)));
p3 = plot(real(cl_poles), imag(cl_poles), '.');
end
ylim([0, 1.1*max(imag(pole(G)))]);
xlim([-1.1*max(imag(pole(G))),0]);

View File

@ -23,17 +23,14 @@ stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, 'type', 'none');
ground = initializeGround('type', 'none');
ground = initializeGround('type', 'rigid', 'rot_point', stewart.platform_F.FO_A);
payload = initializePayload('type', 'none');
controller = initializeController('type', 'open-loop');
% And we identify the dynamics from force actuators to force sensors.
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'stewart_platform_model';
@ -43,7 +40,7 @@ io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1;
io(io_i) = linio([mdl, '/Stewart Platform'], 1, 'openoutput', [], 'Taum'); io_i = io_i + 1; % Force Sensor Outputs [N]
%% Run the linearization
G = linearize(mdl, io, options);
G = linearize(mdl, io);
G.InputName = {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
G.OutputName = {'Fm1', 'Fm2', 'Fm3', 'Fm4', 'Fm5', 'Fm6'};
@ -58,8 +55,8 @@ figure;
ax1 = subplot(2, 1, 1);
hold on;
for i = 2:6
set(gca,'ColorOrderIndex',2);
plot(freqs, abs(squeeze(freqresp(G(['Fm', num2str(i)], 'F1'), freqs, 'Hz'))));
set(gca,'ColorOrderIndex',2);
plot(freqs, abs(squeeze(freqresp(G(['Fm', num2str(i)], 'F1'), freqs, 'Hz'))));
end
set(gca,'ColorOrderIndex',1);
plot(freqs, abs(squeeze(freqresp(G('Fm1', 'F1'), freqs, 'Hz'))));
@ -70,8 +67,8 @@ ylabel('Amplitude [N/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
hold on;
for i = 2:6
set(gca,'ColorOrderIndex',2);
p2 = plot(freqs, 180/pi*angle(squeeze(freqresp(G(['Fm', num2str(i)], 'F1'), freqs, 'Hz'))));
set(gca,'ColorOrderIndex',2);
p2 = plot(freqs, 180/pi*angle(squeeze(freqresp(G(['Fm', num2str(i)], 'F1'), freqs, 'Hz'))));
end
set(gca,'ColorOrderIndex',1);
p1 = plot(freqs, 180/pi*angle(squeeze(freqresp(G('Fm1', 'F1'), freqs, 'Hz'))));
@ -88,7 +85,7 @@ linkaxes([ax1,ax2],'x');
% We add some stiffness and damping in the flexible joints and we re-identify the dynamics.
stewart = initializeJointDynamics(stewart, 'type_F', 'universal', 'type_M', 'spherical');
Gf = linearize(mdl, io, options);
Gf = linearize(mdl, io);
Gf.InputName = {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
Gf.OutputName = {'Fm1', 'Fm2', 'Fm3', 'Fm4', 'Fm5', 'Fm6'};
@ -97,7 +94,7 @@ Gf.OutputName = {'Fm1', 'Fm2', 'Fm3', 'Fm4', 'Fm5', 'Fm6'};
% We now use the amplified actuators and re-identify the dynamics
stewart = initializeAmplifiedStrutDynamics(stewart);
Ga = linearize(mdl, io, options);
Ga = linearize(mdl, io);
Ga.InputName = {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
Ga.OutputName = {'Fm1', 'Fm2', 'Fm3', 'Fm4', 'Fm5', 'Fm6'};
@ -156,17 +153,17 @@ plot(real(tzero(G)), imag(tzero(G)), 'o');
plot(real(tzero(Gf)), imag(tzero(Gf)), 'o');
plot(real(tzero(Ga)), imag(tzero(Ga)), 'o');
for i = 1:length(gains)
cl_poles = pole(feedback(G, (gains(i)/s)*eye(6)));
set(gca,'ColorOrderIndex',1);
p1 = plot(real(cl_poles), imag(cl_poles), '.');
cl_poles = pole(feedback(G, (gains(i)/s)*eye(6)));
set(gca,'ColorOrderIndex',1);
p1 = plot(real(cl_poles), imag(cl_poles), '.');
cl_poles = pole(feedback(Gf, (gains(i)/s)*eye(6)));
set(gca,'ColorOrderIndex',2);
p2 = plot(real(cl_poles), imag(cl_poles), '.');
cl_poles = pole(feedback(Gf, (gains(i)/s)*eye(6)));
set(gca,'ColorOrderIndex',2);
p2 = plot(real(cl_poles), imag(cl_poles), '.');
cl_poles = pole(feedback(Ga, (gains(i)/s)*eye(6)));
set(gca,'ColorOrderIndex',3);
p3 = plot(real(cl_poles), imag(cl_poles), '.');
cl_poles = pole(feedback(Ga, (gains(i)/s)*eye(6)));
set(gca,'ColorOrderIndex',3);
p3 = plot(real(cl_poles), imag(cl_poles), '.');
end
ylim([0, 1.1*max(imag(pole(G)))]);
xlim([-1.1*max(imag(pole(G))),0]);
@ -187,20 +184,20 @@ gains = logspace(0, 5, 1000);
figure;
hold on;
for i = 1:length(gains)
set(gca,'ColorOrderIndex',1);
cl_poles = pole(feedback(G, (gains(i)/s)*eye(6)));
poles_damp = phase(cl_poles(imag(cl_poles)>0)) - pi/2;
p1 = plot(gains(i)*ones(size(poles_damp)), poles_damp, '.');
set(gca,'ColorOrderIndex',1);
cl_poles = pole(feedback(G, (gains(i)/s)*eye(6)));
poles_damp = phase(cl_poles(imag(cl_poles)>0)) - pi/2;
p1 = plot(gains(i)*ones(size(poles_damp)), poles_damp, '.');
set(gca,'ColorOrderIndex',2);
cl_poles = pole(feedback(Gf, (gains(i)/s)*eye(6)));
poles_damp = phase(cl_poles(imag(cl_poles)>0)) - pi/2;
p2 = plot(gains(i)*ones(size(poles_damp)), poles_damp, '.');
set(gca,'ColorOrderIndex',2);
cl_poles = pole(feedback(Gf, (gains(i)/s)*eye(6)));
poles_damp = phase(cl_poles(imag(cl_poles)>0)) - pi/2;
p2 = plot(gains(i)*ones(size(poles_damp)), poles_damp, '.');
set(gca,'ColorOrderIndex',3);
cl_poles = pole(feedback(Ga, (gains(i)/s)*eye(6)));
poles_damp = phase(cl_poles(imag(cl_poles)>0)) - pi/2;
p3 = plot(gains(i)*ones(size(poles_damp)), poles_damp, '.');
set(gca,'ColorOrderIndex',3);
cl_poles = pole(feedback(Ga, (gains(i)/s)*eye(6)));
poles_damp = phase(cl_poles(imag(cl_poles)>0)) - pi/2;
p3 = plot(gains(i)*ones(size(poles_damp)), poles_damp, '.');
end
xlabel('Control Gain');
ylabel('Damping of the Poles');

View File

@ -22,8 +22,9 @@ stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, 'type', 'accelerometer', 'freq', 5e3);
ground = initializeGround('type', 'none');
ground = initializeGround('type', 'rigid', 'rot_point', stewart.platform_F.FO_A);
payload = initializePayload('type', 'none');
controller = initializeController('type', 'open-loop');
%% Options for Linearized
options = linearizeOptions;
@ -53,8 +54,8 @@ figure;
ax1 = subplot(2, 1, 1);
hold on;
for i = 2:6
set(gca,'ColorOrderIndex',2);
plot(freqs, abs(squeeze(freqresp(G(['Vm', num2str(i)], 'F1'), freqs, 'Hz'))));
set(gca,'ColorOrderIndex',2);
plot(freqs, abs(squeeze(freqresp(G(['Vm', num2str(i)], 'F1'), freqs, 'Hz'))));
end
set(gca,'ColorOrderIndex',1);
plot(freqs, abs(squeeze(freqresp(G('Vm1', 'F1'), freqs, 'Hz'))));
@ -65,8 +66,8 @@ ylabel('Amplitude [$\frac{m/s}{N}$]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
hold on;
for i = 2:6
set(gca,'ColorOrderIndex',2);
p2 = plot(freqs, 180/pi*angle(squeeze(freqresp(G(['Vm', num2str(i)], 'F1'), freqs, 'Hz'))));
set(gca,'ColorOrderIndex',2);
p2 = plot(freqs, 180/pi*angle(squeeze(freqresp(G(['Vm', num2str(i)], 'F1'), freqs, 'Hz'))));
end
set(gca,'ColorOrderIndex',1);
p1 = plot(freqs, 180/pi*angle(squeeze(freqresp(G('Vm1', 'F1'), freqs, 'Hz'))));
@ -151,17 +152,17 @@ plot(real(tzero(G)), imag(tzero(G)), 'o');
plot(real(tzero(Gf)), imag(tzero(Gf)), 'o');
plot(real(tzero(Ga)), imag(tzero(Ga)), 'o');
for i = 1:length(gains)
set(gca,'ColorOrderIndex',1);
cl_poles = pole(feedback(G, gains(i)*eye(6)));
p1 = plot(real(cl_poles), imag(cl_poles), '.');
set(gca,'ColorOrderIndex',1);
cl_poles = pole(feedback(G, gains(i)*eye(6)));
p1 = plot(real(cl_poles), imag(cl_poles), '.');
set(gca,'ColorOrderIndex',2);
cl_poles = pole(feedback(Gf, gains(i)*eye(6)));
p2 = plot(real(cl_poles), imag(cl_poles), '.');
set(gca,'ColorOrderIndex',2);
cl_poles = pole(feedback(Gf, gains(i)*eye(6)));
p2 = plot(real(cl_poles), imag(cl_poles), '.');
set(gca,'ColorOrderIndex',3);
cl_poles = pole(feedback(Ga, gains(i)*eye(6)));
p3 = plot(real(cl_poles), imag(cl_poles), '.');
set(gca,'ColorOrderIndex',3);
cl_poles = pole(feedback(Ga, gains(i)*eye(6)));
p3 = plot(real(cl_poles), imag(cl_poles), '.');
end
ylim([0, 3*max(imag(pole(G)))]);
xlim([-3*max(imag(pole(G))),0]);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -40,111 +40,111 @@ In this section, we wish to compare the effect of forces/torques applied by the
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
<<matlab-init>>
#+end_src
#+begin_src matlab
simulinkproject('../');
simulinkproject('../');
#+end_src
#+begin_src matlab
open('stewart_platform_model.slx')
open('stewart_platform_model.slx')
#+end_src
** Comparison with fixed support
Let's generate a Stewart platform.
#+begin_src matlab
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, 'type', 'none');
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, 'type', 'none');
#+end_src
We don't put any flexibility below the Stewart platform such that *its base is fixed to an inertial frame*.
We also don't put any payload on top of the Stewart platform.
#+begin_src matlab
ground = initializeGround('type', 'none');
payload = initializePayload('type', 'none');
controller = initializeController('type', 'open-loop');
ground = initializeGround('type', 'none');
payload = initializePayload('type', 'none');
controller = initializeController('type', 'open-loop');
#+end_src
The transfer function from actuator forces $\bm{\tau}$ to the relative displacement of the mobile platform $\mathcal{\bm{X}}$ is extracted.
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Force Inputs [N]
io(io_i) = linio([mdl, '/Relative Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Position/Orientation of {B} w.r.t. {A}
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Force Inputs [N]
io(io_i) = linio([mdl, '/Relative Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Position/Orientation of {B} w.r.t. {A}
%% Run the linearization
G = linearize(mdl, io, options);
G.InputName = {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
G.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
%% Run the linearization
G = linearize(mdl, io, options);
G.InputName = {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
G.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
#+end_src
Using the Jacobian matrix, we compute the transfer function from force/torques applied by the actuators on the frame $\{B\}$ fixed to the mobile platform:
#+begin_src matlab
Gc = minreal(G*inv(stewart.kinematics.J'));
Gc.InputName = {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'};
Gc = minreal(G*inv(stewart.kinematics.J'));
Gc.InputName = {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'};
#+end_src
We also extract the transfer function from external forces $\bm{\mathcal{F}}_{\text{ext}}$ on the frame $\{B\}$ fixed to the mobile platform to the relative displacement $\mathcal{\bm{X}}$ of $\{B\}$ with respect to frame $\{A\}$:
#+begin_src matlab
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Disturbances'], 1, 'openinput', [], 'F_ext'); io_i = io_i + 1; % External forces/torques applied on {B}
io(io_i) = linio([mdl, '/Relative Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Position/Orientation of {B} w.r.t. {A}
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Disturbances'], 1, 'openinput', [], 'F_ext'); io_i = io_i + 1; % External forces/torques applied on {B}
io(io_i) = linio([mdl, '/Relative Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Position/Orientation of {B} w.r.t. {A}
%% Run the linearization
Gd = linearize(mdl, io, options);
Gd.InputName = {'Fex', 'Fey', 'Fez', 'Mex', 'Mey', 'Mez'};
Gd.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
%% Run the linearization
Gd = linearize(mdl, io, options);
Gd.InputName = {'Fex', 'Fey', 'Fez', 'Mex', 'Mey', 'Mez'};
Gd.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
#+end_src
The comparison of the two transfer functions is shown in Figure [[fig:comparison_Fext_F_fixed_base]].
#+begin_src matlab :exports none
freqs = logspace(1, 4, 1000);
freqs = logspace(1, 4, 1000);
figure;
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(freqs, abs(squeeze(freqresp(Gc(1,1), freqs, 'Hz'))), '-');
plot(freqs, abs(squeeze(freqresp(Gd(1,1), freqs, 'Hz'))), '--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
ax1 = subplot(2, 1, 1);
hold on;
plot(freqs, abs(squeeze(freqresp(Gc(1,1), freqs, 'Hz'))), '-');
plot(freqs, abs(squeeze(freqresp(Gd(1,1), freqs, 'Hz'))), '--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(Gc(1,1), freqs, 'Hz'))), '-');
plot(freqs, 180/pi*angle(squeeze(freqresp(Gd(1,1), freqs, 'Hz'))), '--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
legend({'$\mathcal{X}_{x}/\mathcal{F}_{x}$', '$\mathcal{X}_{x}/\mathcal{F}_{x,ext}$'});
ax2 = subplot(2, 1, 2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(Gc(1,1), freqs, 'Hz'))), '-');
plot(freqs, 180/pi*angle(squeeze(freqresp(Gd(1,1), freqs, 'Hz'))), '--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
legend({'$\mathcal{X}_{x}/\mathcal{F}_{x}$', '$\mathcal{X}_{x}/\mathcal{F}_{x,ext}$'});
linkaxes([ax1,ax2],'x');
linkaxes([ax1,ax2],'x');
#+end_src
#+header: :tangle no :exports results :results none :noweb yes
@ -159,19 +159,19 @@ The comparison of the two transfer functions is shown in Figure [[fig:comparison
This can be understood from figure [[fig:1dof_actuator_external_forces]] where $\mathcal{F}_{x}$ and $\mathcal{F}_{x,\text{ext}}$ have clearly the same effect on $\mathcal{X}_{x}$.
#+begin_src latex :file 1dof_actuator_external_forces.pdf
\begin{tikzpicture}
\draw[ground] (-1, 0) -- (1, 0);
\begin{tikzpicture}
\draw[ground] (-1, 0) -- (1, 0);
\draw[spring] (-0.6, 0) -- (-0.6, 1.5) node[midway, left=0.1]{$k$};
\draw[actuator] ( 0.6, 0) -- ( 0.6, 1.5) node[midway, left=0.1](F){$\mathcal{F}_{x}$};
\draw[spring] (-0.6, 0) -- (-0.6, 1.5) node[midway, left=0.1]{$k$};
\draw[actuator] ( 0.6, 0) -- ( 0.6, 1.5) node[midway, left=0.1](F){$\mathcal{F}_{x}$};
\draw[fill=white] (-1, 1.5) rectangle (1, 2) node[pos=0.5]{$m$};
\draw[fill=white] (-1, 1.5) rectangle (1, 2) node[pos=0.5]{$m$};
\draw[dashed] (1, 2) -- ++(0.5, 0);
\draw[->] (1.5, 2) -- ++(0, 0.5) node[right]{$\mathcal{X}_{x}$};
\draw[dashed] (1, 2) -- ++(0.5, 0);
\draw[->] (1.5, 2) -- ++(0, 0.5) node[right]{$\mathcal{X}_{x}$};
\draw[->] (0, 2) node[]{$\bullet$} -- (0, 2.8) node[below right]{$\mathcal{F}_{x,\text{ext}}$};
\end{tikzpicture}
\draw[->] (0, 2) node[]{$\bullet$} -- (0, 2.8) node[below right]{$\mathcal{F}_{x,\text{ext}}$};
\end{tikzpicture}
#+end_src
#+name: fig:1dof_actuator_external_forces
@ -182,62 +182,62 @@ This can be understood from figure [[fig:1dof_actuator_external_forces]] where $
** Comparison with a flexible support
We now add a flexible support under the Stewart platform.
#+begin_src matlab
ground = initializeGround('type', 'flexible');
ground = initializeGround('type', 'flexible');
#+end_src
And we perform again the identification.
#+begin_src matlab
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Force Inputs [N]
io(io_i) = linio([mdl, '/Relative Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Position/Orientation of {B} w.r.t. {A}
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Force Inputs [N]
io(io_i) = linio([mdl, '/Relative Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Position/Orientation of {B} w.r.t. {A}
%% Run the linearization
G = linearize(mdl, io, options);
G.InputName = {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
G.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
%% Run the linearization
G = linearize(mdl, io, options);
G.InputName = {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
G.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
Gc = minreal(G*inv(stewart.kinematics.J'));
Gc.InputName = {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'};
Gc = minreal(G*inv(stewart.kinematics.J'));
Gc.InputName = {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'};
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Disturbances'], 1, 'openinput', [], 'F_ext'); io_i = io_i + 1; % External forces/torques applied on {B}
io(io_i) = linio([mdl, '/Relative Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Position/Orientation of {B} w.r.t. {A}
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Disturbances'], 1, 'openinput', [], 'F_ext'); io_i = io_i + 1; % External forces/torques applied on {B}
io(io_i) = linio([mdl, '/Relative Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Position/Orientation of {B} w.r.t. {A}
%% Run the linearization
Gd = linearize(mdl, io, options);
Gd.InputName = {'Fex', 'Fey', 'Fez', 'Mex', 'Mey', 'Mez'};
Gd.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
%% Run the linearization
Gd = linearize(mdl, io, options);
Gd.InputName = {'Fex', 'Fey', 'Fez', 'Mex', 'Mey', 'Mez'};
Gd.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
#+end_src
The comparison between the obtained transfer functions is shown in Figure [[fig:comparison_Fext_F_flexible_base]].
#+begin_src matlab :exports none
freqs = logspace(1, 4, 1000);
freqs = logspace(1, 4, 1000);
figure;
figure;
ax1 = subplot(2, 1, 1);
hold on;
plot(freqs, abs(squeeze(freqresp(Gc(1,1), freqs, 'Hz'))), '-');
plot(freqs, abs(squeeze(freqresp(Gd(1,1), freqs, 'Hz'))), '--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
ax1 = subplot(2, 1, 1);
hold on;
plot(freqs, abs(squeeze(freqresp(Gc(1,1), freqs, 'Hz'))), '-');
plot(freqs, abs(squeeze(freqresp(Gd(1,1), freqs, 'Hz'))), '--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylabel('Amplitude [m/N]'); set(gca, 'XTickLabel',[]);
ax2 = subplot(2, 1, 2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(Gc(1,1), freqs, 'Hz'))), '-');
plot(freqs, 180/pi*angle(squeeze(freqresp(Gd(1,1), freqs, 'Hz'))), '--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
legend({'$\mathcal{X}_{x}/\mathcal{F}_{x}$', '$\mathcal{X}_{x}/\mathcal{F}_{x,ext}$'});
ax2 = subplot(2, 1, 2);
hold on;
plot(freqs, 180/pi*angle(squeeze(freqresp(Gc(1,1), freqs, 'Hz'))), '-');
plot(freqs, 180/pi*angle(squeeze(freqresp(Gd(1,1), freqs, 'Hz'))), '--');
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
ylabel('Phase [deg]'); xlabel('Frequency [Hz]');
ylim([-180, 180]);
yticks([-180, -90, 0, 90, 180]);
legend({'$\mathcal{X}_{x}/\mathcal{F}_{x}$', '$\mathcal{X}_{x}/\mathcal{F}_{x,ext}$'});
linkaxes([ax1,ax2],'x');
linkaxes([ax1,ax2],'x');
#+end_src
#+header: :tangle no :exports results :results none :noweb yes
@ -254,22 +254,22 @@ We see that $\mathcal{F}_{x}$ applies a force both on $m$ and $m^{\prime}$ where
And thus $\mathcal{F}_{x}$ and $\mathcal{F}_{x,\text{ext}}$ have clearly *not* the same effect on $\mathcal{X}_{x}$.
#+begin_src latex :file 2dof_actuator_external_forces.pdf
\begin{tikzpicture}
\draw[ground] (-1, 0) -- (1, 0);
\begin{tikzpicture}
\draw[ground] (-1, 0) -- (1, 0);
\draw[spring] (0, 0) -- (0, 1.5) node[midway, left=0.1]{$k^{\prime}$};
\draw[fill=white] (-1, 1.5) rectangle (1, 2) node[pos=0.5]{$m^{\prime}$};
\draw[spring] (0, 0) -- (0, 1.5) node[midway, left=0.1]{$k^{\prime}$};
\draw[fill=white] (-1, 1.5) rectangle (1, 2) node[pos=0.5]{$m^{\prime}$};
\draw[spring] (-0.6, 2) -- (-0.6, 3.5) node[midway, left=0.1]{$k$};
\draw[actuator] ( 0.6, 2) -- ( 0.6, 3.5) node[midway, left=0.1](F){$\mathcal{F}_{x}$};
\draw[spring] (-0.6, 2) -- (-0.6, 3.5) node[midway, left=0.1]{$k$};
\draw[actuator] ( 0.6, 2) -- ( 0.6, 3.5) node[midway, left=0.1](F){$\mathcal{F}_{x}$};
\draw[fill=white] (-1, 3.5) rectangle (1, 4) node[pos=0.5]{$m$};
\draw[fill=white] (-1, 3.5) rectangle (1, 4) node[pos=0.5]{$m$};
\draw[dashed] (1, 4) -- ++(0.5, 0);
\draw[->] (1.5, 4) -- ++(0, 0.5) node[right]{$\mathcal{X}_{x}$};
\draw[dashed] (1, 4) -- ++(0.5, 0);
\draw[->] (1.5, 4) -- ++(0, 0.5) node[right]{$\mathcal{X}_{x}$};
\draw[->] (0, 4) node[]{$\bullet$} -- (0, 4.8) node[below right]{$\mathcal{F}_{x,\text{ext}}$};
\end{tikzpicture}
\draw[->] (0, 4) node[]{$\bullet$} -- (0, 4.8) node[below right]{$\mathcal{F}_{x,\text{ext}}$};
\end{tikzpicture}
#+end_src
#+name: fig:2dof_actuator_external_forces
@ -289,67 +289,67 @@ In this section, we see how the Compliance matrix of the Stewart platform is lin
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
<<matlab-init>>
#+end_src
#+begin_src matlab
simulinkproject('../');
simulinkproject('../');
#+end_src
#+begin_src matlab
open('stewart_platform_model.slx')
open('stewart_platform_model.slx')
#+end_src
** Analysis
Initialization of the Stewart platform.
#+begin_src matlab
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, 'type', 'none');
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, 'type', 'none');
#+end_src
No flexibility below the Stewart platform and no payload.
#+begin_src matlab
ground = initializeGround('type', 'none');
payload = initializePayload('type', 'none');
controller = initializeController('type', 'open-loop');
ground = initializeGround('type', 'none');
payload = initializePayload('type', 'none');
controller = initializeController('type', 'open-loop');
#+end_src
Estimation of the transfer function from $\mathcal{\bm{F}}$ to $\mathcal{\bm{X}}$:
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Force Inputs [N]
io(io_i) = linio([mdl, '/Relative Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Position/Orientation of {B} w.r.t. {A}
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Force Inputs [N]
io(io_i) = linio([mdl, '/Relative Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Position/Orientation of {B} w.r.t. {A}
%% Run the linearization
G = linearize(mdl, io, options);
G.InputName = {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
G.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
%% Run the linearization
G = linearize(mdl, io, options);
G.InputName = {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
G.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
#+end_src
#+begin_src matlab
Gc = minreal(G*inv(stewart.kinematics.J'));
Gc.InputName = {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'};
Gc = minreal(G*inv(stewart.kinematics.J'));
Gc.InputName = {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'};
#+end_src
Let's first look at the low frequency transfer function matrix from $\mathcal{\bm{F}}$ to $\mathcal{\bm{X}}$.

File diff suppressed because it is too large Load Diff

View File

@ -46,66 +46,66 @@ In this document, we discuss the various methods to identify the behavior of the
** Introduction :ignore:
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
<<matlab-init>>
#+end_src
#+begin_src matlab :results none :exports none
simulinkproject('../');
simulinkproject('../');
#+end_src
#+begin_src matlab
open('stewart_platform_model.slx')
open('stewart_platform_model.slx')
#+end_src
** Initialize the Stewart Platform
#+begin_src matlab
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
#+end_src
#+begin_src matlab
ground = initializeGround('type', 'none');
payload = initializePayload('type', 'none');
controller = initializeController('type', 'open-loop');
ground = initializeGround('type', 'none');
payload = initializePayload('type', 'none');
controller = initializeController('type', 'open-loop');
#+end_src
** Identification
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Force Inputs [N]
io(io_i) = linio([mdl, '/Relative Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Position/Orientation of {B} w.r.t. {A}
io(io_i) = linio([mdl, '/Relative Motion Sensor'], 2, 'openoutput'); io_i = io_i + 1; % Velocity of {B} w.r.t. {A}
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Force Inputs [N]
io(io_i) = linio([mdl, '/Relative Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Position/Orientation of {B} w.r.t. {A}
io(io_i) = linio([mdl, '/Relative Motion Sensor'], 2, 'openoutput'); io_i = io_i + 1; % Velocity of {B} w.r.t. {A}
%% Run the linearization
G = linearize(mdl, io);
% G.InputName = {'tau1', 'tau2', 'tau3', 'tau4', 'tau5', 'tau6'};
% G.OutputName = {'Xdx', 'Xdy', 'Xdz', 'Xrx', 'Xry', 'Xrz', 'Vdx', 'Vdy', 'Vdz', 'Vrx', 'Vry', 'Vrz'};
%% Run the linearization
G = linearize(mdl, io);
% G.InputName = {'tau1', 'tau2', 'tau3', 'tau4', 'tau5', 'tau6'};
% G.OutputName = {'Xdx', 'Xdy', 'Xdz', 'Xrx', 'Xry', 'Xrz', 'Vdx', 'Vdy', 'Vdz', 'Vrx', 'Vry', 'Vrz'};
#+end_src
Let's check the size of =G=:
#+begin_src matlab :results replace output
size(G)
size(G)
#+end_src
#+RESULTS:
@ -117,7 +117,7 @@ Let's check the size of =G=:
We expect to have only 12 states (corresponding to the 6dof of the mobile platform).
#+begin_src matlab :results replace output
Gm = minreal(G);
Gm = minreal(G);
#+end_src
#+RESULTS:
@ -129,7 +129,7 @@ And indeed, we obtain 12 states.
** Coordinate transformation
We can perform the following transformation using the =ss2ss= command.
#+begin_src matlab
Gt = ss2ss(Gm, Gm.C);
Gt = ss2ss(Gm, Gm.C);
#+end_src
Then, the =C= matrix of =Gt= is the unity matrix which means that the states of the state space model are equal to the measurements $\bm{Y}$.
@ -138,29 +138,29 @@ The measurements are the 6 displacement and 6 velocities of mobile platform with
We could perform the transformation by hand:
#+begin_src matlab
At = Gm.C*Gm.A*pinv(Gm.C);
At = Gm.C*Gm.A*pinv(Gm.C);
Bt = Gm.C*Gm.B;
Bt = Gm.C*Gm.B;
Ct = eye(12);
Dt = zeros(12, 6);
Ct = eye(12);
Dt = zeros(12, 6);
Gt = ss(At, Bt, Ct, Dt);
Gt = ss(At, Bt, Ct, Dt);
#+end_src
** Analysis
#+begin_src matlab
[V,D] = eig(Gt.A);
[V,D] = eig(Gt.A);
#+end_src
#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
ws = imag(diag(D))/2/pi;
[ws,I] = sort(ws)
ws = imag(diag(D))/2/pi;
[ws,I] = sort(ws)
xi = 100*real(diag(D))./imag(diag(D));
xi = xi(I);
xi = 100*real(diag(D))./imag(diag(D));
xi = xi(I);
data2orgtable([[1:length(ws(ws>0))]', ws(ws>0), xi(xi>0)], {}, {'Mode Number', 'Resonance Frequency [Hz]', 'Damping Ratio [%]'}, ' %.1f ');
data2orgtable([[1:length(ws(ws>0))]', ws(ws>0), xi(xi>0)], {}, {'Mode Number', 'Resonance Frequency [Hz]', 'Damping Ratio [%]'}, ' %.1f ');
#+end_src
#+RESULTS:
@ -180,54 +180,54 @@ To visualize the i'th mode, we may excite the system using the inputs $U_i$ such
Let's first sort the modes and just take the modes corresponding to a eigenvalue with a positive imaginary part.
#+begin_src matlab
ws = imag(diag(D));
[ws,I] = sort(ws)
ws = ws(7:end); I = I(7:end);
ws = imag(diag(D));
[ws,I] = sort(ws)
ws = ws(7:end); I = I(7:end);
#+end_src
#+begin_src matlab
for i = 1:length(ws)
for i = 1:length(ws)
#+end_src
#+begin_src matlab
i_mode = I(i); % the argument is the i'th mode
i_mode = I(i); % the argument is the i'th mode
#+end_src
#+begin_src matlab
lambda_i = D(i_mode, i_mode);
xi_i = V(:,i_mode);
lambda_i = D(i_mode, i_mode);
xi_i = V(:,i_mode);
a_i = real(lambda_i);
b_i = imag(lambda_i);
a_i = real(lambda_i);
b_i = imag(lambda_i);
#+end_src
Let do 10 periods of the mode.
#+begin_src matlab
t = linspace(0, 10/(imag(lambda_i)/2/pi), 1000);
U_i = pinv(Gt.B) * real(xi_i * lambda_i * (cos(b_i * t) + 1i*sin(b_i * t)));
t = linspace(0, 10/(imag(lambda_i)/2/pi), 1000);
U_i = pinv(Gt.B) * real(xi_i * lambda_i * (cos(b_i * t) + 1i*sin(b_i * t)));
#+end_src
#+begin_src matlab
U = timeseries(U_i, t);
U = timeseries(U_i, t);
#+end_src
Simulation:
#+begin_src matlab
load('mat/conf_simscape.mat');
set_param(conf_simscape, 'StopTime', num2str(t(end)));
sim(mdl);
load('mat/conf_simscape.mat');
set_param(conf_simscape, 'StopTime', num2str(t(end)));
sim(mdl);
#+end_src
Save the movie of the mode shape.
#+begin_src matlab
smwritevideo(mdl, sprintf('figs/mode%i', i), ...
'PlaybackSpeedRatio', 1/(b_i/2/pi), ...
'FrameRate', 30, ...
'FrameSize', [800, 400]);
smwritevideo(mdl, sprintf('figs/mode%i', i), ...
'PlaybackSpeedRatio', 1/(b_i/2/pi), ...
'FrameRate', 30, ...
'FrameSize', [800, 400]);
#+end_src
#+begin_src matlab
end
end
#+end_src
#+name: fig:mode1
@ -247,83 +247,83 @@ Save the movie of the mode shape.
** Introduction :ignore:
** Matlab Init :noexport:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
<<matlab-init>>
#+end_src
#+begin_src matlab
simulinkproject('../');
simulinkproject('../');
#+end_src
#+begin_src matlab
open('stewart_platform_model.slx')
open('stewart_platform_model.slx')
#+end_src
** Initialize the Stewart platform
#+begin_src matlab
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, 'type', 'accelerometer', 'freq', 5e3);
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, 'type', 'accelerometer', 'freq', 5e3);
#+end_src
We set the rotation point of the ground to be at the same point at frames $\{A\}$ and $\{B\}$.
#+begin_src matlab
ground = initializeGround('type', 'rigid', 'rot_point', stewart.platform_F.FO_A);
payload = initializePayload('type', 'rigid');
controller = initializeController('type', 'open-loop');
ground = initializeGround('type', 'rigid', 'rot_point', stewart.platform_F.FO_A);
payload = initializePayload('type', 'rigid');
controller = initializeController('type', 'open-loop');
#+end_src
** Transmissibility
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Disturbances/D_w'], 1, 'openinput'); io_i = io_i + 1; % Base Motion [m, rad]
io(io_i) = linio([mdl, '/Absolute Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Absolute Motion [m, rad]
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Disturbances/D_w'], 1, 'openinput'); io_i = io_i + 1; % Base Motion [m, rad]
io(io_i) = linio([mdl, '/Absolute Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Absolute Motion [m, rad]
%% Run the linearization
T = linearize(mdl, io, options);
T.InputName = {'Wdx', 'Wdy', 'Wdz', 'Wrx', 'Wry', 'Wrz'};
T.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
%% Run the linearization
T = linearize(mdl, io, options);
T.InputName = {'Wdx', 'Wdy', 'Wdz', 'Wrx', 'Wry', 'Wrz'};
T.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
#+end_src
#+begin_src matlab
freqs = logspace(1, 4, 1000);
freqs = logspace(1, 4, 1000);
figure;
for ix = 1:6
figure;
for ix = 1:6
for iy = 1:6
subplot(6, 6, (ix-1)*6 + iy);
hold on;
plot(freqs, abs(squeeze(freqresp(T(ix, iy), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylim([1e-5, 10]);
xlim([freqs(1), freqs(end)]);
if ix < 6
xticklabels({});
end
if iy > 1
yticklabels({});
end
subplot(6, 6, (ix-1)*6 + iy);
hold on;
plot(freqs, abs(squeeze(freqresp(T(ix, iy), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylim([1e-5, 10]);
xlim([freqs(1), freqs(end)]);
if ix < 6
xticklabels({});
end
if iy > 1
yticklabels({});
end
end
end
end
#+end_src
From cite:preumont07_six_axis_singl_stage_activ, one can use the Frobenius norm of the transmissibility matrix to obtain a scalar indicator of the transmissibility performance of the system:
@ -333,26 +333,26 @@ From cite:preumont07_six_axis_singl_stage_activ, one can use the Frobenius norm
\end{align*}
#+begin_src matlab
freqs = logspace(1, 4, 1000);
freqs = logspace(1, 4, 1000);
T_norm = zeros(length(freqs), 1);
T_norm = zeros(length(freqs), 1);
for i = 1:length(freqs)
for i = 1:length(freqs)
T_norm(i) = sqrt(trace(freqresp(T, freqs(i), 'Hz')*freqresp(T, freqs(i), 'Hz')'));
end
end
#+end_src
And we normalize by a factor $\sqrt{6}$ to obtain a performance metric comparable to the transmissibility of a one-axis isolator:
\[ \Gamma(\omega) = \|\bm{T}(\omega)\| / \sqrt{6} \]
#+begin_src matlab
Gamma = T_norm/sqrt(6);
Gamma = T_norm/sqrt(6);
#+end_src
#+begin_src matlab
figure;
plot(freqs, Gamma)
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
figure;
plot(freqs, Gamma)
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
#+end_src
* Compliance Analysis
@ -360,101 +360,101 @@ And we normalize by a factor $\sqrt{6}$ to obtain a performance metric comparabl
** Introduction :ignore:
** Matlab Init :noexport:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
<<matlab-init>>
#+end_src
#+begin_src matlab
simulinkproject('../');
simulinkproject('../');
#+end_src
#+begin_src matlab
open('stewart_platform_model.slx')
open('stewart_platform_model.slx')
#+end_src
** Initialize the Stewart platform
#+begin_src matlab
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, 'type', 'accelerometer', 'freq', 5e3);
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, 'type', 'accelerometer', 'freq', 5e3);
#+end_src
We set the rotation point of the ground to be at the same point at frames $\{A\}$ and $\{B\}$.
#+begin_src matlab
ground = initializeGround('type', 'none');
payload = initializePayload('type', 'rigid');
controller = initializeController('type', 'open-loop');
ground = initializeGround('type', 'none');
payload = initializePayload('type', 'rigid');
controller = initializeController('type', 'open-loop');
#+end_src
** Compliance
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Disturbances/F_ext'], 1, 'openinput'); io_i = io_i + 1; % Base Motion [m, rad]
io(io_i) = linio([mdl, '/Absolute Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Absolute Motion [m, rad]
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Disturbances/F_ext'], 1, 'openinput'); io_i = io_i + 1; % Base Motion [m, rad]
io(io_i) = linio([mdl, '/Absolute Motion Sensor'], 1, 'openoutput'); io_i = io_i + 1; % Absolute Motion [m, rad]
%% Run the linearization
C = linearize(mdl, io, options);
C.InputName = {'Fdx', 'Fdy', 'Fdz', 'Mdx', 'Mdy', 'Mdz'};
C.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
%% Run the linearization
C = linearize(mdl, io, options);
C.InputName = {'Fdx', 'Fdy', 'Fdz', 'Mdx', 'Mdy', 'Mdz'};
C.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
#+end_src
#+begin_src matlab
freqs = logspace(1, 4, 1000);
freqs = logspace(1, 4, 1000);
figure;
for ix = 1:6
figure;
for ix = 1:6
for iy = 1:6
subplot(6, 6, (ix-1)*6 + iy);
hold on;
plot(freqs, abs(squeeze(freqresp(C(ix, iy), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylim([1e-10, 1e-3]);
xlim([freqs(1), freqs(end)]);
if ix < 6
xticklabels({});
end
if iy > 1
yticklabels({});
end
subplot(6, 6, (ix-1)*6 + iy);
hold on;
plot(freqs, abs(squeeze(freqresp(C(ix, iy), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
ylim([1e-10, 1e-3]);
xlim([freqs(1), freqs(end)]);
if ix < 6
xticklabels({});
end
if iy > 1
yticklabels({});
end
end
end
end
#+end_src
We can try to use the Frobenius norm to obtain a scalar value representing the 6-dof compliance of the Stewart platform.
#+begin_src matlab
freqs = logspace(1, 4, 1000);
freqs = logspace(1, 4, 1000);
C_norm = zeros(length(freqs), 1);
C_norm = zeros(length(freqs), 1);
for i = 1:length(freqs)
for i = 1:length(freqs)
C_norm(i) = sqrt(trace(freqresp(C, freqs(i), 'Hz')*freqresp(C, freqs(i), 'Hz')'));
end
end
#+end_src
#+begin_src matlab
figure;
plot(freqs, C_norm)
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
figure;
plot(freqs, C_norm)
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
#+end_src
* Functions
@ -470,20 +470,20 @@ We can try to use the Frobenius norm to obtain a scalar value representing the 6
:UNNUMBERED: t
:END:
#+begin_src matlab
function [T, T_norm, freqs] = computeTransmissibility(args)
% computeTransmissibility -
%
% Syntax: [T, T_norm, freqs] = computeTransmissibility(args)
%
% Inputs:
% - args - Structure with the following fields:
% - plots [true/false] - Should plot the transmissilibty matrix and its Frobenius norm
% - freqs [] - Frequency vector to estimate the Frobenius norm
%
% Outputs:
% - T [6x6 ss] - Transmissibility matrix
% - T_norm [length(freqs)x1] - Frobenius norm of the Transmissibility matrix
% - freqs [length(freqs)x1] - Frequency vector in [Hz]
function [T, T_norm, freqs] = computeTransmissibility(args)
% computeTransmissibility -
%
% Syntax: [T, T_norm, freqs] = computeTransmissibility(args)
%
% Inputs:
% - args - Structure with the following fields:
% - plots [true/false] - Should plot the transmissilibty matrix and its Frobenius norm
% - freqs [] - Frequency vector to estimate the Frobenius norm
%
% Outputs:
% - T [6x6 ss] - Transmissibility matrix
% - T_norm [length(freqs)x1] - Frobenius norm of the Transmissibility matrix
% - freqs [length(freqs)x1] - Frequency vector in [Hz]
#+end_src
*** Optional Parameters
@ -491,14 +491,14 @@ We can try to use the Frobenius norm to obtain a scalar value representing the 6
:UNNUMBERED: t
:END:
#+begin_src matlab
arguments
args.plots logical {mustBeNumericOrLogical} = false
args.freqs double {mustBeNumeric, mustBeNonnegative} = logspace(1,4,1000)
end
arguments
args.plots logical {mustBeNumericOrLogical} = false
args.freqs double {mustBeNumeric, mustBeNonnegative} = logspace(1,4,1000)
end
#+end_src
#+begin_src matlab
freqs = args.freqs;
freqs = args.freqs;
#+end_src
*** Identification of the Transmissibility Matrix
@ -506,43 +506,43 @@ We can try to use the Frobenius norm to obtain a scalar value representing the 6
:UNNUMBERED: t
:END:
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Disturbances/D_w'], 1, 'openinput'); io_i = io_i + 1; % Base Motion [m, rad]
io(io_i) = linio([mdl, '/Absolute Motion Sensor'], 1, 'output'); io_i = io_i + 1; % Absolute Motion [m, rad]
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Disturbances/D_w'], 1, 'openinput'); io_i = io_i + 1; % Base Motion [m, rad]
io(io_i) = linio([mdl, '/Absolute Motion Sensor'], 1, 'output'); io_i = io_i + 1; % Absolute Motion [m, rad]
%% Run the linearization
T = linearize(mdl, io, options);
T.InputName = {'Wdx', 'Wdy', 'Wdz', 'Wrx', 'Wry', 'Wrz'};
T.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
%% Run the linearization
T = linearize(mdl, io, options);
T.InputName = {'Wdx', 'Wdy', 'Wdz', 'Wrx', 'Wry', 'Wrz'};
T.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
#+end_src
If wanted, the 6x6 transmissibility matrix is plotted.
#+begin_src matlab
p_handle = zeros(6*6,1);
p_handle = zeros(6*6,1);
if args.plots
if args.plots
fig = figure;
for ix = 1:6
for iy = 1:6
p_handle((ix-1)*6 + iy) = subplot(6, 6, (ix-1)*6 + iy);
hold on;
plot(freqs, abs(squeeze(freqresp(T(ix, iy), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
if ix < 6
xticklabels({});
for iy = 1:6
p_handle((ix-1)*6 + iy) = subplot(6, 6, (ix-1)*6 + iy);
hold on;
plot(freqs, abs(squeeze(freqresp(T(ix, iy), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
if ix < 6
xticklabels({});
end
if iy > 1
yticklabels({});
end
end
if iy > 1
yticklabels({});
end
end
end
linkaxes(p_handle, 'xy')
@ -554,7 +554,7 @@ If wanted, the 6x6 transmissibility matrix is plotted.
han.YLabel.Visible = 'on';
xlabel(han, 'Frequency [Hz]');
ylabel(han, 'Transmissibility [m/m]');
end
end
#+end_src
*** Computation of the Frobenius norm
@ -562,25 +562,25 @@ If wanted, the 6x6 transmissibility matrix is plotted.
:UNNUMBERED: t
:END:
#+begin_src matlab
T_norm = zeros(length(freqs), 1);
T_norm = zeros(length(freqs), 1);
for i = 1:length(freqs)
for i = 1:length(freqs)
T_norm(i) = sqrt(trace(freqresp(T, freqs(i), 'Hz')*freqresp(T, freqs(i), 'Hz')'));
end
end
#+end_src
#+begin_src matlab
T_norm = T_norm/sqrt(6);
T_norm = T_norm/sqrt(6);
#+end_src
#+begin_src matlab
if args.plots
if args.plots
figure;
plot(freqs, T_norm)
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Frequency [Hz]');
ylabel('Transmissibility - Frobenius Norm');
end
end
#+end_src
** Compute the Compliance
@ -595,20 +595,20 @@ If wanted, the 6x6 transmissibility matrix is plotted.
:UNNUMBERED: t
:END:
#+begin_src matlab
function [C, C_norm, freqs] = computeCompliance(args)
% computeCompliance -
%
% Syntax: [C, C_norm, freqs] = computeCompliance(args)
%
% Inputs:
% - args - Structure with the following fields:
% - plots [true/false] - Should plot the transmissilibty matrix and its Frobenius norm
% - freqs [] - Frequency vector to estimate the Frobenius norm
%
% Outputs:
% - C [6x6 ss] - Compliance matrix
% - C_norm [length(freqs)x1] - Frobenius norm of the Compliance matrix
% - freqs [length(freqs)x1] - Frequency vector in [Hz]
function [C, C_norm, freqs] = computeCompliance(args)
% computeCompliance -
%
% Syntax: [C, C_norm, freqs] = computeCompliance(args)
%
% Inputs:
% - args - Structure with the following fields:
% - plots [true/false] - Should plot the transmissilibty matrix and its Frobenius norm
% - freqs [] - Frequency vector to estimate the Frobenius norm
%
% Outputs:
% - C [6x6 ss] - Compliance matrix
% - C_norm [length(freqs)x1] - Frobenius norm of the Compliance matrix
% - freqs [length(freqs)x1] - Frequency vector in [Hz]
#+end_src
*** Optional Parameters
@ -616,14 +616,14 @@ If wanted, the 6x6 transmissibility matrix is plotted.
:UNNUMBERED: t
:END:
#+begin_src matlab
arguments
args.plots logical {mustBeNumericOrLogical} = false
args.freqs double {mustBeNumeric, mustBeNonnegative} = logspace(1,4,1000)
end
arguments
args.plots logical {mustBeNumericOrLogical} = false
args.freqs double {mustBeNumeric, mustBeNonnegative} = logspace(1,4,1000)
end
#+end_src
#+begin_src matlab
freqs = args.freqs;
freqs = args.freqs;
#+end_src
*** Identification of the Compliance Matrix
@ -631,43 +631,43 @@ If wanted, the 6x6 transmissibility matrix is plotted.
:UNNUMBERED: t
:END:
#+begin_src matlab
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Options for Linearized
options = linearizeOptions;
options.SampleTime = 0;
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Disturbances/F_ext'], 1, 'openinput'); io_i = io_i + 1; % External forces [N, N*m]
io(io_i) = linio([mdl, '/Absolute Motion Sensor'], 1, 'output'); io_i = io_i + 1; % Absolute Motion [m, rad]
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Disturbances/F_ext'], 1, 'openinput'); io_i = io_i + 1; % External forces [N, N*m]
io(io_i) = linio([mdl, '/Absolute Motion Sensor'], 1, 'output'); io_i = io_i + 1; % Absolute Motion [m, rad]
%% Run the linearization
C = linearize(mdl, io, options);
C.InputName = {'Fdx', 'Fdy', 'Fdz', 'Mdx', 'Mdy', 'Mdz'};
C.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
%% Run the linearization
C = linearize(mdl, io, options);
C.InputName = {'Fdx', 'Fdy', 'Fdz', 'Mdx', 'Mdy', 'Mdz'};
C.OutputName = {'Edx', 'Edy', 'Edz', 'Erx', 'Ery', 'Erz'};
#+end_src
If wanted, the 6x6 transmissibility matrix is plotted.
#+begin_src matlab
p_handle = zeros(6*6,1);
p_handle = zeros(6*6,1);
if args.plots
if args.plots
fig = figure;
for ix = 1:6
for iy = 1:6
p_handle((ix-1)*6 + iy) = subplot(6, 6, (ix-1)*6 + iy);
hold on;
plot(freqs, abs(squeeze(freqresp(C(ix, iy), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
if ix < 6
xticklabels({});
for iy = 1:6
p_handle((ix-1)*6 + iy) = subplot(6, 6, (ix-1)*6 + iy);
hold on;
plot(freqs, abs(squeeze(freqresp(C(ix, iy), freqs, 'Hz'))), 'k-');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
if ix < 6
xticklabels({});
end
if iy > 1
yticklabels({});
end
end
if iy > 1
yticklabels({});
end
end
end
linkaxes(p_handle, 'xy')
@ -678,7 +678,7 @@ If wanted, the 6x6 transmissibility matrix is plotted.
han.YLabel.Visible = 'on';
xlabel(han, 'Frequency [Hz]');
ylabel(han, 'Compliance [m/N, rad/(N*m)]');
end
end
#+end_src
*** Computation of the Frobenius norm
@ -686,21 +686,21 @@ If wanted, the 6x6 transmissibility matrix is plotted.
:UNNUMBERED: t
:END:
#+begin_src matlab
freqs = args.freqs;
freqs = args.freqs;
C_norm = zeros(length(freqs), 1);
C_norm = zeros(length(freqs), 1);
for i = 1:length(freqs)
for i = 1:length(freqs)
C_norm(i) = sqrt(trace(freqresp(C, freqs(i), 'Hz')*freqresp(C, freqs(i), 'Hz')'));
end
end
#+end_src
#+begin_src matlab
if args.plots
if args.plots
figure;
plot(freqs, C_norm)
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Frequency [Hz]');
ylabel('Compliance - Frobenius Norm');
end
end
#+end_src

View File

@ -234,30 +234,30 @@ This will also gives us the range for which the approximate forward kinematic is
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
<<matlab-init>>
#+end_src
#+begin_src matlab :results none :exports none
simulinkproject('../');
simulinkproject('../');
#+end_src
** Stewart architecture definition
We first define some general Stewart architecture.
#+begin_src matlab
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart);
stewart = computeJacobian(stewart);
#+end_src
** Comparison for "pure" translations
@ -267,31 +267,31 @@ We compute the approximate and exact required strut stroke to have the wanted mo
The estimate required strut stroke for both the approximate and exact solutions are shown in Figure [[fig:inverse_kinematics_approx_validity_x_translation]].
The relative strut length displacement is shown in Figure [[fig:inverse_kinematics_approx_validity_x_translation_relative]].
#+begin_src matlab
Xrs = logspace(-6, -1, 100); % Wanted X translation of the mobile platform [m]
Xrs = logspace(-6, -1, 100); % Wanted X translation of the mobile platform [m]
Ls_approx = zeros(6, length(Xrs));
Ls_exact = zeros(6, length(Xrs));
Ls_approx = zeros(6, length(Xrs));
Ls_exact = zeros(6, length(Xrs));
for i = 1:length(Xrs)
for i = 1:length(Xrs)
Xr = Xrs(i);
L_approx(:, i) = stewart.kinematics.J*[Xr; 0; 0; 0; 0; 0;];
[~, L_exact(:, i)] = inverseKinematics(stewart, 'AP', [Xr; 0; 0]);
end
end
#+end_src
#+begin_src matlab :exports none
figure;
hold on;
for i = 1:6
figure;
hold on;
for i = 1:6
set(gca,'ColorOrderIndex',i);
plot(Xrs, abs(L_approx(i, :)));
set(gca,'ColorOrderIndex',i);
plot(Xrs, abs(L_exact(i, :)), '--');
end
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Wanted $x$ displacement [m]');
ylabel('Estimated required stroke');
end
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Wanted $x$ displacement [m]');
ylabel('Estimated required stroke');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
@ -304,15 +304,15 @@ The relative strut length displacement is shown in Figure [[fig:inverse_kinemati
[[file:figs/inverse_kinematics_approx_validity_x_translation.png]]
#+begin_src matlab :exports none
figure;
hold on;
for i = 1:6
figure;
hold on;
for i = 1:6
plot(Xrs, abs(L_approx(i, :) - L_exact(i, :))./abs(L_approx(i, :) + L_exact(i, :)), 'k-');
end
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Wanted $x$ displacement [m]');
ylabel('Relative Stroke Error');
end
hold off;
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Wanted $x$ displacement [m]');
ylabel('Relative Stroke Error');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
@ -349,41 +349,41 @@ This is what is analyzed in this section.
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
<<matlab-init>>
#+end_src
#+begin_src matlab :results none :exports none
simulinkproject('../');
simulinkproject('../');
#+end_src
** Stewart architecture definition
Let's first define the Stewart platform architecture that we want to study.
#+begin_src matlab
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart);
stewart = computeJacobian(stewart);
#+end_src
** Wanted translations and rotations
Let's now define the wanted extreme translations and rotations.
#+begin_src matlab
Tx_max = 50e-6; % Translation [m]
Ty_max = 50e-6; % Translation [m]
Tz_max = 50e-6; % Translation [m]
Rx_max = 30e-6; % Rotation [rad]
Ry_max = 30e-6; % Rotation [rad]
Rz_max = 0; % Rotation [rad]
Tx_max = 50e-6; % Translation [m]
Ty_max = 50e-6; % Translation [m]
Tz_max = 50e-6; % Translation [m]
Rx_max = 30e-6; % Rotation [rad]
Ry_max = 30e-6; % Rotation [rad]
Rz_max = 0; % Rotation [rad]
#+end_src
** Needed stroke for "pure" rotations or translations
@ -391,17 +391,17 @@ As a first estimation, we estimate the needed actuator stroke for "pure" rotatio
We do that using either the Inverse Kinematic solution or the Jacobian matrix as an approximation.
#+begin_src matlab
LTx = stewart.kinematics.J*[Tx_max 0 0 0 0 0]';
LTy = stewart.kinematics.J*[0 Ty_max 0 0 0 0]';
LTz = stewart.kinematics.J*[0 0 Tz_max 0 0 0]';
LRx = stewart.kinematics.J*[0 0 0 Rx_max 0 0]';
LRy = stewart.kinematics.J*[0 0 0 0 Ry_max 0]';
LRz = stewart.kinematics.J*[0 0 0 0 0 Rz_max]';
LTx = stewart.kinematics.J*[Tx_max 0 0 0 0 0]';
LTy = stewart.kinematics.J*[0 Ty_max 0 0 0 0]';
LTz = stewart.kinematics.J*[0 0 Tz_max 0 0 0]';
LRx = stewart.kinematics.J*[0 0 0 Rx_max 0 0]';
LRy = stewart.kinematics.J*[0 0 0 0 Ry_max 0]';
LRz = stewart.kinematics.J*[0 0 0 0 0 Rz_max]';
#+end_src
The obtain required stroke is:
#+begin_src matlab :results value replace :exports results
ans = sprintf('From %.2g[m] to %.2g[m]: Total stroke = %.1f[um]', min(min([LTx,LTy,LTz,LRx,LRy])), max(max([LTx,LTy,LTz,LRx,LRy])), 1e6*(max(max([LTx,LTy,LTz,LRx,LRy]))-min(min([LTx,LTy,LTz,LRx,LRy]))))
ans = sprintf('From %.2g[m] to %.2g[m]: Total stroke = %.1f[um]', min(min([LTx,LTy,LTz,LRx,LRy])), max(max([LTx,LTy,LTz,LRx,LRy])), 1e6*(max(max([LTx,LTy,LTz,LRx,LRy]))-min(min([LTx,LTy,LTz,LRx,LRy]))))
#+end_src
#+RESULTS:
@ -416,11 +416,11 @@ To do so, we may estimate the required actuator stroke for all possible combinat
Let's first generate all the possible combination of maximum translation and rotations.
#+begin_src matlab
Ps = [2*(dec2bin(0:5^2-1,5)-'0')-1, zeros(5^2, 1)].*[Tx_max Ty_max Tz_max Rx_max Ry_max Rz_max];
Ps = [2*(dec2bin(0:5^2-1,5)-'0')-1, zeros(5^2, 1)].*[Tx_max Ty_max Tz_max Rx_max Ry_max Rz_max];
#+end_src
#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
data2orgtable(Ps, {}, {'*Tx [m]*', '*Ty [m]*', '*Tz [m]*', '*Rx [rad]*', '*Ry [rad]*', '*Rz [rad]*'}, ' %.1e ');
data2orgtable(Ps, {}, {'*Tx [m]*', '*Ty [m]*', '*Tz [m]*', '*Rx [rad]*', '*Ry [rad]*', '*Rz [rad]*'}, ' %.1e ');
#+end_src
#+RESULTS:
@ -454,17 +454,17 @@ Let's first generate all the possible combination of maximum translation and rot
For all possible combination, we compute the required actuator stroke using the inverse kinematic solution.
#+begin_src matlab
L_min = 0;
L_max = 0;
L_min = 0;
L_max = 0;
for i = 1:size(Ps,1)
for i = 1:size(Ps,1)
Rx = [1 0 0;
0 cos(Ps(i, 4)) -sin(Ps(i, 4));
0 sin(Ps(i, 4)) cos(Ps(i, 4))];
Ry = [ cos(Ps(i, 5)) 0 sin(Ps(i, 5));
0 1 0;
-sin(Ps(i, 5)) 0 cos(Ps(i, 5))];
0 1 0;
-sin(Ps(i, 5)) 0 cos(Ps(i, 5))];
Rz = [cos(Ps(i, 6)) -sin(Ps(i, 6)) 0;
sin(Ps(i, 6)) cos(Ps(i, 6)) 0;
@ -474,17 +474,17 @@ For all possible combination, we compute the required actuator stroke using the
[~, Ls] = inverseKinematics(stewart, 'AP', Ps(i, 1:3)', 'ARB', ARB);
if min(Ls) < L_min
L_min = min(Ls)
L_min = min(Ls)
end
if max(Ls) > L_max
L_max = max(Ls)
L_max = max(Ls)
end
end
end
#+end_src
We obtain the required actuator stroke:
#+begin_src matlab :results value replace :exports results
ans = sprintf('From %.2g[m] to %.2g[m]: Total stroke = %.1f[um]', L_min, L_max, 1e6*(L_max-L_min))
ans = sprintf('From %.2g[m] to %.2g[m]: Total stroke = %.1f[um]', L_min, L_max, 1e6*(L_max-L_min))
#+end_src
#+RESULTS:
@ -513,36 +513,36 @@ However, for small displacements, we can use the Jacobian as an approximate solu
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
<<matlab-init>>
#+end_src
#+begin_src matlab :results none :exports none
simulinkproject('../');
simulinkproject('../');
#+end_src
** Stewart architecture definition
Let's first define the Stewart platform architecture that we want to study.
#+begin_src matlab
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart);
stewart = computeJacobian(stewart);
#+end_src
Let's now define the actuator stroke.
#+begin_src matlab
L_min = -50e-6; % [m]
L_max = 50e-6; % [m]
L_min = -50e-6; % [m]
L_max = 50e-6; % [m]
#+end_src
** Pure translations
@ -557,21 +557,21 @@ To obtain the mobility "volume" attainable by the Stewart platform when it's ori
For each possible value of $(\theta, \phi)$, we compute the maximum radius $r$ attainable with the constraint that the stroke of each actuator should be between =L_min= and =L_max=.
#+begin_src matlab
thetas = linspace(0, pi, 50);
phis = linspace(0, 2*pi, 50);
rs = zeros(length(thetas), length(phis));
thetas = linspace(0, pi, 50);
phis = linspace(0, 2*pi, 50);
rs = zeros(length(thetas), length(phis));
for i = 1:length(thetas)
for i = 1:length(thetas)
for j = 1:length(phis)
Tx = sin(thetas(i))*cos(phis(j));
Ty = sin(thetas(i))*sin(phis(j));
Tz = cos(thetas(i));
Tx = sin(thetas(i))*cos(phis(j));
Ty = sin(thetas(i))*sin(phis(j));
Tz = cos(thetas(i));
dL = stewart.kinematics.J*[Tx; Ty; Tz; 0; 0; 0;]; % dL required for 1m displacement in theta/phi direction
dL = stewart.kinematics.J*[Tx; Ty; Tz; 0; 0; 0;]; % dL required for 1m displacement in theta/phi direction
rs(i, j) = max([dL(dL<0)*L_min; dL(dL>0)*L_max]);
rs(i, j) = max([dL(dL<0)*L_min; dL(dL>0)*L_max]);
end
end
end
#+end_src
@ -588,13 +588,13 @@ data2orgtable([1e6*L_min, 1e6*L_max, 1e6*(min(min(rs)))], {}, {'=L_min= [$\mu m$
| -50.0 | 50.0 | 31.5 |
#+begin_src matlab :exports none
figure;
plot3(reshape(rs.*(sin(thetas)'*cos(phis)), [1, length(thetas)*length(phis)]), ...
reshape(rs.*(sin(thetas)'*sin(phis)), [1, length(thetas)*length(phis)]), ...
reshape(rs.*(cos(thetas)'*ones(1, length(phis))), [1, length(thetas)*length(phis)]))
xlabel('X Translation [m]');
ylabel('Y Translation [m]');
zlabel('Z Translation [m]');
figure;
plot3(reshape(rs.*(sin(thetas)'*cos(phis)), [1, length(thetas)*length(phis)]), ...
reshape(rs.*(sin(thetas)'*sin(phis)), [1, length(thetas)*length(phis)]), ...
reshape(rs.*(cos(thetas)'*ones(1, length(phis))), [1, length(thetas)*length(phis)]))
xlabel('X Translation [m]');
ylabel('Y Translation [m]');
zlabel('Z Translation [m]');
#+end_src
#+HEADER: :tangle no :exports results :results none :noweb yes
@ -613,93 +613,93 @@ using this function https://fr.mathworks.com/help/matlab/ref/contour3.html
** Introduction :ignore:
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
<<matlab-init>>
#+end_src
#+begin_src matlab :results none :exports none
simulinkproject('../');
simulinkproject('../');
#+end_src
** Estimation with an analytical model
Let's first define the Stewart Platform Geometry.
#+begin_src matlab
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 150e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart, 'AP', [0; 0; 0]);
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 150e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart, 'AP', [0; 0; 0]);
As_init = stewart.geometry.As;
As_init = stewart.geometry.As;
#+end_src
#+begin_src matlab
Tx_max = 60e-6; % Translation [m]
Ty_max = 60e-6; % Translation [m]
Tz_max = 60e-6; % Translation [m]
Rx_max = 30e-6; % Rotation [rad]
Ry_max = 30e-6; % Rotation [rad]
Rz_max = 0; % Rotation [rad]
Tx_max = 60e-6; % Translation [m]
Ty_max = 60e-6; % Translation [m]
Tz_max = 60e-6; % Translation [m]
Rx_max = 30e-6; % Rotation [rad]
Ry_max = 30e-6; % Rotation [rad]
Rz_max = 0; % Rotation [rad]
#+end_src
#+begin_src matlab
Ps = [2*(dec2bin(0:5^2-1,5)-'0')-1, zeros(5^2, 1)].*[Tx_max Ty_max Tz_max Rx_max Ry_max Rz_max];
Ps = [2*(dec2bin(0:5^2-1,5)-'0')-1, zeros(5^2, 1)].*[Tx_max Ty_max Tz_max Rx_max Ry_max Rz_max];
#+end_src
#+begin_src matlab
flex_ang = zeros(size(Ps, 1), 6);
Rxs = zeros(size(Ps, 1), 6)
Rys = zeros(size(Ps, 1), 6)
Rzs = zeros(size(Ps, 1), 6)
flex_ang = zeros(size(Ps, 1), 6);
Rxs = zeros(size(Ps, 1), 6)
Rys = zeros(size(Ps, 1), 6)
Rzs = zeros(size(Ps, 1), 6)
for Ps_i = 1:size(Ps, 1)
Rx = [1 0 0;
0 cos(Ps(Ps_i, 4)) -sin(Ps(Ps_i, 4));
0 sin(Ps(Ps_i, 4)) cos(Ps(Ps_i, 4))];
for Ps_i = 1:size(Ps, 1)
Rx = [1 0 0;
0 cos(Ps(Ps_i, 4)) -sin(Ps(Ps_i, 4));
0 sin(Ps(Ps_i, 4)) cos(Ps(Ps_i, 4))];
Ry = [ cos(Ps(Ps_i, 5)) 0 sin(Ps(Ps_i, 5));
0 1 0;
-sin(Ps(Ps_i, 5)) 0 cos(Ps(Ps_i, 5))];
Ry = [ cos(Ps(Ps_i, 5)) 0 sin(Ps(Ps_i, 5));
0 1 0;
-sin(Ps(Ps_i, 5)) 0 cos(Ps(Ps_i, 5))];
Rz = [cos(Ps(Ps_i, 6)) -sin(Ps(Ps_i, 6)) 0;
sin(Ps(Ps_i, 6)) cos(Ps(Ps_i, 6)) 0;
0 0 1];
Rz = [cos(Ps(Ps_i, 6)) -sin(Ps(Ps_i, 6)) 0;
sin(Ps(Ps_i, 6)) cos(Ps(Ps_i, 6)) 0;
0 0 1];
ARB = Rz*Ry*Rx;
ARB = Rz*Ry*Rx;
stewart = computeJointsPose(stewart, 'AP', Ps(Ps_i, 1:3)', 'ARB', ARB);
stewart = computeJointsPose(stewart, 'AP', Ps(Ps_i, 1:3)', 'ARB', ARB);
flex_ang(Ps_i, :) = acos(sum(As_init.*stewart.geometry.As));
flex_ang(Ps_i, :) = acos(sum(As_init.*stewart.geometry.As));
for l_i = 1:6
MRf = stewart.platform_M.MRb(:,:,l_i)*(ARB')*(stewart.platform_F.FRa(:,:,l_i)');
for l_i = 1:6
MRf = stewart.platform_M.MRb(:,:,l_i)*(ARB')*(stewart.platform_F.FRa(:,:,l_i)');
Rys(Ps_i, l_i) = atan2(MRf(1,3), sqrt(MRf(1,1)^2 + MRf(2,2)^2));
Rxs(Ps_i, l_i) = atan2(-MRf(2,3)/cos(Rys(Ps_i, l_i)), MRf(3,3)/cos(Rys(Ps_i, l_i)));
Rzs(Ps_i, l_i) = atan2(-MRf(1,2)/cos(Rys(Ps_i, l_i)), MRf(1,1)/cos(Rys(Ps_i, l_i)));
end
end
Rys(Ps_i, l_i) = atan2(MRf(1,3), sqrt(MRf(1,1)^2 + MRf(2,2)^2));
Rxs(Ps_i, l_i) = atan2(-MRf(2,3)/cos(Rys(Ps_i, l_i)), MRf(3,3)/cos(Rys(Ps_i, l_i)));
Rzs(Ps_i, l_i) = atan2(-MRf(1,2)/cos(Rys(Ps_i, l_i)), MRf(1,1)/cos(Rys(Ps_i, l_i)));
end
end
#+end_src
And the maximum bending of the flexible joints is: (in [mrad])
#+begin_src matlab :results replace value
1e3*max(max(abs(flex_ang)))
1e3*max(max(abs(flex_ang)))
#+end_src
#+RESULTS:
: 1.1704
#+begin_src matlab :results replace value
1e3*max(max(sqrt(Rxs.^2 + Rys.^2)))
1e3*max(max(sqrt(Rxs.^2 + Rys.^2)))
#+end_src
#+RESULTS:
: 0.075063
#+begin_src matlab :results replace value
1e3*max(max(Rzs))
1e3*max(max(Rzs))
#+end_src
#+RESULTS:
@ -708,89 +708,89 @@ And the maximum bending of the flexible joints is: (in [mrad])
** Estimation using the Simscape Model
*** Model Init
#+begin_src matlab
open('stewart_platform_model.slx')
open('stewart_platform_model.slx')
#+end_src
#+begin_src matlab
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, 'type', 'accelerometer', 'freq', 5e3);
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 45e-3);
stewart = generateGeneralConfiguration(stewart);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart);
stewart = initializeJointDynamics(stewart, 'type_F', 'universal_p', 'type_M', 'spherical_p');
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart, 'type', 'accelerometer', 'freq', 5e3);
#+end_src
#+begin_src matlab
ground = initializeGround('type', 'rigid');
payload = initializePayload('type', 'none');
controller = initializeController('type', 'open-loop');
disturbances = initializeDisturbances();
references = initializeReferences(stewart);
ground = initializeGround('type', 'rigid');
payload = initializePayload('type', 'none');
controller = initializeController('type', 'open-loop');
disturbances = initializeDisturbances();
references = initializeReferences(stewart);
#+end_src
*** Controller design to be close to the wanted displacement
#+begin_src matlab
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Name of the Simulink File
mdl = 'stewart_platform_model';
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Force Inputs [N]
io(io_i) = linio([mdl, '/Stewart Platform'], 1, 'openoutput', [], 'dLm'); io_i = io_i + 1; % Relative Displacement Outputs [m]
%% Input/Output definition
clear io; io_i = 1;
io(io_i) = linio([mdl, '/Controller'], 1, 'openinput'); io_i = io_i + 1; % Actuator Force Inputs [N]
io(io_i) = linio([mdl, '/Stewart Platform'], 1, 'openoutput', [], 'dLm'); io_i = io_i + 1; % Relative Displacement Outputs [m]
%% Run the linearization
G = linearize(mdl, io);
G.InputName = {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
G.OutputName = {'L1', 'L2', 'L3', 'L4', 'L5', 'L6'};
%% Run the linearization
G = linearize(mdl, io);
G.InputName = {'F1', 'F2', 'F3', 'F4', 'F5', 'F6'};
G.OutputName = {'L1', 'L2', 'L3', 'L4', 'L5', 'L6'};
#+end_src
#+begin_src matlab
wc = 2*pi*30;
Kl = diag(1./diag(abs(freqresp(G, wc)))) * wc/s * 1/(1 + s/3/wc);
wc = 2*pi*30;
Kl = diag(1./diag(abs(freqresp(G, wc)))) * wc/s * 1/(1 + s/3/wc);
#+end_src
#+begin_src matlab
controller = initializeController('type', 'ref-track-L');
controller = initializeController('type', 'ref-track-L');
#+end_src
*** Simulations
#+begin_src matlab
Tx_max = 60e-6; % Translation [m]
Ty_max = 60e-6; % Translation [m]
Tz_max = 60e-6; % Translation [m]
Rx_max = 30e-6; % Rotation [rad]
Ry_max = 30e-6; % Rotation [rad]
Rz_max = 0; % Rotation [rad]
Tx_max = 60e-6; % Translation [m]
Ty_max = 60e-6; % Translation [m]
Tz_max = 60e-6; % Translation [m]
Rx_max = 30e-6; % Rotation [rad]
Ry_max = 30e-6; % Rotation [rad]
Rz_max = 0; % Rotation [rad]
#+end_src
#+begin_src matlab
Ps = [2*(dec2bin(0:5^2-1,5)-'0')-1, zeros(5^2, 1)].*[Tx_max Ty_max Tz_max Rx_max Ry_max Rz_max];
Ps = [2*(dec2bin(0:5^2-1,5)-'0')-1, zeros(5^2, 1)].*[Tx_max Ty_max Tz_max Rx_max Ry_max Rz_max];
#+end_src
#+begin_src matlab
cl_perf = zeros(size(Ps, 1), 1); % Closed loop performance [percentage]
Rs = zeros(size(Ps, 1), 5); % Max Flexor angles for the 6 legs [mrad]
cl_perf = zeros(size(Ps, 1), 1); % Closed loop performance [percentage]
Rs = zeros(size(Ps, 1), 5); % Max Flexor angles for the 6 legs [mrad]
for Ps_i = 1:size(Ps, 1)
fprintf('Experiment %i over %i', Ps_i, size(Ps, 1));
for Ps_i = 1:size(Ps, 1)
fprintf('Experiment %i over %i', Ps_i, size(Ps, 1));
references = initializeReferences(stewart, 't', 0, 'r', Ps(Ps_i, :)');
set_param('stewart_platform_model','StopTime','0.1');
sim('stewart_platform_model');
references = initializeReferences(stewart, 't', 0, 'r', Ps(Ps_i, :)');
set_param('stewart_platform_model','StopTime','0.1');
sim('stewart_platform_model');
cl_perf(Ps_i) = 100*max(abs((simout.y.dLm.Data(end, :) - references.rL.Data(:,1,1)')./simout.y.dLm.Data(end, :)));
Rs(Ps_i, :) = [max(abs(1e3*simout.y.Rf.Data(end, 1:2:end))), max(abs(1e3*simout.y.Rf.Data(end, 2:2:end))), max(abs(1e3*simout.y.Rm.Data(end, 1:3:end))), max(abs(1e3*simout.y.Rm.Data(end, 2:3:end))), max(abs(1e3*simout.y.Rm.Data(end, 3:3:end)))]';
end
cl_perf(Ps_i) = 100*max(abs((simout.y.dLm.Data(end, :) - references.rL.Data(:,1,1)')./simout.y.dLm.Data(end, :)));
Rs(Ps_i, :) = [max(abs(1e3*simout.y.Rf.Data(end, 1:2:end))), max(abs(1e3*simout.y.Rf.Data(end, 2:2:end))), max(abs(1e3*simout.y.Rm.Data(end, 1:3:end))), max(abs(1e3*simout.y.Rm.Data(end, 2:3:end))), max(abs(1e3*simout.y.Rm.Data(end, 3:3:end)))]';
end
#+end_src
Verify that the simulations are all correct:
#+begin_src matlab :results replace value
max(cl_perf)
max(cl_perf)
#+end_src
#+RESULTS:
@ -798,7 +798,7 @@ Verify that the simulations are all correct:
*** Results
#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
data2orgtable(max(Rs)', {'Rx bot', 'Ry bot', 'Rx top', 'Ry top', 'Rz top'}, {'Stroke [mrad]'}, ' %.2f ');
data2orgtable(max(Rs)', {'Rx bot', 'Ry bot', 'Rx top', 'Ry top', 'Rz top'}, {'Stroke [mrad]'}, ' %.2f ');
#+end_src
#+RESULTS:
@ -826,22 +826,22 @@ This Matlab function is accessible [[file:../src/computeJacobian.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
function [stewart] = computeJacobian(stewart)
% computeJacobian -
%
% Syntax: [stewart] = computeJacobian(stewart)
%
% Inputs:
% - stewart - With at least the following fields:
% - geometry.As [3x6] - The 6 unit vectors for each strut expressed in {A}
% - geometry.Ab [3x6] - The 6 position of the joints bi expressed in {A}
% - actuators.K [6x1] - Total stiffness of the actuators
%
% Outputs:
% - stewart - With the 3 added field:
% - kinematics.J [6x6] - The Jacobian Matrix
% - kinematics.K [6x6] - The Stiffness Matrix
% - kinematics.C [6x6] - The Compliance Matrix
function [stewart] = computeJacobian(stewart)
% computeJacobian -
%
% Syntax: [stewart] = computeJacobian(stewart)
%
% Inputs:
% - stewart - With at least the following fields:
% - geometry.As [3x6] - The 6 unit vectors for each strut expressed in {A}
% - geometry.Ab [3x6] - The 6 position of the joints bi expressed in {A}
% - actuators.K [6x1] - Total stiffness of the actuators
%
% Outputs:
% - stewart - With the 3 added field:
% - kinematics.J [6x6] - The Jacobian Matrix
% - kinematics.K [6x6] - The Stiffness Matrix
% - kinematics.C [6x6] - The Compliance Matrix
#+end_src
*** Check the =stewart= structure elements
@ -849,14 +849,14 @@ This Matlab function is accessible [[file:../src/computeJacobian.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
assert(isfield(stewart.geometry, 'As'), 'stewart.geometry should have attribute As')
As = stewart.geometry.As;
assert(isfield(stewart.geometry, 'As'), 'stewart.geometry should have attribute As')
As = stewart.geometry.As;
assert(isfield(stewart.geometry, 'Ab'), 'stewart.geometry should have attribute Ab')
Ab = stewart.geometry.Ab;
assert(isfield(stewart.geometry, 'Ab'), 'stewart.geometry should have attribute Ab')
Ab = stewart.geometry.Ab;
assert(isfield(stewart.actuators, 'K'), 'stewart.actuators should have attribute K')
Ki = stewart.actuators.K;
assert(isfield(stewart.actuators, 'K'), 'stewart.actuators should have attribute K')
Ki = stewart.actuators.K;
#+end_src
@ -865,7 +865,7 @@ This Matlab function is accessible [[file:../src/computeJacobian.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
J = [As' , cross(Ab, As)'];
J = [As' , cross(Ab, As)'];
#+end_src
*** Compute Stiffness Matrix
@ -873,7 +873,7 @@ This Matlab function is accessible [[file:../src/computeJacobian.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
K = J'*diag(Ki)*J;
K = J'*diag(Ki)*J;
#+end_src
*** Compute Compliance Matrix
@ -881,7 +881,7 @@ This Matlab function is accessible [[file:../src/computeJacobian.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
C = inv(K);
C = inv(K);
#+end_src
*** Populate the =stewart= structure
@ -889,9 +889,9 @@ This Matlab function is accessible [[file:../src/computeJacobian.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
stewart.kinematics.J = J;
stewart.kinematics.K = K;
stewart.kinematics.C = C;
stewart.kinematics.J = J;
stewart.kinematics.K = K;
stewart.kinematics.C = C;
#+end_src
@ -934,23 +934,23 @@ Otherwise, when the limbs' lengths derived yield complex numbers, then the posit
:UNNUMBERED: t
:END:
#+begin_src matlab
function [Li, dLi] = inverseKinematics(stewart, args)
% inverseKinematics - Compute the needed length of each strut to have the wanted position and orientation of {B} with respect to {A}
%
% Syntax: [stewart] = inverseKinematics(stewart)
%
% Inputs:
% - stewart - A structure with the following fields
% - geometry.Aa [3x6] - The positions ai expressed in {A}
% - geometry.Bb [3x6] - The positions bi expressed in {B}
% - geometry.l [6x1] - Length of each strut
% - args - Can have the following fields:
% - AP [3x1] - The wanted position of {B} with respect to {A}
% - ARB [3x3] - The rotation matrix that gives the wanted orientation of {B} with respect to {A}
%
% Outputs:
% - Li [6x1] - The 6 needed length of the struts in [m] to have the wanted pose of {B} w.r.t. {A}
% - 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}
function [Li, dLi] = inverseKinematics(stewart, args)
% inverseKinematics - Compute the needed length of each strut to have the wanted position and orientation of {B} with respect to {A}
%
% Syntax: [stewart] = inverseKinematics(stewart)
%
% Inputs:
% - stewart - A structure with the following fields
% - geometry.Aa [3x6] - The positions ai expressed in {A}
% - geometry.Bb [3x6] - The positions bi expressed in {B}
% - geometry.l [6x1] - Length of each strut
% - args - Can have the following fields:
% - AP [3x1] - The wanted position of {B} with respect to {A}
% - ARB [3x3] - The rotation matrix that gives the wanted orientation of {B} with respect to {A}
%
% Outputs:
% - Li [6x1] - The 6 needed length of the struts in [m] to have the wanted pose of {B} w.r.t. {A}
% - 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}
#+end_src
*** Optional Parameters
@ -958,11 +958,11 @@ Otherwise, when the limbs' lengths derived yield complex numbers, then the posit
:UNNUMBERED: t
:END:
#+begin_src matlab
arguments
stewart
args.AP (3,1) double {mustBeNumeric} = zeros(3,1)
args.ARB (3,3) double {mustBeNumeric} = eye(3)
end
arguments
stewart
args.AP (3,1) double {mustBeNumeric} = zeros(3,1)
args.ARB (3,3) double {mustBeNumeric} = eye(3)
end
#+end_src
*** Check the =stewart= structure elements
@ -970,14 +970,14 @@ Otherwise, when the limbs' lengths derived yield complex numbers, then the posit
:UNNUMBERED: t
:END:
#+begin_src matlab
assert(isfield(stewart.geometry, 'Aa'), 'stewart.geometry should have attribute Aa')
Aa = stewart.geometry.Aa;
assert(isfield(stewart.geometry, 'Aa'), 'stewart.geometry should have attribute Aa')
Aa = stewart.geometry.Aa;
assert(isfield(stewart.geometry, 'Bb'), 'stewart.geometry should have attribute Bb')
Bb = stewart.geometry.Bb;
assert(isfield(stewart.geometry, 'Bb'), 'stewart.geometry should have attribute Bb')
Bb = stewart.geometry.Bb;
assert(isfield(stewart.geometry, 'l'), 'stewart.geometry should have attribute l')
l = stewart.geometry.l;
assert(isfield(stewart.geometry, 'l'), 'stewart.geometry should have attribute l')
l = stewart.geometry.l;
#+end_src
@ -986,11 +986,11 @@ Otherwise, when the limbs' lengths derived yield complex numbers, then the posit
:UNNUMBERED: t
:END:
#+begin_src matlab
Li = sqrt(args.AP'*args.AP + diag(Bb'*Bb) + diag(Aa'*Aa) - (2*args.AP'*Aa)' + (2*args.AP'*(args.ARB*Bb))' - diag(2*(args.ARB*Bb)'*Aa));
Li = sqrt(args.AP'*args.AP + diag(Bb'*Bb) + diag(Aa'*Aa) - (2*args.AP'*Aa)' + (2*args.AP'*(args.ARB*Bb))' - diag(2*(args.ARB*Bb)'*Aa));
#+end_src
#+begin_src matlab
dLi = Li-l;
dLi = Li-l;
#+end_src
** =forwardKinematicsApprox=: Compute the Approximate Forward Kinematics
@ -1007,21 +1007,21 @@ This Matlab function is accessible [[file:../src/forwardKinematicsApprox.m][here
:UNNUMBERED: t
:END:
#+begin_src matlab
function [P, R] = forwardKinematicsApprox(stewart, args)
% forwardKinematicsApprox - Computed the approximate pose of {B} with respect to {A} from the length of each strut and using
% the Jacobian Matrix
%
% Syntax: [P, R] = forwardKinematicsApprox(stewart, args)
%
% Inputs:
% - stewart - A structure with the following fields
% - kinematics.J [6x6] - The Jacobian Matrix
% - args - Can have the following fields:
% - dL [6x1] - Displacement of each strut [m]
%
% Outputs:
% - P [3x1] - The estimated position of {B} with respect to {A}
% - R [3x3] - The estimated rotation matrix that gives the orientation of {B} with respect to {A}
function [P, R] = forwardKinematicsApprox(stewart, args)
% forwardKinematicsApprox - Computed the approximate pose of {B} with respect to {A} from the length of each strut and using
% the Jacobian Matrix
%
% Syntax: [P, R] = forwardKinematicsApprox(stewart, args)
%
% Inputs:
% - stewart - A structure with the following fields
% - kinematics.J [6x6] - The Jacobian Matrix
% - args - Can have the following fields:
% - dL [6x1] - Displacement of each strut [m]
%
% Outputs:
% - P [3x1] - The estimated position of {B} with respect to {A}
% - R [3x3] - The estimated rotation matrix that gives the orientation of {B} with respect to {A}
#+end_src
*** Optional Parameters
@ -1029,10 +1029,10 @@ This Matlab function is accessible [[file:../src/forwardKinematicsApprox.m][here
:UNNUMBERED: t
:END:
#+begin_src matlab
arguments
stewart
args.dL (6,1) double {mustBeNumeric} = zeros(6,1)
end
arguments
stewart
args.dL (6,1) double {mustBeNumeric} = zeros(6,1)
end
#+end_src
*** Check the =stewart= structure elements
@ -1040,8 +1040,8 @@ This Matlab function is accessible [[file:../src/forwardKinematicsApprox.m][here
:UNNUMBERED: t
:END:
#+begin_src matlab
assert(isfield(stewart.kinematics, 'J'), 'stewart.kinematics should have attribute J')
J = stewart.kinematics.J;
assert(isfield(stewart.kinematics, 'J'), 'stewart.kinematics should have attribute J')
J = stewart.kinematics.J;
#+end_src
*** Computation
@ -1052,26 +1052,26 @@ 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}} \]
#+begin_src matlab
X = J\args.dL;
X = J\args.dL;
#+end_src
The position vector corresponds to the first 3 elements.
#+begin_src matlab
P = X(1:3);
P = X(1:3);
#+end_src
The next 3 elements are the orientation of {B} with respect to {A} expressed
using the screw axis.
#+begin_src matlab
theta = norm(X(4:6));
s = X(4:6)/theta;
theta = norm(X(4:6));
s = X(4:6)/theta;
#+end_src
We then compute the corresponding rotation matrix.
#+begin_src matlab
R = [s(1)^2*(1-cos(theta)) + cos(theta) , s(1)*s(2)*(1-cos(theta)) - s(3)*sin(theta), s(1)*s(3)*(1-cos(theta)) + s(2)*sin(theta);
s(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);
s(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)];
R = [s(1)^2*(1-cos(theta)) + cos(theta) , s(1)*s(2)*(1-cos(theta)) - s(3)*sin(theta), s(1)*s(3)*(1-cos(theta)) + s(2)*sin(theta);
s(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);
s(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)];
#+end_src
* Bibliography :ignore:

View File

@ -45,40 +45,40 @@
#+end_src
#+begin_src matlab
simulinkproject('../');
simulinkproject('../');
#+end_src
#+begin_src matlab
open('stewart_platform_model.slx')
open('stewart_platform_model.slx')
#+end_src
** Identification of the Dynamics
#+begin_src matlab
apa = load('./mat/APA300ML.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K');
flex_joint = load('./mat/flexor_ID16.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K');
apa = load('./mat/APA300ML.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K');
flex_joint = load('./mat/flexor_ID16.mat', 'int_xyz', 'int_i', 'n_xyz', 'n_i', 'nodes', 'M', 'K');
#+end_src
#+begin_src matlab
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 175e-3);
stewart = generateGeneralConfiguration(stewart, 'FH', 20e-3, 'MH', 20e-3, 'FR', 228e-3/2, 'MR', 220e-3/2, 'FTh', [-9, 9, 120-9, 120+9, 240-9, 240+9]*(pi/180), 'MTh', [-60+15, 60-15, 60+15, 180-15, 180+15, -60-15]*(pi/180));
stewart = computeJointsPose(stewart);
stewart = initializeFlexibleStrutDynamics(stewart, 'H', 0.03, 'K', apa.K, 'M', apa.M, 'n_xyz', apa.n_xyz, 'xi', 0.1, 'step_file', 'mat/APA300ML.STEP');
stewart = initializeJointDynamics(stewart, 'type_F', 'flexible', 'K_F', flex_joint.K, 'M_F', flex_joint.M, 'n_xyz_F', flex_joint.n_xyz, 'xi_F', 0.1, 'step_file_F', 'mat/flexor_ID16.STEP', 'type_M', 'flexible', 'K_M', flex_joint.K, 'M_M', flex_joint.M, 'n_xyz_M', flex_joint.n_xyz, 'xi_M', 0.1, 'step_file_M', 'mat/flexor_ID16.STEP');
stewart = initializeCylindricalPlatforms(stewart, 'Fpr', 150e-3, 'Mpr', 125e-3);
stewart = initializeCylindricalStruts(stewart, 'type_F', 'none', 'type_M', 'none');
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
stewart = initializeStewartPlatform();
stewart = initializeFramesPositions(stewart, 'H', 90e-3, 'MO_B', 175e-3);
stewart = generateGeneralConfiguration(stewart, 'FH', 20e-3, 'MH', 20e-3, 'FR', 228e-3/2, 'MR', 220e-3/2, 'FTh', [-9, 9, 120-9, 120+9, 240-9, 240+9]*(pi/180), 'MTh', [-60+15, 60-15, 60+15, 180-15, 180+15, -60-15]*(pi/180));
stewart = computeJointsPose(stewart);
stewart = initializeFlexibleStrutDynamics(stewart, 'H', 0.03, 'K', apa.K, 'M', apa.M, 'n_xyz', apa.n_xyz, 'xi', 0.1, 'step_file', 'mat/APA300ML.STEP');
stewart = initializeJointDynamics(stewart, 'type_F', 'flexible', 'K_F', flex_joint.K, 'M_F', flex_joint.M, 'n_xyz_F', flex_joint.n_xyz, 'xi_F', 0.1, 'step_file_F', 'mat/flexor_ID16.STEP', 'type_M', 'flexible', 'K_M', flex_joint.K, 'M_M', flex_joint.M, 'n_xyz_M', flex_joint.n_xyz, 'xi_M', 0.1, 'step_file_M', 'mat/flexor_ID16.STEP');
stewart = initializeCylindricalPlatforms(stewart, 'Fpr', 150e-3, 'Mpr', 125e-3);
stewart = initializeCylindricalStruts(stewart, 'type_F', 'none', 'type_M', 'none');
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
stewart = initializeInertialSensor(stewart);
#+end_src
#+begin_src matlab
ground = initializeGround('type', 'none');
payload = initializePayload('type', 'rigid', 'm', 50);
controller = initializeController('type', 'open-loop');
ground = initializeGround('type', 'none');
payload = initializePayload('type', 'rigid', 'm', 50);
controller = initializeController('type', 'open-loop');
#+end_src
#+begin_src matlab
disturbances = initializeDisturbances();
references = initializeReferences(stewart);
disturbances = initializeDisturbances();
references = initializeReferences(stewart);
#+end_src

View File

@ -65,12 +65,12 @@ This is done using something called "*Configuration Reference*" ([[https://fr.ma
Basically, the configuration is stored in a mat file =conf_simscape.mat= 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:
#+begin_src matlab :eval no
load('mat/conf_simscape.mat');
load('mat/conf_simscape.mat');
#+end_src
It is however possible to modify specific parameters just for one simulation using the =set_param= command:
#+begin_src matlab :eval no
set_param(conf_simscape, 'StopTime', 1);
set_param(conf_simscape, 'StopTime', 1);
#+end_src
* Subsystem Reference
@ -158,29 +158,29 @@ This Matlab function is accessible [[file:../src/initializePayload.m][here]].
:UNNUMBERED: t
:END:
#+begin_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]
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]
#+end_src
*** Optional Parameters
@ -188,14 +188,14 @@ This Matlab function is accessible [[file:../src/initializePayload.m][here]].
:UNNUMBERED: t
:END:
#+begin_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
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
#+end_src
*** Add Payload Type
@ -203,16 +203,16 @@ This Matlab function is accessible [[file:../src/initializePayload.m][here]].
:UNNUMBERED: t
:END:
#+begin_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
switch args.type
case 'none'
payload.type = 1;
case 'rigid'
payload.type = 2;
case 'flexible'
payload.type = 3;
case 'cartesian'
payload.type = 4;
end
#+end_src
*** Add Stiffness, Damping and Mass properties of the Payload
@ -220,12 +220,12 @@ This Matlab function is accessible [[file:../src/initializePayload.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
payload.K = args.K;
payload.C = args.C;
payload.m = args.m;
payload.I = args.I;
payload.K = args.K;
payload.C = args.C;
payload.m = args.m;
payload.I = args.I;
payload.h = args.h;
payload.h = args.h;
#+end_src
** Ground
@ -242,23 +242,23 @@ This Matlab function is accessible [[file:../src/initializeGround.m][here]].
:UNNUMBERED: t
:END:
#+begin_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)]
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)]
#+end_src
*** Optional Parameters
@ -266,12 +266,12 @@ This Matlab function is accessible [[file:../src/initializeGround.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
arguments
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
end
#+end_src
*** Add Ground Type
@ -279,14 +279,14 @@ This Matlab function is accessible [[file:../src/initializeGround.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
switch args.type
case 'none'
ground.type = 1;
case 'rigid'
ground.type = 2;
case 'flexible'
ground.type = 3;
end
switch args.type
case 'none'
ground.type = 1;
case 'rigid'
ground.type = 2;
case 'flexible'
ground.type = 3;
end
#+end_src
*** Add Stiffness and Damping properties of the Ground
@ -294,8 +294,8 @@ This Matlab function is accessible [[file:../src/initializeGround.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
ground.K = args.K;
ground.C = args.C;
ground.K = args.K;
ground.C = args.C;
#+end_src
*** Rotation Point
@ -303,7 +303,7 @@ This Matlab function is accessible [[file:../src/initializeGround.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
ground.rot_point = args.rot_point;
ground.rot_point = args.rot_point;
#+end_src
* Initialize Disturbances
:PROPERTIES:
@ -318,13 +318,13 @@ This Matlab function is accessible [[file:../src/initializeGround.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
function [disturbances] = initializeDisturbances(args)
% initializeDisturbances - Initialize the disturbances
%
% Syntax: [disturbances] = initializeDisturbances(args)
%
% Inputs:
% - args -
function [disturbances] = initializeDisturbances(args)
% initializeDisturbances - Initialize the disturbances
%
% Syntax: [disturbances] = initializeDisturbances(args)
%
% Inputs:
% - args -
#+end_src
@ -333,12 +333,12 @@ This Matlab function is accessible [[file:../src/initializeGround.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
arguments
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
end
#+end_src
@ -347,7 +347,7 @@ This Matlab function is accessible [[file:../src/initializeGround.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
disturbances = struct();
disturbances = struct();
#+end_src
** Ground Motion
@ -355,7 +355,7 @@ This Matlab function is accessible [[file:../src/initializeGround.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
disturbances.Dw = timeseries([args.Dw], args.Dw_t);
disturbances.Dw = timeseries([args.Dw], args.Dw_t);
#+end_src
** Direct Forces
@ -363,7 +363,7 @@ This Matlab function is accessible [[file:../src/initializeGround.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
disturbances.Fd = timeseries([args.Fd], args.Fd_t);
disturbances.Fd = timeseries([args.Fd], args.Fd_t);
#+end_src
* Initialize References
@ -379,13 +379,13 @@ This Matlab function is accessible [[file:../src/initializeGround.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
function [references] = initializeReferences(stewart, args)
% initializeReferences - Initialize the references
%
% Syntax: [references] = initializeReferences(args)
%
% Inputs:
% - args -
function [references] = initializeReferences(stewart, args)
% initializeReferences - Initialize the references
%
% Syntax: [references] = initializeReferences(args)
%
% Inputs:
% - args -
#+end_src
@ -394,31 +394,31 @@ This Matlab function is accessible [[file:../src/initializeGround.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
arguments
arguments
stewart
args.t double {mustBeNumeric, mustBeReal} = 0
args.r double {mustBeNumeric, mustBeReal} = zeros(6, 1)
end
end
#+end_src
** Compute the corresponding strut length
#+begin_src matlab
rL = zeros(6, length(args.t));
rL = zeros(6, length(args.t));
for i = 1: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))] * ...
-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))];
[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, 'AP', [args.r(1,i); args.r(2,i); args.r(3,i)], 'ARB', R);
rL(:, i) = dLi;
end
#+end_src
** References
@ -426,6 +426,6 @@ This Matlab function is accessible [[file:../src/initializeGround.m][here]].
:UNNUMBERED: t
:END:
#+begin_src matlab
references.r = timeseries(args.r, args.t);
references.rL = timeseries(rL, args.t);
references.r = timeseries(args.r, args.t);
references.rL = timeseries(rL, args.t);
#+end_src

View File

@ -49,30 +49,30 @@ From the [[https://mathworks.com/products/simulink/projects.html][Simulink proje
The project can be opened using the =simulinkproject= function:
#+begin_src matlab
simulinkproject('../');
simulinkproject('../');
#+end_src
When the project opens, a startup script is ran.
The startup script is defined below and is exported to the =project_startup.m= script.
#+begin_src matlab :eval no :tangle ../src/project_startup.m
project = simulinkproject;
projectRoot = project.RootFolder;
project = simulinkproject;
projectRoot = project.RootFolder;
myCacheFolder = fullfile(projectRoot, '.SimulinkCache');
myCodeFolder = fullfile(projectRoot, '.SimulinkCode');
myCacheFolder = fullfile(projectRoot, '.SimulinkCache');
myCodeFolder = fullfile(projectRoot, '.SimulinkCode');
Simulink.fileGenControl('set',...
'CacheFolder', myCacheFolder,...
'CodeGenFolder', myCodeFolder,...
'createDir', true);
Simulink.fileGenControl('set',...
'CacheFolder', myCacheFolder,...
'CodeGenFolder', myCodeFolder,...
'createDir', true);
%% Load the Simscape Configuration
load('mat/conf_simscape.mat');
%% Load the Simscape Configuration
load('mat/conf_simscape.mat');
#+end_src
When the project closes, it runs the =project_shutdown.m= script defined below.
#+begin_src matlab :eval no :tangle ../src/project_shutdown.m
Simulink.fileGenControl('reset');
Simulink.fileGenControl('reset');
#+end_src
The project also permits to automatically add defined folder to the path when the project is opened.

View File

@ -38,16 +38,16 @@
What causes the coupling from $F_i$ to $X_i$ ?
#+begin_src latex :file coupling.pdf
\begin{tikzpicture}
\node[block] (Jt) at (0, 0) {$J^{-T}$};
\node[block, right= of Jt] (G) {$G$};
\node[block, right= of G] (J) {$J^{-1}$};
\begin{tikzpicture}
\node[block] (Jt) at (0, 0) {$J^{-T}$};
\node[block, right= of Jt] (G) {$G$};
\node[block, right= of G] (J) {$J^{-1}$};
\draw[->] ($(Jt.west)+(-0.8, 0)$) -- (Jt.west) node[above left]{$F_i$};
\draw[->] (Jt.east) -- (G.west) node[above left]{$\tau_i$};
\draw[->] (G.east) -- (J.west) node[above left]{$q_i$};
\draw[->] (J.east) -- ++(0.8, 0) node[above left]{$X_i$};
\end{tikzpicture}
\draw[->] ($(Jt.west)+(-0.8, 0)$) -- (Jt.west) node[above left]{$F_i$};
\draw[->] (Jt.east) -- (G.west) node[above left]{$\tau_i$};
\draw[->] (G.east) -- (J.west) node[above left]{$q_i$};
\draw[->] (J.east) -- ++(0.8, 0) node[above left]{$X_i$};
\end{tikzpicture}
#+end_src
#+name: fig:block_diag_coupling

File diff suppressed because it is too large Load Diff