2018-04-19 17:10:24 +02:00
|
|
|
%% Script Description
|
|
|
|
% Run an identification of each stage from input to output
|
|
|
|
% Save all computed transfer functions into one .mat file
|
|
|
|
|
|
|
|
%%
|
2018-06-13 09:37:20 +02:00
|
|
|
clear; close all; clc;
|
2018-04-19 17:10:24 +02:00
|
|
|
|
2018-06-16 22:57:54 +02:00
|
|
|
%%
|
2018-06-21 11:43:46 +02:00
|
|
|
initializeSample(struct('mass', 20));
|
2018-06-16 22:57:54 +02:00
|
|
|
|
2018-04-19 17:10:24 +02:00
|
|
|
%% Options for Linearized
|
|
|
|
options = linearizeOptions;
|
|
|
|
options.SampleTime = 0;
|
|
|
|
|
|
|
|
%% Name of the Simulink File
|
2018-10-03 13:55:09 +02:00
|
|
|
mdl = 'sim_nano_station';
|
2018-04-19 17:10:24 +02:00
|
|
|
|
|
|
|
%% Y-Translation Stage
|
|
|
|
% Input/Output definition
|
2018-10-03 13:55:09 +02:00
|
|
|
io(1) = linio([mdl, '/Micro-Station/Fy'], 1,'openinput');
|
2018-06-16 22:57:54 +02:00
|
|
|
io(2) = linio([mdl, '/Micro-Station/Translation y'],1,'output');
|
2018-04-19 17:10:24 +02:00
|
|
|
|
|
|
|
% Run the linearization
|
2018-10-03 13:55:09 +02:00
|
|
|
G_ty = linearize(mdl,io, 0);
|
2018-04-19 17:10:24 +02:00
|
|
|
|
|
|
|
% Input/Output names
|
|
|
|
G_ty.InputName = {'Fy'};
|
|
|
|
G_ty.OutputName = {'Dy'};
|
|
|
|
|
|
|
|
%% Tilt Stage
|
|
|
|
% Input/Output definition
|
2018-10-03 13:55:09 +02:00
|
|
|
io(1) = linio([mdl, '/Micro-Station/Ry'], 1,'openinput');
|
2018-06-16 22:57:54 +02:00
|
|
|
io(2) = linio([mdl, '/Micro-Station/Tilt'],1,'output');
|
2018-04-19 17:10:24 +02:00
|
|
|
|
|
|
|
% Run the linearization
|
2018-10-03 13:55:09 +02:00
|
|
|
G_ry = linearize(mdl,io, 0);
|
2018-04-19 17:10:24 +02:00
|
|
|
|
|
|
|
% Input/Output names
|
|
|
|
G_ry.InputName = {'My'};
|
|
|
|
G_ry.OutputName = {'Ry'};
|
|
|
|
|
|
|
|
%% Spindle
|
|
|
|
% Input/Output definition
|
2018-10-03 13:55:09 +02:00
|
|
|
io(1) = linio([mdl, '/Micro-Station/Rz'], 1,'openinput');
|
2018-06-16 22:57:54 +02:00
|
|
|
io(2) = linio([mdl, '/Micro-Station/Spindle'],1,'output');
|
2018-04-19 17:10:24 +02:00
|
|
|
|
|
|
|
% Run the linearization
|
2018-10-03 13:55:09 +02:00
|
|
|
G_rz = linearize(mdl,io, 0);
|
2018-04-19 17:10:24 +02:00
|
|
|
|
|
|
|
% Input/Output names
|
|
|
|
G_rz.InputName = {'Mz'};
|
|
|
|
G_rz.OutputName = {'Rz'};
|
|
|
|
|
|
|
|
%% Hexapod Symetrie
|
|
|
|
% Input/Output definition
|
2018-10-03 13:55:09 +02:00
|
|
|
io(1) = linio([mdl, '/Micro-Station/Fm'], 1,'openinput');
|
2018-06-16 22:57:54 +02:00
|
|
|
io(2) = linio([mdl, '/Micro-Station/Micro_Hexapod'],1,'output');
|
2018-04-19 17:10:24 +02:00
|
|
|
|
|
|
|
% Run the linearization
|
2018-10-03 13:55:09 +02:00
|
|
|
G_hexa = linearize(mdl,io, 0);
|
2018-04-19 17:10:24 +02:00
|
|
|
|
|
|
|
% Input/Output names
|
|
|
|
G_hexa.InputName = {'Fhexa_x', 'Fhexa_y', 'Fhexa_z', 'Mhexa_x', 'Mhexa_y', 'Mhexa_z'};
|
2018-06-13 09:37:20 +02:00
|
|
|
G_hexa.OutputName = {'Dhexa_x', 'Dhexa_y', 'Dhexa_z', 'Rhexa_x', 'Rhexa_y', 'Rhexa_z'};
|
2018-04-19 17:10:24 +02:00
|
|
|
|
|
|
|
%% NASS
|
|
|
|
% Input/Output definition
|
2018-10-03 13:55:09 +02:00
|
|
|
io(1) = linio([mdl, '/Micro-Station/Fn'], 1,'openinput');
|
2018-06-16 22:57:54 +02:00
|
|
|
io(2) = linio([mdl, '/Micro-Station/Nano_Hexapod'],1,'output');
|
2018-04-19 17:10:24 +02:00
|
|
|
|
|
|
|
% Run the linearization
|
2018-10-03 13:55:09 +02:00
|
|
|
G_nass = linearize(mdl,io, 0);
|
2018-04-19 17:10:24 +02:00
|
|
|
|
|
|
|
% Input/Output names
|
|
|
|
G_nass.InputName = {'Fnass_x', 'Fnass_y', 'Fnass_z', 'Mnass_x', 'Mnass_y', 'Mnass_z'};
|
2018-06-21 11:43:46 +02:00
|
|
|
G_nass.OutputName = {'Dnass_x', 'Dnass_y', 'Dnass_z', 'Rnass_x', 'Rnass_y', 'Rnass_z'};
|
2018-04-19 17:10:24 +02:00
|
|
|
|
|
|
|
%% Save all transfer function
|
2018-06-21 11:43:46 +02:00
|
|
|
save('./mat/identified_tf.mat', 'G_ty', 'G_ry', 'G_rz', 'G_hexa', 'G_nass')
|