#+TITLE: Cubic configuration for the Stewart Platform
:DRAWER:
#+HTML_LINK_HOME: ./index.html
#+HTML_LINK_UP: ./index.html
#+HTML_HEAD:
#+HTML_HEAD:
#+HTML_HEAD:
#+HTML_HEAD:
#+HTML_HEAD:
#+HTML_HEAD:
#+PROPERTY: header-args:matlab :session *MATLAB*
#+PROPERTY: header-args:matlab+ :tangle matlab/cubic_configuration.m
#+PROPERTY: header-args:matlab+ :comments org
#+PROPERTY: header-args:matlab+ :exports both
#+PROPERTY: header-args:matlab+ :results none
#+PROPERTY: header-args:matlab+ :eval no-export
#+PROPERTY: header-args:matlab+ :noweb yes
#+PROPERTY: header-args:matlab+ :mkdirp yes
#+PROPERTY: header-args:matlab+ :output-dir figs
:END:
* Introduction :ignore:
The discovery of the Cubic configuration is done in cite:geng94_six_degree_of_freed_activ.
Further analysis is conducted in
The specificity of the Cubic configuration is that each actuator is orthogonal with the others.
The cubic (or orthogonal) configuration of the Stewart platform is now widely used (cite:preumont07_six_axis_singl_stage_activ,jafari03_orthog_gough_stewar_platf_microm).
According to cite:preumont07_six_axis_singl_stage_activ, the cubic configuration provides a uniform stiffness in all directions and *minimizes the crosscoupling* from actuator to sensor of different legs (being orthogonal to each other).
To generate and study the Cubic configuration, =generateCubicConfiguration= is used (description in section [[sec:generateCubicConfiguration]]).
The goal is to study the benefits of using a cubic configuration:
- Equal stiffness in all the degrees of freedom?
- No coupling between the actuators?
- Is the center of the cube an important point?
* Configuration Analysis - Stiffness Matrix
** Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<>
#+end_src
#+begin_src matlab :results none :exports none
simulinkproject('./');
#+end_src
** Cubic Stewart platform centered with the cube center - Jacobian estimated at the cube center
We create a cubic Stewart platform (figure [[fig:3d-cubic-stewart-aligned]]) in such a way that the center of the cube (black dot) is located at the center of the Stewart platform (blue dot).
The Jacobian matrix is estimated at the location of the center of the cube.
#+begin_src matlab
stewart = initializeFramesPositions('H', 100e-3, 'MO_B', -50e-3);
stewart = generateCubicConfiguration(stewart, 'Hc', 100e-3, 'FOc', 50e-3, 'FHa', 0, 'MHb', 0);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, 'Ki', ones(6,1));
stewart = computeJacobian(stewart);
stewart = initializeCylindricalPlatforms(stewart, 'Fpr', 175e-3, 'Mpr', 150e-3);
#+end_src
#+name: fig:3d-cubic-stewart-aligned
#+caption: Centered cubic configuration
[[file:./figs/3d-cubic-stewart-aligned.png]]
#+begin_src matlab :exports none
displayArchitecture(stewart, 'labels', false);
scatter3(0, 0, 50e-3, 200, 'kh');
#+end_src
#+header: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/cubic_conf_centered_J_center.pdf" :var figsize="wide-tall" :post pdf2svg(file=*this*, ext="png")
<>
#+end_src
#+name: fig:cubic_conf_centered_J_center
#+caption: Cubic Stewart platform centered with the cube center - Jacobian estimated at the cube center ([[./figs/cubic_conf_centered_J_center.png][png]], [[./figs/cubic_conf_centered_J_center.pdf][pdf]])
[[file:figs/cubic_conf_centered_J_center.png]]
#+begin_src matlab :exports results :results value table replace :tangle no
data2orgtable(stewart.K, {}, {}, ' %.2g ');
#+end_src
#+RESULTS:
| 2 | 0 | -2.5e-16 | 0 | 2.1e-17 | 0 |
| 0 | 2 | 0 | -7.8e-19 | 0 | 0 |
| -2.5e-16 | 0 | 2 | -2.4e-18 | -1.4e-17 | 0 |
| 0 | -7.8e-19 | -2.4e-18 | 0.015 | -4.3e-19 | 1.7e-18 |
| 1.8e-17 | 0 | -1.1e-17 | 0 | 0.015 | 0 |
| 6.6e-18 | -3.3e-18 | 0 | 1.7e-18 | 0 | 0.06 |
** Cubic Stewart platform centered with the cube center - Jacobian not estimated at the cube center
We create a cubic Stewart platform with center of the cube located at the center of the Stewart platform (figure [[fig:3d-cubic-stewart-aligned]]).
The Jacobian matrix is not estimated at the location of the center of the cube.
#+begin_src matlab
stewart = initializeFramesPositions('H', 100e-3, 'MO_B', 0);
stewart = generateCubicConfiguration(stewart, 'Hc', 100e-3, 'FOc', 50e-3, 'FHa', 0, 'MHb', 0);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, 'Ki', ones(6,1));
stewart = computeJacobian(stewart);
stewart = initializeCylindricalPlatforms(stewart, 'Fpr', 175e-3, 'Mpr', 150e-3);
#+end_src
#+begin_src matlab :exports none
displayArchitecture(stewart, 'labels', false);
scatter3(0, 0, 50e-3, 200, 'kh');
#+end_src
#+header: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/cubic_conf_centered_J_not_center.pdf" :var figsize="wide-tall" :post pdf2svg(file=*this*, ext="png")
<>
#+end_src
#+name: fig:cubic_conf_centered_J_not_center
#+caption: Cubic Stewart platform centered with the cube center - Jacobian not estimated at the cube center ([[./figs/cubic_conf_centered_J_not_center.png][png]], [[./figs/cubic_conf_centered_J_not_center.pdf][pdf]])
[[file:figs/cubic_conf_centered_J_not_center.png]]
#+begin_src matlab :exports results :results value table replace :tangle no
data2orgtable(stewart.K, {}, {}, ' %.2g ');
#+end_src
#+RESULTS:
| 2 | 0 | -2.5e-16 | 1.4e-17 | -0.1 | 0 |
| 0 | 2 | 0 | 0.1 | 0 | 0 |
| -2.5e-16 | 0 | 2 | 3.4e-18 | -1.4e-17 | 0 |
| 1.4e-17 | 0.1 | 3.4e-18 | 0.02 | 1.1e-20 | 3.4e-18 |
| -0.1 | 0 | -1.4e-17 | 1.4e-19 | 0.02 | -1.7e-18 |
| 6.6e-18 | -3.3e-18 | 0 | 3.6e-18 | -1.7e-18 | 0.06 |
** Cubic Stewart platform not centered with the cube center - Jacobian estimated at the cube center
Here, the "center" of the Stewart platform is not at the cube center (figure [[fig:3d-cubic-stewart-misaligned]]).
The Jacobian is estimated at the cube center.
#+name: fig:3d-cubic-stewart-misaligned
#+caption: Not centered cubic configuration
[[file:./figs/3d-cubic-stewart-misaligned.png]]
#+begin_src matlab
stewart = initializeFramesPositions('H', 80e-3, 'MO_B', -40e-3);
stewart = generateCubicConfiguration(stewart, 'Hc', 100e-3, 'FOc', 50e-3, 'FHa', 0, 'MHb', 0);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, 'Ki', ones(6,1));
stewart = computeJacobian(stewart);
stewart = initializeCylindricalPlatforms(stewart, 'Fpr', 175e-3, 'Mpr', 150e-3);
#+end_src
#+begin_src matlab :exports none
displayArchitecture(stewart, 'labels', false);
scatter3(0, 0, 50e-3, 200, 'kh');
#+end_src
#+header: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/cubic_conf_not_centered_J_center.pdf" :var figsize="wide-tall" :post pdf2svg(file=*this*, ext="png")
<>
#+end_src
#+name: fig:cubic_conf_not_centered_J_center
#+caption: Cubic Stewart platform not centered with the cube center - Jacobian estimated at the cube center ([[./figs/cubic_conf_not_centered_J_center.png][png]], [[./figs/cubic_conf_not_centered_J_center.pdf][pdf]])
[[file:figs/cubic_conf_not_centered_J_center.png]]
#+begin_src matlab :exports results :results value table replace :tangle no
data2orgtable(stewart.K, {}, {}, ' %.2g ');
#+end_src
#+RESULTS:
| 2 | 0 | -1.7e-16 | 0 | 0.02 | 0 |
| 0 | 2 | 0 | -0.02 | 0 | 2.8e-17 |
| -1.7e-16 | 0 | 2 | 1.2e-19 | -1.4e-17 | 1.4e-17 |
| 0 | -0.02 | 1.2e-19 | 0.015 | -4.3e-19 | 1.7e-18 |
| 0.02 | 0 | -7.3e-18 | -3.3e-21 | 0.015 | 0 |
| 6.6e-18 | 2.5e-17 | 0 | 2e-18 | 0 | 0.06 |
We obtain $k_x = k_y = k_z$ and $k_{\theta_x} = k_{\theta_y}$, but the Stiffness matrix is not diagonal.
** Cubic Stewart platform not centered with the cube center - Jacobian estimated at the Stewart platform center
Here, the "center" of the Stewart platform is not at the cube center.
The Jacobian is estimated at the center of the Stewart platform.
The center of the cube is at $z = 110$.
The Stewart platform is from $z = H_0 = 75$ to $z = H_0 + H_{tot} = 175$.
The center height of the Stewart platform is then at $z = \frac{175-75}{2} = 50$.
The center of the cube from the top platform is at $z = 110 - 175 = -65$.
#+begin_src matlab
stewart = initializeFramesPositions('H', 80e-3, 'MO_B', -40e-3);
stewart = generateCubicConfiguration(stewart, 'Hc', 100e-3, 'FOc', 50e-3, 'FHa', 0, 'MHb', 0);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, 'Ki', ones(6,1));
stewart = computeJacobian(stewart);
stewart = initializeCylindricalPlatforms(stewart, 'Fpr', 175e-3, 'Mpr', 150e-3);
#+end_src
#+begin_src matlab :exports none
displayArchitecture(stewart, 'labels', false);
scatter3(0, 0, 50e-3, 200, 'kh');
#+end_src
#+header: :tangle no :exports results :results none :noweb yes
#+begin_src matlab :var filepath="figs/cubic_conf_not_centered_J_stewart_center.pdf" :var figsize="wide-tall" :post pdf2svg(file=*this*, ext="png")
<>
#+end_src
#+name: fig:cubic_conf_not_centered_J_stewart_center
#+caption: Cubic Stewart platform not centered with the cube center - Jacobian estimated at the Stewart platform center ([[./figs/cubic_conf_not_centered_J_stewart_center.png][png]], [[./figs/cubic_conf_not_centered_J_stewart_center.pdf][pdf]])
[[file:figs/cubic_conf_not_centered_J_stewart_center.png]]
#+begin_src matlab :exports results :results value table replace :tangle no
data2orgtable(stewart.K, {}, {}, ' %.2g ');
#+end_src
#+RESULTS:
| 2 | 0 | -1.7e-16 | 0 | 0.02 | 0 |
| 0 | 2 | 0 | -0.02 | 0 | 2.8e-17 |
| -1.7e-16 | 0 | 2 | 1.2e-19 | -1.4e-17 | 1.4e-17 |
| 0 | -0.02 | 1.2e-19 | 0.015 | -4.3e-19 | 1.7e-18 |
| 0.02 | 0 | -7.3e-18 | -3.3e-21 | 0.015 | 0 |
| 6.6e-18 | 2.5e-17 | 0 | 2e-18 | 0 | 0.06 |
** Conclusion
#+begin_important
- The cubic configuration permits to have $k_x = k_y = k_z$ and $k_{\theta_x} = k_{\theta_y}$
- The stiffness matrix $K$ is diagonal for the cubic configuration if the Jacobian is estimated at the cube center.
#+end_important
** Having Cube's center above the top platform
Let's say we want to have a decouple dynamics above the top platform.
Thus, we want the cube's center to be located above the top center.
This is possible, to do so:
- The position of the center of the cube should be positioned at A
- The Height of the "useful" part of the cube should be at least equal to two times the distance from F to A.
It is possible to have small cube, but then to configuration is a little bit strange.
#+begin_src matlab
stewart = initializeFramesPositions('H', 100e-3, 'MO_B', 50e-3);
FOc = stewart.H + stewart.MO_B(3);
Hc = 2*(stewart.H + stewart.MO_B(3));
stewart = generateCubicConfiguration(stewart, 'Hc', Hc, 'FOc', FOc, 'FHa', 10e-3, 'MHb', 10e-3);
stewart = computeJointsPose(stewart);
stewart = initializeStrutDynamics(stewart, 'Ki', ones(6,1));
stewart = initializeJointDynamics(stewart, 'disable', true);
stewart = initializeCylindricalPlatforms(stewart);
stewart = initializeCylindricalStruts(stewart);
stewart = computeJacobian(stewart);
stewart = initializeStewartPose(stewart);
#+end_src
#+begin_src matlab :exports none
displayArchitecture(stewart, 'labels', false);
scatter3(0, 0, 50e-3, 200, 'kh');
#+end_src
#+begin_src matlab :exports results :results value table replace :tangle no
data2orgtable(stewart.K, {}, {}, ' %.2g ');
#+end_src
#+RESULTS:
| 2 | 0 | -3.2e-16 | 0 | 3.1e-16 | 0 |
| 0 | 2 | 0 | -1.2e-16 | 0 | 0 |
| -3.2e-16 | 0 | 2 | 5e-18 | -5.6e-17 | 0 |
| 0 | -1.2e-16 | 5e-18 | 0.14 | 3.5e-18 | 1.4e-17 |
| 3e-16 | 0 | -5.4e-17 | 2.1e-19 | 0.14 | -6.9e-18 |
| 7.4e-19 | -2.6e-17 | 0 | 1.3e-17 | -6.9e-18 | 0.54 |
We obtain $k_x = k_y = k_z$ and $k_{\theta_x} = k_{\theta_y}$, but the Stiffness matrix is not diagonal.
* TODO Cubic size analysis :noexport:
We here study the effect of the size of the cube used for the Stewart configuration.
We fix the height of the Stewart platform, the center of the cube is at the center of the Stewart platform.
We only vary the size of the cube.
#+begin_src matlab :results silent
H_cubes = 250:20:350;
stewarts = {zeros(length(H_cubes), 1)};
#+end_src
#+begin_src matlab :results silent
for i = 1:length(H_cubes)
H_cube = H_cubes(i);
H_tot = 100;
H = 80;
opts = struct(...
'H_tot', H_tot, ... % Total height of the Hexapod [mm]
'L', H_cube/sqrt(3), ... % Size of the Cube [mm]
'H', H, ... % Height between base joints and platform joints [mm]
'H0', H_cube/2-H/2 ... % Height between the corner of the cube and the plane containing the base joints [mm]
);
stewart = initializeCubicConfiguration(opts);
opts = struct(...
'Jd_pos', [0, 0, H_cube/2-opts.H0-opts.H_tot], ... % Position of the Jacobian for displacement estimation from the top of the mobile platform [mm]
'Jf_pos', [0, 0, H_cube/2-opts.H0-opts.H_tot] ... % Position of the Jacobian for force location from the top of the mobile platform [mm]
);
stewart = computeGeometricalProperties(stewart, opts);
stewarts(i) = {stewart};
end
#+end_src
The Stiffness matrix is computed for all generated Stewart platforms.
#+begin_src matlab :results none :exports code
Ks = zeros(6, 6, length(H_cube));
for i = 1:length(H_cubes)
Ks(:, :, i) = stewarts{i}.Jd'*stewarts{i}.Jd;
end
#+end_src
The only elements of $K$ that vary are $k_{\theta_x} = k_{\theta_y}$ and $k_{\theta_z}$.
Finally, we plot $k_{\theta_x} = k_{\theta_y}$ and $k_{\theta_z}$
#+begin_src matlab :results none :exports code
figure;
hold on;
plot(H_cubes, squeeze(Ks(4, 4, :)), 'DisplayName', '$k_{\theta_x}$');
plot(H_cubes, squeeze(Ks(6, 6, :)), 'DisplayName', '$k_{\theta_z}$');
hold off;
legend('location', 'northwest');
xlabel('Cube Size [mm]'); ylabel('Rotational stiffnes [normalized]');
#+end_src
#+NAME: fig:stiffness_cube_size
#+HEADER: :tangle no :exports results :results raw :noweb yes
#+begin_src matlab :var filepath="figs/stiffness_cube_size.pdf" :var figsize="normal-normal" :post pdf2svg(file=*this*, ext="png")
<>
#+end_src
#+NAME: fig:stiffness_cube_size
#+CAPTION: $k_{\theta_x} = k_{\theta_y}$ and $k_{\theta_z}$ function of the size of the cube
#+RESULTS: fig:stiffness_cube_size
[[file:figs/stiffness_cube_size.png]]
We observe that $k_{\theta_x} = k_{\theta_y}$ and $k_{\theta_z}$ increase linearly with the cube size.
#+begin_important
In order to maximize the rotational stiffness of the Stewart platform, the size of the cube should be the highest possible.
In that case, the legs will the further separated. Size of the cube is then limited by allowed space.
#+end_important
* Functions
<>
** =generateCubicConfiguration=: Generate a Cubic Configuration
:PROPERTIES:
:header-args:matlab+: :tangle src/generateCubicConfiguration.m
:header-args:matlab+: :comments none :mkdirp yes :eval no
:END:
<>
This Matlab function is accessible [[file:src/generateCubicConfiguration.m][here]].
*** Function description
:PROPERTIES:
:UNNUMBERED: t
:END:
#+begin_src matlab
function [stewart] = generateCubicConfiguration(stewart, args)
% generateCubicConfiguration - Generate a Cubic Configuration
%
% Syntax: [stewart] = generateCubicConfiguration(stewart, args)
%
% Inputs:
% - stewart - A structure with the following fields
% - H [1x1] - Total height of the platform [m]
% - args - Can have the following fields:
% - Hc [1x1] - Height of the "useful" part of the cube [m]
% - FOc [1x1] - Height of the center of the cube with respect to {F} [m]
% - FHa [1x1] - Height of the plane joining the points ai with respect to the frame {F} [m]
% - MHb [1x1] - Height of the plane joining the points bi with respect to the frame {M} [m]
%
% Outputs:
% - stewart - updated Stewart structure with the added fields:
% - Fa [3x6] - Its i'th column is the position vector of joint ai with respect to {F}
% - Mb [3x6] - Its i'th column is the position vector of joint bi with respect to {M}
#+end_src
*** Documentation
:PROPERTIES:
:UNNUMBERED: t
:END:
#+name: fig:cubic-configuration-definition
#+caption: Cubic Configuration
[[file:figs/cubic-configuration-definition.png]]
*** Optional Parameters
:PROPERTIES:
:UNNUMBERED: t
:END:
#+begin_src matlab
arguments
stewart
args.Hc (1,1) double {mustBeNumeric, mustBePositive} = 60e-3
args.FOc (1,1) double {mustBeNumeric} = 50e-3
args.FHa (1,1) double {mustBeNumeric, mustBeNonnegative} = 15e-3
args.MHb (1,1) double {mustBeNumeric, mustBeNonnegative} = 15e-3
end
#+end_src
*** Position of the Cube
:PROPERTIES:
:UNNUMBERED: t
:END:
We define the useful points of the cube with respect to the Cube's center.
${}^{C}C$ are the 6 vertices of the cubes expressed in a frame {C} which is
located at the center of the cube and aligned with {F} and {M}.
#+begin_src matlab
sx = [ 2; -1; -1];
sy = [ 0; 1; -1];
sz = [ 1; 1; 1];
R = [sx, sy, sz]./vecnorm([sx, sy, sz]);
L = args.Hc*sqrt(3);
Cc = R'*[[0;0;L],[L;0;L],[L;0;0],[L;L;0],[0;L;0],[0;L;L]] - [0;0;1.5*args.Hc];
CCf = [Cc(:,1), Cc(:,3), Cc(:,3), Cc(:,5), Cc(:,5), Cc(:,1)]; % CCf(:,i) corresponds to the bottom cube's vertice corresponding to the i'th leg
CCm = [Cc(:,2), Cc(:,2), Cc(:,4), Cc(:,4), Cc(:,6), Cc(:,6)]; % CCm(:,i) corresponds to the top cube's vertice corresponding to the i'th leg
#+end_src
*** Compute the pose
:PROPERTIES:
:UNNUMBERED: t
:END:
We can compute the vector of each leg ${}^{C}\hat{\bm{s}}_{i}$ (unit vector from ${}^{C}C_{f}$ to ${}^{C}C_{m}$).
#+begin_src matlab
CSi = (CCm - CCf)./vecnorm(CCm - CCf);
#+end_src
We now which to compute the position of the joints $a_{i}$ and $b_{i}$.
#+begin_src matlab
stewart.Fa = CCf + [0; 0; args.FOc] + ((args.FHa-(args.FOc-args.Hc/2))./CSi(3,:)).*CSi;
stewart.Mb = CCf + [0; 0; args.FOc-stewart.H] + ((stewart.H-args.MHb-(args.FOc-args.Hc/2))./CSi(3,:)).*CSi;
#+end_src
* Bibliography :ignore:
bibliographystyle:unsrtnat
bibliography:ref.bib