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

📄 test_fangbo_pid.mdl

📁 控制电机程序
💻 MDL
📖 第 1 页 / 共 2 页
字号:
      Outputs		      "3"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [1]
      Position		      [640, 59, 670, 91]
      Location		      [393, 107, 717, 346]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope1"
      Ports		      [1]
      Position		      [645, 134, 675, 166]
      Location		      [55, 411, 379, 650]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      SaveName		      "ScopeData1"
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope2"
      Ports		      [1]
      Position		      [650, 249, 680, 281]
      Location		      [188, 365, 512, 604]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      SaveName		      "ScopeData2"
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Subsystem"
      Ports		      [1, 1]
      Position		      [220, 129, 320, 171]
      TreatAsAtomicUnit	      off
      MaskPromptString	      "Kp:|Ki:|Upper Limit:|Lower Limit:"
      MaskStyleString	      "edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVarAliasString      ",,,"
      MaskVariables	      "Kp=@1;Ki=@2;L_upper=@3;L_lower=@4;"
      MaskDisplay	      "fprintf('PI Controller');"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "0.1|10|4|-4"
      System {
	Name			"Subsystem"
	Location		[433, 403, 931, 703]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [55, 103, 85, 117]
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [205, 170, 235, 200]
	  Orientation		  "left"
	  Gain			  "1000"
	}
	Block {
	  BlockType		  Saturate
	  Name			  "Saturation"
	  Position		  [325, 95, 355, 125]
	  UpperLimit		  "L_upper"
	  LowerLimit		  "L_lower"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [120, 100, 140, 120]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1]
	  Position		  [260, 175, 280, 195]
	  Orientation		  "left"
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	}
	Block {
	  BlockType		  TransferFcn
	  Name			  "Transfer Fcn"
	  Position		  [200, 92, 260, 128]
	  Numerator		  "[Kp Ki]"
	  Denominator		  "[1 0]"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [405, 103, 435, 117]
	}
	Line {
	  SrcBlock		  "Transfer Fcn"
	  SrcPort		  1
	  Points		  [40, 0]
	  Branch {
	    DstBlock		    "Saturation"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 75]
	    DstBlock		    "Sum1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Saturation"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    DstBlock		    "Out1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 100]
	    DstBlock		    "Sum1"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Transfer Fcn"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  Points		  [-70, 0]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  DstBlock		  "Gain"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      Ports		      [2, 1]
      Position		      [175, 140, 195, 160]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|+-"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
    }
    Block {
      BlockType		      SubSystem
      Name		      "fangbo\n"
      Ports		      [1, 1]
      Position		      [400, 129, 500, 171]
      TreatAsAtomicUnit	      off
      MaskType		      "DDC_HY_8072"
      MaskPromptString	      "Sample Time:"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "T_samp=@1;"
      MaskDisplay	      "fprintf('fangbo_HY_8072');"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "0.001"
      System {
	Name			"fangbo\n"
	Location		[433, 403, 931, 703]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [110, 103, 140, 117]
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function"
	  Ports			  [1, 1]
	  Position		  [205, 95, 265, 125]
	  FunctionName		  "fangbo_HY_8072"
	  Parameters		  "T_samp"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [360, 103, 390, 117]
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  DstBlock		  "S-Function"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function"
	  SrcPort		  1
	  DstBlock		  "Out1"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "fangbo\n"
      SrcPort		      1
      DstBlock		      "Demux"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      2
      Points		      [0, 0; 60, 0]
      Branch {
	DstBlock		"Scope1"
	DstPort			1
      }
      Branch {
	Points			[0, 150; -435, 0]
	DstBlock		"Sum"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      1
      Points		      [30, 0; 0, -65]
      DstBlock		      "Scope"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      3
      Points		      [35, 0; 0, 105]
      DstBlock		      "Scope2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Subsystem"
      SrcPort		      1
      Points		      [0, 0; 25, 0]
      Branch {
	Points			[0, -85]
	DstBlock		"ControllerOut"
	DstPort			1
      }
      Branch {
	DstBlock		"fangbo\n"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Sum"
      SrcPort		      1
      DstBlock		      "Subsystem"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Constant"
      SrcPort		      1
      DstBlock		      "Sum"
      DstPort		      1
    }
  }
}

⌨️ 快捷键说明

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