⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 motorolc.mdl

📁 书籍代码:遗传演算法原理与应用_活用MATLAB(Source Code)
💻 MDL
📖 第 1 页 / 共 3 页
字号:
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [135, 205, 165, 235]
	  Value			  "L1"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Integral Subsystem"
	  Ports			  [1, 1]
	  Position		  [185, 76, 245, 114]
	  ShowPortLabels	  on
	  TreatAsAtomicUnit	  off
	  RTWSystemCode		  "Auto"
	  RTWFcnNameOpts	  "Auto"
	  RTWFileNameOpts	  "Auto"
	  System {
	    Name		    "Integral Subsystem"
	    Location		    [-3, 283, 403, 418]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "automatic"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "A4"
	    PaperUnits		    "centimeters"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "In1"
	      Position		      [25, 40, 55, 54]
	      Port		      "1"
	      LatchInput	      off
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Kp"
	      Position		      [90, 26, 135, 64]
	      Gain		      "Ts"
	      Multiplication	      "Element-wise(K.*u)"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum"
	      Ports		      [2, 1]
	      Position		      [170, 35, 190, 55]
	      ShowName		      off
	      IconShape		      "round"
	      Inputs		      "|++"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      UnitDelay
	      Name		      "Unit Delay"
	      Position		      [230, 65, 265, 105]
	      Orientation	      "left"
	      FontSize		      10
	      X0		      "0"
	      SampleTime	      "Ts"
	      RTWStateStorageClass    "Auto"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "I[n]"
	      Position		      [325, 40, 355, 54]
	      Port		      "1"
	      OutputWhenDisabled      "held"
	      InitialOutput	      "[]"
	    }
	    Line {
	      SrcBlock		      "In1"
	      SrcPort		      1
	      DstBlock		      "Kp"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Sum"
	      SrcPort		      1
	      Points		      [110, 0]
	      Branch {
		DstBlock		"I[n]"
		DstPort			1
	      }
	      Branch {
		Points			[0, 40]
		DstBlock		"Unit Delay"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Kp"
	      SrcPort		      1
	      DstBlock		      "Sum"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Unit Delay"
	      SrcPort		      1
	      Points		      [-45, 0]
	      DstBlock		      "Sum"
	      DstPort		      2
	    }
	  }
	}
	Block {
	  BlockType		  Gain
	  Name			  "Kd"
	  Position		  [245, 129, 295, 171]
	  Gain			  "Kd"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Gain
	  Name			  "Ki"
	  Position		  [100, 78, 145, 112]
	  Gain			  "Ki"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Gain
	  Name			  "Kp"
	  Position		  [225, 21, 270, 59]
	  Gain			  "Kp"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1]
	  Position		  [395, 176, 415, 229]
	  Inputs		  "2"
	  Multiplication	  "Element-wise(.*)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  RelationalOperator
	  Name			  "Relational\nOperator"
	  Position		  [325, 197, 355, 228]
	  Operator		  "<="
	}
	Block {
	  BlockType		  Saturate
	  Name			  "Saturation\n+-10"
	  Position		  [390, 59, 420, 91]
	  UpperLimit		  "10"
	  LowerLimit		  "-10"
	  LinearizeAsGain	  on
	}
	Block {
	  BlockType		  Saturate
	  Name			  "Saturation1, L2"
	  Position		  [440, 190, 470, 220]
	  UpperLimit		  "L2"
	  LowerLimit		  "-L2"
	  LinearizeAsGain	  on
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [3, 1]
	  Position		  [325, 55, 365, 95]
	  IconShape		  "round"
	  Inputs		  "++-"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "Zero-Order\nHold"
	  Position		  [440, 59, 470, 91]
	  SampleTime		  "Ts"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "difference2"
	  Ports			  [1, 1]
	  Position		  [75, 131, 125, 169]
	  ShowPortLabels	  on
	  TreatAsAtomicUnit	  off
	  RTWSystemCode		  "Auto"
	  RTWFcnNameOpts	  "Auto"
	  RTWFileNameOpts	  "Auto"
	  System {
	    Name		    "difference2"
	    Location		    [263, 272, 708, 369]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "In1"
	      Position		      [20, 33, 50, 47]
	      Port		      "1"
	      LatchInput	      off
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum"
	      Ports		      [2, 1]
	      Position		      [235, 30, 255, 50]
	      ShowName		      off
	      IconShape		      "round"
	      Inputs		      "|-+"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      UnitDelay
	      Name		      "Unit Delay"
	      Position		      [115, 20, 150, 60]
	      FontSize		      10
	      X0		      "0"
	      SampleTime	      "Ts"
	      RTWStateStorageClass    "Auto"
	    }
	    Block {
	      BlockType		      UnitDelay
	      Name		      "Unit Delay1"
	      Position		      [175, 20, 210, 60]
	      FontSize		      10
	      X0		      "0"
	      SampleTime	      "Ts"
	      RTWStateStorageClass    "Auto"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "gain"
	      Position		      [290, 16, 360, 64]
	      Gain		      "1/(2*Ts)"
	      Multiplication	      "Element-wise(K.*u)"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "D[n]"
	      Position		      [380, 33, 410, 47]
	      Port		      "1"
	      OutputWhenDisabled      "held"
	      InitialOutput	      "[]"
	    }
	    Line {
	      SrcBlock		      "In1"
	      SrcPort		      1
	      Points		      [30, 0]
	      Branch {
		DstBlock		"Unit Delay"
		DstPort			1
	      }
	      Branch {
		Points			[0, 25]
		DstBlock		"Sum"
		DstPort			2
	      }
	    }
	    Line {
	      SrcBlock		      "gain"
	      SrcPort		      1
	      DstBlock		      "D[n]"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Unit Delay"
	      SrcPort		      1
	      DstBlock		      "Unit Delay1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Unit Delay1"
	      SrcPort		      1
	      DstBlock		      "Sum"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Sum"
	      SrcPort		      1
	      DstBlock		      "gain"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Outport
	  Name			  "control"
	  Position		  [490, 68, 520, 82]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "[]"
	}
	Line {
	  SrcBlock		  "difference2"
	  SrcPort		  1
	  DstBlock		  "2-point ave."
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "2-point ave."
	  SrcPort		  1
	  Points		  [5, 0]
	  Branch {
	    DstBlock		    "Kd"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 45]
	    DstBlock		    "Abs"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "e[n]"
	  SrcPort		  1
	  Points		  [0, 0; 10, 0]
	  Branch {
	    Points		    [0, -45]
	    DstBlock		    "Kp"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 10]
	    DstBlock		    "Ki"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Saturation\n+-10"
	  SrcPort		  1
	  DstBlock		  "Zero-Order\nHold"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  DstBlock		  "Saturation\n+-10"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Zero-Order\nHold"
	  SrcPort		  1
	  DstBlock		  "control"
	  DstPort		  1
	}
	Line {
	  Labels		  [0, 0]
	  SrcBlock		  "Kd"
	  SrcPort		  1
	  Points		  [45, 0]
	  DstBlock		  "Sum1"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Kp"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Integral Subsystem"
	  SrcPort		  1
	  Points		  [50, 0; 0, 95]
	  DstBlock		  "Product"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "p_fbk"
	  SrcPort		  1
	  DstBlock		  "difference2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Abs"
	  SrcPort		  1
	  Points		  [10, 0]
	  DstBlock		  "Relational\nOperator"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant"
	  SrcPort		  1
	  Points		  [95, 0; 0, 10; 45, 0]
	  DstBlock		  "Relational\nOperator"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Relational\nOperator"
	  SrcPort		  1
	  DstBlock		  "Product"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Saturation1, L2"
	  SrcPort		  1
	  Points		  [5, 0; 0, -60; -170, 0]
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  DstBlock		  "Saturation1, L2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Ki"
	  SrcPort		  1
	  DstBlock		  "Integral Subsystem"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Double click\non this for demo.5"
      Ports		      []
      Position		      [240, 244, 411, 275]
      BackgroundColor	      "green"
      ShowName		      off
      OpenFcn		      "moto_data2"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      MaskDisplay	      "disp('Load initial data before simulation\\nDou"
"ble clicks on this ICON')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"Double click\non this for demo.5"
	Location		[44, 351, 171, 504]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
      }
    }
    Block {
      BlockType		      Gain
      Name		      "Kd2"
      Position		      [155, 212, 210, 238]
      Gain		      "2"
      Multiplication	      "Element-wise(K.*u)"
      SaturateOnIntegerOverflow	on
    }
    Block {
      BlockType		      Gain
      Name		      "Kd4"
      Position		      [150, 272, 205, 298]
      Gain		      "2"
      Multiplication	      "Element-wise(K.*u)"
      SaturateOnIntegerOverflow	on
    }
    Block {
      BlockType		      MATLABFcn
      Name		      "MATLAB Fcn"
      Position		      [425, 120, 485, 150]
      MATLABFcn		      "round"
      OutputDimensions	      "-1"
      OutputSignalType	      "auto"
      Output1D		      on
    }
    Block {
      BlockType		      SubSystem
      Name		      "Motor Subsystem"
      Ports		      [1, 2]
      Position		      [290, 125, 350, 165]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      System {
	Name			"Motor Subsystem"
	Location		[93, 171, 591, 309]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"automatic"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [25, 38, 55, 52]
	  Port			  "1"
	  LatchInput		  off
	  Interpolate		  on
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator"
	  Ports			  [1, 1]
	  Position		  [305, 31, 330, 59]
	  ExternalReset		  "none"

⌨️ 快捷键说明

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