Huge Update

- Modify the joints for Ty, Ry, Rz to have only one bushing joint.
- Compensation of gravity
This commit is contained in:
2020-02-25 17:49:08 +01:00
parent dfdfcff4db
commit 12c2e4a508
36 changed files with 798 additions and 545 deletions

View File

@@ -99,27 +99,34 @@ The goal here is to perfectly move the station and verify that there is no misma
#+end_src
#+begin_src matlab
open('positioning_error/matlab/sim_nano_station_metrology.slx')
open('nass_model.slx')
#+end_src
** Prepare the Simulation
We set a small =StopTime=.
#+begin_src matlab
load('mat/conf_simulink.mat');
set_param(conf_simulink, 'StopTime', '0.5');
#+end_src
We initialize all the stages.
#+begin_src matlab
initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
initializeNanoHexapod('actuator', 'piezo');
initializeSample('mass', 50);
initializeGround('type', 'rigid');
initializeGranite('type', 'rigid');
initializeTy('type', 'rigid');
initializeRy('type', 'rigid');
initializeRz('type', 'rigid');
initializeMicroHexapod('type', 'rigid');
initializeAxisc('type', 'rigid');
initializeMirror('type', 'rigid');
initializeNanoHexapod('type', 'rigid', 'actuator', 'piezo');
initializeSample('type', 'rigid', 'mass', 50);
#+end_src
No disturbance and no gravity.
#+begin_src matlab
initializeSimscapeConfiguration('gravity', false);
initializeDisturbances('enable', false);
#+end_src
We setup the reference path to be constant.
@@ -154,9 +161,14 @@ No position error for now (perfect positioning).
Dne = zeros(6,1); % [m,m,m,rad,rad,rad]
#+end_src
We want to log the signals
#+begin_src matlab
initializeLoggingConfiguration('log', 'all');
#+end_src
And we run the simulation.
#+begin_src matlab
sim('sim_nano_station_metrology');
sim('nass_model');
#+end_src
** Verify that the pose of the sample is the same as the computed one
@@ -171,20 +183,20 @@ We have then computed:
We load the reference and we compute the desired trajectory of the sample in the form of an homogeneous transformation matrix ${}^W\bm{T}_R$.
#+begin_src matlab
n = length(Dref.Dy.Time);
n = length(simout.r.Dy.Time);
WTr = zeros(4, 4, n);
for i = 1:n
WTr(:, :, i) = computeReferencePose(Dref.Dy.Data(i), Dref.Ry.Data(i), Dref.Rz.Data(i), Dref.Dh.Data(i,:), Dref.Dn.Data(i,:));
WTr(:, :, i) = computeReferencePose(simout.r.Dy.Data(i), simout.r.Ry.Data(i), simout.r.Rz.Data(i), simout.r.Dh.Data(i,:), simout.r.Dn.Data(i,:));
end
#+end_src
As the displacement is perfect, we also measure in simulation the pose of the sample with respect to the granite.
From that we can compute the homogeneous transformation matrix ${}^W\bm{T}_M$.
#+begin_src matlab
n = length(Dsm.R.Time);
n = length(simout.y.R.Time);
WTm = zeros(4, 4, n);
WTm(1:3, 1:3, :) = Dsm.R.Data;
WTm(1:3, 4, :) = [Dsm.x.Data' ; Dsm.y.Data' ; Dsm.z.Data'];
WTm(1:3, 1:3, :) = simout.y.R.Data;
WTm(1:3, 4, :) = [simout.y.x.Data' ; simout.y.y.Data' ; simout.y.z.Data'];
WTm(4, 4, :) = 1;
#+end_src
@@ -242,32 +254,34 @@ We want to verify that we are able to measure this positioning error and convert
#+end_src
#+begin_src matlab
open('positioning_error/matlab/sim_nano_station_metrology.slx')
open('nass_model.slx')
#+end_src
** Prepare the Simulation
We load the configuration.
#+begin_src matlab
load('mat/conf_simulink.mat');
#+end_src
We set a small =StopTime=.
#+begin_src matlab
load('mat/conf_simulink.mat');
set_param(conf_simulink, 'StopTime', '0.5');
#+end_src
We initialize all the stages.
#+begin_src matlab
initializeGround();
initializeGranite();
initializeTy();
initializeRy();
initializeRz();
initializeMicroHexapod();
initializeAxisc();
initializeMirror();
initializeNanoHexapod('actuator', 'piezo');
initializeSample('mass', 50);
initializeGround('type', 'rigid');
initializeGranite('type', 'rigid');
initializeTy('type', 'rigid');
initializeRy('type', 'rigid');
initializeRz('type', 'rigid');
initializeMicroHexapod('type', 'rigid');
initializeAxisc('type', 'rigid');
initializeMirror('type', 'rigid');
initializeNanoHexapod('type', 'rigid', 'actuator', 'piezo');
initializeSample('type', 'rigid', 'mass', 50);
#+end_src
No disturbance and no gravity.
#+begin_src matlab
initializeSimscapeConfiguration('gravity', false);
initializeDisturbances('enable', false);
#+end_src
We setup the reference path to be constant.
@@ -294,14 +308,12 @@ Now we introduce some positioning error.
Dye = 1e-6; % [m]
Rye = 2e-4; % [rad]
Rze = 1e-5; % [rad]
Dhe = zeros(6,1);
Dhle = [1e-6 ; 2e-6 ; 3e-6 ; -2e-6 ; 1e-6 ; 2e-6]; % [m]
Dne = zeros(6,1);
initializePosError('error', true, 'Dy', Dye, 'Ry', Rye, 'Rz', Rze);
#+end_src
And we run the simulation.
#+begin_src matlab
sim('sim_nano_station_metrology');
sim('nass_model');
#+end_src
** Compute the wanted pose of the sample in the NASS Base from the metrology and the reference
@@ -319,20 +331,20 @@ The top platform of the nano-hexapod is considered to be rigidly connected to th
We load the reference and we compute the desired trajectory of the sample in the form of an homogeneous transformation matrix ${}^W\bm{T}_R$.
#+begin_src matlab
n = length(Dref.Dy.Time);
n = length(simout.r.Dy.Time);
WTr = zeros(4, 4, n);
for i = 1:n
WTr(:, :, i) = computeReferencePose(Dref.Dy.Data(i), Dref.Ry.Data(i), Dref.Rz.Data(i), Dref.Dh.Data(i,:), Dref.Dn.Data(i,:));
WTr(:, :, i) = computeReferencePose(simout.r.Dy.Data(i), simout.r.Ry.Data(i), simout.r.Rz.Data(i), simout.r.Dh.Data(i,:), simout.r.Dn.Data(i,:));
end
#+end_src
We also measure in simulation the pose of the sample with respect to the granite.
From that we can compute the homogeneous transformation matrix ${}^W\bm{T}_M$.
#+begin_src matlab
n = length(Dsm.R.Time);
n = length(simout.y.R.Time);
WTm = zeros(4, 4, n);
WTm(1:3, 1:3, :) = Dsm.R.Data;
WTm(1:3, 4, :) = [Dsm.x.Data' ; Dsm.y.Data' ; Dsm.z.Data'];
WTm(1:3, 1:3, :) = simout.y.R.Data;
WTm(1:3, 4, :) = [simout.y.x.Data' ; simout.y.y.Data' ; simout.y.z.Data'];
WTm(4, 4, :) = 1;
#+end_src
@@ -387,9 +399,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 | 2.8e-06 | -2.0e-06 | -1.3e-06 | -5.1e-06 | -1.8e-04 | 4.2e-07 |
| | Edx [m] | Edy [m] | Edz [m] | Erx [rad] | Ery [rad] | Erz [rad] |
|-------+----------+----------+----------+-----------+-----------+-----------|
| Error | -1.0e-11 | -1.0e-06 | -6.2e-16 | -2.0e-09 | -2.0e-04 | -1.0e-05 |
** 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.
@@ -407,13 +419,13 @@ We now keep the wanted pose but we impose a displacement of the nano hexapod cor
'Rm_type', 'constant', ... % For now, only constant is implemented
'Rm_pos', [0, pi]', ... % Initial position of the two masses
'Dn_type', 'constant', ... % For now, only constant is implemented
'Dn_pos', [Edx, Edy, Edz, Erx, Ery, Erz]' ... % Initial position [m,m,m,rad,rad,rad] of the top platform
'Dn_pos', [Edx; Edy; Edz; Erx; Ery; Erz] ... % Initial position [m,m,m,rad,rad,rad] of the top platform
);
#+end_src
And we run the simulation.
#+begin_src matlab
sim('sim_nano_station_metrology');
sim('nass_model');
#+end_src
We keep the old computed computed reference pose ${}^W\bm{T}_r$ even though we have change the nano hexapod reference, but this is not a real wanted reference but rather a adaptation to reject the positioning errors.
@@ -421,10 +433,10 @@ We keep the old computed computed reference pose ${}^W\bm{T}_r$ even though we h
As the displacement is perfect, we also measure in simulation the pose of the sample with respect to the granite.
From that we can compute the homogeneous transformation matrix ${}^W\bm{T}_M$.
#+begin_src matlab
n = length(Dsm.R.Time);
n = length(simout.y.R.Time);
WTm = zeros(4, 4, n);
WTm(1:3, 1:3, :) = Dsm.R.Data;
WTm(1:3, 4, :) = [Dsm.x.Data' ; Dsm.y.Data' ; Dsm.z.Data'];
WTm(1:3, 1:3, :) = simout.y.R.Data;
WTm(1:3, 4, :) = [simout.y.x.Data' ; simout.y.y.Data' ; simout.y.z.Data'];
WTm(4, 4, :) = 1;
#+end_src
@@ -451,9 +463,9 @@ Verify that the pose error is small.
#+end_src
#+RESULTS:
| | Edx [m] | Edy [m] | Edz [m] | Erx [rad] | Ery [rad] | Erz [rad] |
|-------+---------+---------+---------+-----------+-----------+-----------|
| Error | 2.0e-16 | 1.1e-16 | 3.2e-18 | -1.1e-17 | 1.0e-17 | -9.5e-16 |
| | Edx [m] | Edy [m] | Edz [m] | Erx [rad] | Ery [rad] | Erz [rad] |
|-------+---------+----------+---------+-----------+-----------+-----------|
| Error | 2.4e-16 | -9.9e-17 | 4.4e-16 | 2.0e-09 | -8.9e-15 | 2.0e-13 |
** Conclusion
#+begin_important