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

  1. function [am,bm,cm,dm] = sfl(Z1,Z2,Z3,Z4)
  2. % [SS_M] = SFL(SS_) or
  3. % [AM,BM,CM,DM] = SFL(A,B,C,D) produces a left spectral factorization
  4. %       such that 
  5. %       
  6. %                 M'(-s) M(s) = I - G'(-s)G(s).
  7. %
  8. %                Input data:  G(s):= SS_ = MKSYS(A,B,C,D);
  9. %                Output data: M(s):= SS_M = MKSYS(AM,BM,CM,DM);
  10. %
  11. %  The regular state-space can be recovered by "branch".
  12.  
  13. % R. Y. Chiang & M. G. Safonov 7/85/87
  14. % Copyright (c) 1988 by the MathWorks, Inc.
  15. % All Rights Reserved.
  16. % ---------------------------------------------------------------------
  17. %
  18. inargs = '(a,b,c,d)';
  19. eval(mkargs(inargs,nargin,'ss'))
  20.  
  21. [rd,cd] = size(d*d');
  22. [rdd,cdd] = size(d'*d);
  23. rricx = eye(cdd) - d'*d;
  24. deln1 = inv(rricx);
  25. aricx = a + b*deln1 * d' * c;
  26. qricx = -c' * (eye(cd) + d * deln1 * d') * c;
  27. qrnx = diagmx(qricx,rricx);
  28. [kx,x] = lqrc(aricx,b,qrnx);
  29. f1 = -deln1 * (b' * x - d' * c);
  30. [ra,ca] = size(a);
  31. qrny = diagmx(zeros(ra,ca),deln1);
  32. [ky,y] = lqrc(a',f1',qrny);
  33. f2 = -(b * deln1 + y * f1') * rricx;
  34. %
  35. % ------ State Space of M :
  36. %
  37. am = a + b * f1 + f2 * f1;
  38. bm = f2;
  39. ddd = rricx^(0.5);
  40. cm = ddd * f1;
  41. dm = ddd;
  42. %
  43. if xsflag
  44.    am = mksys(am,bm,cm,dm);
  45. end
  46. %
  47. % ------ End of SFL.M ---- RYC/MGS 7/85/87 %
  48.