diff --git a/simscape-model.html b/simscape-model.html index d6ed546..6bd34d8 100644 --- a/simscape-model.html +++ b/simscape-model.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +initializeFramesPositions
: Initialize the positions of frames {A}, {B}, {F} and {M}
+initializeFramesPositions
: Initialize the positions of frames {A}, {B}, {F} and {M}
generateCubicConfiguration
: Generate a Cubic Configuration
+generateCubicConfiguration
: Generate a Cubic Configuration
computeJointsPose
: Compute the Pose of the Joints
+generateGeneralConfiguration
: Generate a Very General Configuration
initializeStrutDynamics
: Add Stiffness and Damping properties of each strut
+computeJointsPose
: Compute the Pose of the Joints
computeJacobian
: Compute the Jacobian Matrix
+initializeStrutDynamics
: Add Stiffness and Damping properties of each strut
inverseKinematics
: Compute Inverse Kinematics
+computeJacobian
: Compute the Jacobian Matrix
forwardKinematicsApprox
: Compute the Forward Kinematics
+inverseKinematics
: Compute Inverse Kinematics
+forwardKinematicsApprox
: Compute the Forward Kinematics
+
The procedure to define the Stewart platform is the following:
@@ -447,12 +456,12 @@ By following this procedure, we obtain a Matlab structure stewart
t
open('stewart_platform.slx')
@@ -461,8 +470,8 @@ By following this procedure, we obtain a Matlab structure stewart
t
stewart = initializeFramesPositions('H', 90e-3, 'MO_B', 45e-3); @@ -478,11 +487,11 @@ stewart = computeJacobian(stewart);
initializeFramesPositions
: Initialize the positions of frames {A}, {B}, {F} and {M}initializeFramesPositions
: Initialize the positions of frames {A}, {B}, {F} and {M}@@ -490,8 +499,8 @@ This Matlab function is accessible her
function [stewart] = initializeFramesPositions(args) @@ -515,11 +524,11 @@ This Matlab function is accessible her
Figure 1: Definition of the position of the frames
@@ -527,8 +536,8 @@ This Matlab function is accessible herarguments @@ -540,8 +549,8 @@ This Matlab function is accessible her
stewart = struct(); @@ -550,8 +559,8 @@ This Matlab function is accessible her
stewart.H = args.H; % Total Height of the Stewart Platform [m] @@ -567,11 +576,11 @@ stewart.FO_A = stewart.MO_B + stewart.FO_M;
generateCubicConfiguration
: Generate a Cubic ConfigurationgenerateCubicConfiguration
: Generate a Cubic Configuration@@ -579,8 +588,8 @@ This Matlab function is accessible he
function [stewart] = generateCubicConfiguration(stewart, args) @@ -606,11 +615,11 @@ This Matlab function is accessible he
arguments @@ -634,8 +643,8 @@ This Matlab function is accessible he
We define the useful points of the cube with respect to the Cube’s center. @@ -661,8 +670,8 @@ CCm = [Cc(:,2), Cc(:
We can compute the vector of each leg \({}^{C}\hat{\bm{s}}_{i}\) (unit vector from \({}^{C}C_{f}\) to \({}^{C}C_{m}\)).
@@ -684,11 +693,100 @@ stewart.Mb = CCf + [0; 0; args.FOc
-
+This Matlab function is accessible here.
+
+Joints are positions on a circle centered with the Z axis of {F} and {M} and at a chosen distance from {F} and {M}.
+The radius of the circles can be chosen as well as the angles where the joints are located.
+
@@ -696,9 +794,9 @@ This Matlab function is accessible here.
Figure 3: Position and orientation of the struts
@@ -804,9 +902,9 @@ This Matlab function is accessible here<
@@ -865,9 +963,9 @@ This Matlab function is accessible here.
@@ -932,9 +1030,9 @@ This Matlab function is accessible here.
For inverse kinematic analysis, it is assumed that the position \({}^A\bm{P}\) and orientation of the moving platform \({}^A\bm{R}_B\) are given and the problem is to obtain the joint variables, namely, \(\bm{L} = [l_1, l_2, \dots, l_6]^T\).
@@ -1035,9 +1133,9 @@ This Matlab function is accessible here<
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:
@@ -1118,7 +1216,7 @@ We then compute the corresponding rotation matrix.
Created: 2020-01-06 lun. 18:16 Created: 2020-01-22 mer. 11:355
+computeJointsPose
: Compute the Pose of the Joints5
generateGeneralConfiguration
: Generate a Very General Configuration5.1 Function description
+function [stewart] = generateGeneralConfiguration(stewart, args)
+% generateGeneralConfiguration - Generate a Very General Configuration
+%
+% Syntax: [stewart] = generateGeneralConfiguration(stewart, args)
+%
+% Inputs:
+% - stewart - A structure with the following fields
+% - H [1x1] - Total height of the platform [m]
+% - args - Can have the following fields:
+% - FH [1x1] - Height of the position of the fixed joints with respect to the frame {F} [m]
+% - FR [1x1] - Radius of the position of the fixed joints in the X-Y [m]
+% - FTh [6x1] - Angles of the fixed joints in the X-Y plane with respect to the X axis [rad]
+% - MH [1x1] - Height of the position of the mobile joints with respect to the frame {M} [m]
+% - FR [1x1] - Radius of the position of the mobile joints in the X-Y [m]
+% - MTh [6x1] - Angles of the mobile joints in the X-Y plane with respect to the X axis [rad]
+%
+% 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}
+
+5.2 Documentation
+5.3 Optional Parameters
+arguments
+ stewart
+ args.FH (1,1) double {mustBeNumeric, mustBePositive} = 15e-3
+ args.FR (1,1) double {mustBeNumeric, mustBePositive} = 90e-3;
+ args.FTh (6,1) double {mustBeNumeric} = [-10, 10, 120-10, 120+10, 240-10, 240+10]*(pi/180);
+ args.MH (1,1) double {mustBeNumeric, mustBePositive} = 15e-3
+ args.MR (1,1) double {mustBeNumeric, mustBePositive} = 70e-3;
+ args.MTh (6,1) double {mustBeNumeric} = [-60+10, 60-10, 60+10, 180-10, 180+10, -60-10]*(pi/180);
+end
+
+5.4 Compute the pose
+stewart.Fa = zeros(3,6);
+stewart.Mb = zeros(3,6);
+
+for i = 1:6
+ stewart.Fa(:,i) = [args.FR*cos(args.FTh(i)); args.FR*sin(args.FTh(i)); args.FH];
+ stewart.Mb(:,i) = [args.MR*cos(args.MTh(i)); args.MR*sin(args.MTh(i)); -args.MH];
+end
+
+6
+computeJointsPose
: Compute the Pose of the Joints5.1 Function description
-6.1 Function description
+function [stewart] = computeJointsPose(stewart)
% computeJointsPose -
@@ -729,11 +827,11 @@ This Matlab function is accessible here.
5.2 Documentation
-6.2 Documentation
+5.3 Compute the position of the Joints
-6.3 Compute the position of the Joints
+stewart.Aa = stewart.Fa - repmat(stewart.FO_A, [1, 6]);
stewart.Bb = stewart.Mb - repmat(stewart.MO_B, [1, 6]);
@@ -755,9 +853,9 @@ stewart.Ba = stewart.Aa - repmat( stewart.MO_B
5.4 Compute the strut length and orientation
-6.4 Compute the strut length and orientation
+stewart.As = (stewart.Ab - stewart.Aa)./vecnorm(stewart.Ab - stewart.Aa); % As_i is the i'th vector of As
@@ -772,9 +870,9 @@ stewart.l = vecnorm(stewart.Ab - stewart.Aa)
5.5 Compute the orientation of the Joints
-6.5 Compute the orientation of the Joints
+stewart.FRa = zeros(3,3,6);
stewart.MRb = zeros(3,3,6);
@@ -792,11 +890,11 @@ stewart.MRb = zeros(3,3,6);
6
-initializeStrutDynamics
: Add Stiffness and Damping properties of each strut7
+initializeStrutDynamics
: Add Stiffness and Damping properties of each strut6.1 Function description
-7.1 Function description
+function [stewart] = initializeStrutDynamics(stewart, args)
% initializeStrutDynamics - Add Stiffness and Damping properties of each strut
@@ -827,23 +925,23 @@ This Matlab function is accessible here<
6.2 Optional Parameters
-7.2 Optional Parameters
+arguments
stewart
args.Ki (6,1) double {mustBeNumeric, mustBePositive} = 1e6*ones(6,1)
- args.Ci (6,1) double {mustBeNumeric, mustBePositive} = 1e2*ones(6,1)
+ args.Ci (6,1) double {mustBeNumeric, mustBePositive} = 1e3*ones(6,1)
end
6.3 Add Stiffness and Damping properties of each strut
-7.3 Add Stiffness and Damping properties of each strut
+stewart.Ki = args.Ki;
stewart.Ci = args.Ci;
@@ -853,11 +951,11 @@ stewart.Ci = args.Ci;
7
-computeJacobian
: Compute the Jacobian Matrix8
+computeJacobian
: Compute the Jacobian Matrix7.1 Function description
-8.1 Function description
+function [stewart] = computeJacobian(stewart)
% computeJacobian -
@@ -889,9 +987,9 @@ This Matlab function is accessible here.
7.2 Compute Jacobian Matrix
-8.2 Compute Jacobian Matrix
+stewart.J = [stewart.As' , cross(stewart.Ab, stewart.As)'];
@@ -899,9 +997,9 @@ This Matlab function is accessible here.
7.3 Compute Stiffness Matrix
-8.3 Compute Stiffness Matrix
+stewart.K = stewart.J'*diag(stewart.Ki)*stewart.J;
@@ -909,9 +1007,9 @@ This Matlab function is accessible here.
7.4 Compute Compliance Matrix
-8.4 Compute Compliance Matrix
+stewart.C = inv(stewart.K);
@@ -920,11 +1018,11 @@ This Matlab function is accessible here.
8
-inverseKinematics
: Compute Inverse Kinematics9
+inverseKinematics
: Compute Inverse Kinematics8.1 Function description
-9.1 Function description
+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}
@@ -957,9 +1055,9 @@ This Matlab function is accessible here.
8.2 Optional Parameters
-9.2 Optional Parameters
+arguments
stewart
@@ -971,9 +1069,9 @@ This Matlab function is accessible here.
8.3 Theory
-9.3 Theory
+8.4 Compute
-9.4 Compute
+Li = sqrt(args.AP'*args.AP + diag(stewart.Bb'*stewart.Bb) + diag(stewart.Aa'*stewart.Aa) - (2*args.AP'*stewart.Aa)' + (2*args.AP'*(args.ARB*stewart.Bb))' - diag(2*(args.ARB*stewart.Bb)'*stewart.Aa));
@@ -1023,11 +1121,11 @@ Otherwise, when the limbs’ lengths derived yield complex numbers, then the
9
-forwardKinematicsApprox
: Compute the Forward Kinematics10
+forwardKinematicsApprox
: Compute the Forward Kinematics9.1 Function description
-10.1 Function description
+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
@@ -1059,9 +1157,9 @@ This Matlab function is accessible here<
9.2 Optional Parameters
-10.2 Optional Parameters
+arguments
stewart
@@ -1072,9 +1170,9 @@ This Matlab function is accessible here<
9.3 Computation
-10.3 Computation
+