nass-simscape/identification/id_nano_station.m

31 lines
714 B
Matlab

%%
clear; close all; clc;
%%
K = tf(zeros(6));
K_iff = tf(zeros(6));
save('./mat/controllers.mat', 'K', 'K_iff', '-append');
initializeInputs();
%% 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');