block420.mdl

来自「realize analysis and design for computer」· MDL 代码 · 共 555 行

MDL
555
字号
Model {  Name			  "block420"  Version		  2.00  SimParamPage		  Solver  SampleTimeColors	  off  WideVectorLines	  on  PaperOrientation	  landscape  StartTime		  "0.0"  StopTime		  "999999"  Solver		  ode23  RelTol		  "1e-3"  AbsTol		  "1e-6"  Refine		  "1"  MaxStep		  "auto"  InitialStep		  "auto"  FixedStep		  "auto"  MaxOrder		  5  OutputOption		  RefineOutputTimes  OutputTimes		  "[]"  LoadExternalInput	  off  ExternalInput		  "[t, u]"  SaveTime		  off  TimeSaveName		  "tout"  SaveState		  off  StateSaveName		  "xout"  SaveOutput		  off  OutputSaveName	  "yout"  LoadInitialState	  off  InitialState		  "xInitial"  SaveFinalState	  off  FinalStateName	  "xFinal"  LimitMaxRows		  off  MaxRows		  "1000"  Decimation		  "1"  AlgebraicLoopMsg	  warning  MinStepSizeMsg	  warning  UnconnectedInputMsg	  warning  UnconnectedOutputMsg	  warning  UnconnectedLineMsg	  warning  ConsistencyChecking	  off  ZeroCross		  on  BlockDefaults {    Orientation		    right    ForegroundColor	    black    BackgroundColor	    white    DropShadow		    off    NamePlacement	    normal    FontName		    "Helvetica"    FontSize		    10    FontWeight		    normal    FontAngle		    normal    ShowName		    on  }  AnnotationDefaults {    HorizontalAlignment	    center    VerticalAlignment	    middle    ForegroundColor	    black    BackgroundColor	    white    DropShadow		    off    FontName		    "Helvetica"    FontSize		    10    FontWeight		    normal    FontAngle		    normal  }  System {    Name		    "block420"    Location		    [121, 174, 621, 461]    Open		    on    ScreenColor		    white    Block {      BlockType		      SubSystem      Name		      "Pulse"      Position		      [45, 203, 70, 227]      DropShadow	      on      ShowPortLabels	      off      MaskType		      "Pulse"      MaskDescription	      "Pulse Generator."      MaskHelp		      "Pulse generator which ensures pulse\\ntransition"			      "s are hit. Provides a vector of pulses when "			      "the height is entered as a vector.\\nUnmask "			      "to see how it works."      MaskPromptString	      "Pulse width:|Pulse height:|Pulse start time:"      MaskStyleString	      "edit,edit,edit"      MaskInitialization      "width=@1;height=@2;tstep=@3;"      MaskDisplay	      "plot(-30,-10,100,100,[60,35,35,20,20,0],[20,20,8"			      "0,80,20,20])"      MaskIconFrame	      on      MaskIconOpaque	      on      MaskIconRotate	      off      MaskIconUnits	      autoscale      MaskValueString	      "0.1|-10|25"      System {	Name			"Pulse"	Location		[100, 215, 335, 385]	Open			off	ScreenColor		white	Block {	  BlockType		  Step	  Name			  "Step Input1"	  Position		  [65, 50, 85, 70]	  ShowName		  off	  Time			  "tstep"	  Before		  "0"	  After			  "height"	}	Block {	  BlockType		  Step	  Name			  "Step Input2"	  Position		  [65, 105, 85, 125]	  ShowName		  off	  Time			  "tstep+width"	  Before		  "0"	  After			  "height"	}	Block {	  BlockType		  Sum	  Name			  "Sum"	  Position		  [145, 75, 165, 95]	  Inputs		  "+-"	}	Block {	  BlockType		  Outport	  Name			  "out_1"	  Position		  [205, 75, 225, 95]	  Port			  "1"	  OutputWhenDisabled	  held	  InitialOutput		  "0"	}	Line {	  SrcBlock		  "Sum"	  SrcPort		  1	  DstBlock		  "out_1"	  DstPort		  1	}	Line {	  SrcBlock		  "Step Input1"	  SrcPort		  1	  Points		  [15, 0; 0, 20]	  DstBlock		  "Sum"	  DstPort		  1	}	Line {	  SrcBlock		  "Step Input2"	  SrcPort		  1	  Points		  [25, 0; 0, -25]	  DstBlock		  "Sum"	  DstPort		  2	}      }    }    Block {      BlockType		      SubSystem      Name		      "Robot"      Position		      [235, 130, 265, 185]      DropShadow	      on      ShowPortLabels	      off      System {	Name			"Robot"	Location		[42, 365, 453, 546]	Open			off	ScreenColor		white	Block {	  BlockType		  Inport	  Name			  "u"	  Position		  [30, 40, 50, 60]	  Port			  "1"	  PortWidth		  "-1"	  SampleTime		  "-1"	}	Block {	  BlockType		  Inport	  Name			  "v"	  Position		  [30, 85, 50, 105]	  Port			  "2"	  PortWidth		  "-1"	  SampleTime		  "-1"	}	Block {	  BlockType		  Demux	  Name			  "Demux"	  Position		  [260, 56, 300, 89]	  Outputs		  "[1 3]"	}	Block {	  BlockType		  Mux	  Name			  "Mux2"	  Position		  [90, 56, 120, 89]	  DropShadow		  on	  ShowName		  off	  Inputs		  "2"	}	Block {	  BlockType		  StateSpace	  Name			  "robmech"	  Position		  [150, 54, 225, 96]	  A			  "om0*[0 1 -1;  al-1 -be1 be1; al  be2 -be2]"	  B			  "[0 0; ga de; 0 0]"	  C			  "[0 0 om0;1 0 0; 0 1 0; 0 0 1]"	  D			  "[0 0; 0 0; 0 0; 0 0]"	  X0			  "0"	}	Block {	  BlockType		  Outport	  Name			  "y"	  Position		  [350, 25, 370, 45]	  Port			  "1"	  OutputWhenDisabled	  held	  InitialOutput		  "0"	}	Block {	  BlockType		  Outport	  Name			  "x"	  Position		  [350, 70, 370, 90]	  Port			  "2"	  OutputWhenDisabled	  held	  InitialOutput		  "0"	}	Line {	  SrcBlock		  "Demux"	  SrcPort		  1	  Points		  [15, 0; 0, -30]	  DstBlock		  "y"	  DstPort		  1	}	Line {	  SrcBlock		  "u"	  SrcPort		  1	  Points		  [5, 0; 0, 15]	  DstBlock		  "Mux2"	  DstPort		  1	}	Line {	  SrcBlock		  "v"	  SrcPort		  1	  Points		  [5, 0; 0, -15]	  DstBlock		  "Mux2"	  DstPort		  2	}	Line {	  SrcBlock		  "Demux"	  SrcPort		  2	  DstBlock		  "x"	  DstPort		  1	}	Line {	  SrcBlock		  "Mux2"	  SrcPort		  1	  DstBlock		  "robmech"	  DstPort		  1	}	Line {	  SrcBlock		  "robmech"	  SrcPort		  1	  DstBlock		  "Demux"	  DstPort		  1	}      }    }    Block {      BlockType		      Step      Name		      "Step Input"      Position		      [50, 120, 70, 140]      DropShadow	      on      ShowName		      off      Time		      "0"      Before		      "0"      After		      "1"    }    Block {      BlockType		      SubSystem      Name		      "dstfb3"      Position		      [170, 115, 200, 170]      BackgroundColor	      magenta      DropShadow	      on      ShowPortLabels	      off      System {	Name			"dstfb3"	Location		[596, 457, 952, 707]	Open			off	ScreenColor		magenta	Block {	  BlockType		  Inport	  Name			  "uc"	  Position		  [20, 40, 40, 60]	  Port			  "1"	  PortWidth		  "-1"	  SampleTime		  "-1"	}	Block {	  BlockType		  Inport	  Name			  "x"	  Position		  [20, 140, 40, 160]	  Port			  "2"	  PortWidth		  "-1"	  SampleTime		  "-1"	}	Block {	  BlockType		  Demux	  Name			  "Demux"	  Position		  [70, 134, 110, 166]	  BackgroundColor	  magenta	  ShowName		  off	  Outputs		  "3"	}	Block {	  BlockType		  Sum	  Name			  "Sum2"	  Position		  [280, 82, 300, 128]	  BackgroundColor	  magenta	  DropShadow		  on	  ShowName		  off	  Inputs		  "+---"	}	Block {	  BlockType		  ZeroOrderHold	  Name			  "ZoH4"	  Position		  [140, 35, 180, 65]	  BackgroundColor	  magenta	  DropShadow		  on	  ShowName		  off	  SampleTime		  "[h t0]"	}	Block {	  BlockType		  ZeroOrderHold	  Name			  "ZoH5"	  Position		  [140, 85, 180, 115]	  BackgroundColor	  magenta	  DropShadow		  on	  ShowName		  off	  SampleTime		  "[h t0]"	}	Block {	  BlockType		  ZeroOrderHold	  Name			  "ZoH6"	  Position		  [140, 135, 180, 165]	  BackgroundColor	  magenta	  DropShadow		  on	  ShowName		  off	  SampleTime		  "[h t0]"	}	Block {	  BlockType		  ZeroOrderHold	  Name			  "ZoH7"	  Position		  [140, 185, 180, 215]	  BackgroundColor	  magenta	  DropShadow		  on	  ShowName		  off	  SampleTime		  "[h t0]"	}	Block {	  BlockType		  Gain	  Name			  "l1"	  Position		  [200, 85, 230, 115]	  BackgroundColor	  magenta	  DropShadow		  on	  Gain			  "l1"	}	Block {	  BlockType		  Gain	  Name			  "l2"	  Position		  [200, 135, 230, 165]	  BackgroundColor	  magenta	  DropShadow		  on	  Gain			  "l2"	}	Block {	  BlockType		  Gain	  Name			  "l3"	  Position		  [200, 185, 230, 215]	  BackgroundColor	  magenta	  DropShadow		  on	  Gain			  "l3"	}	Block {	  BlockType		  Gain	  Name			  "lc"	  Position		  [200, 35, 230, 65]	  BackgroundColor	  magenta	  DropShadow		  on	  Gain			  "lc"	}	Block {	  BlockType		  Outport	  Name			  "u"	  Position		  [330, 95, 350, 115]	  Port			  "1"	  OutputWhenDisabled	  held	  InitialOutput		  "0"	}	Line {	  SrcBlock		  "Demux"	  SrcPort		  3	  Points		  [10, 0]	  DstBlock		  "ZoH7"	  DstPort		  1	}	Line {	  SrcBlock		  "Demux"	  SrcPort		  2	  DstBlock		  "ZoH6"	  DstPort		  1	}	Line {	  SrcBlock		  "Demux"	  SrcPort		  1	  Points		  [10, 0]	  DstBlock		  "ZoH5"	  DstPort		  1	}	Line {	  SrcBlock		  "x"	  SrcPort		  1	  DstBlock		  "Demux"	  DstPort		  1	}	Line {	  SrcBlock		  "l3"	  SrcPort		  1	  Points		  [30, 0]	  DstBlock		  "Sum2"	  DstPort		  4	}	Line {	  SrcBlock		  "ZoH7"	  SrcPort		  1	  DstBlock		  "l3"	  DstPort		  1	}	Line {	  SrcBlock		  "l1"	  SrcPort		  1	  DstBlock		  "Sum2"	  DstPort		  2	}	Line {	  SrcBlock		  "l2"	  SrcPort		  1	  Points		  [20, 0; 0, -40]	  DstBlock		  "Sum2"	  DstPort		  3	}	Line {	  SrcBlock		  "ZoH6"	  SrcPort		  1	  DstBlock		  "l2"	  DstPort		  1	}	Line {	  SrcBlock		  "ZoH5"	  SrcPort		  1	  DstBlock		  "l1"	  DstPort		  1	}	Line {	  SrcBlock		  "lc"	  SrcPort		  1	  Points		  [20, 0; 0, 40]	  DstBlock		  "Sum2"	  DstPort		  1	}	Line {	  SrcBlock		  "ZoH4"	  SrcPort		  1	  DstBlock		  "lc"	  DstPort		  1	}	Line {	  SrcBlock		  "uc"	  SrcPort		  1	  DstBlock		  "ZoH4"	  DstPort		  1	}	Line {	  SrcBlock		  "Sum2"	  SrcPort		  1	  DstBlock		  "u"	  DstPort		  1	}      }    }    Block {      BlockType		      Outport      Name		      "u"      Position		      [330, 135, 350, 155]      Port		      "1"      OutputWhenDisabled      held      InitialOutput	      "0"    }    Block {      BlockType		      Outport      Name		      "u1"      Position		      [265, 90, 285, 110]      Port		      "2"      OutputWhenDisabled      held      InitialOutput	      "0"    }    Block {      BlockType		      Outport      Name		      "u2"      Position		      [165, 60, 185, 80]      Port		      "3"      OutputWhenDisabled      held      InitialOutput	      "0"    }    Line {      SrcBlock		      "Robot"      SrcPort		      1      DstBlock		      "u"      DstPort		      1    }    Line {      SrcBlock		      "dstfb3"      SrcPort		      1      Points		      [0, 0]      Branch {	Points			[10, 0; 0, -45]	DstBlock		"u1"	DstPort			1      }      Branch {	DstBlock		"Robot"	DstPort			1      }    }    Line {      SrcBlock		      "Step Input"      SrcPort		      1      Points		      [0, 0]      Branch {	Points			[55, 0; 0, -60]	DstBlock		"u2"	DstPort			1      }      Branch {	DstBlock		"dstfb3"	DstPort			1      }    }    Line {      SrcBlock		      "Pulse"      SrcPort		      1      Points		      [140, 0; 0, -45]      DstBlock		      "Robot"      DstPort		      2    }    Line {      SrcBlock		      "Robot"      SrcPort		      2      Points		      [36, 0; 0, 75; -175, 0; 0, -90]      DstBlock		      "dstfb3"      DstPort		      2    }  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?