Kinematics of the station
+Table of Contents
+ +-All the files (data and Matlab scripts) are accessible here. +In this document, we discuss the way the motion of each stage is defined.
+1 Micro Hexapod
+1.1 How the Symetrie Hexapod is controlled on the micro station
+
+For the Micro-Hexapod, the convention for the angles are defined in MAN_A_Software API_4.0.150918_EN.pdf
on page 13 (section 2.4 - Rotation Vectors):
+
++ ++The Euler type II convention is used to express the rotation vector. +This convention is mainly used in the aeronautics field (standard ISO 1151 concerning flight mechanics). +
+ ++This convention uses the concepts of rotation of vehicles (ship, car and plane). +Generally, we consider that the main movement of the vehicle is following the X-axis and the Z-axis is parallel to the axis of gravity (at the initial position). +The roll rotation is around the X-axis, the pitch is around the Y-axis and yaw is the rotation around the Z-axis. +The order of rotation is: Rx, Ry and then Rz. +
+ ++In most case, rotations are related to a reference with fixed axis; thus we say the rotations are around fixed axes. +The combination of these three rotations enables to write a rotation matrix. +This writing is unique and equal to: +\[ \bm{R} = \bm{R}_z(\gamma) \cdot \bm{R}_y(\beta) \cdot \bm{R}_x(\alpha) \] +
+ ++The Euler type II convention corresponding to the succession of rotations with respect to fixed axes: first around X0, then Y0 and Z0. +This is equivalent to the succession of rotations with respect to mobile axes: first around Z0, then Y1' and X2'. +
+
+More generally on the Control of the Micro-Hexapod: +
+++ ++Note that for all control modes, the rotation center coincides with Object coordinate system origin. +Moreover, the movements are controlled with translation components at first (Tx, Ty, Tz) then rotation components (Rx, Ry, Rz). +
+
+Thus, it does the translations and then the rotation around the new translated frame. +
+1.2 Control of the Micro-Hexapod using Simscape
++We can think of two main ways to position the Micro-Hexapod using Simscape. +
+ ++The first one is to use only one Bushing Joint between the base and the mobile platform. +The advantage is that it is very easy to impose the wanted displacement, however, we loose the dynamical properties of the Hexapod. +
+ ++The second way is to specify the wanted length of the legs of the Hexapod in order to have the wanted position of the mobile platform. +This require a little bit more of mathematical derivations but this is the chosen solution. +
+1.2.1 Using Bushing Joint
+
+In the documentation of the Bushing Joint (doc "Bushing Joint"
) that is used to position the Hexapods, it is mention that the following frame is positioned with respect to the base frame in a way shown in figure 1.
+
+
+Figure 1: Joint Transformation Sequence for the Bushing Joint
++Basically, it performs the translations, and then the rotation along the X, Y and Z axis of the moving frame. +The three rotations that we define thus corresponds to the Euler U-V-W angles. +
+ ++We should have the same behavior for the Micro-Hexapod on Simscape (same inputs at least). +However, the Bushing Joint makes rotations around mobiles axes (X, Y' and then Z'') and not fixed axes (X, Y and Z). +
+1.2.2 Using Inverse Kinematics and Leg Actuators
++Here, we can use the Inverse Kinematic of the Hexapod to determine the length of each leg in order to obtain some defined translation and rotation of the mobile platform. +
+ ++The advantages are: +
+-
+
- we can position the Hexapod as we want by specifying a rotation matrix +
- the hexapod keeps its full flexibility as we don't specify any wanted displacements, only leg's rest position +
1.2.2.1 Theory
++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\). +
+ ++From the geometry of the manipulator, the loop closure for each limb, \(i = 1, 2, \dots, 6\) can be written as +
+\begin{align*} + l_i {}^A\hat{\bm{s}}_i &= {}^A\bm{A} + {}^A\bm{b}_i - {}^A\bm{a}_i \\ + &= {}^A\bm{A} + {}^A\bm{R}_b {}^B\bm{b}_i - {}^A\bm{a}_i +\end{align*} + ++To obtain the length of each actuator and eliminate \(\hat{\bm{s}}_i\), it is sufficient to dot multiply each side by itself: +
+\begin{equation} + l_i^2 \left[ {}^A\hat{\bm{s}}_i^T {}^A\hat{\bm{s}}_i \right] = \left[ {}^A\bm{P} + {}^A\bm{R}_B {}^B\bm{b}_i - {}^A\bm{a}_i \right]^T \left[ {}^A\bm{P} + {}^A\bm{R}_B {}^B\bm{b}_i - {}^A\bm{a}_i \right] +\end{equation} + ++Hence, for \(i = 1, 2, \dots, 6\), each limb length can be uniquely determined by: +
+\begin{equation} + l_i = \sqrt{{}^A\bm{P}^T {}^A\bm{P} + {}^B\bm{b}_i^T {}^B\bm{b}_i + {}^A\bm{a}_i^T {}^A\bm{a}_i - 2 {}^A\bm{P}^T {}^A\bm{a}_i + 2 {}^A\bm{P}^T \left[{}^A\bm{R}_B {}^B\bm{b}_i\right] - 2 \left[{}^A\bm{R}_B {}^B\bm{b}_i\right]^T {}^A\bm{a}_i} +\end{equation} + ++If the position and orientation of the moving platform lie in the feasible workspace of the manipulator, one unique solution to the limb length is determined by the above equation. +Otherwise, when the limbs' lengths derived yield complex numbers, then the position or orientation of the moving platform is not reachable. +
+1.2.2.2 Matlab Implementation
+open 'simscape/hexapod_tests.slx'
+
+load('simscape/conf_simscape.mat'); +set_param(conf_simscape, 'StopTime', '0.5'); ++
tx = 0.1; % [rad] +ty = 0.2; % [rad] +tz = 0.05; % [rad] + +Rx = [1 0 0; + 0 cos(tx) -sin(tx); + 0 sin(tx) cos(tx)]; + +Ry = [ cos(ty) 0 sin(ty); + 0 1 0; + -sin(ty) 0 cos(ty)]; + +Rz = [cos(tz) -sin(tz) 0; + sin(tz) cos(tz) 0; + 0 0 1]; + +ARB = Rz*Ry*Rx; +AP = [0.01; 0.02; 0.03]; % [m] + +hexapod = initializeMicroHexapod(struct('AP', AP, 'ARB', ARB)); ++
sim('simscape/hexapod_tests.slx') ++
+And we verify that we indeed succeed to go to the wanted position. +
+[simout.x.Data(end) ; simout.y.Data(end) ; simout.z.Data(end)] - AP ++
-2.12e-06 | +
2.9787e-06 | +
-4.4341e-06 | +
simout.R.Data(:, :, end)-ARB ++
-1.5714e-06 | +1.4513e-06 | +7.8133e-06 | +
8.4113e-07 | +-7.1485e-07 | +-7.4572e-06 | +
-7.5348e-06 | +7.7112e-06 | +-2.3088e-06 | +
Table of Contents
-
-
- 1. Simulink Project - Startup and Shutdown scripts -
- 2. Simscape Multibody - Presentation +
- 1. Simulink Project - Startup and Shutdown scripts +
- 2. Simscape Multibody - Presentation -
- 3. Simulink files and signal names +
- 3. Simulink files and signal names -
- 4. Simulink Library +
- 4. Simulink Library -
- 5. Functions +
- 5. Functions -
- 6. Initialize Elements +
- 6. Initialize Elements
-
-
- 6.1. Experiment -
- 6.2. Generate Reference Signals -
- 6.3. TODO Inputs -
- 6.4. Ground -
- 6.5. Granite -
- 6.6. Translation Stage -
- 6.7. Tilt Stage -
- 6.8. Spindle -
- 6.9. Micro Hexapod -
- 6.10. Center of gravity compensation -
- 6.11. Mirror -
- 6.12. Nano Hexapod -
- 6.13. Cedrat Actuator -
- 6.14. Sample +
- 6.1. Experiment +
- 6.2. Generate Reference Signals +
- 6.3. TODO Inputs +
- 6.4. Ground +
- 6.5. Granite +
- 6.6. Translation Stage +
- 6.7. Tilt Stage +
- 6.8. Spindle +
- 6.9. Initialize Hexapod legs' length +
- 6.10. Micro Hexapod +
- 6.11. Center of gravity compensation +
- 6.12. Mirror +
- 6.13. Nano Hexapod +
- 6.14. Cedrat Actuator +
- 6.15. Sample
-
-
- In section 1, the simulink project with the associated scripts are presented -
- In section 2, an introduction to Simscape Multibody is done -
- In section 3, each simscape files are presented with the associated signal names and joint architectures -
- In section 4, the list of the Simulink library elements are described -
- In section 5, a list of Matlab function that will be used are defined here -
- In section 6, all the functions that are used to initialize the Simscape Multibody elements are defined here. This includes the mass of all solids for instance. +
- In section 1, the simulink project with the associated scripts are presented +
- In section 2, an introduction to Simscape Multibody is done +
- In section 3, each simscape files are presented with the associated signal names and joint architectures +
- In section 4, the list of the Simulink library elements are described +
- In section 5, a list of Matlab function that will be used are defined here +
- In section 6, all the functions that are used to initialize the Simscape Multibody elements are defined here. This includes the mass of all solids for instance.
1 Simulink Project - Startup and Shutdown scripts
+1 Simulink Project - Startup and Shutdown scripts
2 Simscape Multibody - Presentation
+2 Simscape Multibody - Presentation
@@ -416,8 +417,8 @@ A simscape model per
2.1 Solid bodies
+2.1 Solid bodies
Each solid body is represented by a solid block.
@@ -426,8 +427,8 @@ The geometry of the solid body can be imported using a step
file. T
2.2 Frames
+2.2 Frames
Frames are very important in simscape multibody, they defined where the forces are applied, where the joints are located and where the measurements are made.
@@ -439,8 +440,8 @@ They can be defined from the solid body geometry, or using the
-
Solid Bodies are connected with joints (between frames of the two solid bodies).
@@ -450,7 +451,7 @@ Solid Bodies are connected with joints (between frames of the two solid bodies).
There are various types of joints that are all described here.
A transform sensor block measures the spatial relationship between two frames: the base
We can apply external forces to the model by using an external force and torque block.
@@ -914,11 +915,11 @@ Internal force, acting reciprocally between base and following origins is implem
@@ -926,8 +927,8 @@ In order to "normalize" things, the names of all the signal are listed here.
Few different Simulink files are used:
@@ -939,7 +940,7 @@ Few different Simulink files are used:
@@ -1350,8 +1351,8 @@ A simulink library is developed in order to share elements between the different
inputs.slx
@@ -1359,8 +1360,8 @@ A simulink library is developed in order to share elements between the different
nasslibrary.slx
@@ -1368,8 +1369,8 @@ A simulink library is developed in order to share elements between the different
poserrorwrtnassbase.slx
@@ -1377,8 +1378,8 @@ A simulink library is developed in order to share elements between the different
QuaternionToAngles.slx
@@ -1386,8 +1387,8 @@ A simulink library is developed in order to share elements between the different
RotationMatrixToAngle.slx
@@ -1396,18 +1397,18 @@ A simulink library is developed in order to share elements between the different
@@ -1443,11 +1444,11 @@ This Matlab function is accessible here.
@@ -1519,11 +1520,11 @@ setpoint(
-
@@ -1695,11 +1696,11 @@ This Matlab function is accessible her
@@ -1791,11 +1792,11 @@ This Matlab function is accessible here.
@@ -1864,18 +1865,18 @@ This Matlab function is accessible here.
@@ -1909,11 +1910,11 @@ This Matlab function is accessible here<
@@ -1929,10 +1930,10 @@ This Matlab function is accessible here.
'Dy_amplitude', 0, ... % Amplitude of the displacement [m]
'Dy_period', 1, ... % Period of the displacement [s]
'Ry_type', 'constant', ... % Either "constant" / "triangular" / "sinusoidal"
- 'Ry_amplitude', 0, ... % Amplitude [deg]
+ 'Ry_amplitude', 0, ... % Amplitude [rad]
'Ry_period', 10, ... % Period of the displacement [s]
'Rz_type', 'constant', ... % Either "constant" / "rotating"
- 'Rz_amplitude', 0, ... % Initial angle [deg]
+ 'Rz_amplitude', 0, ... % Initial angle [rad]
'Rz_period', 1, ... % Period of the rotating [s]
'Dh_type', 'constant', ... % For now, only constant is implemented
'Dh_pos', [0; 0; 0; 0; 0; 0], ... % Initial position [m,m,m,rad,rad,rad] of the top platform
@@ -1976,13 +1977,13 @@ This Matlab function is accessible here.
switch opts.Ry_type
case 'constant'
- Ry(:) = pi/180*opts.Ry_amplitude;
+ Ry(:) = opts.Ry_amplitude;
case 'triangular'
- Ry(:) = -4*(pi/180*opts.Ry_amplitude) + 4*(pi/180*opts.Ry_amplitude)/opts.Ry_period*t;
- Ry(t<0.75*opts.Ry_period) = 2*(pi/180*opts.Ry_amplitude) - 4*(pi/180*opts.Ry_amplitude)/opts.Ry_period*t(t<0.75*opts.Ry_period);
- Ry(t<0.25*opts.Ry_period) = 4*(pi/180*opts.Ry_amplitude)/opts.Ry_period*t(t<0.25*opts.Ry_period);
+ Ry(:) = -4*opts.Ry_amplitude + 4*opts.Ry_amplitude/opts.Ry_period*t;
+ Ry(t<0.75*opts.Ry_period) = 2*opts.Ry_amplitude - 4*opts.Ry_amplitude/opts.Ry_period*t(t<0.75*opts.Ry_period);
+ Ry(t<0.25*opts.Ry_period) = 4*opts.Ry_amplitude/opts.Ry_period*t(t<0.25*opts.Ry_period);
case 'sinusoidal'
- Ry(:) = opts.Ry_amplitude*sin(2*pi/opts.Ry_period*t);
+
otherwise
warning('Ry_type is not set correctly');
end
@@ -1994,9 +1995,9 @@ This Matlab function is accessible here.
switch opts.Rz_type
case 'constant'
- Rz(:) = pi/180*opts.Rz_amplitude;
+ Rz(:) = opts.Rz_amplitude;
case 'rotating'
- Rz(:) = pi/180*opts.Rz_amplitude+2*pi/opts.Rz_period*t;
+ Rz(:) = opts.Rz_amplitude+2*pi/opts.Rz_period*t;
otherwise
warning('Rz_type is not set correctly');
end
@@ -2006,8 +2007,6 @@ This Matlab function is accessible here.
t = [0, Ts];
Dh = zeros(length(t), 6);
- opts.Dh_pos(4:6) = pi/180*opts.Dh_pos(4:6); % convert from [deg] to [rad]
-
switch opts.Dh_type
case 'constant'
Dh = [opts.Dh_pos, opts.Dh_pos];
@@ -2025,8 +2024,6 @@ This Matlab function is accessible here.
t = [0, Ts];
Dn = zeros(length(t), 6);
- opts.Dn_pos(4:6) = pi/180*opts.Dn_pos(4:6); % convert from [deg] to [rad]
-
switch opts.Dn_type
case 'constant'
Dn = [opts.Dn_pos, opts.Dn_pos];
@@ -2043,11 +2040,11 @@ This Matlab function is accessible here.
@@ -2267,11 +2264,11 @@ This Matlab function is accessible here.
@@ -2337,11 +2334,11 @@ This Matlab function is accessible here
@@ -2423,11 +2420,11 @@ This Matlab function is accessible here.
@@ -2498,11 +2495,11 @@ This Matlab function is accessible here.
@@ -2569,11 +2566,49 @@ This Matlab function is accessible here.
+This Matlab function is accessible here.
+
@@ -2583,7 +2618,11 @@ This Matlab function is accessible her
@@ -2830,11 +2895,11 @@ This Matlab function is accessible here.
@@ -2900,11 +2965,11 @@ This Matlab function is accessible here.
@@ -3121,11 +3186,11 @@ This Matlab function is accessible here
@@ -3165,11 +3230,11 @@ This Matlab function is accessible here
@@ -3214,7 +3279,7 @@ This Matlab function is accessible here.
2.3 Joints
+2.3 Joints
+
CV
+
2.4 Measurements
+2.4 Measurements
B
and the follower F
.
@@ -900,8 +901,8 @@ If we want to simulate an inertial sensor, we just have to choose B
2.5 Excitation
+2.5 Excitation
3 Simulink files and signal names
+3 Simulink files and signal names
3.1 List of Simscape files
+3.1 List of Simscape files
+
3.2 List of Inputs
+3.2 List of Inputs
3.2.1 Perturbations
+3.2.1 Perturbations
+
3.2.2 Measurement Noise
+3.2.2 Measurement Noise
+
3.2.3 Control Inputs
+3.2.3 Control Inputs
+
3.3 List of Outputs
+3.3 List of Outputs
+
4 Simulink Library
+4 Simulink Library
4.1
+inputs
4.1
inputs
4.2
+nass_library
4.2
nass_library
4.3
+pos_error_wrt_nass_base
4.3
pos_error_wrt_nass_base
4.4
+QuaternionToAngles
4.4
QuaternionToAngles
4.5
+RotationMatrixToAngle
4.5
RotationMatrixToAngle
5 Functions
+5 Functions
-5.1 computePsdDispl
+5.1 computePsdDispl
5.2 computeSetpoint
+5.2 computeSetpoint
5.3 converErrorBasis
+
-5.4 generateDiagPidControl
+5.4 generateDiagPidControl
5.5 identifyPlant
+5.5 identifyPlant
5.6 runSimulation
+5.6 runSimulation
6 Initialize Elements
+6 Initialize Elements
-6.1 Experiment
+6.1 Experiment
6.2 Generate Reference Signals
+6.2 Generate Reference Signals
6.3 TODO Inputs
+6.3 TODO Inputs
@@ -2239,11 +2236,11 @@ This Matlab function is accessible here.
6.4 Ground
+6.4 Ground
6.5 Granite
+6.5 Granite
6.6 Translation Stage
+6.6 Translation Stage
6.7 Tilt Stage
+6.7 Tilt Stage
6.8 Spindle
+6.8 Spindle
6.9 Micro Hexapod
+6.9 Initialize Hexapod legs' length
function [hexapod] = initializeHexapodPosition(hexapod, AP, ARB)
+% initializeHexapodPosition -
+%
+% Syntax: initializeHexapodPosition(hexapod, AP, ARB)
+%
+% Inputs:
+% - hexapod - Hexapod object containing the geometry of the hexapod
+% - AP - Position vector of point OB expressed in frame {A}
+% - ARB - Rotation Matrix expressed in frame {A}
+
+ L0 = zeros(6, 1);
+
+ for i = 1:length(L)
+ Bbi = hexapod.pos_top_tranform(i, :)';
+ Aai = hexapod.pos_base(i, :)';
+
+ L0(i) = sqrt(AP'*AP + Bbi'*Bbi + Aai'*Aai - 2*AP'*Aai + 2*AP'*(ARB*Bbi) - 2*(ARB*Bbi)'*Aai);
+ end
+
+ hexapod.L0 = L0;
+end
+
+6.10 Micro Hexapod
+function [micro_hexapod] = initializeMicroHexapod(opts_param)
%% Default values for opts
- opts = struct('rigid', false);
+ opts = struct(...
+ 'rigid', false, ...
+ 'AP', zeros(3, 1), ... % Wanted position in [m] of OB with respect to frame {A}
+ 'ARB', eye(3) ... % Rotation Matrix that represent the wanted orientation of frame {B} with respect to frame {A}
+ );
%% Populate opts with input parameters
if exist('opts_param','var')
@@ -2595,7 +2634,7 @@ This Matlab function is accessible her
%% Stewart Object
micro_hexapod = struct();
micro_hexapod.h = 350; % Total height of the platform [mm]
- micro_hexapod.jacobian = 270; % Distance from the top platform to the Jacobian point [mm]
+ micro_hexapod.jacobian = 270; % Distance from the top of the mobile platform to the Jacobian point [mm]
%% Bottom Plate - Mechanical Design
BP = struct();
@@ -2630,7 +2669,7 @@ This Matlab function is accessible her
else
Leg.k.ax = 2e7; % Stiffness of each leg [N/m]
end
- Leg.ksi.ax = 0.1; % Modal damping ksi = 1/2*c/sqrt(km) []
+ Leg.ksi.ax = 0.1; % Modal damping ksi = 1/2*c/sqrt(km) []
Leg.rad.bottom = 25; % Radius of the cylinder of the bottom part [mm]
Leg.rad.top = 17; % Radius of the cylinder of the top part [mm]
Leg.density = 8000; % Density of the material [kg/m^3]
@@ -2676,6 +2715,9 @@ This Matlab function is accessible her
%%
micro_hexapod = initializeParameters(micro_hexapod);
+ %% Setup equilibrium position of each leg
+ micro_hexapod.L0 = initializeHexapodPosition(micro_hexapod, opts.AP, opts.ARB);
+
%% Save
save('./mat/stages.mat', 'micro_hexapod', '-append');
@@ -2769,24 +2811,47 @@ This Matlab function is accessible her
stewart.J = getJacobianMatrix(leg_vectors', aa');
end
- function J = getJacobianMatrix(RM,M_pos_base)
+ %%
+ function J = getJacobianMatrix(RM, M_pos_base)
% RM: [3x6] unit vector of each leg in the fixed frame
% M_pos_base: [3x6] vector of the leg connection at the top platform location in the fixed frame
J = zeros(6);
J(:, 1:3) = RM';
J(:, 4:6) = cross(M_pos_base, RM)';
end
+
+ %%
+ function [L] = initializeHexapodPosition(hexapod, AP, ARB)
+ % initializeHexapodPosition - Compute the initial position of each leg to have the wanted Hexapod's position
+ %
+ % Syntax: initializeHexapodPosition(hexapod, AP, ARB)
+ %
+ % Inputs:
+ % - hexapod - Hexapod object containing the geometry of the hexapod
+ % - AP - Position vector of point OB expressed in frame {A} in [m]
+ % - ARB - Rotation Matrix expressed in frame {A}
+
+ % Wanted Length of the hexapod's legs [m]
+ L = zeros(6, 1);
+
+ for i = 1:length(L)
+ Bbi = hexapod.pos_top_tranform(i, :)' - 1e-3*[0 ; 0 ; hexapod.TP.thickness+hexapod.Leg.sphere.top+hexapod.SP.thickness.top+hexapod.jacobian]; % [m]
+ Aai = hexapod.pos_base(i, :)' + 1e-3*[0 ; 0 ; hexapod.BP.thickness+hexapod.Leg.sphere.bottom+hexapod.SP.thickness.bottom-micro_hexapod.h-hexapod.jacobian]; % [m]
+
+ L(i) = sqrt(AP'*AP + Bbi'*Bbi + Aai'*Aai - 2*AP'*Aai + 2*AP'*(ARB*Bbi) - 2*(ARB*Bbi)'*Aai);
+ end
+ end
end
6.10 Center of gravity compensation
-6.11 Center of gravity compensation
+6.11 Mirror
-6.12 Mirror
+6.12 Nano Hexapod
-6.13 Nano Hexapod
+6.13 Cedrat Actuator
-6.14 Cedrat Actuator
+6.14 Sample
-6.15 Sample
+