35 lines
1.0 KiB
Matlab
35 lines
1.0 KiB
Matlab
function [G_cart, G_cart_raw] = identifyNass(opts_param)
|
|
%% Default values for opts
|
|
opts = struct('f_low', 1,...
|
|
'f_high', 10000 ...
|
|
);
|
|
|
|
%% Populate opts with input parameters
|
|
if exist('opts_param','var')
|
|
for opt = fieldnames(opts_param)'
|
|
opts.(opt{1}) = opts_param.(opt{1});
|
|
end
|
|
end
|
|
|
|
%% Options for Linearized
|
|
options = linearizeOptions;
|
|
options.SampleTime = 0;
|
|
|
|
%% Name of the Simulink File
|
|
mdl = 'Micro_Station_Identification';
|
|
|
|
%% Centralized control (Cartesian coordinates)
|
|
% Input/Output definition
|
|
io(1) = linio([mdl, '/Micro-Station/Fn'], 1,'input');
|
|
io(2) = linio([mdl, '/Micro-Station/Nano_Hexapod'],1,'output');
|
|
|
|
% Run the linearization
|
|
G_cart_raw = linearize(mdl,io, 0);
|
|
|
|
G_cart = preprocessIdTf(G_cart_raw, opts.f_low, opts.f_high);
|
|
|
|
% Input/Output names
|
|
G_cart.InputName = {'Fnx', 'Fny', 'Fnz', 'Mnx', 'Mny', 'Mnz'};
|
|
G_cart.OutputName = {'Dnx', 'Dny', 'Dnz', 'Rnx', 'Rny', 'Rnz'};
|
|
end
|