nass-simscape/identification/matlab-old/id_nano_station.m

31 lines
714 B
Mathematica
Raw Normal View History

2018-06-16 22:57:54 +02:00
%%
clear; close all; clc;
%%
2018-10-25 11:00:30 +02:00
K = tf(zeros(6));
K_iff = tf(zeros(6));
2018-10-25 11:00:30 +02:00
save('./mat/controllers.mat', 'K', 'K_iff', '-append');
initializeInputs();
%% Light Sample
2018-06-16 22:57:54 +02:00
initializeSample(struct('mass', 1));
initializeNanoHexapod(struct('actuator', 'lorentz'));
G_light_vc = identifyPlant();
2018-06-16 22:57:54 +02:00
initializeNanoHexapod(struct('actuator', 'piezo'));
G_light_pz = identifyPlant();
2018-06-16 22:57:54 +02:00
%% Heavy Sample
2018-06-16 22:57:54 +02:00
initializeSample(struct('mass', 50));
initializeNanoHexapod(struct('actuator', 'lorentz'));
G_heavy_vc = identifyPlant();
initializeNanoHexapod(struct('actuator', 'piezo'));
G_heavy_pz = identifyPlant();
2018-06-16 22:57:54 +02:00
2018-10-02 21:46:34 +02:00
%% Save the obtained transfer functions
save('./mat/G.mat', 'G_light_vc', 'G_light_pz', 'G_heavy_vc', 'G_heavy_pz');