nass-micro-station-measurem.../2018-01-12 - Marc/scripts/id31_microstation_12january2018.m

381 lines
11 KiB
Mathematica
Raw Permalink Normal View History

2019-03-14 16:40:28 +01:00
% Title: id31 microstation
% Date: 12 january 2018
2019-03-14 16:40:28 +01:00
% Description: measure on id31 microstation in room id31-13
2019-03-14 16:40:28 +01:00
% FS: =512Hz
%% measurements 12 janaury 2018
microstation=['Marble '; 'Tilt '; 'Hexapod '];
2019-03-14 16:40:28 +01:00
% ch1: hammer
% ch2: geophone L32 X on marble X,Y or Z
% ch3: geophone L32 on tilt stage X,Y or Z
% ch4: geophone L32 on hexapode X,Y or Z
leg1=['TY ON - RZ OFF - RY OFF - Slip ring OFF - Hexapod OFF'];
% Meas1 - excitation X direction on marble
% Meas2 - excitation X direction on hexa
% Meas3 - excitation Y direction on marble
% Meas4 - excitation Y direction on hexa
% Meas5 - excitation Z direction on marble
% Meas6 - excitation Z direction on hexa
% xxx_marble_x - excitation X direction on marble
% xxx_marble_y - excitation Y direction on marble
% xxx_marble_z - excitation Z direction on marble
% xxx_hexa_x - excitation X direction on hexa
% xxx_hexa_y - excitation Y direction on hexa
% xxx_hexa_z - excitation Z direction on hexa
% frf= transfert function acceleration/force en ms-2/N (complex)
% phs= phase
% coh= coherence
% freq_frf= frequencies
%% -------------------------------------------------------------------------
% LOAD SAVED FRF
% ------------------------------------------------------------------------
% ch_max=16;
% % --------------------------------
%
2019-03-14 16:40:28 +01:00
% mult=1e6; % --> m/s to micron/s
%
% nyqhp=2.56; % nyquist
2019-03-14 16:40:28 +01:00
% f_cut=0.5; % cut frequency for high pass filter
% t_win=4; % window length in sec
% t_ovlp=0; % overlap window in sec
warning off MATLAB:divideByZero
% specify capt # for which to run this
capt=[1:6];
for i=capt
2019-03-14 16:40:28 +01:00
eval(['load Measurement',num2str(i)])
for ch=2:4
eval(['freq_frf(:,',num2str(1),')=FFT1_H1_',num2str(2),'_1_RMS_X_Val;'])
%omeg=2*pi*freq;
2019-03-14 16:40:28 +01:00
eval(['av_spc(:,',num2str(ch),')=FFT1_AvSpc_',num2str(ch),'_RMS_Y_Val;'])
eval(['frf_mod(:,',num2str(ch),')=FFT1_H1_',num2str(ch),'_1_RMS_Y_Mod;'])
eval(['frf_phs(:,',num2str(ch),')=FFT1_H1_',num2str(ch),'_1_RMS_Y_Phas;'])
eval(['frf_reim(:,',num2str(ch),')=FFT1_H1_',num2str(ch),'_1_Y_ReIm;'])
eval(['frf_coh(:,',num2str(ch),')=FFT1_Coh_',num2str(ch),'_1_RMS_Y_Val;'])
end
eval(['mod',num2str(i),'=frf_mod;'])
eval(['phs',num2str(i),'=frf_phs;'])
eval(['ReIm',num2str(i),'=frf_reim;'])
eval(['coh',num2str(i),'=frf_coh;'])
end
%%
%%--------plot settings for colors and linewidth----
proname(1)={'LineWidth'};
proname(2)={'Color'};
proname(3)={'LineStyle'};
val(1,1) = {.5} ;val(1,2) = {[0.6 0.2 1]} ;val(1,3) = {'-'};
val(2,1) = {2} ;val(2,2) = {[0 0 1]} ;val(2,3) = {'-'};
val(3,1) = {0.5} ;val(3,2) = {[0.25 0.9 0.65]} ;val(3,3) = {'-'};
val(4,1) = {2} ;val(4,2) = {[0 1 0]} ;val(4,3) = {'-'};
val(5,1) = {0.5} ;val(5,2) = {[1 0.4 0.4]} ;val(5,3) = {'-'};
val(6,1) = {2} ;val(6,2) = {[1 0 0]} ;val(6,3) = {'-'};
val(7,1) = {1} ;val(7,2) = {[0.8 0.8 0.8]} ;val(7,3) = {'-'};
val(8,1) = {2} ;val(8,2) = {[0.1 0.1 0.2]} ;val(8,3) = {'-'};
val(9,1) = {1} ;val(9,2) = {[0.7 0.8 0.4]} ;val(9,3) = {'-'};
val(10,1) = {2} ;val(10,2) = {[0.7 0.8 0.2]} ;val(10,3) = {'-'};
val(11,1) = {1} ;val(11,2) = {[0.9 0.7 0.35]} ;val(11,3) = {'-'};
val(12,1) = {2} ;val(12,2) = {[1 0.8 0.3]} ;val(12,3) = {'-'};
val(13,1) = {1} ;val(13,2) = {[0.5 0.4 0.3]} ;val(13,3) = {'-'};
val(14,1) = {2} ;val(14,2) = {[0.5 0.3 0.2]} ;val(14,3) = {'-'};
%
2019-03-14 16:40:28 +01:00
% %--------------------------------Plots
xlab=['Frequency in Hz'];
xlab1=['Hours since start: 06/07/2012 at 19:40'];
ylab1=['Velocity / Force in m.s^{-1}.N^{-1}.'];
ylab2=['PSD in \mum^{2}/Hz'];
ylab3=['Amplification'];
ylab4=['PSD in (\mum/s)^{2}/Hz'];
ylab5=['PSD in a.u.'];
ylab6=['Phase in deg.'];
ylab7=['Coherence'];
font_s=14;
% ---------------------------------
tit_3=['ID31 microstation - Vertical (Z) FRF'];
tit_1=['ID31 microstation - Horizontal (X) FRF'];
tit_2=['ID31 microstation - Horizontal (Y) FRF'];
tit_4=['ID31 microstation - Horizontal (X) Phase'];
tit_5=['ID31 microstation - Horizontal (Y) Phase'];
tit_6=['ID31 microstation - Vertical (Z) Phase'];
tit_7=['ID31 microstation - Horizontal (X) Coh'];
tit_8=['ID31 microstation - Horizontal (Y) Coh'];
tit_9=['ID31 microstation - Vertical (Z) Coh'];
legend1=['microstation(1,:),microstation(2,:),microstation(3,:),''Location'',''SouthEast'''];
%legend7=['TY controlled - RZ ON - RY OFF - Slip ring ON - Hexapod OFF',
%% X direction
figure
h=semilogy(freq_frf,abs([ReIm1(:,2) ReIm1(:,3) ReIm1(:,4)]));
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_1,xlab,ylab1,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'frf_x_hammer_marble','fig')
print -dpng frf_x_hammer_marble
figure
h=semilogy(freq_frf,abs([ReIm2(:,2) ReIm2(:,3) ReIm2(:,4)]));
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_1,xlab,ylab1,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'frf_x_hammer_hexa','fig')
print -dpng frf_x_hammer_hexa
%%
figure
h=plot(freq_frf,[(phs1(:,2)) (phs1(:,3)) (phs1(:,4))]);
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_4,xlab,ylab6,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'phase_x_hammer_marble','fig')
print -dpng phase_x_hammer_marble
figure
h=plot(freq_frf,[(phs2(:,2)) (phs2(:,3)) (phs2(:,4))]);
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_4,xlab,ylab6,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'phase_x_hammer_hexa','fig')
print -dpng phase_x_hammer_hexa
figure
h=plot(freq_frf,[(coh1(:,2)) (coh1(:,3)) (coh1(:,4))]);
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_7,xlab,ylab7,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'coh_x_hammer_marble','fig')
print -dpng coh_x_hammer_marble
figure
h=plot(freq_frf,[(coh2(:,2)) (coh4(:,3)) (coh4(:,4))]);
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_7,xlab,ylab7,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'coh_x_hammer_hexa','fig')
print -dpng coh_x_hammer_hexa
%% Y direction
figure
h=semilogy(freq_frf,abs([ReIm3(:,2) ReIm3(:,3) ReIm3(:,4)]));
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_2,xlab,ylab1,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'frf_y_hammer_marble','fig')
print -dpng frf_y_hammer_marble
figure
h=semilogy(freq_frf,abs([ReIm4(:,2) ReIm4(:,3) ReIm4(:,4)]));
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_2,xlab,ylab1,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'frf_y_hammer_hexa','fig')
print -dpng frf_y_hammer_hexa
figure
h=plot(freq_frf,[(phs3(:,2)) (phs3(:,3)) (phs3(:,4))]);
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_5,xlab,ylab6,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'phase_y_hammer_marble','fig')
print -dpng phase_y_hammer_marble
figure
h=plot(freq_frf,[(phs4(:,2)) (phs4(:,3)) (phs4(:,4))]);
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_5,xlab,ylab6,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'phase_y_hammer_hexa','fig')
print -dpng phase_y_hammer_hexa
figure
h=plot(freq_frf,[(coh3(:,2)) (coh3(:,3)) (coh3(:,4))]);
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_8,xlab,ylab7,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'coh_y_hammer_marble','fig')
print -dpng coh_y_hammer_marble
figure
h=plot(freq_frf,[(coh4(:,2)) (coh4(:,3)) (coh4(:,4))]);
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_8,xlab,ylab7,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'coh_y_hammer_hexa','fig')
print -dpng coh_y_hammer_hexa
%% Z direction
figure
h=semilogy(freq_frf,abs([ReIm5(:,2) ReIm5(:,3) ReIm5(:,4) ]));
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_3,xlab,ylab1,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'frf_z_hammer_marble','fig')
print -dpng frf_z_hammer_marble
figure
h=semilogy(freq_frf,abs([ReIm6(:,2) ReIm6(:,3) ReIm6(:,4)]));
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_3,xlab,ylab1,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'frf_z_hammer_hexa','fig')
print -dpng frf_z_hammer_hexa
figure
h=plot(freq_frf,[(phs5(:,2)) (phs5(:,3)) (phs5(:,4))]);
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_6,xlab,ylab6,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'phase_z_hammer_marble','fig')
print -dpng phase_z_hammer_marble
figure
h=plot(freq_frf,[(phs6(:,2)) (phs6(:,3)) (phs6(:,4))]);
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_6,xlab,ylab6,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'phase_z_hammer_hexa','fig')
print -dpng phase_z_hammer_hexa
figure
h=plot(freq_frf,[(coh5(:,2)) (coh5(:,3)) (coh5(:,4))]);
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_9,xlab,ylab7,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'coh_z_hammer_marble','fig')
print -dpng coh_z_hammer_marble
figure
h=plot(freq_frf,[(coh6(:,2)) (coh6(:,3)) (coh6(:,4))]);
set(h,proname,val([6 4 2],1:3))
eval(['legend(',legend1,')'])
titlabel_font(tit_9,xlab,ylab7,font_s);
%axis([1 100 1e-2 1e2])
grid
saveas(gcf,'coh_z_hammer_hexa','fig')
print -dpng coh_z_hammer_hexa
%% COMPARE FRF
figure
h=semilogy(freq_frf,abs([ReIm4(:,11) ReIm10(:,11) ReIm11(:,11) ReIm15(:,11)]));
set(h,proname,val([6 4 2 12],1:3))
legend(leg1,leg3,leg4,leg6,'Location','SouthEast');
titlabel_font(tit_1,xlab,ylab1,10);
grid
saveas(gcf,'comp_frf_x_hammer_hexa','fig')
print -dpng comp_frf_x_hammer_hexa
figure
h=semilogy(freq_frf,abs([ReIm5(:,12) ReIm9(:,12) ReIm13(:,12) ReIm14(:,12)]));
set(h,proname,val([6 4 2 12],1:3))
legend(leg1,leg2,leg5,leg6,'Location','SouthEast');
titlabel_font(tit_2,xlab,ylab1,10);
grid
saveas(gcf,'comp_frf_y_hammer_hexa','fig')
print -dpng comp_frf_y_hammer_hexa
figure
h=semilogy(freq_frf,abs([ReIm6(:,12) ReIm16(:,12)]));
set(h,proname,val([6 12],1:3))
legend(leg1,leg6,'Location','SouthEast');
titlabel_font(tit_3,xlab,ylab1,10);
grid
saveas(gcf,'comp_frf_z_hammer_hexa','fig')
print -dpng comp_frf_z_hammer_hexa
%%
2019-03-14 16:40:28 +01:00
figure
h=semilogy(freq_frf,abs([ReIm4(:,5) ReIm10(:,5) ReIm11(:,5) ReIm15(:,5)]));
set(h,proname,val([6 4 2 12],1:3))
legend(leg1,leg3,leg4,leg6,'Location','SouthEast');
grid
% saveas(gcf,'comp_frf_x_hammer_hexa','fig')
% print -dpng comp_frf_x_hammer_hexa
figure
h=semilogy(freq_frf,abs([ReIm5(:,6) ReIm9(:,6) ReIm13(:,6) ReIm14(:,6)]));
set(h,proname,val([6 4 2 12],1:3))
legend(leg1,leg2,leg5,leg6,'Location','SouthEast');
grid
% saveas(gcf,'comp_frf_y_hammer_hexa','fig')
% print -dpng comp_frf_y_hammer_hexa
figure
h=semilogy(freq_frf,abs([ReIm6(:,7) ReIm16(:,7)]));
set(h,proname,val([6 12],1:3))
legend(leg1,leg6,'Location','SouthEast');
grid
% saveas(gcf,'comp_frf_z_hammer_hexa','fig')
% print -dpng comp_frf_z_hammer_hexa