📄 vlpvcdit.m
字号:
% In addition to the variables needed in the workspace by vlpvrun.m, % we need: blk, lastit, w. % method & firstit are optional.if ~exist('method') method = 'pdlf';endif ~exist('firstit') firstit = 2;endif ~exist('gam1') vlpvrun clear vclp1 vctrl1 firstit = 2;endK = int2str(firstit);Km1 = int2str(firstit-1);Km2 = int2str(firstit-2);eval(['gam = gam' Km1 ';']);eval(['xmat = xmat' Km1 ';']);eval(['ymat = ymat' Km1 ';']);if (exist('vd1') & firstit > 2) | (exist('vd0') & firstit == 2) eval(['vdold = vd' Km2 ';']); eval(['vlpvnew = mdscl(vlpv,vdold,nmeas,nctrl);']);else vlpvnew = vlpv; vdold = [];endfor k = firstit:lastit K = int2str(k); Km1 = int2str(k-1); disp(['Iteration #' K]); if strcmp(method,'sqlf') [vctrl,vclp] = vlpvsyn(vlpvnew,nmeas,nctrl,gam,xmat,ymat); elseif strcmp(method,'pdlfr') [vctrl,vclp] = vlpvsynr(vlpvnew,nmeas,nctrl,gam,xmat,ymat,fparm,gparm); else [vctrl,vclp] = vlpvsyn(vlpvnew,nmeas,nctrl,gam,xmat,ymat,fparm,gparm); end if k > firstit vdold = vdnew; end [vdnew,vmu,vmupk] = vlpvmucd(vclp,blk,w,vdold); % Use constant D-scale mu disp(['max mu <= ' num2str(pkvnorm(vmupk))]); vlpvnew = mdscl(vlpv,vdnew,nmeas,nctrl); if strcmp(method,'sqlf') [gam,xmat,ymat,xyopt] = vlpvsol(vlpvnew,nmeas,nctrl); [vctrl,vclp] = vlpvsyn(vlpvnew,nmeas,nctrl,gam,xmat,ymat); else if strcmp(method,'pdlfs') [gam,xmat,ymat,xyopt] = vlpvsols(vlpvnew,nmeas,nctrl,[maxe gest],vnu,fparm,gparm,gradf,gradg); elseif strcmp(method,'pdlfr') [gam,xmat,ymat,xyopt] = vlpvsolr(vlpvnew,nmeas,nctrl,nsf,vnu,fparm,gparm,gradf,gradg); elseif strcmp(method,'pdlfg') [gam,xmat,ymat,xyopt] = vlpvsolg(vlpvnew,nmeas,nctrl,gamwt,vnu,fparm,gparm,gradf,gradg); else [gam,xmat,ymat,xyopt] = vlpvsol(vlpvnew,nmeas,nctrl,vnu,fparm,gparm,gradf,gradg); end if strcmp(method,'pdlfr') [vctrl,vclp] = vlpvsynr(vlpvnew,nmeas,nctrl,gam,xmat,ymat,fparm,gparm); else [vctrl,vclp] = vlpvsyn(vlpvnew,nmeas,nctrl,gam,xmat,ymat,fparm,gparm); end end disp(['LPV gamma = ' num2str(pkvnorm(gam))]); vhinf = vlpvhinf(vclp); disp(['max Hinf norm = ' num2str(max(vunpck(vhinf)))]); % save data eval(['vd' Km1 ' = vdnew;']); eval(['vmu' Km1 ' = vmu;']); eval(['vmupk' Km1 ' = vmupk;']); eval(['gam' K ' = gam;']); eval(['xmat' K ' = xmat;']); eval(['ymat' K ' = ymat;']); eval(['xyopt' K ' = xyopt;']); eval(['vhinf' K ' = vhinf;']);endclear vdold vd vdnew vctrl vclp vmu vlpvnew gam xmat ymat xyopt vhinf vmupkclear vlpvx vctrl1 vclp1 K Km1 Km2 k vdeltx vf16x
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -