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

📄 b_ss_controller.mdl

📁 这是一个电机PID控制的程序
💻 MDL
📖 第 1 页 / 共 4 页
字号:
	  BlockType		  Gain
	  Name			  "Feed Forward"
	  Position		  [175, 32, 235, 68]
	  Gain			  "Kff"
	  ParameterDataTypeMode	  "Inherit via internal rule"
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	  SampleTime		  "Ts"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Integral Gain"
	  Position		  [265, 77, 325, 113]
	  Gain			  "L2(5)"
	  ParameterDataTypeMode	  "Inherit via internal rule"
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	  SampleTime		  "Ts"
	}
	Block {
	  BlockType		  Gain
	  Name			  "L2"
	  Position		  [416, 125, 464, 175]
	  Orientation		  "up"
	  Gain			  "L2(1:4)"
	  Multiplication	  "Matrix(K*u) (u vector)"
	  ParameterDataTypeMode	  "Inherit via internal rule"
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	  SampleTime		  "Ts"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [3, 1]
	  Position		  [430, 85, 450, 105]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "+--"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum3"
	  Ports			  [2, 1]
	  Position		  [80, 85, 100, 105]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "+-"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	  Port {
	    PortNumber		    1
	    Name		    "position error"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	}
	Block {
	  BlockType		  Outport
	  Name			  "U"
	  Position		  [515, 88, 545, 102]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "Integral Gain"
	  SrcPort		  1
	  Points		  [10, 0]
	  DstBlock		  "Discrete-Time\nIntegrator"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  DstBlock		  "U"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Ref"
	  SrcPort		  1
	  Points		  [40, 0]
	  Branch {
	    DstBlock		    "Sum3"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Feed Forward"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "states_X"
	  SrcPort		  1
	  Points		  [390, 0]
	  DstBlock		  "L2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "L2"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Discrete-Time\nIntegrator"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Encoder"
	  SrcPort		  1
	  Points		  [40, 0]
	  DstBlock		  "Sum3"
	  DstPort		  2
	}
	Line {
	  Name			  "position error"
	  Labels		  [0, 0]
	  SrcBlock		  "Sum3"
	  SrcPort		  1
	  DstBlock		  "Integral Gain"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Feed Forward"
	  SrcPort		  1
	  Points		  [200, 0]
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Demux
      Name		      "Demux"
      Ports		      [1, 4]
      Position		      [645, 166, 650, 204]
      BackgroundColor	      "black"
      ShowName		      off
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Mechanics"
      Ports		      [1, 4]
      Position		      [455, 73, 540, 172]
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      MaskHideContents	      off
      System {
	Name			"Mechanics"
	Location		[505, 98, 1120, 605]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Vin"
	  Position		  [25, 48, 55, 62]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Load"
	  Ports			  [2, 3]
	  Position		  [145, 298, 225, 372]
	  Orientation		  "left"
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  MaskHideContents	  off
	  Port {
	    PortNumber		    2
	    Name		    "dth_l"
	    PropagatedSignals	    "dth_l"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	  Port {
	    PortNumber		    3
	    Name		    "th_l"
	    PropagatedSignals	    "th_l"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	  System {
	    Name		    "Load"
	    Location		    [54, 146, 605, 484]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "A4"
	    PaperUnits		    "centimeters"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "dth_m"
	      Position		      [260, 25, 290, 40]
	      Orientation	      "down"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "th_m"
	      Position		      [350, 105, 380, 120]
	      Orientation	      "down"
	      Port		      "2"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Integrator
	      Name		      "Integrator3"
	      Ports		      [1, 1]
	      Position		      [210, 165, 240, 195]
	      IgnoreLimit	      off
	      Port {
		PortNumber		1
		Name			"dth_l"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Integrator
	      Name		      "Integrator4"
	      Ports		      [1, 1]
	      Position		      [300, 165, 330, 195]
	      IgnoreLimit	      off
	      Port {
		PortNumber		1
		Name			"th_l"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Load\ndamping"
	      Position		      [175, 233, 255, 267]
	      Orientation	      "left"
	      Gain		      "bl"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Rotor inertia1"
	      Position		      [115, 164, 160, 196]
	      Gain		      "1/Jl"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	      Port {
		PortNumber		1
		Name			"ddth_l"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Spring \nconstant"
	      Position		      [415, 135, 445, 165]
	      Gain		      "Ks"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	      Port {
		PortNumber		1
		Name			"torque_k"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Spring \ndamping"
	      Position		      [305, 70, 335, 100]
	      Gain		      "b"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	      Port {
		PortNumber		1
		Name			"torque_b"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum2"
	      Ports		      [2, 1]
	      Position		      [265, 75, 285, 95]
	      ShowName		      off
	      IconShape		      "round"
	      Inputs		      "+-"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum4"
	      Ports		      [2, 1]
	      Position		      [355, 140, 375, 160]
	      ShowName		      off
	      IconShape		      "round"
	      Inputs		      "+-"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum5"
	      Ports		      [2, 1]
	      Position		      [490, 105, 510, 125]
	      ShowName		      off
	      IconShape		      "round"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum6"
	      Ports		      [2, 1]
	      Position		      [70, 170, 90, 190]
	      ShowName		      off
	      IconShape		      "round"
	      Inputs		      "|+-"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "c_torque"
	      Position		      [45, 118, 75, 132]
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "dth_l"
	      Position		      [295, 243, 325, 257]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "th_l"
	      Position		      [480, 173, 510, 187]
	      Port		      "3"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Line {
	      SrcBlock		      "th_m"
	      SrcPort		      1
	      DstBlock		      "Sum4"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "dth_m"
	      SrcPort		      1
	      DstBlock		      "Sum2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Load\ndamping"
	      SrcPort		      1
	      Points		      [-90, 0]
	      DstBlock		      "Sum6"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Sum6"
	      SrcPort		      1
	      DstBlock		      "Rotor inertia1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Sum5"
	      SrcPort		      1
	      Points		      [10, 0; 0, 195; -495, 0; 0, -130]
	      Branch {
		DstBlock		"c_torque"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Sum6"
		DstPort			1
	      }
	    }
	    Line {
	      Name		      "torque_k"
	      Labels		      [0, 0]
	      SrcBlock		      "Spring \nconstant"
	      SrcPort		      1
	      Points		      [50, 0]
	      DstBlock		      "Sum5"
	      DstPort		      2
	    }
	    Line {
	      Name		      "torque_b"
	      Labels		      [0, 0]
	      SrcBlock		      "Spring \ndamping"
	      SrcPort		      1
	      Points		      [160, 0]
	      DstBlock		      "Sum5"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Sum4"
	      SrcPort		      1
	      DstBlock		      "Spring \nconstant"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Sum2"
	      SrcPort		      1
	      DstBlock		      "Spring \ndamping"
	      DstPort		      1
	    }
	    Line {
	      Name		      "ddth_l"
	      Labels		      [0, 0]
	      SrcBlock		      "Rotor inertia1"
	      SrcPort		      1
	      DstBlock		      "Integrator3"
	      DstPort		      1
	    }
	    Line {
	      Name		      "th_l"
	      Labels		      [0, 0]
	      SrcBlock		      "Integrator4"
	      SrcPort		      1
	      Points		      [0, 0; 30, 0]

⌨️ 快捷键说明

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