Huge Change
- Add may folders - Add IFF and HAC-LAC scripts
This commit is contained in:
115
identification/id_G_cart_plots.m
Normal file
115
identification/id_G_cart_plots.m
Normal file
@@ -0,0 +1,115 @@
|
||||
%%
|
||||
clear; close all; clc;
|
||||
|
||||
%% Load the transfer functions
|
||||
save('./mat/G.mat', 'G_light_vc', 'G_light_pz', 'G_heavy_vc', 'G_heavy_pz');
|
||||
|
||||
%% Load Configuration file
|
||||
load('./mat/config.mat', 'save_fig', 'freqs');
|
||||
|
||||
%% Plant
|
||||
figure;
|
||||
% Amplitude
|
||||
ax1 = subaxis(2,1,1);
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_cart('Dx', 'Fnx'), freqs, 'Hz'))));
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_cart('Dx', 'Fnx'), freqs, 'Hz'))));
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_vc.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), '--');
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_pz.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), '--');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
set(gca, 'XTickLabel',[]);
|
||||
ylabel('Amplitude [m/N]');
|
||||
hold off;
|
||||
|
||||
% Phase
|
||||
ax2 = subaxis(2,1,2);
|
||||
hold on;
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_light_vc.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_light_pz.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');
|
||||
set(gca,'ColorOrderIndex',1)
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_heavy_vc.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), '--', 'DisplayName', 'VC - Heavy');
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_heavy_pz.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), '--', 'DisplayName', 'PZ - Heavy');
|
||||
set(gca,'xscale','log');
|
||||
yticks(-1800:90:1800);
|
||||
ylim([-180 180]);
|
||||
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||
legend('Location', 'southwest');
|
||||
hold off;
|
||||
|
||||
linkaxes([ax1,ax2],'x');
|
||||
|
||||
if save_fig; exportFig('comp_models_plant_x_x', 'normal-normal', struct('path', 'identification')); end
|
||||
|
||||
%%
|
||||
figure;
|
||||
% Amplitude
|
||||
ax1 = subaxis(2,1,1);
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_cart('Dz', 'Fnz'), freqs, 'Hz'))));
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_cart('Dz', 'Fnz'), freqs, 'Hz'))));
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_vc.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), '--');
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_pz.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), '--');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
set(gca, 'XTickLabel',[]);
|
||||
ylabel('Amplitude [m/N]');
|
||||
hold off;
|
||||
|
||||
% Phase
|
||||
ax2 = subaxis(2,1,2);
|
||||
hold on;
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_light_vc.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_light_pz.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');
|
||||
set(gca,'ColorOrderIndex',1)
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_heavy_vc.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), '--', 'DisplayName', 'VC - Heavy');
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_heavy_pz.G_cart('Dz', 'Fnz'), freqs, 'Hz'))), '--', 'DisplayName', 'PZ - Heavy');
|
||||
set(gca,'xscale','log');
|
||||
yticks(-1800:90:1800);
|
||||
ylim([-180 180]);
|
||||
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||
legend('Location', 'southwest');
|
||||
hold off;
|
||||
|
||||
linkaxes([ax1,ax2],'x');
|
||||
|
||||
if save_fig; exportFig('comp_models_plant_z_z', 'normal-normal', struct('path', 'identification')); end
|
||||
|
||||
%% Plot all the coupling
|
||||
figure;
|
||||
|
||||
for i_input = 1:3
|
||||
for i_output = 1:3
|
||||
subaxis(3,3,3*(i_input-1)+i_output);
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_cart(i_output, i_input), freqs, 'Hz'))));
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_cart(i_output, i_input), freqs, 'Hz'))));
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
xlim([freqs(1) freqs(end)]); ylim([1e-12, 1e-2]);
|
||||
yticks([1e-12, 1e-8, 1e-4]); xticks([0.1 1 10 100 1000]);
|
||||
if i_output > 1; set(gca,'yticklabel',[]); end
|
||||
if i_input < 3; set(gca,'xticklabel',[]); end
|
||||
hold off;
|
||||
end
|
||||
end
|
||||
|
||||
if save_fig; exportFig('comp_models_plant_coupling_all', 'full-tall', struct('path', 'identification')); end
|
||||
|
||||
%% Plot some coupling
|
||||
figure;
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'DisplayName', 'VC - Light - $Fx \to Dx$');
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_cart('Dx', 'Fnx'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light - $Fx \to Dx$');
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_cart('Dy', 'Fnx'), freqs, 'Hz'))), '--', 'DisplayName', 'VC - Heavy - $Fx \to Dy$');
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_cart('Dy', 'Fnx'), freqs, 'Hz'))), '--', 'DisplayName', 'PZ - Heavy - $Fx \to Dy$');
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_cart('Dz', 'Fnx'), freqs, 'Hz'))), '-.', 'DisplayName', 'VC - Heavy - $Fx \to Dz$');
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_cart('Dz', 'Fnx'), freqs, 'Hz'))), '-.', 'DisplayName', 'PZ - Heavy - $Fx \to Dz$');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('Amplitude [m/m]');
|
||||
legend('Location', 'southwest');
|
||||
xticks('manual'); xlim([freqs(1) freqs(end)]);
|
||||
hold off;
|
||||
|
||||
if save_fig; exportFig('comp_models_plant_coupling', 'normal-normal', struct('path', 'identification')); end
|
77
identification/id_G_d_plots.m
Normal file
77
identification/id_G_d_plots.m
Normal file
@@ -0,0 +1,77 @@
|
||||
%%
|
||||
clear; close all; clc;
|
||||
|
||||
%% Load the identified transfer functions
|
||||
save('./mat/G.mat', 'G_light_vc', 'G_light_pz', 'G_heavy_vc', 'G_heavy_pz');
|
||||
|
||||
%% Load Configuration file
|
||||
load('./mat/config.mat', 'save_fig', 'freqs');
|
||||
|
||||
%% Transfer function from ground displacement to measured displacement
|
||||
figure;
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_dg('Dz', 'Dgz'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_dg('Dz', 'Dgz'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_vc.G_dg('Dz', 'Dgz'), freqs, 'Hz'))), '--', 'DisplayName', 'VC - Heavy');
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_pz.G_dg('Dz', 'Dgz'), freqs, 'Hz'))), '--', 'DisplayName', 'PZ - Heavy');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [m/m]');
|
||||
hold off;
|
||||
legend('Location', 'southwest');
|
||||
|
||||
if save_fig; exportFig('comp_models_xw_to_d', 'normal-normal', struct('path', 'identification')); end
|
||||
|
||||
%%
|
||||
figure;
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_dg('Dx', 'Dgx'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_dg('Dx', 'Dgx'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_vc.G_dg('Dx', 'Dgx'), freqs, 'Hz'))), '--', 'DisplayName', 'VC - Heavy');
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_pz.G_dg('Dx', 'Dgx'), freqs, 'Hz'))), '--', 'DisplayName', 'PZ - Heavy');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [m/m]');
|
||||
hold off;
|
||||
legend('Location', 'southwest');
|
||||
|
||||
%% Transfer function from direct force to measured displacement
|
||||
figure;
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_vc.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), '--', 'DisplayName', 'VC - Heavy');
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_pz.G_fs('Dz', 'Fsz'), freqs, 'Hz'))), '--', 'DisplayName', 'PZ - Heavy');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [m/N]');
|
||||
hold off;
|
||||
legend('Location', 'southwest');
|
||||
|
||||
if save_fig; exportFig('comp_models_fi_to_d', 'normal-normal', struct('path', 'identification')); end
|
||||
|
||||
%%
|
||||
figure;
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_fs('Ry', 'Fsx'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_fs('Ry', 'Fsx'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_vc.G_fs('Ry', 'Fsx'), freqs, 'Hz'))), '--', 'DisplayName', 'VC - Heavy');
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_pz.G_fs('Ry', 'Fsx'), freqs, 'Hz'))), '--', 'DisplayName', 'PZ - Heavy');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [m/N]');
|
||||
hold off;
|
||||
legend('Location', 'southwest');
|
||||
|
||||
%%
|
||||
figure;
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_fs('Rz', 'Fsx'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_fs('Rz', 'Fsx'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_vc.G_fs('Rz', 'Fsx'), freqs, 'Hz'))), '--', 'DisplayName', 'VC - Heavy');
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_pz.G_fs('Rz', 'Fsx'), freqs, 'Hz'))), '--', 'DisplayName', 'PZ - Heavy');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [m/N]');
|
||||
hold off;
|
||||
legend('Location', 'southwest');
|
57
identification/id_G_iff_plots.m
Normal file
57
identification/id_G_iff_plots.m
Normal file
@@ -0,0 +1,57 @@
|
||||
%%
|
||||
clear; close all; clc;
|
||||
|
||||
%% Load the identified transfer functions
|
||||
load('./mat/G.mat', 'G_light_vc', 'G_light_pz', 'G_heavy_vc', 'G_heavy_pz');
|
||||
|
||||
%% Load Configuration file
|
||||
load('./mat/config.mat', 'save_fig', 'freqs');
|
||||
|
||||
%%
|
||||
figure;
|
||||
% Amplitude
|
||||
ax1 = subaxis(2,1,1);
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_iff('Fm1', 'F1'), freqs, 'Hz'))));
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_pz.G_iff('Fm1', 'F1'), freqs, 'Hz'))));
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_vc.G_iff('Fm1', 'F1'), freqs, 'Hz'))), '--');
|
||||
plot(freqs, abs(squeeze(freqresp(G_heavy_pz.G_iff('Fm1', 'F1'), freqs, 'Hz'))), '--');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
set(gca, 'XTickLabel',[]);
|
||||
ylabel('Amplitude [m/N]');
|
||||
hold off;
|
||||
|
||||
% Phase
|
||||
ax2 = subaxis(2,1,2);
|
||||
hold on;
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_light_vc.G_iff('Fm1', 'F1'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_light_pz.G_iff('Fm1', 'F1'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');
|
||||
set(gca,'ColorOrderIndex',1)
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_heavy_vc.G_iff('Fm1', 'F1'), freqs, 'Hz'))), '--', 'DisplayName', 'VC - Heavy');
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_heavy_pz.G_iff('Fm1', 'F1'), freqs, 'Hz'))), '--', 'DisplayName', 'PZ - Heavy');
|
||||
set(gca,'xscale','log');
|
||||
yticks(-180:90:180);
|
||||
ylim([-180 180]);
|
||||
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||
legend('Location', 'southwest');
|
||||
hold off;
|
||||
|
||||
linkaxes([ax1,ax2],'x');
|
||||
|
||||
if save_fig; exportFig('G_iff', 'normal-normal', struct('path', 'identification')); end
|
||||
|
||||
%% Coupling
|
||||
figure;
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_iff('Fm1', 'F1'), freqs, 'Hz'))), 'k-');
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_iff('Fm2', 'F1'), freqs, 'Hz'))), 'k--');
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_iff('Fm3', 'F1'), freqs, 'Hz'))), 'k--');
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_iff('Fm4', 'F1'), freqs, 'Hz'))), 'k--');
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_iff('Fm5', 'F1'), freqs, 'Hz'))), 'k--');
|
||||
plot(freqs, abs(squeeze(freqresp(G_light_vc.G_iff('Fm6', 'F1'), freqs, 'Hz'))), 'k--');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [m/N]'); xlabel('Frequency [Hz]');
|
||||
hold off;
|
||||
|
||||
if save_fig; exportFig('G_iff_coupling', 'normal-normal', struct('path', 'identification')); end
|
@@ -1,115 +0,0 @@
|
||||
%%
|
||||
clear; close all; clc;
|
||||
|
||||
%% Load the transfer functions
|
||||
load('./mat/G_f_to_d.mat', 'G_1_vc', 'G_1_pz', 'G_50_vc', 'G_50_pz');
|
||||
|
||||
%% Load Configuration file
|
||||
load('./mat/config.mat', 'save_fig', 'freqs');
|
||||
|
||||
%%
|
||||
figure;
|
||||
% Amplitude
|
||||
ax1 = subaxis(2,1,1);
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_1_vc('Dx', 'Fnx'), freqs, 'Hz'))));
|
||||
plot(freqs, abs(squeeze(freqresp(G_1_pz('Dx', 'Fnx'), freqs, 'Hz'))));
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_50_vc('Dx', 'Fnx'), freqs, 'Hz'))), '--');
|
||||
plot(freqs, abs(squeeze(freqresp(G_50_pz('Dx', 'Fnx'), freqs, 'Hz'))), '--');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
set(gca, 'XTickLabel',[]);
|
||||
ylabel('Amplitude [m/N]');
|
||||
hold off;
|
||||
|
||||
% Phase
|
||||
ax2 = subaxis(2,1,2);
|
||||
hold on;
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_1_vc('Dx', 'Fnx'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_1_pz('Dx', 'Fnx'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');
|
||||
set(gca,'ColorOrderIndex',1)
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_50_vc('Dx', 'Fnx'), freqs, 'Hz'))), '--', 'DisplayName', 'VC - Heavy');
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_50_pz('Dx', 'Fnx'), freqs, 'Hz'))), '--', 'DisplayName', 'PZ - Heavy');
|
||||
set(gca,'xscale','log');
|
||||
yticks(-1800:90:1800);
|
||||
ylim([-180 180]);
|
||||
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||
legend('Location', 'southwest');
|
||||
hold off;
|
||||
|
||||
linkaxes([ax1,ax2],'x');
|
||||
|
||||
if save_fig; exportFig('comp_models_plant_x_x', 'normal-normal', struct('path', 'identification')); end
|
||||
|
||||
%%
|
||||
figure;
|
||||
% Amplitude
|
||||
ax1 = subaxis(2,1,1);
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_1_vc('Dz', 'Fnz'), freqs, 'Hz'))));
|
||||
plot(freqs, abs(squeeze(freqresp(G_1_pz('Dz', 'Fnz'), freqs, 'Hz'))));
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_50_vc('Dz', 'Fnz'), freqs, 'Hz'))), '--');
|
||||
plot(freqs, abs(squeeze(freqresp(G_50_pz('Dz', 'Fnz'), freqs, 'Hz'))), '--');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
set(gca, 'XTickLabel',[]);
|
||||
ylabel('Amplitude [m/N]');
|
||||
hold off;
|
||||
|
||||
% Phase
|
||||
ax2 = subaxis(2,1,2);
|
||||
hold on;
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_1_vc('Dz', 'Fnz'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_1_pz('Dz', 'Fnz'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');
|
||||
set(gca,'ColorOrderIndex',1)
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_50_vc('Dz', 'Fnz'), freqs, 'Hz'))), '--', 'DisplayName', 'VC - Heavy');
|
||||
plot(freqs, 180/pi*angle(squeeze(freqresp(G_50_pz('Dz', 'Fnz'), freqs, 'Hz'))), '--', 'DisplayName', 'PZ - Heavy');
|
||||
set(gca,'xscale','log');
|
||||
yticks(-1800:90:1800);
|
||||
ylim([-180 180]);
|
||||
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||
legend('Location', 'southwest');
|
||||
hold off;
|
||||
|
||||
linkaxes([ax1,ax2],'x');
|
||||
|
||||
if save_fig; exportFig('comp_models_plant_z_z', 'normal-normal', struct('path', 'identification')); end
|
||||
|
||||
%% Plot all the coupling
|
||||
figure;
|
||||
|
||||
for i_input = 1:3
|
||||
for i_output = 1:3
|
||||
subaxis(3,3,3*(i_input-1)+i_output);
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_1_vc(i_output, i_input), freqs, 'Hz'))));
|
||||
plot(freqs, abs(squeeze(freqresp(G_1_pz(i_output, i_input), freqs, 'Hz'))));
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
xlim([freqs(1) freqs(end)]); ylim([1e-12, 1e-2]);
|
||||
yticks([1e-12, 1e-8, 1e-4]); xticks([0.1 1 10 100 1000]);
|
||||
if i_output > 1; set(gca,'yticklabel',[]); end
|
||||
if i_input < 3; set(gca,'xticklabel',[]); end
|
||||
hold off;
|
||||
end
|
||||
end
|
||||
|
||||
if save_fig; exportFig('comp_models_plant_coupling_all', 'full-tall', struct('path', 'identification')); end
|
||||
|
||||
%% Plot some coupling
|
||||
figure;
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(G_1_vc('Dx', 'Fnx'), freqs, 'Hz'))), 'DisplayName', 'VC - Light - $Fx \to Dx$');
|
||||
plot(freqs, abs(squeeze(freqresp(G_1_pz('Dx', 'Fnx'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light - $Fx \to Dx$');
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_1_vc('Dy', 'Fnx'), freqs, 'Hz'))), '--', 'DisplayName', 'VC - Heavy - $Fx \to Dy$');
|
||||
plot(freqs, abs(squeeze(freqresp(G_1_pz('Dy', 'Fnx'), freqs, 'Hz'))), '--', 'DisplayName', 'PZ - Heavy - $Fx \to Dy$');
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(G_1_vc('Dz', 'Fnx'), freqs, 'Hz'))), '-.', 'DisplayName', 'VC - Heavy - $Fx \to Dz$');
|
||||
plot(freqs, abs(squeeze(freqresp(G_1_pz('Dz', 'Fnx'), freqs, 'Hz'))), '-.', 'DisplayName', 'PZ - Heavy - $Fx \to Dz$');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
xlabel('Frequency [Hz]'); ylabel('Amplitude [m/m]');
|
||||
legend('Location', 'southwest');
|
||||
xticks('manual'); xlim([freqs(1) freqs(end)]);
|
||||
hold off;
|
||||
|
||||
if save_fig; exportFig('comp_models_plant_coupling', 'normal-normal', struct('path', 'identification')); end
|
@@ -1,28 +0,0 @@
|
||||
%% Script Description
|
||||
% Identification of the transfer function
|
||||
% from Ground Motion to measured displacement
|
||||
|
||||
%%
|
||||
clear; close all; clc;
|
||||
|
||||
%% Open Loop - Light Sample
|
||||
initializeSample(struct('mass', 1));
|
||||
|
||||
initializeNanoHexapod(struct('actuator', 'lorentz'));
|
||||
Gd_ol_1_vc = identifyGd(struct('cl', false));
|
||||
|
||||
initializeNanoHexapod(struct('actuator', 'piezo'));
|
||||
Gd_ol_1_pz = identifyGd(struct('cl', false));
|
||||
|
||||
%% Open Loop - Heavy Sample
|
||||
initializeSample(struct('mass', 50));
|
||||
|
||||
initializeNanoHexapod(struct('actuator', 'lorentz'));
|
||||
Gd_ol_50_vc = identifyGd(struct('cl', false));
|
||||
|
||||
initializeNanoHexapod(struct('actuator', 'piezo'));
|
||||
Gd_ol_50_pz = identifyGd(struct('cl', false));
|
||||
|
||||
%% Save the identified transfer functions
|
||||
save('./mat/G_xw_to_d.mat', ...
|
||||
'Gd_ol_1_vc', 'Gd_ol_1_pz', 'Gd_ol_50_vc', 'Gd_ol_50_pz');
|
@@ -1,39 +0,0 @@
|
||||
%%
|
||||
clear; close all; clc;
|
||||
|
||||
%% Load the identified transfer functions
|
||||
load('./mat/G_xw_to_d.mat', ...
|
||||
'Gd_ol_1_vc', 'Gd_ol_1_pz', 'Gd_ol_50_vc', 'Gd_ol_50_pz');
|
||||
|
||||
%% Load Configuration file
|
||||
load('./mat/config.mat', 'save_fig', 'freqs');
|
||||
|
||||
%% Transfer function from ground displacement to measured displacement
|
||||
figure;
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(Gd_ol_1_vc('Dz', 'Dgz'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
|
||||
plot(freqs, abs(squeeze(freqresp(Gd_ol_1_pz('Dz', 'Dgz'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(Gd_ol_50_vc('Dz', 'Dgz'), freqs, 'Hz'))), '--', 'DisplayName', 'VC - Heavy');
|
||||
plot(freqs, abs(squeeze(freqresp(Gd_ol_50_pz('Dz', 'Dgz'), freqs, 'Hz'))), '--', 'DisplayName', 'PZ - Heavy');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [m/m]');
|
||||
hold off;
|
||||
legend('Location', 'southwest');
|
||||
|
||||
if save_fig; exportFig('comp_models_xw_to_d', 'normal-normal', struct('path', 'identification')); end
|
||||
|
||||
%% Transfer function from direct force to measured displacement
|
||||
figure;
|
||||
hold on;
|
||||
plot(freqs, abs(squeeze(freqresp(Gd_ol_1_vc('Dz', 'Fsz'), freqs, 'Hz'))), 'DisplayName', 'VC - Light');
|
||||
plot(freqs, abs(squeeze(freqresp(Gd_ol_1_pz('Dz', 'Fsz'), freqs, 'Hz'))), 'DisplayName', 'PZ - Light');
|
||||
set(gca,'ColorOrderIndex',1);
|
||||
plot(freqs, abs(squeeze(freqresp(Gd_ol_50_vc('Dz', 'Fsz'), freqs, 'Hz'))), '--', 'DisplayName', 'VC - Heavy');
|
||||
plot(freqs, abs(squeeze(freqresp(Gd_ol_50_pz('Dz', 'Fsz'), freqs, 'Hz'))), '--', 'DisplayName', 'PZ - Heavy');
|
||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||
ylabel('Amplitude [m/N]');
|
||||
hold off;
|
||||
legend('Location', 'southwest');
|
||||
|
||||
if save_fig; exportFig('comp_models_fi_to_d', 'normal-normal', struct('path', 'identification')); end
|
@@ -1,20 +1,6 @@
|
||||
%%
|
||||
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 disturbances 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
|
||||
@@ -25,6 +11,19 @@ run id_micro_station_plots.m
|
||||
% Compare the measurements of Marc with the model
|
||||
run id_micro_station_comp_meas.m
|
||||
|
||||
%% Identification of the nano-station
|
||||
% Run the identification
|
||||
run id_nano_station.m
|
||||
|
||||
% Plot the plant for feedback control
|
||||
run id_G_cart_plots.m
|
||||
|
||||
% Plot the transfer function from disturbances to displacement
|
||||
run id_G_d_plots.m
|
||||
|
||||
% Plot the transfer function for IFF control
|
||||
run id_G_iff_plots.m
|
||||
|
||||
%% Identification of all the stages
|
||||
% Compute the transfer functions of each stage from act. to sens.
|
||||
run id_stages.m
|
||||
|
@@ -1,28 +1,27 @@
|
||||
%% Script Description
|
||||
% Identification of a force injected into the NASS (in cartesian
|
||||
% coordinates) to the relative displacement of the sample
|
||||
% and granite.
|
||||
|
||||
%%
|
||||
clear; close all; clc;
|
||||
|
||||
%%
|
||||
initializeNanoHexapod(struct('actuator', 'lorentz'));
|
||||
K_iff = tf(zeros(6));
|
||||
save('./mat/K_iff.mat', 'K_iff');
|
||||
|
||||
%% Light Sample
|
||||
initializeSample(struct('mass', 1));
|
||||
|
||||
G_1_vc = identifyG();
|
||||
initializeNanoHexapod(struct('actuator', 'lorentz'));
|
||||
G_light_vc = identifyPlant();
|
||||
|
||||
initializeNanoHexapod(struct('actuator', 'piezo'));
|
||||
G_1_pz = identifyG();
|
||||
G_light_pz = identifyPlant();
|
||||
|
||||
%%
|
||||
initializeNanoHexapod(struct('actuator', 'lorentz'));
|
||||
%% Heavy Sample
|
||||
initializeSample(struct('mass', 50));
|
||||
|
||||
G_50_vc = identifyG();
|
||||
initializeNanoHexapod(struct('actuator', 'lorentz'));
|
||||
G_heavy_vc = identifyPlant();
|
||||
|
||||
initializeNanoHexapod(struct('actuator', 'piezo'));
|
||||
G_50_pz = identifyG();
|
||||
G_heavy_pz = identifyPlant();
|
||||
|
||||
%% Save the obtained transfer functions
|
||||
save('./mat/G_f_to_d.mat', 'G_1_vc', 'G_1_pz', 'G_50_vc', 'G_50_pz');
|
||||
save('./mat/G.mat', 'G_light_vc', 'G_light_pz', 'G_heavy_vc', 'G_heavy_pz');
|
Binary file not shown.
Reference in New Issue
Block a user