2018-06-06 19:16:04 +02:00
|
|
|
%% Script Description
|
2018-06-16 22:57:54 +02:00
|
|
|
% Make the same identification as Marc did
|
|
|
|
% Should comment out the nano-hexapod and sample before
|
|
|
|
% runing this script.
|
2018-06-06 19:16:04 +02:00
|
|
|
|
|
|
|
%%
|
2018-06-16 22:57:54 +02:00
|
|
|
clear; close all; clc;
|
2018-06-06 19:16:04 +02:00
|
|
|
|
|
|
|
%% Options for Linearized
|
|
|
|
options = linearizeOptions;
|
|
|
|
options.SampleTime = 0;
|
|
|
|
|
|
|
|
%% Name of the Simulink File
|
2018-06-16 22:57:54 +02:00
|
|
|
mdl = 'Micro_Station_Identification';
|
2018-06-06 19:16:04 +02:00
|
|
|
|
|
|
|
%% Micro-Hexapod
|
|
|
|
% Input/Output definition
|
2018-06-16 22:57:54 +02:00
|
|
|
io(1) = linio([mdl, '/Micro-Station/Fm'],1,'input');
|
|
|
|
io(2) = linio([mdl, '/Micro-Station/Micro_Hexapod_Inertial_Sensor'],1,'output');
|
2018-06-06 19:16:04 +02:00
|
|
|
|
|
|
|
% Run the linearization
|
2018-06-16 22:57:54 +02:00
|
|
|
G_h_h_raw = linearize(mdl,io, 0);
|
|
|
|
G_h_h_raw = G_h_h_raw(1:3, 1:3);
|
|
|
|
G_h_h = preprocessIdTf(G_h_h_raw, 10, 10000);
|
2018-06-06 19:16:04 +02:00
|
|
|
|
|
|
|
% Input/Output names
|
2018-06-07 13:49:42 +02:00
|
|
|
G_h_h.InputName = {'Fux', 'Fuy', 'Fuz'};
|
|
|
|
G_h_h.OutputName = {'Dux', 'Duy', 'Duz'};
|
2018-06-06 19:16:04 +02:00
|
|
|
|
|
|
|
%% Granite
|
|
|
|
% Input/Output definition
|
2018-06-16 22:57:54 +02:00
|
|
|
io(1) = linio([mdl, '/Micro-Station/F_granite'],1,'input');
|
|
|
|
io(2) = linio([mdl, '/Micro-Station/Granite_Inertial_Sensor'],1,'output');
|
2018-06-06 19:16:04 +02:00
|
|
|
|
|
|
|
% Run the linearization
|
2018-06-16 22:57:54 +02:00
|
|
|
G_g_g_raw = linearize(mdl,io, 0);
|
|
|
|
G_g_g = preprocessIdTf(G_g_g_raw, 10, 10000);
|
2018-06-06 19:16:04 +02:00
|
|
|
|
|
|
|
% Input/Output names
|
2018-06-07 13:49:42 +02:00
|
|
|
G_g_g.InputName = {'Fgx', 'Fgy', 'Fgz'};
|
|
|
|
G_g_g.OutputName = {'Dgx', 'Dgy', 'Dgz'};
|
2018-06-06 19:16:04 +02:00
|
|
|
|
2018-06-07 13:49:42 +02:00
|
|
|
%% Micro Hexapod to Granite
|
|
|
|
% Input/Output definition
|
2018-06-16 22:57:54 +02:00
|
|
|
io(1) = linio([mdl, '/Micro-Station/Fm'],1,'input');
|
|
|
|
io(2) = linio([mdl, '/Micro-Station/Granite_Inertial_Sensor'],1,'output');
|
2018-06-07 13:49:42 +02:00
|
|
|
|
|
|
|
% Run the linearization
|
2018-06-16 22:57:54 +02:00
|
|
|
G_h_g_raw = linearize(mdl,io, 0);
|
|
|
|
G_h_g_raw = G_h_g_raw(1:3, 1:3);
|
|
|
|
G_h_g = preprocessIdTf(G_h_g_raw, 10, 10000);
|
2018-06-06 19:16:04 +02:00
|
|
|
|
2018-06-07 13:49:42 +02:00
|
|
|
% Input/Output names
|
|
|
|
G_h_g.InputName = {'Fhx', 'Fhy', 'Fhz'};
|
|
|
|
G_h_g.OutputName = {'Dgx', 'Dgy', 'Dgz'};
|
|
|
|
|
2018-10-02 22:01:30 +02:00
|
|
|
%% Save the obtained transfer functions
|
|
|
|
save('./mat/id_micro_station.mat', 'G_h_h', 'G_g_g', 'G_h_g');
|