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-10-12 18:17:03 +02:00
|
|
|
mdl = 'simscape_id_micro_station';
|
2018-06-06 19:16:04 +02:00
|
|
|
|
|
|
|
%% Micro-Hexapod
|
|
|
|
% Input/Output definition
|
2018-10-03 13:55:09 +02:00
|
|
|
io(1) = linio([mdl, '/Micro-Station/Fm_ext'],1,'openinput');
|
|
|
|
io(2) = linio([mdl, '/Micro-Station/Fg_ext'],1,'openinput');
|
|
|
|
io(3) = linio([mdl, '/Micro-Station/Dm_inertial'],1,'output');
|
2018-10-12 18:17:03 +02:00
|
|
|
io(4) = linio([mdl, '/Micro-Station/Ty_inertial'],1,'output');
|
|
|
|
io(5) = linio([mdl, '/Micro-Station/Ry_inertial'],1,'output');
|
|
|
|
io(6) = linio([mdl, '/Micro-Station/Dg_inertial'],1,'output');
|
2018-06-06 19:16:04 +02:00
|
|
|
|
|
|
|
% Run the linearization
|
2018-10-03 13:55:09 +02:00
|
|
|
G_ms = linearize(mdl, io, 0);
|
2018-06-06 19:16:04 +02:00
|
|
|
|
|
|
|
% Input/Output names
|
2018-10-12 18:17:03 +02:00
|
|
|
G_ms.InputName = {'Fmx', 'Fmy', 'Fmz',...
|
|
|
|
'Fgx', 'Fgy', 'Fgz'};
|
|
|
|
G_ms.OutputName = {'Dmx', 'Dmy', 'Dmz', ...
|
|
|
|
'Tyx', 'Tyy', 'Tyz', ...
|
|
|
|
'Ryx', 'Ryy', 'Ryz', ...
|
|
|
|
'Dgx', 'Dgy', 'Dgz'};
|
2018-06-07 13:49:42 +02:00
|
|
|
|
2018-10-02 22:01:30 +02:00
|
|
|
%% Save the obtained transfer functions
|
2018-10-03 13:55:09 +02:00
|
|
|
save('./mat/id_micro_station.mat', 'G_ms');
|