%% ABOUT THIS FILE % ---------------------------------------------------------------------- % Type-A with Dummy Mass for KAGRA % Coded by K. Okutomi on 2016.06.28 % ---------------------------------------------------------------------- %% PRELIMINARY clear all; % Clear workspace close all; % Close plot windows addpath('../../utility'); % Add path to utilities addpath('controlmodel'); addpath('susmodel'); g = 9.81; %% IMPORT SUSPENSION MODEL matfile='TypeA_DP_160619mdl'; load([matfile,'.mat']); %% TUNING DAMPER % This part compensates the failure in converting the structural damping to % viscous damping. % sys1.a(15,15)=sys1.a(15,15)*280; % YF0 % sys1.a(21,21)=sys1.a(21,21)*300000; % YMD %% IMPORT SERVO FILTERS addpath('parameter'); % Add path to servo TypeA_DP_paramIPCtrl160701; % NO CONTROL MODE rmpath ('parameter'); % Remove path to servo %% IMPORT SIMULINK MODEL mdlfile='TypeA_DP_ctrl160627'; % typeA_RT ver.160419 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); %% IMPORT SUSPENSION MODEL % matfile='TypeA_DP_160619mdl'; % load([matfile,'.mat']); %% IMPORT SIMULINK MODEL % mdlfile='TypeA_DP_160619'; % typeA_DP only sus model % st =linmod(mdlfile); % invl =strrep(st.InputName, [mdlfile,'/'],''); % outvl =strrep(st.OutputName,[mdlfile,'/'],''); % sys0 =ss(st.a,st.b,st.c,st.d,'inputname',invl,'outputname',outvl); %% FREQUENCY freq =logspace(-2,1,1001); freq2=logspace(-2,2,1001); %% IP SERVO % ipservoflt = myzpk([0.05;0.08],[1e-4;1e1;1e1],3*(1e1*pp)^2); bodesusplotcmpopt(sysc0,... {'injYF0','LVDT_YF0';'injYF0','LVDT_YBF';'injYF0','dispYDP'},freq,... 'ylim',[1e-6,1e0],... 'color',{'b-', 'g-','r-'},... 'calibration',{1, 1, 1},... 'unit1','1'); % saveas(gca, 'figure/TypeA_RT_IPctrl_susTF_20160512','epsc') % saveas(gca, 'figure/TypeA_RT_IPctrl_susTF_20160512.png') %% OPEN LOOP TRANSFER FUNCTION % bodesusplotcmp(sys,... % 'FzF0','zF0',freq,... % 'title','Open Loop Transfer Function in Long.',... % 'ylim',[1e-3,1e3],... % 'unit1','1'); % saveas(gca, 'figure/tfTypeA_DP_actLF0-YF0_160629.png') % % bodesusplotcmp(sysSum,... % 'FyawF0','yawF0',freq,... % 'title','Open Loop Transfer Function in Yaw',... % 'ylim',[1e-3,1e3],... % 'unit1','1'); % saveas(gca, 'figure/tfTypeA_DP_actLF0-YF0_160629.png') bodesusplotOLTF(sysc,... '',) %% COLSED LOOP TRANSFER FUNCTION % bodesusplotcmpopt(sysc0,... % {'actLF0','LVDT_LF0';'actYF0','LVDT_YF0'},freq,... % 'ylim',[1e-4,1e1],... % 'color',{'b-', 'g-'},... % 'calibration',{1, 1},... % 'unit1','1'); %% NOISE % NOISE % 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] % 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] 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 typeA_RT_servo_lock_160427; % 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 % [magsL,phsL]=bodesus(sysc,'n_LVDT_LF0','disp_LDM',freq); % [magsG,~]=bodesus(sysc,'n_ACC_LF0','disp_LDM',freq); [magsS,~]=bodesus(sysc,'accLGND','disp_LDM',freq); [mag0S,~]=bodesus(sysc0,'accLGND','disp_LDM',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}); rmsS=makerms(freq,magsS); rmsSv=makerms(freq,magsS.*freq*pp); rms0S=makerms(freq,mag0S); rms0Sv=makerms(freq,mag0S.*freq*pp); % rmsT=makerms(freq,magsT); % rmsTv=makerms(freq,magsT.*freq*pp); % rms0S=makerms(freq,mag0S); % rms0Sv=makerms(freq,mag0S.*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({magsS,mag0S,rmsS,rmsSv,rms0S,rms0Sv,noise_seism},freq,... % 'title','DM Displacement Noise (GEO. Blending at 0.05 Hz)',... % 'legend',{'IPctrl','no ctrl','IPctrl RMS',... % 'IPctrl RMSvel.','no ctrl RMS','no ctrl RMSvel.','Seismic'},... % 'color',{'r-','b-','r--','m--','b--','c--','k-'},... % 'ylim',[1e-12,1e-5],'ylabel','Magnitude [m/rtHz] or [m] or [m/sec]') % saveas(gca,'figure/typeA_RT_IPdamp_cmp_160512','epsc') poledampingcmp(sysc0, sysc) % mypsdplotopt({magsG,magsL,magsS,magsT,rmsT,rmsTv},freq,... % 'title','Blending at 0.05 Hz',... % 'legend',{'GEO','LVDT','Seismic','total','RMS',... % 'RMS velocity'},... % 'color',{'b-','g-','k-','r-','r--','m--'},... % 'ylim',[1e-12,1e-5],'ylabel','Magnitude [m/rtHz] or [m] or [m/sec]') % saveas(gca,'figure/typeA_RT_IPdamp_DCservoON_160427','epsc') % % %% COMPARE % mypsdplotopt({magsG,magsL,magsS,magsT,mag0S,reqBS},freq,... % 'title','Noise coupling',... % 'legend',{'geophone','LVDT','seismic','Controlled total'... % 'No controlled','BS requirement'},... % 'color',{'g-','b-','k-','r-','m--','k--'},... % 'ylim',[1e-20,1e-5],'ylabel','Magnitude [m/rtHz]') % saveas(gca,'figure/typeA_RT_IPdamp_highfreq_noise_160427','epsc') % % %% TILT % % freq3=logspace(-2.5,1,1001); % % [magt0,phst0]=bodesus(sysc0,'accPGND','IFO_LTM',freq3); % [magt1,phst1]=bodesus(sysc,'accPGND','IFO_LTM',freq3); % magt0=magt0.*freq3.*freq3*pp*pp; % magt1=magt1.*freq3.*freq3*pp*pp; % % mypsdplotopt({magt1,magt0},freq3,... % 'title','Sensitivity to the tilt',... % 'ylim',[1e-3,1e4],'ylabel','Magnitude [m/rad]',... % 'color',{'r-','b-'},'legend',{'Control ON','Control OFF'}) % % export_fig('figure/typeB1proto_IPdamp_DCservoON_tilt_150629.pdf')