diff --git a/metrology/index.html b/metrology/index.html index 5292ab0..f8808b1 100644 --- a/metrology/index.html +++ b/metrology/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Metrology @@ -283,25 +283,25 @@ for the JavaScript code in this tag.

Table of Contents

@@ -314,25 +314,25 @@ Also, all the stages can be perfectly positioned.

-First, in section 1, is explained how the measurement of the position of the sample with respect to the granite is performed. +First, in section 1, is explained how the measurement of the position of the sample with respect to the granite is performed.

-In section 2, we verify that the function developed to compute the wanted pose (translation and orientation) of the sample with respect to the granite can be determined from the wanted position of each stage (translation stage, tilt stage, spindle and micro-hexapod). +In section 2, we verify that the function developed to compute the wanted pose (translation and orientation) of the sample with respect to the granite can be determined from the wanted position of each stage (translation stage, tilt stage, spindle and micro-hexapod). To do so, we impose a perfect displacement and all the stage, we perfectly measure the position of the sample with respect to the granite, and we verify that this measured position corresponds to the computed wanted pose of the sample.

-Then, in section 3, we introduce some positioning error in the position stages. +Then, in section 3, we introduce some positioning error in the position stages. The positioning error of the sample expressed with respect to the granite frame (the one measured) is expressed in a frame connected to the NASS top platform. Finally, we move the NASS such that it compensate for the positioning error that are expressed in the frame of the NASS, and we verify that the positioning error of the sample is well compensated.

-
-

1 How do we measure the position of the sample with respect to the granite

+
+

1 How do we measure the position of the sample with respect to the granite

- + A transform sensor block gives the translation and orientation of the follower frame with respect to the base frame.

@@ -358,18 +358,18 @@ We can then determine extract other orientation conventions such that Euler angl
-
-

2 Verify that the function to compute the reference pose is correct

+
+

2 Verify that the function to compute the reference pose is correct

- +

The goal here is to perfectly move the station and verify that there is no mismatch between the metrology measurement and the computation of the reference pose.

-
-

2.1 Prepare the Simulation

+
+

2.1 Prepare the Simulation

We load the configuration. @@ -439,6 +439,7 @@ No position error for now (perfect positioning). Rye = 0; % [rad] Rze = 0; % [rad] Dhe = zeros(6,1); % [m,rad] +Dhle = zeros(6,1); % [m] Dne = zeros(6,1); % [m,rad]

@@ -453,8 +454,8 @@ And we run the simulation.
-
-

2.2 Verify that the pose of the sample is the same as the computed one

+
+

2.2 Verify that the pose of the sample is the same as the computed one

Let's denote: @@ -530,8 +531,8 @@ ans =

-
-

2.3 Conclusion

+
+

2.3 Conclusion

@@ -544,11 +545,11 @@ Both the measurement and the theory gives the same result.

-
-

3 Verify that the function to convert the position error in the frame fixed to the nano-hexapod is working

+
+

3 Verify that the function to convert the position error in the frame fixed to the nano-hexapod is working

- +

We now introduce some positioning error in the stage. @@ -559,8 +560,8 @@ This will induce a global positioning error of the sample with respect to the de We want to verify that we are able to measure this positioning error and convert it in the frame attached to the Nano-hexapod.

-
-

3.1 Prepare the Simulation

+
+

3.1 Prepare the Simulation

We load the configuration. @@ -578,6 +579,23 @@ We set a small StopTime.

+

+We initialize all the stages. +

+
+
initializeGround();
+initializeGranite();
+initializeTy();
+initializeRy();
+initializeRz();
+initializeMicroHexapod();
+initializeAxisc();
+initializeMirror();
+initializeNanoHexapod(struct('actuator', 'piezo'));
+initializeSample(struct('mass', 50));
+
+
+

We setup the reference path to be constant.

@@ -606,12 +624,12 @@ initializeReferences(opts
-
Dye = 0; % [m]
-Rye = 0; % [rad]
-Rze = 0; % [rad]
-Dhe = [1e-3 ; 0 ; 2e-3 ; 1e-3 ; 0 ; 3e-3]; % [m,rad]
-% Dhe = zeros(6,1);
+
Dye = 1e-6; % [m]
+Rye = 2e-4; % [rad]
+Rze = 1e-5; % [rad]
+Dhe = zeros(6,1);
 % Dne = [1e-3 ; 0 ; 2e-3 ; 0 ; 3e-3 ; 1e-3]; % [m,rad]
+Dhle = [1e-6 ; 2e-6 ; 3e-6 ; -2e-6 ; 1e-6 ; 2e-6]; % [m]
 Dne = zeros(6,1);
 
@@ -626,8 +644,8 @@ And we run the simulation.
-
-

3.2 Compute the wanted pose of the sample in the NASS Base from the metrology and the reference

+
+

3.2 Compute the wanted pose of the sample in the NASS Base from the metrology and the reference

Now that we have introduced some positioning error, the computed wanted pose and the measured pose will not be the same. @@ -750,20 +768,20 @@ Rz = [cosError --1.0e-03 -1.0e-06 --2.0e-03 --1.0e-03 -3.0e-06 --3.0e-03 +2.8e-06 +-2.0e-06 +-1.3e-06 +-5.1e-06 +-1.8e-04 +4.2e-07

-
-

3.3 Verify that be imposing the error motion on the nano-hexapod, we indeed have zero error at the end

+
+

3.3 Verify that be imposing the error motion on the nano-hexapod, we indeed have zero error at the end

We now keep the wanted pose but we impose a displacement of the nano hexapod corresponding to the measured position error. @@ -845,20 +863,20 @@ Verify that the pose error is small. Error --3.0e-09 --1.0e-09 -3.0e-09 -2.0e-09 --1.0e-09 -3.0e-09 +1.0e-16 +-1.1e-18 +3.3e-20 +1.5e-16 +5.8e-17 +-6.1e-16

-
-

3.4 Conclusion

+
+

3.4 Conclusion

@@ -870,15 +888,15 @@ Indeed, we are able to convert the position error in the frame of the NASS and t

-
-

4 Functions

+
+

4 Functions

-
-

4.1 computeReferencePose

+
+

4.1 computeReferencePose

- +

@@ -971,7 +989,7 @@ This Matlab function is accessible here

Author: Dehaeze Thomas

-

Created: 2019-12-11 mer. 09:33

+

Created: 2019-12-11 mer. 09:43

Validate

diff --git a/metrology/index.org b/metrology/index.org index 45f9388..93a3e4b 100644 --- a/metrology/index.org +++ b/metrology/index.org @@ -145,6 +145,7 @@ No position error for now (perfect positioning). Rye = 0; % [rad] Rze = 0; % [rad] Dhe = zeros(6,1); % [m,rad] + Dhle = zeros(6,1); % [m] Dne = zeros(6,1); % [m,rad] #+end_src @@ -250,6 +251,20 @@ We set a small =StopTime=. set_param(conf_simscape, 'StopTime', '0.5'); #+end_src +We initialize all the stages. +#+begin_src matlab + initializeGround(); + initializeGranite(); + initializeTy(); + initializeRy(); + initializeRz(); + initializeMicroHexapod(); + initializeAxisc(); + initializeMirror(); + initializeNanoHexapod(struct('actuator', 'piezo')); + initializeSample(struct('mass', 50)); +#+end_src + We setup the reference path to be constant. #+begin_src matlab opts = struct( ... @@ -273,12 +288,12 @@ We setup the reference path to be constant. Now we introduce some positioning error. #+begin_src matlab - Dye = 0; % [m] - Rye = 0; % [rad] - Rze = 0; % [rad] - Dhe = [1e-3 ; 0 ; 2e-3 ; 1e-3 ; 0 ; 3e-3]; % [m,rad] - % Dhe = zeros(6,1); + Dye = 1e-6; % [m] + Rye = 2e-4; % [rad] + Rze = 1e-5; % [rad] + Dhe = zeros(6,1); % Dne = [1e-3 ; 0 ; 2e-3 ; 0 ; 3e-3 ; 1e-3]; % [m,rad] + Dhle = [1e-6 ; 2e-6 ; 3e-6 ; -2e-6 ; 1e-6 ; 2e-6]; % [m] Dne = zeros(6,1); #+end_src @@ -370,9 +385,9 @@ Verify that the pose error corresponds to the positioning error of the stages. #+end_src #+RESULTS: -| | Edx [m] | Edy [m] | Edz [m] | Erx [rad] | Ery [rad] | Erz [rad] | -|-------+----------+---------+----------+-----------+-----------+-----------| -| Error | -1.0e-03 | 1.0e-06 | -2.0e-03 | -1.0e-03 | 3.0e-06 | -3.0e-03 | +| | Edx [m] | Edy [m] | Edz [m] | Erx [rad] | Ery [rad] | Erz [rad] | +|-------+---------+----------+----------+-----------+-----------+-----------| +| Error | 2.8e-06 | -2.0e-06 | -1.3e-06 | -5.1e-06 | -1.8e-04 | 4.2e-07 | ** Verify that be imposing the error motion on the nano-hexapod, we indeed have zero error at the end We now keep the wanted pose but we impose a displacement of the nano hexapod corresponding to the measured position error. @@ -421,9 +436,9 @@ Verify that the pose error is small. #+end_src #+RESULTS: -| | Edx [m] | Edy [m] | Edz [m] | Erx [rad] | Ery [rad] | Erz [rad] | -|-------+----------+----------+---------+-----------+-----------+-----------| -| Error | -3.0e-09 | -1.0e-09 | 3.0e-09 | 2.0e-09 | -1.0e-09 | 3.0e-09 | +| | Edx [m] | Edy [m] | Edz [m] | Erx [rad] | Ery [rad] | Erz [rad] | +|-------+---------+----------+---------+-----------+-----------+-----------| +| Error | 1.0e-16 | -1.1e-18 | 3.3e-20 | 1.5e-16 | 5.8e-17 | -6.1e-16 | ** Conclusion #+begin_important diff --git a/simscape/sim_nano_station_metrology.slx b/simscape/sim_nano_station_metrology.slx index 04b879a..32af8b0 100644 Binary files a/simscape/sim_nano_station_metrology.slx and b/simscape/sim_nano_station_metrology.slx differ diff --git a/simscape_subsystems/micro_hexapod_rigid_legs.slx b/simscape_subsystems/micro_hexapod_rigid_legs.slx new file mode 100644 index 0000000..1e18e31 Binary files /dev/null and b/simscape_subsystems/micro_hexapod_rigid_legs.slx differ diff --git a/src/inverseKinematicsHexapod.m b/src/inverseKinematicsHexapod.m new file mode 100644 index 0000000..c607e59 --- /dev/null +++ b/src/inverseKinematicsHexapod.m @@ -0,0 +1,31 @@ +% Inverse Kinematics of the Hexapod +% :PROPERTIES: +% :header-args:matlab+: :tangle ../src/inverseKinematicsHexapod.m +% :header-args:matlab+: :comments org :mkdirp yes +% :header-args:matlab+: :eval no :results none +% :END: +% <> + +% This Matlab function is accessible [[file:src/inverseKinematicsHexapod.m][here]]. + + +function [L] = inverseKinematicsHexapod(hexapod, AP, ARB) +% inverseKinematicsHexapod - Compute the initial position of each leg to have the wanted Hexapod's position +% +% Syntax: inverseKinematicsHexapod(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-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