//==========================================// //--- Solving the 4 bloc problem ---// //==========================================// xdel(winsid()); s = poly(0,'s'); // Definition of the system G = syslin('c',255/(s*(s/66.9+1))); // Definition of the weighting functions // We We = syslin('c',0.5*(s+150)/(s+0.001)); // Wu Wu = syslin('c',0.1*(s/300+1)/(s/10000+1)*((s/300)^2+2*(s/300)+1)/((s/300)^2+0.05*(s/300)+1)); // Wb Wb = syslin('c',0.16*s/s); // Open the xcos diagram xcos('4bloc.zcos'); // Extracting the plant for Hinf synthesis loadXcosLibs(); loadScicos(); importXcosDiagram('4bloc.zcos'); for kk = 1:length(scs_m.objs) if typeof(scs_m.objs(kk)) == 'Block' if scs_m.objs(kk).graphics.id == 'plant' scs_plant = scs_m.objs(kk).model.rpar; disp('plant found!'); break; end end end sys = lincos(scs_plant);