nass-simscape/init_data.m
Thomas Dehaeze 7575aee987 Add metrology element (change of base, computation of error)
Lot's of new things:
- try to use less .mat files
- computation of setpoint and error in the cartesian frame fixed to the granite
- change of base to have the errors w.r.t. the NASS base
- add script to plot setpoint, position and error
2018-10-24 15:08:23 +02:00

59 lines
973 B
Matlab

%%
clear; close all; clc;
%% Initialize simulation configuration
opts_sim = struct(...
'Tsim', 5 ...
);
initializeSimConf(opts_sim);
%% Initialize Inputs
opts_inputs = struct(...
'Dw', true, ...
'ry', false, ...
'Rz', true ...
);
initializeInputs(opts_inputs);
%% Initialize Solids
initializeSolids();
%% Initialize Ground
initializeGround();
%% Initialize Granite
initializeGranite();
%% Initialize Translation stage
initializeTy();
%% Initialize Tilt Stage
initializeRy();
%% Initialize Spindle
initializeRz();
%% Initialize Hexapod Symétrie
initializeMicroHexapod();
%% Initialize Center of Gravity compensation
initializeAxisc();
%% Initialize NASS
initializeNanoHexapod(struct('actuator', 'lorentz'));
%% Initialize the Mirror
initializeMirror(struct('shape', 'spherical'));
%% Initialize Sample
initializeSample(struct('mass', 20));
%% Controllers
K = tf(zeros(6));
K_iff = tf(zeros(6));
save('./mat/controllers.mat', 'K', 'K_iff');