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

  1. function nmh2 = normh2(Z1,Z2,Z3,Z4)
  2. % [NMH2] = NORMH2(A,B,C,D) or
  3. % [NMH2] = NORMH2(SS_) computes the H2 norm of the given state-space
  4. %    realization. If the system not strictly proper, INF is returned. 
  5. %    Otherwise, the H2 norm is computed as
  6. %            NMH2 = trace[CPC'] = trace[B'QB]
  7. %
  8. %    where P is the controllability grammian, and Q is the observability
  9. %    grammian.
  10.  
  11. % R. Y. Chiang & M. G. Safonov 8/91
  12. % Copyright (c) 1991 by the MathWorks, Inc.
  13. % All Rights Reserved.
  14.  
  15. inargs='(a,b,c,d)';
  16. eval(mkargs(inargs,nargin,'ss'))
  17.  
  18. if norm(d,'fro') > sqrt(eps)
  19.    nmh2 = inf;
  20.    return
  21. end
  22.  
  23. P = gram(a,b);
  24. nmh2 = trace(c*P*c');
  25.  
  26. %
  27. % ---- End of NORMH2.M % RYC/MGS %
  28.  
  29.  
  30.