%% ABOUT THIS FILE % ---------------------------------------------------------------------- % Type-B1 prototype for KAGRA % Coded by Y. Fujii on 2016/11/16 % ---------------------------------------------------------------------- %% PRELIMINARY clear all; % Clear workspace close all; % Close plot windows addpath('../../../utility'); % Add path to utilities % addpath('/usr/local/matlab/altmany-export_fig-76bd7fa'); g = 9.81; %% IMPORT SUSPENSION MODEL matfile='typeBp161115mdl'; load([matfile,'.mat']); %% TUNING DAMPER % This part compensates the failure in converting the structural damping to % viscous damping. % REDUCE DAMPING ON RIM sys1.a(34,34)=sys1.a(34,34)/30; % RIM sys1.a(40,40)=sys1.a(40,40)/30; % RRM sys1.a(46,46)=sys1.a(46,46)/30; % RTM % INCREASE DAMPING ON YF0 %sys1.a(15,15)=sys1.a(15,15)*3000; % YF1 %sys1.a(15,15)=sys1.a(15,15)*1000; % YF1 % INCREASE DAMPING ON LF1 %sys1.a(13,13)=sys1.a(13,13)*3000; % LF1 % INCREASE DAMPING ON TF1 %sys1.a(14,14)=sys1.a(14,14)*3000; % TF1 % INCREASE DAMPING ON YRM, YTM sys1.a(42,42)=sys1.a(42,42)*30; % YRM sys1.a(48,48)=sys1.a(48,48)*300; % YTM %% IMPORT SERVO FILTERS addpath('servofilter'); % Add path to servo typeBp161115_servo_obs; % DAMPING CONTROL MODE rmpath ('servofilter'); % Remove path to servo %% IMPORT SIMULINK MODEL mdlfile='typeBp161115simctrl_LengthOL'; % typeB1 ver.150616 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); %% FREQUENCY freq1=logspace(-2,2,1001); freq2=logspace(-2,2,1001); %% TRANSFER FUNCTION BF data_LBF=importdata('sumconplot/forceTF/typebp161115_LBF.dat'); data_LBF=[data_LBF(:,1),data_LBF(:,2)/0.0009128347724758092,data_LBF(:,3)]; data_TBF=importdata('sumconplot/forceTF/typebp161115_TBF.dat'); data_TBF=[data_TBF(:,1),data_TBF(:,2)/0.0009128347751106936,data_TBF(:,3)]; data_VBF=importdata('sumconplot/forceTF/typebp161115_VBF.dat'); data_VBF=[data_VBF(:,1),data_VBF(:,2)/0.0010885105636099731,data_VBF(:,3)]; data_RBF=importdata('sumconplot/forceTF/typebp161115_RBF.dat'); data_RBF=[data_RBF(:,1),data_RBF(:,2)/0.013142884471620242,data_RBF(:,3)]; data_PBF=importdata('sumconplot/forceTF/typebp161115_PBF.dat'); data_PBF=[data_PBF(:,1),data_PBF(:,2)/0.013142880382772719,data_PBF(:,3)]; data_YBF=importdata('sumconplot/forceTF/typebp161115_YBF.dat'); data_YBF=[data_YBF(:,1),data_YBF(:,2)/0.3463050128931313,data_YBF(:,3)]; bodesusplotCLTFsimcmp(sysc,'actLBF','LVDT_LBF',freq1,data_LBF,... 'ylim',[1e-4,1e2],'calibration',gain_act_LBF,'unit1','1',... 'title','Transfer function from actLBF to LBF'); export_fig('figures/CLTF/typebp161115_CLTFcomp_LBF.pdf') bodesusplotCLTFsimcmp(sysc,'actTBF','LVDT_TBF',freq1,data_TBF,... 'ylim',[1e-4,1e2],'calibration',gain_act_TBF,'unit1','1',... 'title','Transfer function from actTBF to TBF'); export_fig('figures/CLTF/typebp161115_CLTFcomp_TBF.pdf') bodesusplotCLTFsimcmp(sysc,'actVBF','LVDT_VBF',freq1,data_VBF,... 'ylim',[1e-4,1e2],'calibration',gain_act_VBF,'unit1','1',... 'title','Transfer function from actVBF to VBF'); export_fig('figures/CLTF/typebp161115_CLTFcomp_VBF.pdf') bodesusplotCLTFsimcmp(sysc,'actRBF','LVDT_RBF',freq1,data_RBF,... 'ylim',[1e-4,1e2],'calibration',gain_act_RBF,'unit1','1',... 'title','Transfer function from actRBF to RBF'); export_fig('figures/CLTF/typebp161115_CLTFcomp_RBF.pdf') bodesusplotCLTFsimcmp(sysc,'actPBF','LVDT_PBF',freq1,data_PBF,... 'ylim',[1e-4,1e2],'calibration',gain_act_PBF,'unit1','1',... 'title','Transfer function from actPBF to PBF'); export_fig('figures/CLTF/typebp161115_CLTFcomp_PBF.pdf') bodesusplotCLTFsimcmp(sysc,'actYBF','LVDT_YBF',freq1,data_YBF,... 'ylim',[1e-4,1e2],'calibration',gain_act_YBF,'unit1','1',... 'title','Transfer function from actYBF to YBF'); export_fig('figures/CLTF/typebp161115_CLTFcomp_YBF.pdf') %% TRANSFER FUNCTION IM data_LIM=importdata('sumconplot/forceTF/typebp161115_LIM_OSEM.dat'); data_LIM=[data_LIM(:,1),data_LIM(:,2)/0.004469210075210013,data_LIM(:,3)]; data_TIM=importdata('sumconplot/forceTF/typebp161115_TIM_OSEM.dat'); data_TIM=[data_TIM(:,1),data_TIM(:,2)/0.00446920866908622,data_TIM(:,3)]; data_VIM=importdata('sumconplot/forceTF/typebp161115_VIM_OSEM.dat'); data_VIM=[data_VIM(:,1),data_VIM(:,2)/0.002655718793689245,data_VIM(:,3)]; data_RIM=importdata('sumconplot/forceTF/typebp161115_RIM_OSEM.dat'); data_RIM=[data_RIM(:,1),data_RIM(:,2)/0.3723329964821274,data_RIM(:,3)]; data_PIM=importdata('sumconplot/forceTF/typebp161115_PIM_OSEM.dat'); data_PIM=[data_PIM(:,1),data_PIM(:,2)/0.37499976840629107,data_PIM(:,3)]; data_YIM=importdata('sumconplot/forceTF/typebp161115_YIM_OSEM.dat'); data_YIM=[data_YIM(:,1),data_YIM(:,2)/2.443041324933432,data_YIM(:,3)]; data_LIM_Oplev=importdata('sumconplot/forceTF/typebp161115_LIM2LTMols.dat'); data_LIM_Oplev=[data_LIM_Oplev(:,1),data_LIM_Oplev(:,2)/0.000998271281155306,data_LIM_Oplev(:,3)]; data_PIM_Oplev=importdata('sumconplot/forceTF/typebp161115_PIM2PTMoplev.dat'); data_PIM_Oplev=[data_PIM_Oplev(:,1),data_PIM_Oplev(:,2)/0.33717661771175383,data_PIM_Oplev(:,3)]; data_YIM_Oplev=importdata('sumconplot/forceTF/typebp161115_YIM2YTMoplev.dat'); data_YIM_Oplev=[data_YIM_Oplev(:,1),data_YIM_Oplev(:,2)/2.3568716395982863,data_YIM_Oplev(:,3)]; bodesusplotCLTFsimcmp(sysc,'actLIM','OSEM_LIM',freq2,data_LIM,... 'ylim',[1e-6,1e2],'calibration',gain_act_LIM,'unit1','1'); export_fig('figures/CLTF/typebp161115_CLTFcomp_LIM.pdf') bodesusplotCLTFsimcmp(sysc,'actTIM','OSEM_TIM',freq2,data_TIM,... 'ylim',[1e-6,1e2],'calibration',gain_act_TIM,'unit1','1'); export_fig('figures/CLTF/typebp161115_CLTFcomp_TIM.pdf') bodesusplotCLTFsimcmp(sysc,'actVIM','OSEM_VIM',freq2,data_VIM,... 'ylim',[1e-6,1e2],'calibration',gain_act_VIM,'unit1','1'); export_fig('figures/CLTF/typebp161115_CLTFcomp_VIM.pdf') bodesusplotCLTFsimcmp(sysc,'actRIM','OSEM_RIM',freq2,data_RIM,... 'ylim',[1e-6,1e2],'calibration',gain_act_RIM,'unit1','1'); export_fig('figures/CLTF/typebp161115_CLTFcomp_RIM.pdf') bodesusplotCLTFsimcmp(sysc,'actPIM','OSEM_PIM',freq2,data_PIM,... 'ylim',[1e-6,1e2],'calibration',gain_act_PIM,'unit1','1'); export_fig('figures/CLTF/typebp161115_CLTFcomp_PIM.pdf') bodesusplotCLTFsimcmp(sysc,'actYIM','OSEM_YIM',freq2,data_YIM,... 'ylim',[1e-6,1e2],'calibration',gain_act_YIM,'unit1','1'); export_fig('figures/CLTF/typebp161115_CLTFcomp_YIM.pdf') bodesusplotCLTFsimcmp(sysc,'actLIM','OpLev_LTM',freq2,data_LIM_Oplev,... 'ylim',[1e-6,1e2],'calibration',gain_act_LIM/0.2102,'unit1','1'); export_fig('figures/CLTF/typebp161115_CLTFcomp_LIM2LTM_OpSens.pdf') bodesusplotCLTFsimcmp(sysc,'actPIM','OpLev_PTM',freq2,data_PIM_Oplev,... 'ylim',[1e-6,1e2],'calibration',gain_act_PIM,'unit1','1'); export_fig('figures/CLTF/typebp161115_CLTFcomp_PIM2PTM_OpLev.pdf') bodesusplotCLTFsimcmp(sysc,'actYIM','OpLev_YTM',freq2,data_YIM_Oplev,... 'ylim',[1e-6,1e2],'calibration',gain_act_YIM,'unit1','1'); export_fig('figures/CLTF/typebp161115_CLTFcomp_YIM2YTM_OpLev.pdf') %% TRANSFER FUNCTION TM %data_LTM_Oplev=importdata('sumconplot/forceTF/typebp161115_LTM2LTMols.dat'); %data_LTM_Oplev=[data_LTM_Oplev(:,1),data_LTM_Oplev(:,2)/0.0058144657401692735,data_LTM_Oplev(:,3)]; %data_PTM_Oplev=importdata('sumconplot/forceTF/typebp161115_PTM2PTMoplev.dat'); %data_PTM_Oplev=[data_PTM_Oplev(:,1),data_PTM_Oplev(:,2)/0.8453586747935663,data_PTM_Oplev(:,3)]; %data_YTM_Oplev=importdata('sumconplot/forceTF/typebp161115_YTM2YTMoplev.dat'); %data_YTM_Oplev=[data_YTM_Oplev(:,1),data_YTM_Oplev(:,2)/0.37216707035015684,data_YTM_Oplev(:,3)]; %bodesusplotCLTFsimcmp(sysc,'actLTM','OpLev_LTM',freq2,data_LTM_Oplev,... % 'ylim',[1e-6,1e2],'calibration',gain_act_LTM,'unit1','1'); %export_fig('figures/CLTF/typebp161115_CLTFcomp_LTM_OpSens.pdf') %bodesusplotCLTFsimcmp(sysc,'actPTM','OpLev_PTM',freq2,data_PTM_Oplev,... % 'ylim',[1e-6,1e2],'calibration',gain_act_PTM,'unit1','1'); %export_fig('figures/CLTF/typebp161115_CLTFcomp_PTM2PTM_OpLev.pdf') %bodesusplotCLTFsimcmp(sysc,'actYTM','OpLev_YTM',freq2,data_YTM_Oplev,... % 'ylim',[1e-6,1e2],'calibration',gain_act_YTM,'unit1','1'); %export_fig('figures/CLTF/typebp161115_CLTFcomp_YTM2YTM_OpLev.pdf') %% TRANSFER FUNCTION GAS data_VF1=importdata('sumconplot/forceTF/typebp161115_VSF_GAS.dat'); data_VF1=[data_VF1(:,1),data_VF1(:,2)/0.0010884165498107523,data_VF1(:,3)]; data_VF2=importdata('sumconplot/forceTF/typebp161115_VBF_GAS.dat'); data_VF2=[data_VF2(:,1),data_VF2(:,2)/0.002655525675453235,data_VF2(:,3)]; bodesusplotCLTFsimcmp(sysc,'actVF1','LVDT_VF1',freq1,data_VF1,... 'ylim',[1e-4,1e2],'calibration',gain_act_VF1,'unit1','1'); export_fig('figures/CLTF/typebp161115_CLTFcomp_VF1.pdf') bodesusplotCLTFsimcmp(sysc,'actVF2','LVDT_VF2',freq1,data_VF2,... 'ylim',[1e-4,1e2],'calibration',gain_act_VF2,'unit1','1'); export_fig('figures/CLTF/typebp161115_CLTFcomp_VF2.pdf')