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

  1.  echo on
  2. %
  3. %    HIMAT_X3
  4. %
  5. %   It is assumed that you have just run 'himat_x2'.
  6. %
  7. %  This MATLAB script file is the third iteration of mu-synthesis 
  8. %   control design for the HIMAT pitch axis control problem.
  9. %
  10. %  Third iteration of the mu-synthesis procedure. Design a 
  11. %   H-infinity control law for the new interconnection structure 
  12. %   which includes the frequency varying d-scales. HIMAT_IC3 
  13. %   has 20 states, 6 outputs and 6 inputs.
  14.  
  15.  [k3,g3,gf3]=hinfsyn(himat_ic3,2,2,0.95,1.10,.05,2);
  16.  
  17. % Now a H-infinity control law has been designed which achieves an
  18. %  infinity norm of .9875 for the new interconnection structure.
  19. %  The new system includes the frequency varying d-scales fit in
  20. %  the second iteration. To verify the gamma value, a frequency
  21. %  response of the closed loop is done and the maximum 
  22. %  singular value of the closed-loop response across frequency
  23. %  is plotted. We will also 
  24. %  check that the closed-loop poles are stable.
  25.  
  26.  pause    % strike any key to continue  
  27.  format short e
  28.  rifd(spoles(g3))
  29.  pause    % strike any key to continue
  30.  g3g=frsp(g3,om2);
  31.  g3pk=pkvnorm(g3g);
  32.  echo off
  33.  fprintf( '\n final gamma %g, \n max singular value %g \n \n',gf3,g3pk)
  34.  echo on
  35.  g3gs=vsvd(g3g);
  36.  vplot('liv,m',g3gs)
  37.  echo off
  38.  title('Singular value plot of Third Iteration in mu-synthesis');
  39.  xlabel('Frequency (rad/s)');
  40.  ylabel('Magnitude');
  41.  grid;
  42.  echo on
  43.  pause    % strike any key to continue
  44.  
  45. % The H-infinity control law can be analyzed using mu-analysis. The 
  46. %  closed-loop system, G3, has 4 inputs and 4 outputs.  The block
  47. %  structure again is a 2x2 full uncertainty block corresponding to
  48. %  actuator multiplicative uncertainty and a 2x2 full performance 
  49. %  block weighting the output sensitivity.
  50.  
  51. pause    % strike any key to continue
  52.  [bnds3,dv3,sens3,rp3]=mu(g3g,blk);
  53.  
  54. %  plot the maximum singular value and mu on the same plot
  55. %   solid - maximum singular value
  56. %   dashed - mu
  57.  
  58.  both=sbs(sel(g3gs,1,1),bnds3);
  59.  vplot('liv,m',both)
  60.  echo off
  61.  title('Max. singular value and mu for the closed-loop system, g3');
  62.  xlabel('Frequency (rad/s)');
  63.  ylabel('Magnitude');
  64.  grid;
  65.  pause    % strike any key to continue
  66.  echo on
  67.  
  68. % clear variables not used and pack the memory space due 
  69. %  to the limitations on the Mac and PC's.
  70.  
  71.  clear rp3 g3g g3gs both 
  72.  pack
  73.  
  74. % The next step is the fit the d-scales which are output from
  75. %  the MU program. The MUSYNFIT function is used to fit 
  76. %  the d-scales for each individual block. Next we fit a new
  77. %  set of d-scales based on the new  H-infinity control law.
  78.  
  79. %  MUSYNFIT requires the left d-scale from the previous 
  80. %  mu-synthesis iteration (DSYSL) to avoid increasing the states
  81. %  with each iteration. The d-scales from the mu-analysis 
  82. %  problem, DV2, and the sensitivity of the d-scales, SENS2,
  83. %  along with the block structure, number of controller 
  84. %  inputs and outputs. For the second
  85. %  iteration, DSYSL is used for the left d-scale. 
  86. %  Output from MSYNFIT is the new left d-scale and right 
  87. %  d-scale to be multiplied into the interconnection structure.
  88.  
  89.  pause    % strike any key to continue
  90.  
  91. %   We recommend a a 3rd order transfer function. This increases
  92. %   the number of states in the interconnection structure to
  93. %   3*(size of full block)*2. If one selects a different order
  94. %   for the d-scale weight, the gamma iteration will converge
  95. %   to a different value.
  96.  
  97.  [dsysl,dsysr]=musynfit(dsysl,dv3,sens3,blk,2,2);
  98.  
  99. % Now, wrap the new d-scales around the original 
  100. %   interconnection structure.
  101.  
  102. %          himat_ic4 = dsysl*himat_ic*(dsysr)^-1
  103.  
  104.  pause     % strike any key to continue
  105.  himat_ic4=mmult(dsysl,himat_ic,minv(dsysr));
  106. % clear dsysr g3 g3pk
  107.  pack;
  108.  minfo(himat_ic4)
  109.  
  110. % Thus ends the third iteration of mu-synthesis. Notice that
  111. %  the new interconnection structure has 20 states, only 12
  112. %  more states than the original interconnection structure. 
  113. %  The 12 states that were in the system from the previous 
  114. %  iteration have already been scaled into the
  115. %  d-scale fitting routine (Note, this is of course if you
  116. %  fit the d-scales using a 3rd order system.)
  117.  
  118. %  Type in 'himat_x4' to continue with the fourth and final
  119. %  iteration of mu-synthesis control design.
  120. %
  121. % Copyright MUSYN INC 1991,  All Rights Reserved
  122.