%% 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 % INCREASE DAMPING ON VTM sys1.a(45,45)=sys1.a(45,45)*100; % VTM %% IMPORT SERVO FILTERS addpath('servofilter'); % Add path to servo typeBp161115_no_control % NO CONTROL rmpath ('servofilter'); % Remove path to servo %% IMPORT SIMULINK MODEL mdlfile='typeBp161115simctrl_LengthOL'; % typeB1 ver.160108v2 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); %% IMPORT SERVO FILTERS addpath('servofilter'); % Add path to servo typeBp161115_servo_obs7; % Damping phase rmpath ('servofilter'); % Remove path to servo %% FREQUENCY freq1=logspace(-2,3,1001); freq2=logspace(-4,2,1001); freq=logspace(-2,2,1001); %% PLOT SERVO FILTER %% TRANSFER FUNCTION F0 %bodesusplotopt(sysc0,'actLF0','LVDT_LF0',freq,... % 'ylim',[1e-4,1e1],'calibration',gain_act_LF0,'unit1','1',... % 'position',[0 50 800 650]); %export_fig('figures/typeBp_wIP160110v2/typeBp_wIP160110v2_TF_LF0_160116.pdf') freq1=logspace(-2,3,1001); mybodeplot({servo_VF1,servo_VF2},freq2,... {'VF1','VF2'},'F2 servo filter'); export_fig('figures/servofilter/typebp161115_GASsevoflt_damp.pdf') mybodeplotNW({servo_LBF,servo_TBF,servo_VBF},freq1,... {'LBF','TBF','VBF'},'BF servo filter'); export_fig('figures/servofilter/typebp161115_BFsevofltLTV_damp.pdf') mybodeplotNW({servo_RBF,servo_PBF,servo_YBF},freq1,... {'RBF','PBF','YBF'},'BF servo filter'); export_fig('figures/servofilter/typebp161115_BFsevofltRPY_damp.pdf') mybodeplotNW({servo_LIM,servo_TIM,servo_VIM},freq1,... {'LIM','TIM','VIM'},'IM servo filter'); export_fig('figures/servofilter/typebp161115_IMsevofltLTV_damp.pdf') %mybodeplotNW({servo_RIM,servo_PIM,servo_YIM},freq1,... % {'RIM','PIM','YIM'},'IM servo filter'); %export_fig('figures/servofilter/typebp161115_IMsevofltRPY_damp.pdf') mybodeplotNW({servo_RIM},freq1,... {'RIM'},'IM servo filter'); export_fig('figures/servofilter/typebp161115_IMsevofltR_damp.pdf') %mybodeplotNW({servo_PIM,servo_YIM},freq1,... % {'PIM','YIM'},'IM servo filter'); %export_fig('figures/servofilter/typebp161115_IMsevofltPY_damp.pdf') %mybodeplot({servo_oplev_LTM,servo_oplev_PTM,servo_oplev_YTM},freq1,... % {'LTM OpSens','PTM OpLev','YTM OpLev'},'TM servo filter'); %export_fig('figures/servofilter/typebp161115_TMsevofltLPY_damp.pdf') mybodeplotSE({servo_oplev_PIM,servo_oplev_YIM},freq1,... {'PIM 2 PTM OpLev','YIM 2 YTM OpLev'},'IM-TM servo filter'); export_fig('figures/servofilter/typebp161115_IMTMsevofltPY.pdf') %%PLOT OLTF bodesusplotcmpoptOLTF(sysc0,... {'actLBF','LVDT_LBF';'actTBF','LVDT_TBF';'actVBF','LVDT_VBF'},freq1,... 'ylim',[1e-3,1e3],'calibration',... {gain_act_LBF*servo_LBF,gain_act_TBF*servo_TBF,gain_act_VBF*servo_VBF},... 'unit1','1','title','Open Loop Gain',... 'legend',{'LBF','TBF','VBF'}); export_fig('figures/OLTF/typebp161115_OLTF_BF_LTV_damp.pdf') bodesusplotcmpoptOLTF(sysc0,... {'actRBF','LVDT_RBF';'actPBF','LVDT_PBF';'actYBF','LVDT_YBF'},freq1,... 'ylim',[1e-3,1e3],'calibration',... {gain_act_RBF*servo_RBF,gain_act_PBF*servo_PBF,gain_act_YBF*servo_YBF},... 'unit1','1','title','Open Loop Gain',... 'legend',{'RBF','PBF','YBF'}); export_fig('figures/OLTF/typebp161115_OLTF_BF_RPY_damp.pdf') %% TRANSFER FUNCTION GAS bodesusplotcmpoptOLTF(sysc0,... {'actVF1','LVDT_VF1';'actVF2','LVDT_VF2'},freq2,... 'ylim',[1e-5,1e2],'calibration',... {gain_act_VF1*servo_VF1,gain_act_VF2*servo_VF2},... 'unit1','1','title','Open Loop Gain',... 'legend',{'VF1','VF2'}); export_fig('figures/OLTF/typebp161115_OLTF_GAS_damp.pdf') %% TRANSFER FUNCTION IM bodesusplotcmpoptOLTF(sysc0,... {'actLIM','OSEM_LIM';'actTIM','OSEM_TIM';'actVIM','OSEM_VIM'},freq1,... 'ylim',[1e-5,1e4],'calibration',... {gain_act_LIM*servo_LIM,gain_act_TIM*servo_TIM,gain_act_VIM*servo_VIM},... 'unit1','1','title','Open Loop Gain',... 'legend',{'LIM','TIM','VIM'}); export_fig('figures/OLTF/typebp161115_OLTF_IM_LTV_damp.pdf') %bodesusplotcmpoptOLTF(sysc0,... % {'actRIM','OSEM_RIM';'actPIM','OSEM_PIM';'actYIM','OSEM_YIM'},freq1,... % 'ylim',[1e-4,1e3],'calibration',... % {gain_act_RIM*servo_RIM,gain_act_PIM*servo_PIM,gain_act_YIM*servo_YIM},... % 'unit1','1','title','Open Loop Gain',... % 'legend',{'RIM','PIM','YIM'}); %export_fig('figures/OLTF/typebp161115_OLTF_IM_RPY_damp.pdf') bodesusplotcmpoptOLTF(sysc0,... {'actRIM','OSEM_RIM'},freq1,... 'ylim',[1e-4,1e3],'calibration',... {gain_act_RIM*servo_RIM},... 'unit1','1','title','Open Loop Gain',... 'legend',{'RIM'}); export_fig('figures/OLTF/typebp161115_OLTF_IM_R_damp.pdf') %bodesusplotcmpoptOLTF(sysc0,... % {'actPIM','OSEM_PIM';'actYIM','OSEM_YIM'},freq1,... % 'ylim',[1e-4,1e3],'calibration',... % {gain_act_PIM*servo_PIM,gain_act_YIM*servo_YIM},... % 'unit1','1','title','Open Loop Gain',... % 'legend',{'PIM','YIM'}); %export_fig('figures/OLTF/typebp161115_OLTF_IM_PY_damp.pdf') %% TRANSFER FUNCTION TM %bodesusplotcmpoptOLTF(sysc0,... % {'actLTM','OpLev_LTM';'actPTM','OpLev_PTM';'actYTM','OpLev_YTM'},freq1,... % 'ylim',[1e-5,1e4],'calibration',... % {gain_act_LTM*servo_oplev_LTM,gain_act_PTM*servo_oplev_PTM,gain_act_YTM*servo_oplev_YTM},... % 'unit1','1','title','Open Loop Gain',... % 'legend',{'L','P','Y'}); %export_fig('figures/OLTF/typebp161115_OLTF_TMoplev_damp.pdf') %% TRANSFER FUNCTION TM bodesusplotcmpoptOLTF(sysc0,... {'actPIM','OpLev_PTM';'actYIM','OpLev_YTM'},freq1,... 'ylim',[1e-5,1e4],'calibration',... {gain_act_PIM*servo_oplev_PIM,gain_act_YIM*servo_oplev_YIM},... 'unit1','1','title','Open Loop Gain',... 'legend',{'P','Y'}); export_fig('figures/OLTF/typebp161115_OLTF_TMoplev_damp.pdf')