Add every computation files and data

This commit is contained in:
2019-03-14 16:40:28 +01:00
parent 3929373a9d
commit c2aa389536
423 changed files with 2233847 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View File

@@ -0,0 +1,293 @@
% 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')

View File

@@ -0,0 +1,200 @@
%% Title: id31 microstation in EXP hutch for RAW data
% Date: 12 october 2018
%% NOTE
% With this file you can load the raw mat files
%% 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 '];
%
%% PARAMETERS
beamline='ID31 Nanostation - Hammer testing';
% --------------------------------
%%----------OROS -----------------
ch_max=16;
% --------------------------------
%mult=1e6/276*173; % --> m/s to micron/s and sensitivity correction for L4-C
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
%d=1.3; % distance between vertical sensors
warning off MATLAB:divideByZero
% specify capt # for which to run this
capt=[1:9];
% specify channels for which shut correction must be applied
shunt_ch=[1];
% in case of hammer inpacts specify capt # where it doesnt occur
no_hammer=[];
%no_hammer=[0];
% specify hammer channel (or ch to find peak due to impacts)
shock_ch=9;
%% main loop --------
% ------------------
for i=capt
eval(['load Measurement_raw',num2str(i)])
freq_max=Track1_TrueBandWidth;
dts=1/(freq_max*nyqhp);
freq=linspace(0,freq_max,t_win*freq_max);
wo=2*pi*freq;
for k=1:ch_max
vname=['Track',num2str(k)];
array_exist(k)=ismember(vname,who);
end
non_zero=find(array_exist);
for z=non_zero(1):length(non_zero)
track_nb=['Track',num2str(z)]';
eval(['data(:,z)=Track',num2str(z),';']);
end
c=data*mult;
%-------------
nbch=size(c,2);
%-------------
r=length(c);
if r/2~=fix(r/2) % loop to test for odd or even nb of samples
c=c(1:r-1,:); % take only even
else
end
%------------------------------
time=linspace(0,length(c)*dts,length(c));
for j=nbch %shunt_ch
[c(:,j),c_shut]=shut_c(c(:,j),1/dts); % correct for shunt
end
%c(:,8)=(c(:,5)-c(:,4))/d; % differential Theta Y angle
b=find(no_hammer==i); % if i==1 | i==2 | i==6
if b~=0
[psd_v,integ_v,psd_d,integ_d]=integrated_psd(c,t_win,t_ovlp,nyqhp,dts);
[frz_cut,crsp,pwsp,coherz,nsp]=fqresp(c,shock_ch,t_win,t_ovlp,nyqhp,dts);
else
thresh=0.5; % threshold of max value
sep=2.5; % separation minimum of peaks in sec
pre_ev=2; % pre event delay in sec
pos_ev=2; % post event delay in sec
[ti,t_impact]=findpeaks(c(:,shock_ch),'minpeakheight',max(c(:,shock_ch))*thresh,'minpeakdistance',ceil(sep/dts));
% find times at which there are impacts (threshold of max and separated by sep sec)
psd_v=zeros((pre_ev+pos_ev)/dts/nyqhp,nbch);
psd_d=zeros((pre_ev+pos_ev)/dts/nyqhp,nbch);
frz_cut=zeros((pre_ev+pos_ev)/dts/nyqhp,nbch);
for k=1:length(t_impact)
ibeg=fix(t_impact(k)-(pre_ev/dts));
iend=fix(t_impact(k)+(pos_ev/dts));
freq_s=linspace(0,freq_max,t_win/2*freq_max);
if ibeg>1 && iend<length(c) % eliminate indexes outside data range
[psd,integ_v,psd_int,integ_d]=integrated_psd(c(ibeg:iend,:),t_win,t_ovlp,nyqhp,dts);
psd_v=psd+psd_v;
psd_d=psd_int+psd_d;
[frz,crsp,pwsp,coherz,nsp]=fqresp(c(ibeg:iend,:),shock_ch,t_win,t_ovlp,nyqhp,dts);
frz_cut=frz+frz_cut;
end
end
psd_v=psd_v/length(t_impact);
psd_d=psd_d/length(t_impact);
frz_cut=frz_cut/length(t_impact);
end
drms=max(integ_d); % compute rms level
dc=hpfint(c,f_cut,dts); % filter and integrate in time domain
dppc=hpdpp(dc,t_win,t_ovlp,1,dts); % compute peak to peak level
%% transfer function, cross spectrum, power spectr. and coherence w.r.t. ch1
eval(['c',num2str(i),'=c;'])
eval(['dc',num2str(i),'=dc;'])
eval(['dppc',num2str(i),'=dppc;'])
eval(['drms',num2str(i),'=drms;'])
eval(['psd_v',num2str(i),'=psd_v;']) % already integrated in OROS
eval(['psd_d',num2str(i),'=psd_d;'])
eval(['integ_v',num2str(i),'=integ_v;'])
eval(['integ_d',num2str(i),'=integ_d;'])
eval(['frz',num2str(i),'=frz_cut;'])
% eval(['frh',num2str(i),'=frh_cut;'])
% eval(['frx',num2str(i),'=frx;'])
eval(['coherz',num2str(i),'=coherz;'])
eval(['time',num2str(i),'=time;'])
clear data c dc psd psd_v psd_d time c_shut % clean up the mess
end

View File

@@ -0,0 +1,3 @@
contient les mesures des réponses avec marteau d'impact. Les fichiers xxx_raw sont sans traitement dans le domaine temporel (environ 10 impacts par fichier). Les fonctions de transfert avec phase sont dans le même répertoire avec des noms explicites (manquent les cohérences que je n'ai pas sorties)
Ces données ne me semblent pas de super qualité en basse fréquence, avec le Ty libre le mode à 5Hz est très amorti.