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

  1. function [ahed,bhed,ched,dhed,aug,hsv] = bstschml(Z1,Z2,Z3,Z4,Z5,Z6,Z7)
  2. % [SS_H,AUG,HSV] = BSTSCHML(SS_,TYPE,NO,INFO) or
  3. % [AHED,BHED,CHED,DHED,AUG,HSV]=BSTSCHML(A,B,C,D,TYPE,NO,INFO) performs 
  4. %    relative error Schur model reduction on a SQUARE, STABLE G(s):=
  5. %    (A,B,C,D). The infinity-norm of the relative error is bounded as
  6. %                             -1               n
  7. %            |(Gm(s)-G(s))Gm(s) |    <= 2 * ( SUM  si / (1 - si) )
  8. %                                inf          k+1 
  9. %    where si denotes the i-th Hankel singular value of the all-pass 
  10. %    "phase matrix" of G(s). 
  11. %    The algorithm is based on the Balanced Stochastic Truncation (BST) 
  12. %    theory with Relative Error Method (REM).
  13. %    Based on the "TYPE" selected, you have the following options:
  14. %     1). TYPE = 1  --- no: size "k" of the reduced order model.
  15. %     2). TYPE = 2  --- find k-th order reduced model that 
  16. %                       tolerance (db) <= "no".
  17. %     3). TYPE = 3  --- display all the Hankel SV of phase matrix and 
  18. %                   prompt for "k" (in this case, no need to specify "no").
  19. %    Input variable: "info" = 'left '(default is also 'left ').
  20. %    Output variable "aug": aug(1,1) = no. of state removed
  21. %                           aug(1,2) = relative error bound
  22. %    Note that if D is not full rank, an error will result.
  23.  
  24. % R. Y. Chiang & M. G. Safonov 2/30/88
  25. % Copyright (c) 1988 by the MathWorks, Inc.
  26. % All Rights Reserved.
  27. % ------------------------------------------------------------------------
  28.  
  29. nag1 = nargin;
  30. inargs = '(A,B,C,D,Type,no,info)';
  31. eval(mkargs(inargs,nargin,'ss'))
  32. nag1 = nargin;  % NARGIN may have been changed.
  33.  
  34. if nag1 <= 6
  35.    info = 'left ';
  36. end
  37. if Type == 3
  38.    no = NaN;
  39. end
  40. [ahed,bhed,ched,dhed,aug,hsv] = bstschmr(A,B,C,D,Type,no,info);
  41. %
  42. if xsflag 
  43.    ahed = mksys(ahed,bhed,ched,dhed);
  44.    bhed = aug; 
  45.    ched = hsv;
  46. end
  47. %
  48. % ------- End of BSTSCHML.M --- RYC/MGS 9/13/87 %