Renamed and split all the identification scripts

This commit is contained in:
Thomas Dehaeze 2018-10-02 22:01:30 +02:00
parent 8cde1ba206
commit 223aeae32d
14 changed files with 136 additions and 72 deletions

View File

@ -12,21 +12,21 @@ legend({'$F_{n_x} \rightarrow D_{x}$ - $M = 1Kg$', ...
'$F_{n_y} \rightarrow D_{y}$ - $M = 1Kg$', ... '$F_{n_y} \rightarrow D_{y}$ - $M = 1Kg$', ...
'$F_{n_z} \rightarrow D_{z}$ - $M = 1Kg$'}) '$F_{n_z} \rightarrow D_{z}$ - $M = 1Kg$'})
legend('location', 'southwest') legend('location', 'southwest')
exportFig('G_xyz_1', 'normal-normal') exportFig('G_xyz_1', 'normal-normal', struct('path', 'identification'))
bodeFig({G_20(1, 1), G_20(2, 2), G_20(3, 3)}, struct('phase', true)) bodeFig({G_20(1, 1), G_20(2, 2), G_20(3, 3)}, struct('phase', true))
legend({'$F_{n_x} \rightarrow D_{x}$ - $M = 20Kg$', ... legend({'$F_{n_x} \rightarrow D_{x}$ - $M = 20Kg$', ...
'$F_{n_y} \rightarrow D_{y}$ - $M = 20Kg$', ... '$F_{n_y} \rightarrow D_{y}$ - $M = 20Kg$', ...
'$F_{n_z} \rightarrow D_{z}$ - $M = 20Kg$'}) '$F_{n_z} \rightarrow D_{z}$ - $M = 20Kg$'})
legend('location', 'southwest') legend('location', 'southwest')
exportFig('G_xyz_20', 'normal-normal') exportFig('G_xyz_20', 'normal-normal', struct('path', 'identification'))
bodeFig({G_1(1, 1), G_20(1, 1), G_50(1, 1)}, struct('phase', true)) bodeFig({G_1(1, 1), G_20(1, 1), G_50(1, 1)}, struct('phase', true))
legend({'$F_{n_x} \rightarrow D_{x}$ - $M = 1Kg$', ... legend({'$F_{n_x} \rightarrow D_{x}$ - $M = 1Kg$', ...
'$F_{n_x} \rightarrow D_{x}$ - $M = 20Kg$', ... '$F_{n_x} \rightarrow D_{x}$ - $M = 20Kg$', ...
'$F_{n_x} \rightarrow D_{x}$ - $M = 50Kg$'}) '$F_{n_x} \rightarrow D_{x}$ - $M = 50Kg$'})
legend('location', 'southwest') legend('location', 'southwest')
exportFig('G_x_mass', 'normal-normal') exportFig('G_x_mass', 'normal-normal', struct('path', 'identification'))
bodeFig({G_1(2, 2), G_20(2, 2), G_50(2, 2)}, struct('phase', true)) bodeFig({G_1(2, 2), G_20(2, 2), G_50(2, 2)}, struct('phase', true))
legend({'$F_{n_y} \rightarrow D_{y}$ - $M = 1Kg$', ... legend({'$F_{n_y} \rightarrow D_{y}$ - $M = 1Kg$', ...
@ -40,7 +40,7 @@ legend({'$F_{n_z} \rightarrow D_{z}$ - $M = 1Kg$', ...
'$F_{n_z} \rightarrow D_{z}$ - $M = 20Kg$', ... '$F_{n_z} \rightarrow D_{z}$ - $M = 20Kg$', ...
'$F_{n_z} \rightarrow D_{z}$ - $M = 50Kg$'}) '$F_{n_z} \rightarrow D_{z}$ - $M = 50Kg$'})
legend('location', 'southwest') legend('location', 'southwest')
exportFig('G_z_mass', 'normal-normal') exportFig('G_z_mass', 'normal-normal', struct('path', 'identification'))
%% %%
@ -48,7 +48,7 @@ bodeFig({G_1(2, 2), G_20(2, 2), G_50(2, 2)}, freqs, struct('phase', true))
legend({'$M = 1Kg$', ... legend({'$M = 1Kg$', ...
'$M = 20Kg$', ... '$M = 20Kg$', ...
'$M = 50Kg$'}) '$M = 50Kg$'})
exportFig('G_y_mass_article', 'half-normal') exportFig('G_y_mass_article', 'half-normal', struct('path', 'identification'))
%% %%
freqs = logspace(-1, 3, 1000); freqs = logspace(-1, 3, 1000);
@ -60,4 +60,4 @@ legend({'$1Kg$', ...
legend('location', 'southwest') legend('location', 'southwest')
set(gca,'YTick',[1e-8, 1e-6, 1e-4]) set(gca,'YTick',[1e-8, 1e-6, 1e-4])
ylim([1e-9, 1e-3]) ylim([1e-9, 1e-3])
exportFig('G_x_mass', 'half-short') exportFig('G_x_mass', 'half-short', struct('path', 'identification'))

View File

@ -15,12 +15,5 @@ initializeSimConf(struct('cl_time', 0));
%% Close Loop %% Close Loop
[Gd_cl_20, Gd_cl_20_raw] = identifyGd(struct('cl', true)); [Gd_cl_20, Gd_cl_20_raw] = identifyGd(struct('cl', true));
%% %% Save the identified transfer functions
freqs = logspace(0, 3, 1000);
bodeFig({Gd_ol_20(1, 1), Gd_cl_20(1, 1)}, freqs, struct('ylabel', 'Amplitude [m/m]'))
legend({'OL', 'CL'});
exportFig('transmissibility_ol_cl', 'half-normal');
%%
save('./mat/Gd_ol_cl.mat', 'Gd_ol_20', 'Gd_cl_20'); save('./mat/Gd_ol_cl.mat', 'Gd_ol_20', 'Gd_cl_20');

View File

@ -0,0 +1,12 @@
%%
clear; close all; clc;
%% Load the identified transfer functions
load('./mat/Gd_ol_cl.mat', 'Gd_ol_20', 'Gd_cl_20');
%%
freqs = logspace(0, 3, 1000);
bodeFig({Gd_ol_20(1, 1), Gd_cl_20(1, 1)}, freqs, struct('ylabel', 'Amplitude [m/m]'))
legend({'OL', 'CL'});
exportFig('transmissibility_ol_cl', 'half-normal', struct('path', 'identification'));

37
identification/id_main.m Normal file
View File

@ -0,0 +1,37 @@
%%
clear; close all; clc;
%% Plant Identification
% Compute the transfer function of G for multiple masses
run id_G.m
% Plot de obtained transfer functions
run id_G_plots.m
%% Identification of transfer function from ground motion to displacement
% Compute the transfer function of Gd
run id_Gd.m
% Plot de obtained transfer functions
run id_Gd_plots.m
%% Identification of the micro-station
% Compute the transfer functions
run id_micro_station.m
% Plot de obtained transfer functions
run id_micro_station_plots.m
%% Identification of all the stages
% Compute the transfer functions of each stage from act. to sens.
run id_stages.m
% Plot de obtained transfer functions
run id_stages_plots.m
%% Identification of the nass
% Compute the transfer functions
run id_nass.m
% Plot de obtained transfer functions
run id_nass.m

View File

@ -27,12 +27,6 @@ G_h_h = preprocessIdTf(G_h_h_raw, 10, 10000);
G_h_h.InputName = {'Fux', 'Fuy', 'Fuz'}; G_h_h.InputName = {'Fux', 'Fuy', 'Fuz'};
G_h_h.OutputName = {'Dux', 'Duy', 'Duz'}; G_h_h.OutputName = {'Dux', 'Duy', 'Duz'};
% Bode Plot of the linearized function
bodeFig({G_h_h(1, 1), G_h_h(2, 2), G_h_h(3, 3)})
legend({'$F_{h_x} \rightarrow D_{h_x}$', '$F_{h_y} \rightarrow D_{h_y}$', '$F_{h_z} \rightarrow D_{h_z}$'})
legend('location', 'southwest')
exportFig('id_marc_h_to_h', 'normal-normal', struct('path', 'Identification'))
%% Granite %% Granite
% Input/Output definition % Input/Output definition
io(1) = linio([mdl, '/Micro-Station/F_granite'],1,'input'); io(1) = linio([mdl, '/Micro-Station/F_granite'],1,'input');
@ -46,12 +40,6 @@ G_g_g = preprocessIdTf(G_g_g_raw, 10, 10000);
G_g_g.InputName = {'Fgx', 'Fgy', 'Fgz'}; G_g_g.InputName = {'Fgx', 'Fgy', 'Fgz'};
G_g_g.OutputName = {'Dgx', 'Dgy', 'Dgz'}; G_g_g.OutputName = {'Dgx', 'Dgy', 'Dgz'};
% Bode Plot of the linearized function
bodeFig({G_g_g(1, 1), G_g_g(2, 2), G_g_g(3, 3)})
legend({'$F_{g_x} \rightarrow D_{g_x}$', '$F_{g_y} \rightarrow D_{g_y}$', '$F_{g_z} \rightarrow D_{g_z}$'})
legend('location', 'southwest')
exportFig('id_marc_g_to_g', 'normal-normal', struct('path', 'Identification'))
%% Micro Hexapod to Granite %% Micro Hexapod to Granite
% Input/Output definition % Input/Output definition
io(1) = linio([mdl, '/Micro-Station/Fm'],1,'input'); io(1) = linio([mdl, '/Micro-Station/Fm'],1,'input');
@ -66,13 +54,5 @@ G_h_g = preprocessIdTf(G_h_g_raw, 10, 10000);
G_h_g.InputName = {'Fhx', 'Fhy', 'Fhz'}; G_h_g.InputName = {'Fhx', 'Fhy', 'Fhz'};
G_h_g.OutputName = {'Dgx', 'Dgy', 'Dgz'}; G_h_g.OutputName = {'Dgx', 'Dgy', 'Dgz'};
% Bode Plot of the linearized function %% Save the obtained transfer functions
bodeFig({G_h_g(1, 1), G_h_g(2, 2), G_h_g(3, 3)}) save('./mat/id_micro_station.mat', 'G_h_h', 'G_g_g', 'G_h_g');
legend({'$F_{h_x} \rightarrow D_{g_x}$', '$F_{h_y} \rightarrow D_{g_y}$', '$F_{h_z} \rightarrow D_{g_z}$'})
legend('location', 'southwest')
exportFig('id_marc_h_to_g', 'normal-normal', struct('path', 'Identification'))
%%
save('./mat/id_G_h_h.mat', 'G_h_h');
save('./mat/id_G_g_g.mat', 'G_g_g');
save('./mat/id_G_h_g.mat', 'G_h_g');

View File

@ -0,0 +1,29 @@
%%
clear; close all; clc;
%% Load the obtained transfer functions
load('./mat/id_micro_station.mat', 'G_h_h', 'G_g_g', 'G_h_g');
%% Micro-Hexapod
bodeFig({G_h_h(1, 1), G_h_h(2, 2), G_h_h(3, 3)})
legend({'$F_{h_x} \rightarrow D_{h_x}$', '$F_{h_y} \rightarrow D_{h_y}$', '$F_{h_z} \rightarrow D_{h_z}$'})
legend('location', 'southwest')
exportFig('id_marc_h_to_h', 'normal-normal', struct('path', 'identification'))
%% Granite
% Bode Plot of the linearized function
bodeFig({G_g_g(1, 1), G_g_g(2, 2), G_g_g(3, 3)})
legend({'$F_{g_x} \rightarrow D_{g_x}$', '$F_{g_y} \rightarrow D_{g_y}$', '$F_{g_z} \rightarrow D_{g_z}$'})
legend('location', 'southwest')
exportFig('id_marc_g_to_g', 'normal-normal', struct('path', 'identification'))
%% Micro Hexapod to Granite
% Bode Plot of the linearized function
bodeFig({G_h_g(1, 1), G_h_g(2, 2), G_h_g(3, 3)})
legend({'$F_{h_x} \rightarrow D_{g_x}$', '$F_{h_y} \rightarrow D_{g_y}$', '$F_{h_z} \rightarrow D_{g_z}$'})
legend('location', 'southwest')
exportFig('id_marc_h_to_g', 'normal-normal', struct('path', 'identification'))

24
identification/id_nass.m Normal file
View File

@ -0,0 +1,24 @@
%% Script Description
% Identification of the NASS from cartesian actuation
% to cartesian displacement.
%%
clear; close all; clc;
%%
initializeSample(struct('mass', 1));
G_nass_1 = identifyNass();
%%
initializeSample(struct('mass', 20));
G_nass_20 = identifyNass();
%%
initializeSample(struct('mass', 50));
G_nass_50 = identifyNass();
%% Save Transfer Functions
save('./mat/G_nass.mat', 'G_nass_1', 'G_nass_20', 'G_nass_50');

View File

@ -1,24 +1,8 @@
%% Script Description
% Identification of the NASS from cartesian actuation
% to cartesian displacement.
%% %%
clear; close all; clc; clear; close all; clc;
%% %% Load Transfer Functions
initializeSample(struct('mass', 1)); load('./mat/G_nass.mat', 'G_nass_1', 'G_nass_20', 'G_nass_50');
G_nass_1 = identifyNass();
%%
initializeSample(struct('mass', 20));
G_nass_20 = identifyNass();
%%
initializeSample(struct('mass', 50));
G_nass_50 = identifyNass();
%% %%
freqs = logspace(1, 4, 1000); freqs = logspace(1, 4, 1000);
@ -28,28 +12,25 @@ legend({'$F_{n_x} \rightarrow D_{n_x}$ - $M = 1Kg$', ...
'$F_{n_y} \rightarrow D_{n_y}$ - $M = 1Kg$', ... '$F_{n_y} \rightarrow D_{n_y}$ - $M = 1Kg$', ...
'$F_{n_z} \rightarrow D_{n_z}$ - $M = 1Kg$'}) '$F_{n_z} \rightarrow D_{n_z}$ - $M = 1Kg$'})
legend('location', 'southwest') legend('location', 'southwest')
exportFig('nass_cart_xyz', 'normal-normal') exportFig('nass_cart_xyz', 'normal-normal', struct('path', 'identification'))
bodeFig({G_nass_1(1, 1), G_nass_20(1, 1), G_nass_50(1, 1)}, struct('phase', true)) bodeFig({G_nass_1(1, 1), G_nass_20(1, 1), G_nass_50(1, 1)}, struct('phase', true))
legend({'$F_{n_x} \rightarrow D_{n_x}$ - $M = 1Kg$', ... legend({'$F_{n_x} \rightarrow D_{n_x}$ - $M = 1Kg$', ...
'$F_{n_x} \rightarrow D_{n_x}$ - $M = 20Kg$', ... '$F_{n_x} \rightarrow D_{n_x}$ - $M = 20Kg$', ...
'$F_{n_x} \rightarrow D_{n_x}$ - $M = 50Kg$'}) '$F_{n_x} \rightarrow D_{n_x}$ - $M = 50Kg$'})
legend('location', 'southwest') legend('location', 'southwest')
exportFig('nass_cart_x_mass', 'normal-normal') exportFig('nass_cart_x_mass', 'normal-normal', struct('path', 'identification'))
bodeFig({G_nass_1(2, 2), G_nass_20(2, 2), G_nass_50(2, 2)}, struct('phase', true)) bodeFig({G_nass_1(2, 2), G_nass_20(2, 2), G_nass_50(2, 2)}, struct('phase', true))
legend({'$F_{n_x} \rightarrow D_{n_x}$ - $M = 1Kg$', ... legend({'$F_{n_x} \rightarrow D_{n_x}$ - $M = 1Kg$', ...
'$F_{n_x} \rightarrow D_{n_x}$ - $M = 20Kg$', ... '$F_{n_x} \rightarrow D_{n_x}$ - $M = 20Kg$', ...
'$F_{n_x} \rightarrow D_{n_x}$ - $M = 50Kg$'}) '$F_{n_x} \rightarrow D_{n_x}$ - $M = 50Kg$'})
legend('location', 'southwest') legend('location', 'southwest')
exportFig('nass_cart_y_mass', 'normal-normal') exportFig('nass_cart_y_mass', 'normal-normal', struct('path', 'identification'))
bodeFig({G_nass_1(3, 3), G_nass_20(3, 3), G_nass_50(3, 3)}, struct('phase', true)) bodeFig({G_nass_1(3, 3), G_nass_20(3, 3), G_nass_50(3, 3)}, struct('phase', true))
legend({'$F_{n_z} \rightarrow D_{n_z}$ - $M = 1Kg$', ... legend({'$F_{n_z} \rightarrow D_{n_z}$ - $M = 1Kg$', ...
'$F_{n_z} \rightarrow D_{n_z}$ - $M = 20Kg$', ... '$F_{n_z} \rightarrow D_{n_z}$ - $M = 20Kg$', ...
'$F_{n_z} \rightarrow D_{n_z}$ - $M = 50Kg$'}) '$F_{n_z} \rightarrow D_{n_z}$ - $M = 50Kg$'})
legend('location', 'southwest') legend('location', 'southwest')
exportFig('nass_cart_z_mass', 'normal-normal') exportFig('nass_cart_z_mass', 'normal-normal', struct('path', 'identification'))
%% Save Transfer Functions
save('./mat/G_nass.mat', 'G_nass_1', 'G_nass_20', 'G_nass_50');

View File

@ -6,45 +6,45 @@
clear; close all; clc clear; close all; clc
%% Load Data %% Load Data
load('./mat/identified_tf.mat'); load('./mat/identified_tf.mat', 'G_ty', 'G_ry', 'G_rz', 'G_hexa', 'G_nass');
%% Y-Translation Stage %% Y-Translation Stage
bodeFig({G_ty}, struct('phase', true)) bodeFig({G_ty}, struct('phase', true))
legend({'$F_{y} \rightarrow D_{y}$'}) legend({'$F_{y} \rightarrow D_{y}$'})
exportFig('id_ty', 'normal-normal') exportFig('id_ty', 'normal-normal', struct('path', 'identification'))
%% Tilt Stage %% Tilt Stage
bodeFig({G_ry}, struct('phase', true)) bodeFig({G_ry}, struct('phase', true))
legend({'$M_{y} \rightarrow R_{y}$'}) legend({'$M_{y} \rightarrow R_{y}$'})
exportFig('id_ry', 'normal-normal') exportFig('id_ry', 'normal-normal', struct('path', 'identification'))
%% Spindle %% Spindle
bodeFig({G_rz}, struct('phase', true)) bodeFig({G_rz}, struct('phase', true))
legend({'$M_{z} \rightarrow R_{z}$'}) legend({'$M_{z} \rightarrow R_{z}$'})
exportFig('id_ry', 'normal-normal') exportFig('id_ry', 'normal-normal', struct('path', 'identification'))
%% Hexapod Symetrie %% Hexapod Symetrie
bodeFig({G_hexa(1, 1), G_hexa(2, 2), G_hexa(3, 3)}, struct('phase', true)) bodeFig({G_hexa(1, 1), G_hexa(2, 2), G_hexa(3, 3)}, struct('phase', true))
legend({'$F_{h_x} \rightarrow D_{h_x}$', '$F_{h_y} \rightarrow D_{h_y}$', '$F_{h_z} \rightarrow D_{h_z}$'}) legend({'$F_{h_x} \rightarrow D_{h_x}$', '$F_{h_y} \rightarrow D_{h_y}$', '$F_{h_z} \rightarrow D_{h_z}$'})
exportFig('id_hexapod_trans', 'normal-normal') exportFig('id_hexapod_trans', 'normal-normal', struct('path', 'identification'))
bodeFig({G_hexa(4, 4), G_hexa(5, 5), G_hexa(6, 6)}, struct('phase', true)) bodeFig({G_hexa(4, 4), G_hexa(5, 5), G_hexa(6, 6)}, struct('phase', true))
legend({'$M_{h_x} \rightarrow R_{h_x}$', '$M_{h_y} \rightarrow R_{h_y}$', '$M_{h_z} \rightarrow R_{h_z}$'}) legend({'$M_{h_x} \rightarrow R_{h_x}$', '$M_{h_y} \rightarrow R_{h_y}$', '$M_{h_z} \rightarrow R_{h_z}$'})
exportFig('id_hexapod_rot', 'normal-normal') exportFig('id_hexapod_rot', 'normal-normal', struct('path', 'identification'))
bodeFig({G_hexa(1, 1), G_hexa(2, 1), G_hexa(3, 1)}, struct('phase', true)) bodeFig({G_hexa(1, 1), G_hexa(2, 1), G_hexa(3, 1)}, struct('phase', true))
legend({'$F_{h_x} \rightarrow D_{h_x}$', '$F_{h_x} \rightarrow D_{h_y}$', '$F_{h_x} \rightarrow D_{h_z}$'}) legend({'$F_{h_x} \rightarrow D_{h_x}$', '$F_{h_x} \rightarrow D_{h_y}$', '$F_{h_x} \rightarrow D_{h_z}$'})
exportFig('id_hexapod_coupling', 'normal-normal') exportFig('id_hexapod_coupling', 'normal-normal', struct('path', 'identification'))
%% NASS %% NASS
bodeFig({G_nass(1, 1), G_nass(2, 2), G_nass(3, 3)}, struct('phase', true)) bodeFig({G_nass(1, 1), G_nass(2, 2), G_nass(3, 3)}, struct('phase', true))
legend({'$F_{n_x} \rightarrow D_{n_x}$', '$F_{n_y} \rightarrow D_{n_y}$', '$F_{n_z} \rightarrow D_{n_z}$'}) legend({'$F_{n_x} \rightarrow D_{n_x}$', '$F_{n_y} \rightarrow D_{n_y}$', '$F_{n_z} \rightarrow D_{n_z}$'})
exportFig('id_nass_trans', 'normal-normal') exportFig('id_nass_trans', 'normal-normal', struct('path', 'identification'))
bodeFig({G_nass(4, 4), G_nass(5, 5), G_nass(6, 6)}, struct('phase', true)) bodeFig({G_nass(4, 4), G_nass(5, 5), G_nass(6, 6)}, struct('phase', true))
legend({'$M_{n_x} \rightarrow R_{n_x}$', '$M_{n_y} \rightarrow R_{n_y}$', '$M_{n_z} \rightarrow R_{n_z}$'}) legend({'$M_{n_x} \rightarrow R_{n_x}$', '$M_{n_y} \rightarrow R_{n_y}$', '$M_{n_z} \rightarrow R_{n_z}$'})
exportFig('id_nass_rot', 'normal-normal') exportFig('id_nass_rot', 'normal-normal', struct('path', 'identification'))
bodeFig({G_nass(1, 1), G_nass(2, 1), G_nass(3, 1)}, struct('phase', true)) bodeFig({G_nass(1, 1), G_nass(2, 1), G_nass(3, 1)}, struct('phase', true))
legend({'$F_{n_x} \rightarrow D_{n_x}$', '$F_{n_x} \rightarrow D_{n_y}$', '$F_{n_x} \rightarrow D_{n_z}$'}) legend({'$F_{n_x} \rightarrow D_{n_x}$', '$F_{n_x} \rightarrow D_{n_y}$', '$F_{n_x} \rightarrow D_{n_z}$'})
exportFig('id_nass_coupling', 'normal-normal') exportFig('id_nass_coupling', 'normal-normal', struct('path', 'identification'))

View File

@ -10,3 +10,8 @@ Wxg = Wxg*(s/(0.5e6)^(1/3) + 2*pi*10)^3/(s + 2*pi*10)^3;
Wxg = Wxg/(1+s/(2*pi*2000)); Wxg = Wxg/(1+s/(2*pi*2000));
save('./mat/weight_Wxg.mat', 'Wxg'); save('./mat/weight_Wxg.mat', 'Wxg');
%% Sensor Noise
Wn = tf(1e-12);
save('./mat/weight_Wn.mat', 'Wn');

3
main.m
View File

@ -16,3 +16,6 @@ run run_simulations.m
%% Demonstration of displacement of all the stages %% Demonstration of displacement of all the stages
run init_data_demonstration.m run init_data_demonstration.m
%% Identification
open id_main.m