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

📄 a_ss_controller.mdl

📁 这是一个电机PID控制的程序
💻 MDL
📖 第 1 页 / 共 4 页
字号:
	      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]
	      Branch {
		DstBlock		"th_l"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Sum4"
		DstPort			2
	      }
	    }
	    Line {
	      Name		      "dth_l"
	      Labels		      [0, 0]
	      SrcBlock		      "Integrator3"
	      SrcPort		      1
	      Points		      [0, 0; 30, 0]
	      Branch {
		Points			[0, 70]
		Branch {
		  DstBlock		  "dth_l"
		  DstPort		  1
		}
		Branch {
		  DstBlock		  "Load\ndamping"
		  DstPort		  1
		}
	      }
	      Branch {
		DstBlock		"Sum2"
		DstPort			2
	      }
	      Branch {
		DstBlock		"Integrator4"
		DstPort			1
	      }
	    }
	  }
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [4, 1]
	  Position		  [390, 327, 395, 483]
	  ShowName		  off
	  DisplayOption		  "bar"
	  Port {
	    PortNumber		    1
	    PropagatedSignals	    "dth_m, th_m, dth_l, th_l"
	    ShowPropagatedSignals   "on"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	}
	Block {
	  BlockType		  Terminator
	  Name			  "Terminator"
	  Position		  [300, 55, 320, 75]
	  ShowName		  off
	}
	Block {
	  BlockType		  Terminator
	  Name			  "Terminator1"
	  Position		  [325, 70, 345, 90]
	  ShowName		  off
	}
	Block {
	  BlockType		  Terminator
	  Name			  "Terminator2"
	  Position		  [235, 115, 255, 135]
	  ShowName		  off
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "dc_motor_detailed"
	  Ports			  [2, 7]
	  Position		  [80, 30, 205, 130]
	  BackgroundColor	  "lightBlue"
	  DropShadow		  on
	  AncestorBlock		  "dc_motor_lib/dc_motor_detailed"
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  MaskHideContents	  off
	  MaskPromptString	  "Terminal Resistance (ohms)|Terminal inducta"
"nce (H)|Back EMF Constant (Vs/Rad)|Torque Constant (Nm/A)|Rotor Inertia (Kgm^"
"2)|Mechanical Damping (Nms/rad)|Thermal Resistance (K/W)|Thermal time constan"
"t (s)|Ambient temperature (C)"
	  MaskStyleString	  "edit,edit,edit,edit,edit,edit,edit,edit,edi"
"t"
	  MaskTunableValueString  "on,on,on,on,on,on,on,on,on"
	  MaskCallbackString	  "||||||||"
	  MaskEnableString	  "on,on,on,on,on,on,on,on,on"
	  MaskVisibilityString	  "on,on,on,on,on,on,on,on,on"
	  MaskToolTipString	  "on,on,on,on,on,on,on,on,on"
	  MaskVarAliasString	  ",,,,,,,,"
	  MaskVariables		  "Rm=@1;Lm=@2;Kb=@3;Kt=@4;Jm=@5;bm=@6;Ktemp=@"
"7;ttemp=@8;amb_temp=@9;"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  MaskValueString	  "Rm|Lm|Kb|Kt|Jm|bm|14|910|22"
	  MaskTabNameString	  ",,,,,,,,"
	  Port {
	    PortNumber		    1
	    Name		    "current"
	    PropagatedSignals	    "Current"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	  Port {
	    PortNumber		    5
	    Name		    "dth_m"
	    PropagatedSignals	    "dth_m"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	  Port {
	    PortNumber		    6
	    Name		    "th_m"
	    PropagatedSignals	    "th_m"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	  System {
	    Name		    "dc_motor_detailed"
	    Location		    [7, 384, 866, 964]
	    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		      [15, 88, 45, 102]
	      IconDisplay	      "Port number"
	      Port {
		PortNumber		1
		Name			"Voltage_in"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "counter_torque"
	      Position		      [90, 423, 120, 437]
	      Port		      "2"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Abs
	      Name		      "Abs"
	      Position		      [460, 240, 490, 270]
	      SaturateOnIntegerOverflow	off
	      ZeroCross		      on
	      SampleTime	      "-1"
	    }
	    Block {
	      BlockType		      Abs
	      Name		      "Abs1"
	      Position		      [460, 285, 490, 315]
	      SaturateOnIntegerOverflow	off
	      ZeroCross		      on
	      SampleTime	      "-1"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Ambient_temp"
	      Position		      [610, 224, 695, 256]
	      Value		      "amb_temp"
	      VectorParams1D	      on
	      SamplingMode	      "Sample based"
	      OutDataTypeMode	      "Inherit from 'Constant value'"
	      OutDataType	      "sfix(16)"
	      ConRadixGroup	      "Use specified scaling"
	      OutScaling	      "2^0"
	      SampleTime	      "inf"
	      FramePeriod	      "inf"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Back EMF"
	      Position		      [95, 125, 135, 155]
	      Gain		      "Kb"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Product
	      Name		      "Divide"
	      Ports		      [2, 1]
	      Position		      [535, 262, 565, 293]
	      Inputs		      "**"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      OutScaling	      "2^-10"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	      Port {
		PortNumber		1
		Name			"Pm"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Inductance"
	      Position		      [245, 79, 300, 111]
	      Gain		      "1/Lm"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Integrator
	      Name		      "Integrator"
	      Ports		      [1, 1]
	      Position		      [350, 80, 380, 110]
	      IgnoreLimit	      off
	      Port {
		PortNumber		1
		Name			"Current"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Integrator
	      Name		      "Integrator1"
	      Ports		      [1, 1]
	      Position		      [350, 350, 380, 380]
	      IgnoreLimit	      off
	      Port {
		PortNumber		1
		Name			"dth_m"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Integrator
	      Name		      "Integrator2"
	      Ports		      [1, 1]
	      Position		      [470, 350, 500, 380]
	      IgnoreLimit	      off
	      Port {
		PortNumber		1
		Name			"th_m"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Integrator
	      Name		      "Integrator5"
	      Ports		      [1, 1]
	      Position		      [665, 160, 695, 190]
	      IgnoreLimit	      off
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Motor Resistance"
	      Position		      [240, 19, 295, 51]
	      Orientation	      "left"
	      Gain		      "Rm"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Rotor inertia"
	      Position		      [230, 349, 275, 381]
	      Gain		      "1/Jm"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	      Port {
		PortNumber		1
		Name			"ddth_m"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum"
	      Ports		      [3, 1]
	      Position		      [170, 85, 190, 105]
	      ShowName		      off
	      IconShape		      "round"
	      Inputs		      "-+-"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum1"
	      Ports		      [3, 1]
	      Position		      [175, 355, 195, 375]
	      ShowName		      off
	      IconShape		      "round"
	      Inputs		      "-+-"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum7"
	      Ports		      [2, 1]
	      Position		      [520, 165, 540, 185]
	      ShowName		      off
	      IconShape		      "round"
	      Inputs		      "-+|"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum8"
	      Ports		      [2, 1]
	      Position		      [730, 165, 750, 185]
	      ShowName		      off
	      IconShape		      "round"
	      Inputs		      "|++"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Thermal\nRecistance"
	      Position		      [560, 158, 635, 192]
	      Gain		      "1/Ktemp"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Thermal\ndamping"
	      Position		      [570, 104, 680, 136]
	      Orientation	      "left"
	      Gain		      "Ktemp/ttemp"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Torque Constant"
	      Position		      [90, 350, 130, 380]
	      Gain		      "Kt"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	      Port {
		PortNumber		1
		Name			"torque"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Visc damp1"
	      Position		      [260, 282, 310, 318]
	      Orientation	      "left"
	      Gain		      "bm"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Im"
	      Position		      [780, 88, 810, 102]
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "back_emf"
	      Position		      [210, 133, 240, 147]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "P_m"
	      Position		      [780, 273, 810, 287]
	      Port		      "3"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "ddth_m"
	      Position		      [780, 518, 810, 532]
	      Port		      "4"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "dth_m"
	      Position		      [780, 468, 810, 482]
	      Port		      "5"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "th_m"
	      Position		      [780, 358, 810, 372]
	      Port		      "6"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "temp_m"
	      Position		      [780, 168, 810, 182]
	      Port		      "7"
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	    }
	    Line {
	      SrcBlock		      "Back EMF"
	      SrcPort		      1
	      Points		      [40, 0]
	      Branch {
		DstBlock		"Sum"
		DstPort			3
	      }
	      Branch {
		DstBlock		"back_emf"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Motor Resistance"
	      SrcPort		      1
	      Points		      [-55, 0]
	      DstBlock		      "Sum"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Sum"
	      SrcPort		      1
	      DstBlock		      "Inductance"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Inductance"
	      SrcPort		      1
	      Points		      [0, 0]
	      DstBlock		      "Integrator"
	      DstPort		      1
	    }
	    Line {

⌨️ 快捷键说明

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