home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 7.ddi / ROBUST.DI$ / HKL1.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  2.9 KB  |  72 lines

  1. %
  2. % 1-block H-inf problem
  3. %
  4.  
  5. % R. Y. Chiang & M. G. Safonov 7/85
  6. % Copyright (c) 1988 by the MathWorks, Inc.
  7. % All Rights Reserved.
  8. % -----------------------------------------------------------------
  9. disp('  ')
  10. disp('        << Working on Phase III: Interpolation problem >>')
  11. disp(' ')
  12. disp('       1-block H-inf problem (HKL1: T21 square,T12 square)')
  13. disp('  ')
  14. disp('               ..... Working ..... Please wait .....')
  15. [ahtls,bhtls,chtls,dhtls,ahtl,bhtl,chtl,dhtl,mhtl]=stabproj(ahtt,bhtt,chtt,dhtt);
  16. %
  17. %  IV). Zeroth order Hankel Approximation:
  18. %
  19. [a11h,B1h,C1h,d1h,a22h,B2h,C2h,d2h,msat] = stabproj(-ahtl',-chtl',bhtl',dhtl');
  20. [ay,by,cy,dy,ayu,byu,cyu,dyu,aughsv] = ohkapp(a11h,B1h,C1h,d1h,1,0);
  21. hsvmx = aughsv(1,1)
  22. if aughsv(1,1) <= 1.0,..
  23.          [axt1,bxt1,cxt1,dxt1] = addss(ayu,byu,cyu,dyu,a22h,B2h,C2h,d2h);
  24.          [mahtl,nahtl] = size(ahtl);
  25.          if msat == mahtl
  26.            axt1 = ayu; bxt1 = byu; cxt1 =cyu; dxt1 = dyu+d2h;             
  27.          end 
  28.          axtl = -axt1';
  29.          bxtl = -cxt1';
  30.          cxtl =  bxt1';
  31.          dxtl =  dxt1';
  32.          aq = axtl; bq = bxtl; cq = -cxtl; dq = -dxtl;
  33.          [raq,caq] = size(aq); [rdq,cdq] = size(dq);
  34.          [rC2,cC2] = size(C2);
  35.          [rf,cf]   = size(f); [rh,ch]   = size(h);
  36.          bqq = -bq * inv(ml);
  37.          cqq = inv(mr) * cq;
  38.          dqq = -inv(mr) * dq * inv(ml);
  39.          dq22 = inv([eye(rdq) -D22;-dqq eye(rdq)]);
  40.          cq22 = [C2+D22*f zeros(rC2,caq);zeros(rdq,cC2) cqq];
  41.          bq2h = [h B2;bqq zeros(raq,rf)];
  42.          acp  = [at12 zeros(cf,caq);zeros(raq,cf) aq] + ...
  43.                  bq2h * dq22 * cq22;
  44.          bcp  = -bq2h*dq22 * [eye(rdq);zeros(rdq)];
  45.          ccp  = [f zeros(rf,caq)] + [zeros(rf,cdq) eye(rf)] * ...
  46.                  dq22 * cq22;
  47.          dcp  = -dqq * inv(eye(rdq)-D22*dqq);
  48.          acl  = [at12 bt12*dq*ct21-B2*f bt12*cq;...
  49.                  zeros(rat0,cat1) at21 zeros(rat0,caq);...
  50.                  zeros(raq,cat1) bq*ct21 aq];
  51.          bcl  = [bt12*dq*dt21+B1;bt21;bq*dt21];
  52.          ccl  = [ct12 dt12*dq*ct21-D12*f dt12*cq];
  53.          dcl  = dt11+dt12*dq*dt21;
  54.          disp('  ')
  55.          disp('  ')
  56.          disp(' ----------------------------------------------------------');
  57.          disp('   LINF computation is done .....');
  58.          disp('      state-space of the controller: (acp,bcp,ccp,dcp)');
  59.          disp('      state-space of the CLTF Ty1u1: (acl,bcl,ccl,dcl)');
  60.          disp('   Plots of S & (I-S) problem ---> run script file: pltopt');
  61.          disp(' ----------------------------------------------------------');
  62. else
  63.          disp('  ')
  64.          disp('  ')
  65.          disp(' ----------------------------------------------------------');
  66.          disp('    NO STABILIZING CONTROLLER MEETS THE SPEC. !!')
  67.          disp('    ADJUST "Gam" AND REDO PHASE I, II AND III.')
  68.          disp(' ----------------------------------------------------------');
  69. end
  70. %
  71. % ------ End of HKL1.M ----- RYC/MGS %
  72.