nass-simscape/identification/id_plant_variation.m

29 lines
657 B
Matlab

%%
clear; close all; clc;
%%
K = tf(zeros(6));
K_iff = tf(zeros(6));
save('./mat/controllers.mat', 'K', 'K_iff', '-append');
%% Light Sample
initializeSample(struct('mass', 50));
initializeNanoHexapod(struct('actuator', 'piezo'));
%% Vertical Configuration
initializeInputs();
G_vert_init = identifyPlant();
initializeInputs(struct('Rz', 90));
G_vert_turn = identifyPlant();
%% Tilted configuration
initializeInputs(struct('Ry', 3));
G_tilt_init = identifyPlant();
initializeInputs(struct('Ry', 3, 'Rz', 90));
G_tilt_turn = identifyPlant();
%% Save
save('./mat/id_plant_variation.mat', 'G_vert_init', 'G_vert_turn', 'G_tilt_init', 'G_tilt_turn')