% Title: id31 microstation in EXP hutch % Date: 12 october 2018 % Description: measure on id31 microstation in exp hutch % FS: =256Hz % all L28 (31V/m/s) except CH1 L4-C (276V/m/s) % ch1: marble Z % ch2: outer frame Ty Z % ch3: inner frame Tilt Z % ch4: hexa Z % ch5: marble H % ch6: outer frame TY H % ch7: inner frame Tilt H % ch8: hexa H % ch9: hammer % measurements 12 october 2018 % ------------------------------------------------ % excitation Y marble corner % Measurement1 % excitation Y outer frame corner % Measurement2 % excitation Y hexa % Measurement3 % ------------------------------------------------ % excitation Z marble corner % Measurement4 % excitation Z outer frame corner % Measurement5 % excitation Z hexa % Measurement6 % ------------------------------------------------ % excitation X marble corner % Measurement7 % excitation X outer frame corner % Measurement8 % excitation X hexa % Measurement9 %% microstation=['Marble '; 'TY ';'Tilt '; 'Hexapod ']; % % 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; % % -------------------------------- % % mult=1e6; % --> m/s to micron/s % % nyqhp=2.56; % nyquist % 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 cd FRF_id31_microstation_12october2018 % specify capt # for which to run this capt=[1:9]; for i=capt eval(['load Measurement',num2str(i)]) for ch=1:8 eval(['freq_frf(:,',num2str(1),')=FFT1_H1_',num2str(2),'_9_RMS_X_Val;']) %omeg=2*pi*freq; eval(['av_spc(:,',num2str(ch),')=FFT1_AvSpc_',num2str(ch),'_RMS_Y_Val;']) eval(['frf_mod(:,',num2str(ch),')=FFT1_H1_',num2str(ch),'_9_RMS_Y_Mod;']) eval(['frf_phs(:,',num2str(ch),')=FFT1_H1_',num2str(ch),'_9_RMS_Y_Phas;']) eval(['frf_reim(:,',num2str(ch),')=FFT1_H1_',num2str(ch),'_9_Y_ReIm;']) %eval(['frf_coh(:,',num2str(ch),')=FFT1_Coh_',num2str(ch),'_9_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;']) eval(['avsp',num2str(i),'=av_spc;']) 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) = {'-'}; %% --------------------------------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_1=['ID31 microstation - (X) FRF - Hammer Marble']; tit_1_a=['ID31 microstation - (X) FRF - Hammer TY']; tit_1_b=['ID31 microstation - (X) FRF - Hammer hexa']; tit_2=['ID31 microstation - (Y) FRF - Hammer Marble']; tit_2_a=['ID31 microstation - (Y) FRF - Hammer TY']; tit_2_b=['ID31 microstation - (Y) FRF - Hammer hexa']; tit_3=['ID31 microstation - (Z) FRF - Hammer Marble']; tit_3_a=['ID31 microstation - (Z) FRF - Hammer TY']; tit_3_b=['ID31 microstation - (Z) FRF - Hammer hexa']; % 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,:),microstation(4,:),''Location'',''SouthEast''']; %% FRF X direction figure h=semilogy(freq_frf,abs([ReIm7(:,5) ReIm7(:,6) ReIm7(:,7) ReIm7(:,8)])); set(h,proname,val([6 4 2 8],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([ReIm8(:,5) ReIm8(:,6) ReIm8(:,7) ReIm8(:,8)])); set(h,proname,val([6 4 2 8],1:3)) eval(['legend(',legend1,')']) titlabel_font(tit_1_a,xlab,ylab1,font_s); %axis([1 100 1e-2 1e2]) grid saveas(gcf,'frf_x_hammer_ty','fig') print -dpng frf_x_hammer_ty figure h=semilogy(freq_frf,abs([ReIm9(:,5) ReIm9(:,6) ReIm9(:,7) ReIm9(:,8)])); set(h,proname,val([6 4 2 8],1:3)) eval(['legend(',legend1,')']) titlabel_font(tit_1_b,xlab,ylab1,font_s); %axis([1 100 1e-2 1e2]) grid saveas(gcf,'frf_x_hammer_hexa','fig') print -dpng frf_x_hammer_hexa %% FRF Y direction figure h=semilogy(freq_frf,abs([ReIm1(:,5) ReIm1(:,6) ReIm1(:,7) ReIm1(:,8)])); set(h,proname,val([6 4 2 8],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([ReIm2(:,5) ReIm2(:,6) ReIm2(:,7) ReIm2(:,8)])); set(h,proname,val([6 4 2 8],1:3)) eval(['legend(',legend1,')']) titlabel_font(tit_2_a,xlab,ylab1,font_s); %axis([1 100 1e-2 1e2]) grid saveas(gcf,'frf_y_hammer_ty','fig') print -dpng frf_y_hammer_ty figure h=semilogy(freq_frf,abs([ReIm3(:,5) ReIm3(:,6) ReIm3(:,7) ReIm3(:,8)])); set(h,proname,val([6 4 2 8],1:3)) eval(['legend(',legend1,')']) titlabel_font(tit_2_b,xlab,ylab1,font_s); %axis([1 100 1e-2 1e2]) grid saveas(gcf,'frf_y_hammer_hexa','fig') print -dpng frf_y_hammer_hexa %% FRF Z direction figure h=semilogy(freq_frf,abs([ReIm4(:,5) ReIm4(:,6) ReIm4(:,7) ReIm4(:,8)])); set(h,proname,val([6 4 2 8],1:3)) eval(['legend(',legend1,')']) titlabel_font(tit_3,xlab,ylab1,font_s); %axis([1 100 1e-2 1e2])dd grid saveas(gcf,'frf_z_hammer_marble','fig') print -dpng frf_z_hammer_marble figure h=semilogy(freq_frf,abs([ReIm5(:,5) ReIm5(:,6) ReIm5(:,7) ReIm5(:,8)])); set(h,proname,val([6 4 2 8],1:3)) eval(['legend(',legend1,')']) titlabel_font(tit_3_a,xlab,ylab1,font_s); %axis([1 100 1e-2 1e2]) grid saveas(gcf,'frf_z_hammer_ty','fig') print -dpng frf_z_hammer_ty figure h=semilogy(freq_frf,abs([ReIm6(:,5) ReIm6(:,6) ReIm6(:,7) ReIm6(:,8)])); set(h,proname,val([6 4 2 8],1:3)) eval(['legend(',legend1,')']) titlabel_font(tit_3_b,xlab,ylab1,font_s); %axis([1 100 1e-2 1e2]) grid saveas(gcf,'frf_z_hammer_hexa','fig') print -dpng frf_z_hammer_hexa %% save data % save ('coher_marble_x.mat', 'coh1') % save ('coher_marble_y.mat', 'coh3') % save ('coher_marble_z.mat', 'coh5') % save ('coher_hexa_z.mat', 'coh6') % save ('coher_hexa_y.mat', 'coh4') % save ('coher_hexa_x.mat', 'coh2') save ('phs_ty_x.mat', 'phs8') save ('phs_ty_y.mat', 'phs2') save ('phs_ty_z.mat', 'phs5') save ('phs_hexa_x.mat', 'phs9') save ('phs_hexa_y.mat', 'phs3') save ('phs_hexa_z.mat', 'phs6') save ('phs_marble_x.mat', 'phs7') save ('phs_marble_y.mat', 'phs1') save ('phs_marble_z.mat', 'phs4') save ('frf_ty_x.mat', 'ReIm8') save ('frf_ty_y.mat', 'ReIm2') save ('frf_ty_z.mat', 'ReIm5') save ('frf_hexa_x.mat', 'ReIm9') save ('frf_hexa_y.mat', 'ReIm3') save ('frf_hexa_z.mat', 'ReIm6') save ('frf_marble_x.mat', 'ReIm7') save ('frf_marble_y.mat', 'ReIm1') save ('frf_marble_z.mat', 'ReIm4') save ('freq_frf.mat', 'freq_frf')