home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 2.ddi / MUTOOLS2.DI$ / HINFFI_T.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  1.7 KB  |  73 lines

  1. %-------------------------------------------------------------------
  2. %
  3. %    [p,q12,r12,fail] = hinffi_t(p,ncon)
  4. %
  5. %    scale the d12 matrix to satisfy the formulas
  6. %    and check the rank conditions for full info case.
  7. %
  8. %    written:    Gary Balas      July, 1990.
  9. %
  10. % full info case:
  11. %
  12. %       p  =  | ap  | b1   b2  |
  13. %             | ---------------|
  14. %             | c1  | d11  d12 |
  15. %
  16. % with assumed c2, d21 and d22 :
  17. %             | [I] | [0]  [0] |
  18. %             | [0] | [I]  [0] |
  19. %
  20. %------------------------------------------------------------------
  21.  
  22. function [p,q12,r12,fail] = hinffi_t(p,ncon)
  23.  
  24. fail = 0;
  25. [ap,bp,cp,dp,b1,b2,c1,d11,d12,ndata] = hinffi_p(p,ncon);
  26. np1 = ndata(1);
  27. np2 = ndata(2);
  28. nm1 = ndata(3);
  29. nm2 = ndata(4);
  30. %
  31. % determine if   |A-jwI  b2 | has full column rank at w=0
  32. %                |  c1   d12|
  33. %
  34. tmp_col=[ap b2;c1 d12];
  35. [nr,nc]=size(tmp_col);
  36. irank = rank(tmp_col,eps);
  37. % irank = nc;
  38.  if irank ~= nc
  39.   fprintf('\n')
  40.   disp('*  [a b2;c1 d12] does not have full column rank at s=0 ')
  41.    fail = 1;
  42.    return
  43.  end
  44. %
  45. %  scale the matrices to    q12*d12*r12 = | 0 |
  46. %                                         | I |
  47. %
  48. [q12,r12] = qr(d12);
  49. %
  50. % determine if d12 has full column rank
  51. %
  52. irank = rank(r12,eps);
  53.  if irank ~= nm2
  54.    disp('  d12 does not have full column rank  ')
  55.    fail = 1;
  56.    return
  57.  end
  58. q12 = [q12(:,(nm2+1):np1),q12(:,1:nm2)]';
  59. r12 = inv(r12(1:nm2,:));
  60.  
  61. c1 = q12*c1;
  62. cp = [c1];
  63. b2 = b2*r12;
  64. bp = [b1,b2];
  65. d11 = q12*d11;
  66. d12 = q12*d12*r12;
  67. dp = [d11 d12];
  68. p = pck(ap,bp,cp,dp);
  69.  
  70. %---------------------------------------------------------------
  71. %
  72. % Copyright MUSYN INC 1991,  All Rights Reserved
  73.