nass-simscape/identification/id_nano_station.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

28 lines
666 B
Matlab

%%
clear; close all; clc;
%%
K_iff = tf(zeros(6));
save('./mat/controllers.mat', 'K_iff', '-append');
%% Light Sample
initializeSample(struct('mass', 1));
initializeNanoHexapod(struct('actuator', 'lorentz'));
G_light_vc = identifyPlant();
initializeNanoHexapod(struct('actuator', 'piezo'));
G_light_pz = identifyPlant();
%% Heavy Sample
initializeSample(struct('mass', 50));
initializeNanoHexapod(struct('actuator', 'lorentz'));
G_heavy_vc = identifyPlant();
initializeNanoHexapod(struct('actuator', 'piezo'));
G_heavy_pz = identifyPlant();
%% Save the obtained transfer functions
save('./mat/G.mat', 'G_light_vc', 'G_light_pz', 'G_heavy_vc', 'G_heavy_pz');