vlpvdkit.m

来自「线性时变系统控制器设计的工具包」· M 代码 · 共 59 行

M
59
字号
% In addition to vlpvrun.m, we need the following variables in the workspace:% blk, nits, wif ~exist('method') method = 'pdlf';endif ~exist('gam1') vlpvrun vclp = vclp1; clear vclp1 vctrl1endif exist('vclp1') vclp = vclp1; clear vclp1 vctrl1elseif method == 'sqlf' [vctrl,vclp] = vlpvsyn(vlpv,3,1,gam1,xmat1,ymat1);else [vctrl,vclp] = vlpvsyn(vlpv,3,1,gam1,xmat1,ymat1,[],gparm);endif ~exist('w') w = logspace(-1,2,46);endfor k = 2:nits K = int2str(k); Km1 = int2str(k-1); disp(['Iteration #' K]); if k > 2  vdold = vdnew; else  vdold = []; end [vmu,vdnew] = vlpvmu(vclp,blk,w,vdold,'sc'); vmu = sel(vmu,':',1); disp(['max mu <= ' num2str(max(vunpck(vmu)))]); vlpvnew = mdscl(vlpv,vdnew,nmeas,nctrl); if method == 'sqlf'  [gam,xmat,ymat,xyopt] = vlpvsol(vlpvnew,nmeas,nctrl);  disp(['SQLF gamma = ' num2str(gam)]);  [vctrl,vclp] = vlpvsyn(vlpvnew,nmeas,nctrl,gam,xmat,ymat); else  [gam,xmat,ymat,xyopt] = vlpvsol(vlpvnew,nmeas,nctrl,vnu,[],gparm,[],gradg);  disp(['PDLF gamma = ' num2str(gam)]);  [vctrl,vclp] = vlpvsyn(vlpvnew,nmeas,nctrl,gam,xmat,ymat,[],gparm); end vhinf = vlpvhinf(vclp); disp(['max Hinf = ' num2str(max(vunpck(vhinf)))]); eval(['vmu' Km1 ' = vmu;']); eval(['vd' Km1 ' = vdnew;']); 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 vhinfclear vlpvx vctrl1 vclp1 K Km1 k vdeltx vf16x

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?