%% ABOUT THIS FILE % ---------------------------------------------------------------------- % Type-B1 prototype for KAGRA % Coded by T. Sekiguchi on 2015/06/16 % ---------------------------------------------------------------------- %% PRELIMINARY clear all; % Clear workspace close all; % Close plot windows addpath('../../utility'); % Add path to utilities g = 9.81; %% IMPORT SUSPENSION MODEL matfile='typeB1susmdl'; load([matfile,'.mat']); %% TUNING DAMPER % This part compensates the failure in converting the structural damping to % viscous damping. % REDUCE DAMPING ON RIM sys1.a(43,43)=sys1.a(43,43)/30; % RIM sys1.a(49,49)=sys1.a(49,49)/30; % RRM sys1.a(55,55)=sys1.a(55,55)/30; % RTM % INCREASE DAMPING ON YF0 sys1.a(15,15)=sys1.a(15,15)*3000; % YF0 % INCREASE DAMPING ON YRM, YTM sys1.a(51,51)=sys1.a(51,51)*30; % YRM sys1.a(57,57)=sys1.a(57,57)*300; % YTM %% ZERO CONTROL CASE addpath('servofilter'); % Add path to servo typeB1proto_no_control_150618; % NO CONTROL rmpath ('servofilter'); % Remove path to servo mdlfile='typeB1simctrl_150629'; % typeB1 ver.150616 % SETTING FILTERS st =linmod(mdlfile); invl =strrep(st.InputName, [mdlfile,'/'],''); outvl =strrep(st.OutputName,[mdlfile,'/'],''); sysc0 =ss(st.a,st.b,st.c,st.d,'inputname',invl,'outputname',outvl); %% FREQUENCY freq =logspace(-2,1.99,1001); %% NOISE % NOISE data_OSEM = importdata('../../noise/OSEMnoiseworstproto_disp.dat'); % um/rtHz noise_OSEM = interp1(data_OSEM(:,1),data_OSEM(:,2)*1e-6,freq')'; %m/rtHz n_OSEM_LTM = noise_OSEM/sqrt(4); % [m/rtHz] n_OSEM_PTM = noise_OSEM/sqrt(2)/117e-3; % [rad/rtHz] n_OSEM_YTM = noise_OSEM/sqrt(2)/117e-3; % [rad/rtHz] n_OSEM_LIM = noise_OSEM/sqrt(1); % [m/rtHz] n_OSEM_TIM = noise_OSEM/sqrt(2); % [m/rtHz] n_OSEM_VIM = noise_OSEM/sqrt(3); % [m/rtHz] n_OSEM_RIM = noise_OSEM/sqrt(3/2)/96e-3;% [rad/rtHz] n_OSEM_PIM = noise_OSEM/sqrt(3/2)/96e-3;% [rad/rtHz] n_OSEM_YIM = noise_OSEM/sqrt(2)/87e-3; % [rad/rtHz] data_LVDT = importdata('../../noise/LVDTnoiseADC_disp.dat'); % um/rtHz noise_LVDT = interp1(data_LVDT(:,1),data_LVDT(:,2)*1e-6,freq')'; % m/rtHz n_LVDT_LF0 = noise_LVDT/sqrt(3/2); % [m/rtHz] n_LVDT_TF0 = noise_LVDT/sqrt(3/2); % [m/rtHz] n_LVDT_YF0 = noise_LVDT/sqrt(3)/600e-3; % [rad/rtHz] n_LVDT_VF0 = noise_LVDT*2; % [m/rtHz] n_LVDT_VF1 = noise_LVDT*2; % [m/rtHz] n_LVDT_VF2 = noise_LVDT*2; % [m/rtHz] data_GEO = importdata('../../noise/GEOnoiseproto_vel.dat'); % um/sec/rtHz noise_GEO = interp1(data_GEO(:,1),data_GEO(:,2)*1e-6,freq')';% m/sec/rtHz n_GEO_LF0 = noise_GEO/sqrt(3/2); % [m/rtHz] n_GEO_TF0 = noise_GEO/sqrt(3/2); % [m/rtHz] n_GEO_YF0 = noise_GEO/sqrt(3)/594e-3; % [m/rtHz] data_seism = importdata('../../noise/KamiokaSeismicHighNoise.dat'); % m/rtHz noise_seism = interp1(data_seism(:,1),data_seism(:,2),freq')';% m//rtHz %% MODEL addpath('servofilter'); % Add path to servo typeB1proto_servo_lock_150629; % LOCK ACQUISITION MODE rmpath ('servofilter'); % Remove path to servo st =linmod(mdlfile); invl =strrep(st.InputName, [mdlfile,'/'],''); outvl =strrep(st.OutputName,[mdlfile,'/'],''); sysc =ss(st.a,st.b,st.c,st.d,'inputname',invl,'outputname',outvl); %% CALC TOP TRANS [magsL,~]=bodesus(sysc,'n_LVDT_LF0','IFO_LTM',freq); [magsG,~]=bodesus(sysc,'n_GEO_LF0','IFO_LTM',freq); [magsS,~]=bodesus(sysc,'accLGND','IFO_LTM',freq); [mag0S,~]=bodesus(sysc0,'accLGND','IFO_LTM',freq); magsL=magsL.*n_LVDT_LF0; magsG=magsG.*n_GEO_LF0; magsS=magsS.*freq.*freq*pp*pp.*noise_seism; mag0S=mag0S.*freq.*freq*pp*pp.*noise_seism; magsT=sumpsd({magsL,magsG,magsS}); rmsT=makerms(freq,magsT); rmsTv=makerms(freq,magsT.*freq*pp); rms0S=makerms(freq,mag0S); rms0Sv=makerms(freq,mag0S.*freq*pp); %% CALC TOP PITCH [magpL,~]=bodesus(sysc,'n_LVDT_LF0','OpLev_PTM',freq); [magpG,~]=bodesus(sysc,'n_GEO_LF0','OpLev_PTM',freq); [magpS,~]=bodesus(sysc,'accLGND','OpLev_PTM',freq); [mag0pS,~]=bodesus(sysc0,'accLGND','OpLev_PTM',freq); magpL=magpL.*n_LVDT_LF0; magpG=magpG.*n_GEO_LF0; magpS=magpS.*freq.*freq*pp*pp.*noise_seism; mag0pS=mag0pS.*freq.*freq*pp*pp.*noise_seism; %% CALC ABOUT OSEM [magoL,~]=bodesus(sysc,'n_OSEM_LIM','IFO_LTM',freq); [magoP,~]=bodesus(sysc,'n_OSEM_PIM','IFO_LTM',freq); [magoY,~]=bodesus(sysc,'n_OSEM_YIM','IFO_LTM',freq); [magoT,~]=bodesus(sysc,'n_OSEM_TIM','IFO_LTM',freq); [magoR,~]=bodesus(sysc,'n_OSEM_RIM','IFO_LTM',freq); [magoV,~]=bodesus(sysc,'n_OSEM_VIM','IFO_LTM',freq); magoL=magoL.*n_OSEM_LIM; magoT=magoT.*n_OSEM_TIM; magoV=magoV.*n_OSEM_VIM; magoR=magoR.*n_OSEM_RIM; magoP=magoP.*n_OSEM_PIM; magoY=magoY.*n_OSEM_YIM; [magtL,~]=bodesus(sysc,'n_OSEM_LTM','IFO_LTM',freq); [magtP,~]=bodesus(sysc,'n_OSEM_PTM','IFO_LTM',freq); [magtY,~]=bodesus(sysc,'n_OSEM_YTM','IFO_LTM',freq); magtL=magtL.*n_OSEM_LTM; magtP=magtP.*n_OSEM_PTM; magtY=magtY.*n_OSEM_YTM; magoTot=sumpsd({magoL,magoP,magoY,magoT,magoR,magoV,magtL,magtP,magtY}); rmsoTot=makerms(freq,magoTot); rmsoTotv=makerms(freq,magoTot.*freq*pp); %% ALL magaT=sumpsd({magsT,magoTot}); rmsaT=makerms(freq,magaT); rmsaTv=makerms(freq,magaT.*freq*pp); %% Requirement reqBS=freq; for i=1:length(freq) if freq(i)<8 reqBS(i)=0; else reqBS(i)=1e-15*(freq(i)/10)^(-1.5); end end %% PLOT mypsdplotopt({magoL,magoT,magoV,magoR,magoP,magoY,magsT,reqBS},freq,... 'title','Noise coupling from IM OSEMs',... 'legend',{'L','T','V','R','P',... 'Y','Noise from top','BS requirement'},... 'color',{'r-','b-','g-','c-','m-','y-','k-','k--'},... 'ylim',[1e-18,1e-5],'ylabel','Magnitude [m/rtHz] ') %export_fig('figure/typeB1proto_damping_IMOSEM_150630.pdf') %% PLOT mypsdplotopt({magtL,magtP,magtY,magsT,reqBS},freq,... 'title','Noise coupling from TM OSEMs',... 'legend',{'L','P',... 'Y','Noise from top','BS requirement'},... 'color',{'r-','b-','g-','c-','m-','y-','k-','k--'},... 'ylim',[1e-18,1e-5],'ylabel','Magnitude [m/rtHz] ') %export_fig('figure/typeB1proto_damping_IMOSEM_150630.pdf') %% PLOT mypsdplotopt({magoTot,magsT,magaT,rmsaT,rmsaTv,rmsoTotv},freq,... 'title','Noise coupling from IM OSEMs',... 'legend',{'OSEM noise','Noise from top','Total','RMS','RMS velocity',... 'OSEM RMS velocity'},... 'color',{'r-','b-','k-','r--','m--','c--'},... 'ylim',[1e-12,1e-5],'ylabel','Magnitude [m/rtHz] or [m] or [m/sec]') %% GAS controls [magg0,~]=bodesus(sysc,'n_LVDT_VF0','IFO_LTM',freq); [magg1,~]=bodesus(sysc,'n_LVDT_VF1','IFO_LTM',freq); [magg2,~]=bodesus(sysc,'n_LVDT_VF2','IFO_LTM',freq); magg0=magg0.*n_LVDT_VF0; magg1=magg1.*n_LVDT_VF0; magg2=magg2.*n_LVDT_VF0; %% PLOT freq4=logspace(-4,1,1001); bodesusplotcmpopt(sysc0,... {'actVF0','LVDT_VF0';... 'actVF1','LVDT_VF1';... 'actVF2','LVDT_VF2'},freq4,... 'calibration',... {gain_act_VF0*servo_VF0,... gain_act_VF1*servo_VF2,... gain_act_VF2*servo_VF2},... 'legend',{'F0','F1','F2'},... 'title','Open loop gain') %% PLOT mypsdplotopt({magg0,magg1,magg2,magsT,reqBS},freq,... 'title','Noise coupling from GAS filter LVDTs',... 'legend',{'F0','F1',... 'F2','Noise from top','BS requirement'},... 'color',{'r-','b-','g-','k-','k--'},... 'ylim',[1e-18,1e-5],'ylabel','Magnitude [m/rtHz] ') %% MODEL2 addpath('servofilter'); % Add path to servo typeB1proto_servo_lock_150629; % LOCK ACQUISITION MODE rmpath ('servofilter'); % Remove path to servo st =linmod(mdlfile); invl =strrep(st.InputName, [mdlfile,'/'],''); outvl =strrep(st.OutputName,[mdlfile,'/'],''); sysc =ss(st.a,st.b,st.c,st.d,'inputname',invl,'outputname',outvl); %% TF freq2=logspace(-2,1,1001); bodesusplotcmpopt2({sysc0,sysc},'actLF0','LVDT_LF0',freq2,... 'ylim',[1e-6,1e-1],'legend',{'Undamped','Damped'},... 'title','Actuation transfer function about F0 translation') export_fig('figure/typeB1proto_damping_actLF0_TF_150630.pdf') %% COMP %poledampingcmp(sysc0_LF0,sysc1_LF0); sysc0_LF0=takesusonly(sysc0,'actLF0','LVDT_LF0'); sysc1_LF0=takesusonly(sysc, 'actLF0','LVDT_LF0'); timelist=0:0.1:60; irdata0=impulse(sysc0_LF0,timelist); irdata1=impulse(sysc1_LF0,timelist); fig0=figure; plot(timelist,irdata0*1000,'r-',timelist,irdata1*3000,'b-','LineWidth',2); legend({'Undamped','Damped'}) xlim([0,60]) ylim([-0.5,0.5]) grid on title('Impulse Response','FontSize',12,'FontWeight','bold',... 'FontName','Times New Roman','interpreter','none') ylabel('Amplitude','FontSize',12,'FontWeight','bold','FontName','Times New Roman') xlabel('Time [sec]','FontSize',12,'FontWeight','bold','FontName','Times New Roman') set(gca,'FontSize',12,'FontName','Times New Roman') set(fig0,'Position', [50, 50, 850, 650]) set(fig0,'Color','white') export_fig('figure/typeB1proto_damping_actLF0_IR_150630.pdf') %% FIND RES [~,~]=findQ(sysc0,0.413,5e-3); [~,~]=findQ(sysc0,0.643,5e-3); %% FIND RES2 [~,~]=findQ(sysc,0.413,5e-3); [~,~]=findQ(sysc,0.643,5e-3); %% OLG freq5=logspace(-2,3,1001); bodesusplotcmpopt(sysc0,... {'actLIM','OSEM_LIM'; 'actTIM','OSEM_TIM'},freq5,... 'calibration',... {gain_act_LIM*servo_LIM,... gain_act_TIM*servo_TIM},... 'legend',{'LIM','TIM'},... 'title','Open loop gain')