1222 lines
61 KiB
HTML
1222 lines
61 KiB
HTML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
|
<head>
|
|
<!-- 2021-01-08 ven. 15:29 -->
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
|
<title>Stewart Platform - Vibration Isolation</title>
|
|
<meta name="generator" content="Org mode" />
|
|
<meta name="author" content="Dehaeze Thomas" />
|
|
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
|
|
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
|
|
<script>
|
|
MathJax = {
|
|
svg: {
|
|
scale: 1,
|
|
fontCache: "global"
|
|
},
|
|
tex: {
|
|
tags: "ams",
|
|
multlineWidth: "%MULTLINEWIDTH",
|
|
tagSide: "right",
|
|
macros: {bm: ["\\boldsymbol{#1}",1],},
|
|
tagIndent: ".8em"
|
|
}
|
|
};
|
|
</script>
|
|
<script id="MathJax-script" async
|
|
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="org-div-home-and-up">
|
|
<a accesskey="h" href="./index.html"> UP </a>
|
|
|
|
|
<a accesskey="H" href="./index.html"> HOME </a>
|
|
</div><div id="content">
|
|
<h1 class="title">Stewart Platform - Vibration Isolation</h1>
|
|
<div id="table-of-contents">
|
|
<h2>Table of Contents</h2>
|
|
<div id="text-table-of-contents">
|
|
<ul>
|
|
<li><a href="#org4b4dce5">1. HAC-LAC (Cascade) Control - Integral Control</a>
|
|
<ul>
|
|
<li><a href="#org9a6463e">1.1. Introduction</a></li>
|
|
<li><a href="#org3a99845">1.2. Initialization</a></li>
|
|
<li><a href="#org14c6b40">1.3. Identification</a>
|
|
<ul>
|
|
<li><a href="#org0472596">1.3.1. HAC - Without LAC</a></li>
|
|
<li><a href="#org4f15e52">1.3.2. HAC - IFF</a></li>
|
|
<li><a href="#org7a58249">1.3.3. HAC - DVF</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org68ac3ce">1.4. Control Architecture</a></li>
|
|
<li><a href="#org668a952">1.5. 6x6 Plant Comparison</a></li>
|
|
<li><a href="#org57a64c4">1.6. HAC - DVF</a>
|
|
<ul>
|
|
<li><a href="#orgd38d3c3">1.6.1. Plant</a></li>
|
|
<li><a href="#org9f6bb59">1.6.2. Controller Design</a></li>
|
|
<li><a href="#orga03849e">1.6.3. Obtained Performance</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org49dd47c">1.7. HAC - IFF</a>
|
|
<ul>
|
|
<li><a href="#orgff953e4">1.7.1. Plant</a></li>
|
|
<li><a href="#orgbd635c1">1.7.2. Controller Design</a></li>
|
|
<li><a href="#org83c15a9">1.7.3. Obtained Performance</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org8e15485">1.8. Comparison</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#orgdc1bcf2">2. MIMO Analysis</a>
|
|
<ul>
|
|
<li><a href="#orgb2d0659">2.1. Initialization</a></li>
|
|
<li><a href="#org2c99279">2.2. Identification</a>
|
|
<ul>
|
|
<li><a href="#org7e602f6">2.2.1. HAC - Without LAC</a></li>
|
|
<li><a href="#orgc4bf514">2.2.2. HAC - DVF</a></li>
|
|
<li><a href="#orgba8c7bf">2.2.3. Cartesian Frame</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#orgf9d0420">2.3. Singular Value Decomposition</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#orga095fa8">3. Diagonal Control based on the damped plant</a>
|
|
<ul>
|
|
<li><a href="#org7b7245e">3.1. Initialization</a></li>
|
|
<li><a href="#orgb5e88a6">3.2. Identification</a></li>
|
|
<li><a href="#orgb5a063b">3.3. Steady State Decoupling</a>
|
|
<ul>
|
|
<li><a href="#orgd0ce552">3.3.1. Pre-Compensator Design</a></li>
|
|
<li><a href="#org41b76c6">3.3.2. Diagonal Control Design</a></li>
|
|
<li><a href="#org923f450">3.3.3. Results</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#orgb53dd48">3.4. Decoupling at Crossover</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org639412c">4. Time Domain Simulation</a>
|
|
<ul>
|
|
<li><a href="#org2308492">4.1. Initialization</a></li>
|
|
<li><a href="#orgc72e6b5">4.2. HAC IFF</a></li>
|
|
<li><a href="#org757f9e9">4.3. HAC-DVF</a></li>
|
|
<li><a href="#org3228759">4.4. Results</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#org6a9c87c">5. Functions</a>
|
|
<ul>
|
|
<li><a href="#orgd1492e7">5.1. <code>initializeController</code>: Initialize the Controller</a>
|
|
<ul>
|
|
<li><a href="#orgae5eed0">Function description</a></li>
|
|
<li><a href="#orgda07b57">Optional Parameters</a></li>
|
|
<li><a href="#orgdb009ab">Structure initialization</a></li>
|
|
<li><a href="#org056c578">Add Type</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org4b4dce5" class="outline-2">
|
|
<h2 id="org4b4dce5"><span class="section-number-2">1</span> HAC-LAC (Cascade) Control - Integral Control</h2>
|
|
<div class="outline-text-2" id="text-1">
|
|
</div>
|
|
<div id="outline-container-org9a6463e" class="outline-3">
|
|
<h3 id="org9a6463e"><span class="section-number-3">1.1</span> Introduction</h3>
|
|
<div class="outline-text-3" id="text-1-1">
|
|
<p>
|
|
In this section, we wish to study the use of the High Authority Control - Low Authority Control (HAC-LAC) architecture on the Stewart platform.
|
|
</p>
|
|
|
|
<p>
|
|
The control architectures are shown in Figures <a href="#org000f34d">1</a> and <a href="#orgeaed076">2</a>.
|
|
</p>
|
|
|
|
<p>
|
|
First, the LAC loop is closed (the LAC control is described <a href="active-damping.html">here</a>), and then the HAC controller is designed and the outer loop is closed.
|
|
</p>
|
|
|
|
|
|
<div id="org000f34d" class="figure">
|
|
<p><img src="figs/control_arch_hac_iff.png" alt="control_arch_hac_iff.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 1: </span>HAC-LAC architecture with IFF</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div id="orgeaed076" class="figure">
|
|
<p><img src="figs/control_arch_hac_dvf.png" alt="control_arch_hac_dvf.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 2: </span>HAC-LAC architecture with DVF</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org3a99845" class="outline-3">
|
|
<h3 id="org3a99845"><span class="section-number-3">1.2</span> Initialization</h3>
|
|
<div class="outline-text-3" id="text-1-2">
|
|
<p>
|
|
We first initialize 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'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</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>
|
|
|
|
<p>
|
|
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>);
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org14c6b40" class="outline-3">
|
|
<h3 id="org14c6b40"><span class="section-number-3">1.3</span> Identification</h3>
|
|
<div class="outline-text-3" id="text-1-3">
|
|
<p>
|
|
We identify the transfer function from the actuator forces \(\bm{\tau}\) to the absolute displacement of the mobile platform \(\bm{\mathcal{X}}\) in three different cases:
|
|
</p>
|
|
<ul class="org-ul">
|
|
<li>Open Loop plant</li>
|
|
<li>Already damped plant using Integral Force Feedback</li>
|
|
<li>Already damped plant using Direct velocity feedback</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div id="outline-container-org0472596" class="outline-4">
|
|
<h4 id="org0472596"><span class="section-number-4">1.3.1</span> HAC - Without LAC</h4>
|
|
<div class="outline-text-4" id="text-1-3-1">
|
|
<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>);
|
|
</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>;
|
|
|
|
<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">'/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 Sensor [m, rad]</span>
|
|
|
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
|
|
G_ol = linearize(mdl, io);
|
|
G_ol.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_ol.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>
|
|
</div>
|
|
|
|
<div id="outline-container-org4f15e52" class="outline-4">
|
|
<h4 id="org4f15e52"><span class="section-number-4">1.3.2</span> HAC - IFF</h4>
|
|
<div class="outline-text-4" id="text-1-3-2">
|
|
<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 = <span class="org-type">-</span>(1e4<span class="org-type">/</span>s)<span class="org-type">*</span>eye(6);
|
|
</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>;
|
|
|
|
<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">'/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 Sensor [m, rad]</span>
|
|
|
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
|
|
G_iff = linearize(mdl, io);
|
|
G_iff.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_iff.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>
|
|
</div>
|
|
|
|
<div id="outline-container-org7a58249" class="outline-4">
|
|
<h4 id="org7a58249"><span class="section-number-4">1.3.3</span> HAC - DVF</h4>
|
|
<div class="outline-text-4" id="text-1-3-3">
|
|
<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 = <span class="org-type">-</span>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>
|
|
</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>;
|
|
|
|
<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">'/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 Sensor [m, rad]</span>
|
|
|
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
|
|
G_dvf = linearize(mdl, io);
|
|
G_dvf.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_dvf.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>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org68ac3ce" class="outline-3">
|
|
<h3 id="org68ac3ce"><span class="section-number-3">1.4</span> Control Architecture</h3>
|
|
<div class="outline-text-3" id="text-1-4">
|
|
<p>
|
|
We use the Jacobian to express the actuator forces in the cartesian frame, and thus we obtain the transfer functions from \(\bm{\mathcal{F}}\) to \(\bm{\mathcal{X}}\).
|
|
</p>
|
|
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> Gc_ol = minreal(G_ol)<span class="org-type">/</span>stewart.kinematics.J<span class="org-type">'</span>;
|
|
Gc_ol.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_iff = minreal(G_iff)<span class="org-type">/</span>stewart.kinematics.J<span class="org-type">'</span>;
|
|
Gc_iff.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_dvf = minreal(G_dvf)<span class="org-type">/</span>stewart.kinematics.J<span class="org-type">'</span>;
|
|
Gc_dvf.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>};
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
We then design a controller based on the transfer functions from \(\bm{\mathcal{F}}\) to \(\bm{\mathcal{X}}\), finally, we will pre-multiply the controller by \(\bm{J}^{-T}\).
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org668a952" class="outline-3">
|
|
<h3 id="org668a952"><span class="section-number-3">1.5</span> 6x6 Plant Comparison</h3>
|
|
<div class="outline-text-3" id="text-1-5">
|
|
|
|
<div id="orgcf3a190" class="figure">
|
|
<p><img src="figs/hac_lac_coupling_jacobian.png" alt="hac_lac_coupling_jacobian.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 3: </span>Norm of the transfer functions from \(\bm{\mathcal{F}}\) to \(\bm{\mathcal{X}}\) (<a href="./figs/hac_lac_coupling_jacobian.png">png</a>, <a href="./figs/hac_lac_coupling_jacobian.pdf">pdf</a>)</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org57a64c4" class="outline-3">
|
|
<h3 id="org57a64c4"><span class="section-number-3">1.6</span> HAC - DVF</h3>
|
|
<div class="outline-text-3" id="text-1-6">
|
|
</div>
|
|
<div id="outline-container-orgd38d3c3" class="outline-4">
|
|
<h4 id="orgd38d3c3"><span class="section-number-4">1.6.1</span> Plant</h4>
|
|
<div class="outline-text-4" id="text-1-6-1">
|
|
|
|
<div id="orgc08547a" class="figure">
|
|
<p><img src="figs/hac_lac_plant_dvf.png" alt="hac_lac_plant_dvf.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 4: </span>Diagonal elements of the plant for HAC control when DVF is previously applied (<a href="./figs/hac_lac_plant_dvf.png">png</a>, <a href="./figs/hac_lac_plant_dvf.pdf">pdf</a>)</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org9f6bb59" class="outline-4">
|
|
<h4 id="org9f6bb59"><span class="section-number-4">1.6.2</span> Controller Design</h4>
|
|
<div class="outline-text-4" id="text-1-6-2">
|
|
<p>
|
|
We design a diagonal controller with equal bandwidth for the 6 terms.
|
|
The controller is a pure integrator with a small lead near the crossover.
|
|
</p>
|
|
|
|
<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; <span class="org-comment">% Wanted Bandwidth [rad/s]</span>
|
|
|
|
h = 1.2;
|
|
H_lead = 1<span class="org-type">/</span>h<span class="org-type">*</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>(wc<span class="org-type">/</span>h))<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>(wc<span class="org-type">*</span>h));
|
|
|
|
Kd_dvf = diag(1<span class="org-type">./</span>abs(diag(freqresp(1<span class="org-type">/</span>s<span class="org-type">*</span>Gc_dvf, wc)))) <span class="org-type">.*</span> H_lead <span class="org-type">.*</span> 1<span class="org-type">/</span>s;
|
|
</pre>
|
|
</div>
|
|
|
|
|
|
<div id="org8108913" class="figure">
|
|
<p><img src="figs/hac_lac_loop_gain_dvf.png" alt="hac_lac_loop_gain_dvf.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 5: </span>Diagonal elements of the Loop Gain for the HAC control (<a href="./figs/hac_lac_loop_gain_dvf.png">png</a>, <a href="./figs/hac_lac_loop_gain_dvf.pdf">pdf</a>)</p>
|
|
</div>
|
|
|
|
|
|
<p>
|
|
Finally, we pre-multiply the diagonal controller by \(\bm{J}^{-T}\) prior implementation.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> K_hac_dvf = inv(stewart.kinematics.J<span class="org-type">'</span>)<span class="org-type">*</span>Kd_dvf;
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orga03849e" class="outline-4">
|
|
<h4 id="orga03849e"><span class="section-number-4">1.6.3</span> Obtained Performance</h4>
|
|
<div class="outline-text-4" id="text-1-6-3">
|
|
<p>
|
|
We identify the transmissibility and compliance of the system.
|
|
</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, <span class="org-type">~</span>] = computeCompliance();
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'dvf'</span>);
|
|
[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 class="org-src-container">
|
|
<pre class="src src-matlab"> controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'hac-dvf'</span>);
|
|
[T_hac_dvf, T_norm_hac_dvf, <span class="org-type">~</span>] = computeTransmissibility();
|
|
[C_hac_dvf, C_norm_hac_dvf, <span class="org-type">~</span>] = computeCompliance();
|
|
</pre>
|
|
</div>
|
|
|
|
|
|
<div id="orgf16f5f2" class="figure">
|
|
<p><img src="figs/hac_lac_C_T_dvf.png" alt="hac_lac_C_T_dvf.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 6: </span>Obtained Compliance and Transmissibility (<a href="./figs/hac_lac_C_T_dvf.png">png</a>, <a href="./figs/hac_lac_C_T_dvf.pdf">pdf</a>)</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org49dd47c" class="outline-3">
|
|
<h3 id="org49dd47c"><span class="section-number-3">1.7</span> HAC - IFF</h3>
|
|
<div class="outline-text-3" id="text-1-7">
|
|
</div>
|
|
<div id="outline-container-orgff953e4" class="outline-4">
|
|
<h4 id="orgff953e4"><span class="section-number-4">1.7.1</span> Plant</h4>
|
|
<div class="outline-text-4" id="text-1-7-1">
|
|
|
|
<div id="org66710a7" class="figure">
|
|
<p><img src="figs/hac_lac_plant_iff.png" alt="hac_lac_plant_iff.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 7: </span>Diagonal elements of the plant for HAC control when IFF is previously applied (<a href="./figs/hac_lac_plant_iff.png">png</a>, <a href="./figs/hac_lac_plant_iff.pdf">pdf</a>)</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgbd635c1" class="outline-4">
|
|
<h4 id="orgbd635c1"><span class="section-number-4">1.7.2</span> Controller Design</h4>
|
|
<div class="outline-text-4" id="text-1-7-2">
|
|
<p>
|
|
We design a diagonal controller with equal bandwidth for the 6 terms.
|
|
The controller is a pure integrator with a small lead near the crossover.
|
|
</p>
|
|
|
|
<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; <span class="org-comment">% Wanted Bandwidth [rad/s]</span>
|
|
|
|
h = 1.2;
|
|
H_lead = 1<span class="org-type">/</span>h<span class="org-type">*</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>(wc<span class="org-type">/</span>h))<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>(wc<span class="org-type">*</span>h));
|
|
|
|
Kd_iff = diag(1<span class="org-type">./</span>abs(diag(freqresp(1<span class="org-type">/</span>s<span class="org-type">*</span>Gc_iff, wc)))) <span class="org-type">.*</span> H_lead <span class="org-type">.*</span> 1<span class="org-type">/</span>s;
|
|
</pre>
|
|
</div>
|
|
|
|
|
|
<div id="org0b7f4f2" class="figure">
|
|
<p><img src="figs/hac_lac_loop_gain_iff.png" alt="hac_lac_loop_gain_iff.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 8: </span>Diagonal elements of the Loop Gain for the HAC control (<a href="./figs/hac_lac_loop_gain_iff.png">png</a>, <a href="./figs/hac_lac_loop_gain_iff.pdf">pdf</a>)</p>
|
|
</div>
|
|
|
|
|
|
<p>
|
|
Finally, we pre-multiply the diagonal controller by \(\bm{J}^{-T}\) prior implementation.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> K_hac_iff = inv(stewart.kinematics.J<span class="org-type">'</span>)<span class="org-type">*</span>Kd_iff;
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org83c15a9" class="outline-4">
|
|
<h4 id="org83c15a9"><span class="section-number-4">1.7.3</span> Obtained Performance</h4>
|
|
<div class="outline-text-4" id="text-1-7-3">
|
|
<p>
|
|
We identify the transmissibility and compliance of the system.
|
|
</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, <span class="org-type">~</span>] = computeCompliance();
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'iff'</span>);
|
|
[T_iff, T_norm_iff, <span class="org-type">~</span>] = computeTransmissibility();
|
|
[C_iff, C_norm_iff, <span class="org-type">~</span>] = computeCompliance();
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'hac-iff'</span>);
|
|
[T_hac_iff, T_norm_hac_iff, <span class="org-type">~</span>] = computeTransmissibility();
|
|
[C_hac_iff, C_norm_hac_iff, <span class="org-type">~</span>] = computeCompliance();
|
|
</pre>
|
|
</div>
|
|
|
|
|
|
<div id="org6c57f46" class="figure">
|
|
<p><img src="figs/hac_lac_C_T_iff.png" alt="hac_lac_C_T_iff.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 9: </span>Obtained Compliance and Transmissibility (<a href="./figs/hac_lac_C_T_iff.png">png</a>, <a href="./figs/hac_lac_C_T_iff.pdf">pdf</a>)</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org8e15485" class="outline-3">
|
|
<h3 id="org8e15485"><span class="section-number-3">1.8</span> Comparison</h3>
|
|
<div class="outline-text-3" id="text-1-8">
|
|
|
|
<div id="org34035be" class="figure">
|
|
<p><img src="figs/hac_lac_C_full_comparison.png" alt="hac_lac_C_full_comparison.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 10: </span>Comparison of the norm of the Compliance matrices for the HAC-LAC architecture (<a href="./figs/hac_lac_C_full_comparison.png">png</a>, <a href="./figs/hac_lac_C_full_comparison.pdf">pdf</a>)</p>
|
|
</div>
|
|
|
|
|
|
<div id="org6db2ceb" class="figure">
|
|
<p><img src="figs/hac_lac_T_full_comparison.png" alt="hac_lac_T_full_comparison.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 11: </span>Comparison of the norm of the Transmissibility matrices for the HAC-LAC architecture (<a href="./figs/hac_lac_T_full_comparison.png">png</a>, <a href="./figs/hac_lac_T_full_comparison.pdf">pdf</a>)</p>
|
|
</div>
|
|
|
|
|
|
<div id="orga195621" class="figure">
|
|
<p><img src="figs/hac_lac_C_T_comparison.png" alt="hac_lac_C_T_comparison.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 12: </span>Comparison of the Frobenius norm of the Compliance and Transmissibility for the HAC-LAC architecture with both IFF and DVF (<a href="./figs/hac_lac_C_T_comparison.png">png</a>, <a href="./figs/hac_lac_C_T_comparison.pdf">pdf</a>)</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgdc1bcf2" class="outline-2">
|
|
<h2 id="orgdc1bcf2"><span class="section-number-2">2</span> MIMO Analysis</h2>
|
|
<div class="outline-text-2" id="text-2">
|
|
<p>
|
|
Let’s define the system as shown in figure <a href="#org6f95566">13</a>.
|
|
</p>
|
|
|
|
|
|
<div id="org6f95566" class="figure">
|
|
<p><img src="figs/general_control_names.png" alt="general_control_names.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 13: </span>General Control Architecture</p>
|
|
</div>
|
|
|
|
<table id="org8568d41" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
|
<caption class="t-above"><span class="table-number">Table 1:</span> Signals definition for the generalized plant</caption>
|
|
|
|
<colgroup>
|
|
<col class="org-left" />
|
|
|
|
<col class="org-left" />
|
|
|
|
<col class="org-left" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th scope="col" class="org-left"> </th>
|
|
<th scope="col" class="org-left"><b>Symbol</b></th>
|
|
<th scope="col" class="org-left"><b>Meaning</b></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="org-left"><b>Exogenous Inputs</b></td>
|
|
<td class="org-left">\(\bm{\mathcal{X}}_w\)</td>
|
|
<td class="org-left">Ground motion</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="org-left"> </td>
|
|
<td class="org-left">\(\bm{\mathcal{F}}_d\)</td>
|
|
<td class="org-left">External Forces applied to the Payload</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="org-left"> </td>
|
|
<td class="org-left">\(\bm{r}\)</td>
|
|
<td class="org-left">Reference signal for tracking</td>
|
|
</tr>
|
|
</tbody>
|
|
<tbody>
|
|
<tr>
|
|
<td class="org-left"><b>Exogenous Outputs</b></td>
|
|
<td class="org-left">\(\bm{\mathcal{X}}\)</td>
|
|
<td class="org-left">Absolute Motion of the Payload</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="org-left"> </td>
|
|
<td class="org-left">\(\bm{\tau}\)</td>
|
|
<td class="org-left">Actuator Rate</td>
|
|
</tr>
|
|
</tbody>
|
|
<tbody>
|
|
<tr>
|
|
<td class="org-left"><b>Sensed Outputs</b></td>
|
|
<td class="org-left">\(\bm{\tau}_m\)</td>
|
|
<td class="org-left">Force Sensors in each leg</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="org-left"> </td>
|
|
<td class="org-left">\(\delta \bm{\mathcal{L}}_m\)</td>
|
|
<td class="org-left">Measured displacement of each leg</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="org-left"> </td>
|
|
<td class="org-left">\(\bm{\mathcal{X}}\)</td>
|
|
<td class="org-left">Absolute Motion of the Payload</td>
|
|
</tr>
|
|
</tbody>
|
|
<tbody>
|
|
<tr>
|
|
<td class="org-left"><b>Control Signals</b></td>
|
|
<td class="org-left">\(\bm{\tau}\)</td>
|
|
<td class="org-left">Actuator Inputs</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="outline-container-orgb2d0659" class="outline-3">
|
|
<h3 id="orgb2d0659"><span class="section-number-3">2.1</span> Initialization</h3>
|
|
<div class="outline-text-3" id="text-2-1">
|
|
<p>
|
|
We first initialize 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'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</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>
|
|
|
|
<p>
|
|
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>);
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org2c99279" class="outline-3">
|
|
<h3 id="org2c99279"><span class="section-number-3">2.2</span> Identification</h3>
|
|
<div class="outline-text-3" id="text-2-2">
|
|
</div>
|
|
<div id="outline-container-org7e602f6" class="outline-4">
|
|
<h4 id="org7e602f6"><span class="section-number-4">2.2.1</span> HAC - Without LAC</h4>
|
|
<div class="outline-text-4" id="text-2-2-1">
|
|
<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>);
|
|
</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>;
|
|
|
|
<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">'/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 Sensor [m, rad]</span>
|
|
|
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
|
|
G_ol = linearize(mdl, io);
|
|
G_ol.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_ol.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>
|
|
</div>
|
|
|
|
<div id="outline-container-orgc4bf514" class="outline-4">
|
|
<h4 id="orgc4bf514"><span class="section-number-4">2.2.2</span> HAC - DVF</h4>
|
|
<div class="outline-text-4" id="text-2-2-2">
|
|
<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 = <span class="org-type">-</span>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>
|
|
</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>;
|
|
|
|
<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">'/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 Sensor [m, rad]</span>
|
|
|
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
|
|
G_dvf = linearize(mdl, io);
|
|
G_dvf.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_dvf.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>
|
|
</div>
|
|
|
|
<div id="outline-container-orgba8c7bf" class="outline-4">
|
|
<h4 id="orgba8c7bf"><span class="section-number-4">2.2.3</span> Cartesian Frame</h4>
|
|
<div class="outline-text-4" id="text-2-2-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> Gc_ol = minreal(G_ol)<span class="org-type">/</span>stewart.kinematics.J<span class="org-type">'</span>;
|
|
Gc_ol.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_dvf = minreal(G_dvf)<span class="org-type">/</span>stewart.kinematics.J<span class="org-type">'</span>;
|
|
Gc_dvf.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>};
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgf9d0420" class="outline-3">
|
|
<h3 id="orgf9d0420"><span class="section-number-3">2.3</span> Singular Value Decomposition</h3>
|
|
<div class="outline-text-3" id="text-2-3">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> freqs = logspace(1, 4, 1000);
|
|
|
|
U_ol = zeros(6,6,length(freqs));
|
|
S_ol = zeros(6,length(freqs));
|
|
V_ol = zeros(6,6,length(freqs));
|
|
|
|
U_dvf = zeros(6,6,length(freqs));
|
|
S_dvf = zeros(6,length(freqs));
|
|
V_dvf = zeros(6,6,length(freqs));
|
|
|
|
<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>
|
|
[U,S,V] = svd(freqresp(Gc_ol, freqs(<span class="org-constant">i</span>), <span class="org-string">'Hz'</span>));
|
|
U_ol(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = U;
|
|
S_ol(<span class="org-type">:</span>,<span class="org-constant">i</span>) = diag(S);
|
|
V_ol(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = V;
|
|
|
|
[U,S,V] = svd(freqresp(Gc_dvf, freqs(<span class="org-constant">i</span>), <span class="org-string">'Hz'</span>));
|
|
U_dvf(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = U;
|
|
S_dvf(<span class="org-type">:</span>,<span class="org-constant">i</span>) = diag(S);
|
|
V_dvf(<span class="org-type">:</span>,<span class="org-type">:</span>,<span class="org-constant">i</span>) = V;
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orga095fa8" class="outline-2">
|
|
<h2 id="orga095fa8"><span class="section-number-2">3</span> Diagonal Control based on the damped plant</h2>
|
|
<div class="outline-text-2" id="text-3">
|
|
<p>
|
|
From (<a href="#citeproc_bib_item_1">Skogestad and Postlethwaite 2007</a>), a simple approach to multivariable control is the following two-step procedure:
|
|
</p>
|
|
<ol class="org-ol">
|
|
<li><b>Design a pre-compensator</b> \(W_1\), which counteracts the interactions in the plant and results in a new <b>shaped plant</b> \(G_S(s) = G(s) W_1(s)\) which is <b>more diagonal and easier to control</b> than the original plant \(G(s)\).</li>
|
|
<li><b>Design a diagonal controller</b> \(K_S(s)\) for the shaped plant using methods similar to those for SISO systems.</li>
|
|
</ol>
|
|
|
|
<p>
|
|
The overall controller is then:
|
|
\[ K(s) = W_1(s)K_s(s) \]
|
|
</p>
|
|
|
|
<p>
|
|
There are mainly three different cases:
|
|
</p>
|
|
<ol class="org-ol">
|
|
<li><b>Dynamic decoupling</b>: \(G_S(s)\) is diagonal at all frequencies. For that we can choose \(W_1(s) = G^{-1}(s)\) and this is an inverse-based controller.</li>
|
|
<li><b>Steady-state decoupling</b>: \(G_S(0)\) is diagonal. This can be obtained by selecting \(W_1(s) = G^{-1}(0)\).</li>
|
|
<li><b>Approximate decoupling at frequency \(\w_0\)</b>: \(G_S(j\w_0)\) is as diagonal as possible. Decoupling the system at \(\w_0\) is a good choice because the effect on performance of reducing interaction is normally greatest at this frequency.</li>
|
|
</ol>
|
|
</div>
|
|
|
|
<div id="outline-container-org7b7245e" class="outline-3">
|
|
<h3 id="org7b7245e"><span class="section-number-3">3.1</span> Initialization</h3>
|
|
<div class="outline-text-3" id="text-3-1">
|
|
<p>
|
|
We first initialize 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'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</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>
|
|
|
|
<p>
|
|
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>);
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgb5e88a6" class="outline-3">
|
|
<h3 id="orgb5e88a6"><span class="section-number-3">3.2</span> Identification</h3>
|
|
<div class="outline-text-3" id="text-3-2">
|
|
<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 = <span class="org-type">-</span>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>
|
|
</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>;
|
|
|
|
<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">'/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 Sensor [m, rad]</span>
|
|
|
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
|
|
G_dvf = linearize(mdl, io);
|
|
G_dvf.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_dvf.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>
|
|
</div>
|
|
|
|
<div id="outline-container-orgb5a063b" class="outline-3">
|
|
<h3 id="orgb5a063b"><span class="section-number-3">3.3</span> Steady State Decoupling</h3>
|
|
<div class="outline-text-3" id="text-3-3">
|
|
</div>
|
|
<div id="outline-container-orgd0ce552" class="outline-4">
|
|
<h4 id="orgd0ce552"><span class="section-number-4">3.3.1</span> Pre-Compensator Design</h4>
|
|
<div class="outline-text-4" id="text-3-3-1">
|
|
<p>
|
|
We choose \(W_1 = G^{-1}(0)\).
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> W1 = inv(freqresp(G_dvf, 0));
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
The (static) decoupled plant is \(G_s(s) = G(s) W_1\).
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> Gs = G_dvf<span class="org-type">*</span>W1;
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
In the case of the Stewart platform, the pre-compensator for static decoupling is equal to \(\mathcal{K} \bm{J}\):
|
|
</p>
|
|
\begin{align*}
|
|
W_1 &= \left( \frac{\bm{\mathcal{X}}}{\bm{\tau}}(s=0) \right)^{-1}\\
|
|
&= \left( \frac{\bm{\mathcal{X}}}{\bm{\tau}}(s=0) \bm{J}^T \right)^{-1}\\
|
|
&= \left( \bm{C} \bm{J}^T \right)^{-1}\\
|
|
&= \left( \bm{J}^{-1} \mathcal{K}^{-1} \right)^{-1}\\
|
|
&= \mathcal{K} \bm{J}
|
|
\end{align*}
|
|
|
|
<p>
|
|
The static decoupled plant is schematic shown in Figure <a href="#org6f0c40d">14</a> and the bode plots of its diagonal elements are shown in Figure <a href="#orgd6f1b1d">15</a>.
|
|
</p>
|
|
|
|
|
|
<div id="org6f0c40d" class="figure">
|
|
<p><img src="figs/control_arch_static_decoupling.png" alt="control_arch_static_decoupling.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 14: </span>Static Decoupling of the Stewart platform</p>
|
|
</div>
|
|
|
|
|
|
<div id="orgd6f1b1d" class="figure">
|
|
<p><img src="figs/static_decoupling_diagonal_plant.png" alt="static_decoupling_diagonal_plant.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 15: </span>Bode plot of the diagonal elements of \(G_s(s)\) (<a href="./figs/static_decoupling_diagonal_plant.png">png</a>, <a href="./figs/static_decoupling_diagonal_plant.pdf">pdf</a>)</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org41b76c6" class="outline-4">
|
|
<h4 id="org41b76c6"><span class="section-number-4">3.3.2</span> Diagonal Control Design</h4>
|
|
<div class="outline-text-4" id="text-3-3-2">
|
|
<p>
|
|
We design a diagonal controller \(K_s(s)\) that consist of a pure integrator and a lead around the crossover.
|
|
</p>
|
|
|
|
<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; <span class="org-comment">% Wanted Bandwidth [rad/s]</span>
|
|
|
|
h = 1.5;
|
|
H_lead = 1<span class="org-type">/</span>h<span class="org-type">*</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>(wc<span class="org-type">/</span>h))<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>(wc<span class="org-type">*</span>h));
|
|
|
|
Ks_dvf = diag(1<span class="org-type">./</span>abs(diag(freqresp(1<span class="org-type">/</span>s<span class="org-type">*</span>Gs, wc)))) <span class="org-type">.*</span> H_lead <span class="org-type">.*</span> 1<span class="org-type">/</span>s;
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
The overall controller is then \(K(s) = W_1 K_s(s)\) as shown in Figure <a href="#org2d2d9e8">16</a>.
|
|
</p>
|
|
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> K_hac_dvf = W1 <span class="org-type">*</span> Ks_dvf;
|
|
</pre>
|
|
</div>
|
|
|
|
|
|
<div id="org2d2d9e8" class="figure">
|
|
<p><img src="figs/control_arch_static_decoupling_K.png" alt="control_arch_static_decoupling_K.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 16: </span>Controller including the static decoupling matrix</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org923f450" class="outline-4">
|
|
<h4 id="org923f450"><span class="section-number-4">3.3.3</span> Results</h4>
|
|
<div class="outline-text-4" id="text-3-3-3">
|
|
<p>
|
|
We identify the transmissibility and compliance of the Stewart platform under open-loop and closed-loop control.
|
|
</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, <span class="org-type">~</span>] = computeCompliance();
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'hac-dvf'</span>);
|
|
[T_hac_dvf, T_norm_hac_dvf, <span class="org-type">~</span>] = computeTransmissibility();
|
|
[C_hac_dvf, C_norm_hac_dvf, <span class="org-type">~</span>] = computeCompliance();
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
The results are shown in figure
|
|
</p>
|
|
|
|
|
|
<div id="orgb6c4828" class="figure">
|
|
<p><img src="figs/static_decoupling_C_T_frobenius_norm.png" alt="static_decoupling_C_T_frobenius_norm.png" />
|
|
</p>
|
|
<p><span class="figure-number">Figure 17: </span>Frobenius norm of the Compliance and transmissibility matrices (<a href="./figs/static_decoupling_C_T_frobenius_norm.png">png</a>, <a href="./figs/static_decoupling_C_T_frobenius_norm.pdf">pdf</a>)</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgb53dd48" class="outline-3">
|
|
<h3 id="orgb53dd48"><span class="section-number-3">3.4</span> Decoupling at Crossover</h3>
|
|
<div class="outline-text-3" id="text-3-4">
|
|
<ul class="org-ul">
|
|
<li class="off"><code>[ ]</code> Find a method for real approximation of a complex matrix</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org639412c" class="outline-2">
|
|
<h2 id="org639412c"><span class="section-number-2">4</span> Time Domain Simulation</h2>
|
|
<div class="outline-text-2" id="text-4">
|
|
</div>
|
|
<div id="outline-container-org2308492" class="outline-3">
|
|
<h3 id="org2308492"><span class="section-number-3">4.1</span> Initialization</h3>
|
|
<div class="outline-text-3" id="text-4-1">
|
|
<p>
|
|
We first initialize 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'</span>, <span class="org-string">'type_M'</span>, <span class="org-string">'spherical'</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>
|
|
|
|
<p>
|
|
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>);
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> load(<span class="org-string">'./mat/motion_error_ol.mat'</span>, <span class="org-string">'Eg'</span>)
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgc72e6b5" class="outline-3">
|
|
<h3 id="orgc72e6b5"><span class="section-number-3">4.2</span> HAC IFF</h3>
|
|
<div class="outline-text-3" id="text-4-2">
|
|
<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 = <span class="org-type">-</span>(1e4<span class="org-type">/</span>s)<span class="org-type">*</span>eye(6);
|
|
|
|
<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">'/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 Sensor [m, rad]</span>
|
|
|
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
|
|
G_iff = linearize(mdl, io);
|
|
G_iff.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_iff.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>};
|
|
|
|
Gc_iff = minreal(G_iff)<span class="org-type">/</span>stewart.kinematics.J<span class="org-type">'</span>;
|
|
Gc_iff.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>};
|
|
</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>100; <span class="org-comment">% Wanted Bandwidth [rad/s]</span>
|
|
|
|
h = 1.2;
|
|
H_lead = 1<span class="org-type">/</span>h<span class="org-type">*</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>(wc<span class="org-type">/</span>h))<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>(wc<span class="org-type">*</span>h));
|
|
|
|
Kd_iff = diag(1<span class="org-type">./</span>abs(diag(freqresp(1<span class="org-type">/</span>s<span class="org-type">*</span>Gc_iff, wc)))) <span class="org-type">.*</span> H_lead <span class="org-type">.*</span> 1<span class="org-type">/</span>s;
|
|
K_hac_iff = inv(stewart.kinematics.J<span class="org-type">'</span>)<span class="org-type">*</span>Kd_iff;
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'hac-iff'</span>);
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org757f9e9" class="outline-3">
|
|
<h3 id="org757f9e9"><span class="section-number-3">4.3</span> HAC-DVF</h3>
|
|
<div class="outline-text-3" id="text-4-3">
|
|
<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 = <span class="org-type">-</span>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);
|
|
|
|
<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">'/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 Sensor [m, rad]</span>
|
|
|
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% Run the linearization</span></span>
|
|
G_dvf = linearize(mdl, io);
|
|
G_dvf.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_dvf.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>};
|
|
|
|
Gc_dvf = minreal(G_dvf)<span class="org-type">/</span>stewart.kinematics.J<span class="org-type">'</span>;
|
|
Gc_dvf.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>};
|
|
</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>100; <span class="org-comment">% Wanted Bandwidth [rad/s]</span>
|
|
|
|
h = 1.2;
|
|
H_lead = 1<span class="org-type">/</span>h<span class="org-type">*</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>(wc<span class="org-type">/</span>h))<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>(wc<span class="org-type">*</span>h));
|
|
|
|
Kd_dvf = diag(1<span class="org-type">./</span>abs(diag(freqresp(1<span class="org-type">/</span>s<span class="org-type">*</span>Gc_dvf, wc)))) <span class="org-type">.*</span> H_lead <span class="org-type">.*</span> 1<span class="org-type">/</span>s;
|
|
|
|
K_hac_dvf = inv(stewart.kinematics.J<span class="org-type">'</span>)<span class="org-type">*</span>Kd_dvf;
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> controller = initializeController(<span class="org-string">'type'</span>, <span class="org-string">'hac-dvf'</span>);
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org3228759" class="outline-3">
|
|
<h3 id="org3228759"><span class="section-number-3">4.4</span> Results</h3>
|
|
<div class="outline-text-3" id="text-4-4">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> <span class="org-type">figure</span>;
|
|
subplot(1, 2, 1);
|
|
hold on;
|
|
plot(Eg.Time, Eg.Data(<span class="org-type">:</span>, 1), <span class="org-string">'DisplayName'</span>, <span class="org-string">'X'</span>);
|
|
plot(Eg.Time, Eg.Data(<span class="org-type">:</span>, 2), <span class="org-string">'DisplayName'</span>, <span class="org-string">'Y'</span>);
|
|
plot(Eg.Time, Eg.Data(<span class="org-type">:</span>, 3), <span class="org-string">'DisplayName'</span>, <span class="org-string">'Z'</span>);
|
|
hold off;
|
|
xlabel(<span class="org-string">'Time [s]'</span>);
|
|
ylabel(<span class="org-string">'Position error [m]'</span>);
|
|
legend();
|
|
|
|
subplot(1, 2, 2);
|
|
hold on;
|
|
plot(simout.Xa.Time, simout.Xa.Data(<span class="org-type">:</span>, 1));
|
|
plot(simout.Xa.Time, simout.Xa.Data(<span class="org-type">:</span>, 2));
|
|
plot(simout.Xa.Time, simout.Xa.Data(<span class="org-type">:</span>, 3));
|
|
hold off;
|
|
xlabel(<span class="org-string">'Time [s]'</span>);
|
|
ylabel(<span class="org-string">'Orientation error [rad]'</span>);
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org6a9c87c" class="outline-2">
|
|
<h2 id="org6a9c87c"><span class="section-number-2">5</span> Functions</h2>
|
|
<div class="outline-text-2" id="text-5">
|
|
</div>
|
|
<div id="outline-container-orgd1492e7" class="outline-3">
|
|
<h3 id="orgd1492e7"><span class="section-number-3">5.1</span> <code>initializeController</code>: Initialize the Controller</h3>
|
|
<div class="outline-text-3" id="text-5-1">
|
|
<p>
|
|
<a id="orgc575d0d"></a>
|
|
</p>
|
|
</div>
|
|
|
|
<div id="outline-container-orgae5eed0" class="outline-4">
|
|
<h4 id="orgae5eed0">Function description</h4>
|
|
<div class="outline-text-4" id="text-orgae5eed0">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> <span class="org-keyword">function</span> <span class="org-variable-name">[controller]</span> = <span class="org-function-name">initializeController</span>(<span class="org-variable-name">args</span>)
|
|
<span class="org-comment">% initializeController - Initialize the Controller</span>
|
|
<span class="org-comment">%</span>
|
|
<span class="org-comment">% Syntax: [] = initializeController(args)</span>
|
|
<span class="org-comment">%</span>
|
|
<span class="org-comment">% Inputs:</span>
|
|
<span class="org-comment">% - args - Can have the following fields:</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgda07b57" class="outline-4">
|
|
<h4 id="orgda07b57">Optional Parameters</h4>
|
|
<div class="outline-text-4" id="text-orgda07b57">
|
|
<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">'open-loop'</span>, <span class="org-string">'iff'</span>, <span class="org-string">'dvf'</span>, <span class="org-string">'hac-iff'</span>, <span class="org-string">'hac-dvf'</span>, <span class="org-string">'ref-track-L'</span>, <span class="org-string">'ref-track-X'</span>, <span class="org-string">'ref-track-hac-dvf'</span>})} = <span class="org-string">'open-loop'</span>
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-orgdb009ab" class="outline-4">
|
|
<h4 id="orgdb009ab">Structure initialization</h4>
|
|
<div class="outline-text-4" id="text-orgdb009ab">
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> controller = struct();
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="outline-container-org056c578" class="outline-4">
|
|
<h4 id="org056c578">Add Type</h4>
|
|
<div class="outline-text-4" id="text-org056c578">
|
|
<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">'open-loop'</span>
|
|
controller.type = 0;
|
|
<span class="org-keyword">case</span> <span class="org-string">'iff'</span>
|
|
controller.type = 1;
|
|
<span class="org-keyword">case</span> <span class="org-string">'dvf'</span>
|
|
controller.type = 2;
|
|
<span class="org-keyword">case</span> <span class="org-string">'hac-iff'</span>
|
|
controller.type = 3;
|
|
<span class="org-keyword">case</span> <span class="org-string">'hac-dvf'</span>
|
|
controller.type = 4;
|
|
<span class="org-keyword">case</span> <span class="org-string">'ref-track-L'</span>
|
|
controller.type = 5;
|
|
<span class="org-keyword">case</span> <span class="org-string">'ref-track-X'</span>
|
|
controller.type = 6;
|
|
<span class="org-keyword">case</span> <span class="org-string">'ref-track-hac-dvf'</span>
|
|
controller.type = 7;
|
|
<span class="org-keyword">end</span>
|
|
</pre>
|
|
</div>
|
|
|
|
<style>.csl-entry{text-indent: -1.5em; margin-left: 1.5em;}</style><h2 class='citeproc-org-bib-h2'>Bibliography</h2>
|
|
<div class="csl-bib-body">
|
|
<div class="csl-entry"><a name="citeproc_bib_item_1"></a>Skogestad, Sigurd, and Ian Postlethwaite. 2007. <i>Multivariable Feedback Control: Analysis and Design</i>. John Wiley.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="postamble" class="status">
|
|
<p class="author">Author: Dehaeze Thomas</p>
|
|
<p class="date">Created: 2021-01-08 ven. 15:29</p>
|
|
</div>
|
|
</body>
|
|
</html>
|