sim12xx1.mdl
上传用户:eighthdate
上传日期:2014-05-24
资源大小:270k
文件大小:6k
源码类别:

其他行业

开发平台:

Matlab

  1. Model {
  2.   Name   "sim12ex11"
  3.   Version   2.09
  4.   SimParamPage   Solver
  5.   SampleTimeColors   off
  6.   InvariantConstants   off
  7.   WideVectorLines   off
  8.   ShowLineWidths   off
  9.   PaperOrientation   landscape
  10.   PaperType   usletter
  11.   PaperUnits   inches
  12.   StartTime   "0.0"
  13.   StopTime   "2"
  14.   Solver   ode45
  15.   RelTol   "1e-3"
  16.   AbsTol   "1e-3"
  17.   Refine   "1"
  18.   MaxStep   ".010"
  19.   InitialStep   "auto"
  20.   FixedStep   "auto"
  21.   MaxOrder   5
  22.   OutputOption   RefineOutputTimes
  23.   OutputTimes   "[]"
  24.   LoadExternalInput   off
  25.   ExternalInput   "[t, u]"
  26.   SaveTime   off
  27.   TimeSaveName   "tout"
  28.   SaveState   off
  29.   StateSaveName   "xout"
  30.   SaveOutput   off
  31.   OutputSaveName   "yout"
  32.   LoadInitialState   off
  33.   InitialState   "xInitial"
  34.   SaveFinalState   off
  35.   FinalStateName   "xFinal"
  36.   LimitMaxRows   off
  37.   MaxRows   "1000"
  38.   Decimation   "1"
  39.   AlgebraicLoopMsg   warning
  40.   MinStepSizeMsg   warning
  41.   UnconnectedInputMsg   warning
  42.   UnconnectedOutputMsg   warning
  43.   UnconnectedLineMsg   warning
  44.   ConsistencyChecking   off
  45.   ZeroCross   on
  46.   SimulationMode   normal
  47.   RTWSystemTargetFile   "grt.tlc"
  48.   RTWInlineParameters   off
  49.   RTWRetainRTWFile   off
  50.   RTWTemplateMakefile   "grt_vc.tmf"
  51.   RTWMakeCommand   "make_rtw"
  52.   RTWGenerateCodeOnly   off
  53.   ExtModeMexFile   "ext_comm"
  54.   ExtModeBatchMode   off
  55.   BlockDefaults {
  56.     Orientation     right
  57.     ForegroundColor     black
  58.     BackgroundColor     white
  59.     DropShadow     off
  60.     NamePlacement     normal
  61.     FontName     "Helvetica"
  62.     FontSize     10
  63.     FontWeight     normal
  64.     FontAngle     normal
  65.     ShowName     on
  66.   }
  67.   AnnotationDefaults {
  68.     HorizontalAlignment     center
  69.     VerticalAlignment     middle
  70.     ForegroundColor     black
  71.     BackgroundColor     white
  72.     DropShadow     off
  73.     FontName     "Helvetica"
  74.     FontSize     10
  75.     FontWeight     normal
  76.     FontAngle     normal
  77.   }
  78.   LineDefaults {
  79.     FontName     "Helvetica"
  80.     FontSize     9
  81.     FontWeight     normal
  82.     FontAngle     normal
  83.   }
  84.   System {
  85.     Name     "sim12ex11"
  86.     Location     [147, 280, 837, 694]
  87.     Open     on
  88.     ScreenColor     white
  89.     Block {
  90.       BlockType       Demux
  91.       Name       "Demux"
  92.       Ports       [1, 3, 0, 0, 0]
  93.       Position       [425, 96, 480, 164]
  94.       Outputs       "3"
  95.     }
  96.     Block {
  97.       BlockType       StateSpace
  98.       Name       "Feedback Gain nusing LQR Design."
  99.       Position       [295, 225, 365, 285]
  100.       Orientation       left
  101.       A       "[]"
  102.       B       "[]"
  103.       C       "[]"
  104.       D       "k"
  105.       X0       "0"
  106.       MaskType       "Regulator"
  107.       MaskDescription       "Linear quadratic regulator.n(Requires Control "
  108.       "Toolbox)"
  109.       MaskHelp       "Implements a linear state quadratic regulator. "
  110.       "Mask and unmask this block to see how it works."
  111.       MaskPromptString       "Plant A matrix:|Plant B matrix:|Plant C matrix:|"
  112.       "Plant D matrix:|Output weighting, y'Qy:|Input "
  113.       "weighting, u'Ru:"
  114.       MaskStyleString       "edit,edit,edit,edit,edit,edit"
  115.       MaskInitialization      "[k]=lqry(@1,@2,@3,@4,@5,@6);"
  116.       MaskDisplay       "disp('K')"
  117.       MaskIconFrame       on
  118.       MaskIconOpaque       on
  119.       MaskIconRotate       none
  120.       MaskIconUnits       autoscale
  121.       MaskValueString       "[-5   0   -100;  2   -2    0;   0    0.1   "
  122.       "-0.08]|[0;   0;    -0.1]|eye(3)|zeros(3,1)|[20, "
  123.       "0  0;  0  10   0;  0   0   5]      |eye(1,1)*.15"
  124.     }
  125.     Block {
  126.       BlockType       Scope
  127.       Name       "Scope"
  128.       Ports       [1, 0, 0, 0, 0]
  129.       Position       [540, 126, 580, 174]
  130.       Floating       off
  131.       Location       [188, 365, 512, 604]
  132.       Open       off
  133.       Grid       on
  134.       TickLabels       on
  135.       ZoomMode       on
  136.       TimeRange       "auto"
  137.       YMin       "-5"
  138.       YMax       "5"
  139.       SaveToWorkspace       off
  140.       SaveName       "ScopeData"
  141.       LimitMaxRows       on
  142.       MaxRows       "5000"
  143.       Decimation       "1"
  144.       SampleInput       off
  145.       SampleTime       "0"
  146.     }
  147.     Block {
  148.       BlockType       StateSpace
  149.       Name       "State-Space"
  150.       Position       [260, 99, 360, 161]
  151.       A       "[-5  0  -100;  2  -2  0;  0  0.1  -0.08]"
  152.       B       "[0;   0 ;  -0.1]"
  153.       C       "eye(3)"
  154.       D       "zeros(3, 1)"
  155.       X0       "0"
  156.     }
  157.     Block {
  158.       BlockType       Step
  159.       Name       "Step Input"
  160.       Position       [55, 95, 95, 135]
  161.       Time       "10"
  162.       Before       "0.2"
  163.       After       ".2"
  164.     }
  165.     Block {
  166.       BlockType       Sum
  167.       Name       "Sum"
  168.       Ports       [2, 1, 0, 0, 0]
  169.       Position       [185, 104, 210, 151]
  170.       Inputs       "+-"
  171.     }
  172.     Line {
  173.       SrcBlock       "Sum"
  174.       SrcPort       1
  175.       DstBlock       "State-Space"
  176.       DstPort       1
  177.     }
  178.     Line {
  179.       SrcBlock       "Step Input"
  180.       SrcPort       1
  181.       DstBlock       "Sum"
  182.       DstPort       1
  183.     }
  184.     Line {
  185.       SrcBlock       "Demux"
  186.       SrcPort       3
  187.       DstBlock       "Scope"
  188.       DstPort       1
  189.     }
  190.     Line {
  191.       SrcBlock       "State-Space"
  192.       SrcPort       1
  193.       Points       [30, 0]
  194.       Branch {
  195. DstBlock "Demux"
  196. DstPort 1
  197.       }
  198.       Branch {
  199. Points [0, 125]
  200. DstBlock "Feedback Gain nusing LQR Design."
  201. DstPort 1
  202.       }
  203.     }
  204.     Line {
  205.       SrcBlock       "Feedback Gain nusing LQR Design."
  206.       SrcPort       1
  207.       Points       [-135, 0; 0, -115]
  208.       DstBlock       "Sum"
  209.       DstPort       2
  210.     }
  211.     Annotation {
  212.       Position       [348, 335]
  213.       FontSize       12
  214.       Text       "Simulation block diagram for Example 12.11"
  215.     }
  216.     Annotation {
  217.       Position       [512, 132]
  218.       VerticalAlignment       top
  219.       Text       "Dw"
  220.     }
  221.     Annotation {
  222.       Position       [322, 47]
  223.       VerticalAlignment       top
  224.       FontSize       12
  225.       Text       "LQG Demo. Start simulation.nTry varying "
  226.       "weighting parameters."
  227.     }
  228.   }
  229. }