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

📄 pidex0.mdl

📁 关于电机的.m程序
💻 MDL
📖 第 1 页 / 共 4 页
字号:
	      SrcBlock		      "Gain"
	      SrcPort		      1
	      DstBlock		      "Integrator"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "er"
	      SrcPort		      1
	      Points		      [0, 0; 10, 0]
	      Branch {
		DstBlock		"Gain"
		DstPort			1
	      }
	      Branch {
		Points			[0, -50]
		DstBlock		"Gain1"
		DstPort			1
	      }
	      Branch {
		Points			[0, 50]
		DstBlock		"Gain2"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Sum"
	      SrcPort		      1
	      DstBlock		      "Saturation"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Saturation"
	      SrcPort		      1
	      DstBlock		      "c"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Integrator"
	      SrcPort		      1
	      DstBlock		      "Sum"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Gain2"
	      SrcPort		      1
	      DstBlock		      "approximate\nderivative"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "approximate\nderivative"
	      SrcPort		      1
	      Points		      [5, 0]
	      DstBlock		      "Sum"
	      DstPort		      3
	    }
	  }
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [90, 90, 110, 110]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "plant"
	  Ports			  [1, 1]
	  Position		  [255, 71, 350, 129]
	  BackgroundColor	  "orange"
	  ShowName		  off
	  TreatAsAtomicUnit	  off
	  MaskDisplay		  "disp('PLANT3')"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  System {
	    Name		    "plant"
	    Location		    [583, 588, 881, 672]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "In1"
	      Position		      [15, 38, 45, 52]
	      ForegroundColor	      "red"
	    }
	    Block {
	      BlockType		      TransferFcn
	      Name		      "G1"
	      Position		      [70, 28, 135, 62]
	      ForegroundColor	      "red"
	      Numerator		      "1"
	      Denominator	      "[4 1]"
	    }
	    Block {
	      BlockType		      TransferFcn
	      Name		      "G2"
	      Position		      [155, 28, 230, 62]
	      ForegroundColor	      "red"
	      Numerator		      "1"
	      Denominator	      "[4 .6 1]"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Out1"
	      Position		      [255, 38, 285, 52]
	      ForegroundColor	      "red"
	    }
	    Line {
	      SrcBlock		      "G1"
	      SrcPort		      1
	      DstBlock		      "G2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "In1"
	      SrcPort		      1
	      DstBlock		      "G1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "G2"
	      SrcPort		      1
	      DstBlock		      "Out1"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [430, 93, 460, 107]
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "PID controller3"
	  SrcPort		  1
	  DstBlock		  "plant"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "PID controller3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "plant"
	  SrcPort		  1
	  Points		  [40, 0]
	  Branch {
	    DstBlock		    "Out1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 65; -295, 0]
	    DstBlock		    "Sum"
	    DstPort		    2
	  }
	}
	Annotation {
	  Name			  "Kpu = 8.5\n Tu  = 0.19"
	  Position		  [455, 153]
	  FontName		  "Arial"
	  FontSize		  16
	}
      }
    }
    Block {
      BlockType		      Step
      Name		      "input"
      Position		      [340, 150, 370, 180]
      ForegroundColor	      "darkGreen"
      Time		      ".05"
      SampleTime	      "0"
    }
    Block {
      BlockType		      SubSystem
      Name		      "procedure"
      Ports		      []
      Position		      [164, 219, 316, 282]
      ForegroundColor	      "orange"
      DropShadow	      on
      ShowName		      off
      TreatAsAtomicUnit	      off
      MaskDisplay	      "plot(-1.5,-1.5,1.5,1.5,cos(0:.01:7),sin(0:.01:7"
") )\ndisp('PROCEDURE')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"procedure"
	Location		[26, 524, 567, 801]
	Open			on
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"99"
	Annotation {
	  Name			  "The controller parameters are obtained by f"
"irst operating in a linear mode\n(setting sat=inf). In the presence of a limi"
"ter, an antiwindup action is often\nrequired as shown here in two different i"
"mplementations of the antiwindup feature\ngiven in cases 1 and 2."
	  Position		  [60, 210]
	  HorizontalAlignment	  "left"
	  VerticalAlignment	  "top"
	  ForegroundColor	  "darkGreen"
	  FontSize		  12
	}
	Annotation {
	  Name			  "       P controller:    Kp = 0.5*Kpu      K"
"i = 0                          Kd = 0\n      PI controller :   Kp = 0.45*Kpu "
"    Ki = 0.54*Kpu/Tu     Kd = 0 \n                                  PID contr"
"oller:     Kp = 0.6*Kpu      Ki =  1.2*Kpu/Tu     Kd = 0.075*Kpu*Tu        "
	  Position		  [203, 172]
	  ForegroundColor	  "red"
	  FontName		  "Arial"
	  FontSize		  12
	}
	Annotation {
	  Name			  "PID parameter tuning"
	  Position		  [263, 22]
	  ForegroundColor	  "blue"
	  FontSize		  12
	  FontWeight		  "bold"
	}
	Annotation {
	  Name			  "The transfer function of a PID controller i"
"s often written in this form:\n                                    Gpid(s) = "
"Kp + Ki/s + Kd*s\nStep 1: Set Ki = 0 and Kd = 0. Increase Kp in steps until t"
"he closed-loop response reaches\n              a state of sustained oscillati"
"ons. Mark this so-called ultimate gain  denoted as Kpu. \n              Measu"
"re the corresponding period of oscillation at the output , call it Tu.\nStep "
"2: Now set the parameters of the controller in accordance with the Ziegler-Ni"
"chols tuning\n              criterion.                           "
	  Position		  [15, 40]
	  HorizontalAlignment	  "left"
	  VerticalAlignment	  "top"
	  FontSize		  12
	}
      }
    }
    Block {
      BlockType		      Scope
      Name		      "responses"
      Ports		      [3]
      Position		      [590, 147, 620, 203]
      ForegroundColor	      "darkGreen"
      Location		      [579, 110, 1117, 805]
      Open		      on
      NumInputPorts	      "3"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"System response 1"
	axes2			"System response 2"
	axes3			"System response 3"
      }
      List {
	ListType		SelectedSignals
	axes1			""
	axes2			""
	axes3			""
      }
      TimeRange		      "100"
      YMin		      "0~0~0"
      YMax		      "1~1.1~1"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Line {
      SrcBlock		      "Ex1"
      SrcPort		      1
      Points		      [15, 0; 0, 35]
      DstBlock		      "Manual Switch"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Ex2"
      SrcPort		      1
      Points		      [15, 0; 0, -25]
      DstBlock		      "Manual Switch"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Switch Case"
      SrcPort		      2
      Points		      [85, 0]
      DstBlock		      "Switch Case Action\nSubsystem2"
      DstPort		      ifaction
    }
    Line {
      SrcBlock		      "Switch Case"
      SrcPort		      1
      Points		      [85, 0]
      DstBlock		      "Switch Case Action\nSubsystem1"
      DstPort		      ifaction
    }
    Line {
      SrcBlock		      "input"
      SrcPort		      1
      Points		      [0, 0; 25, 0]
      Branch {
	DstBlock		"Switch Case Action\nSubsystem2"
	DstPort			1
      }
      Branch {
	Points			[0, 45]
	Branch {
	  Points		  [110, 0]
	  DstBlock		  "Mux1"
	  DstPort		  2
	}
	Branch {
	  Points		  [0, 60]
	  Branch {
	    Points		    [0, 45; 110, 0]
	    DstBlock		    "Mux3"
	    DstPort		    2
	  }
	  Branch {
	    DstBlock		    "Switch Case Action\nSubsystem3"
	    DstPort		    1
	  }
	}
      }
      Branch {
	Points			[0, -85]
	Branch {
	  Points		  [0, -20]
	  DstBlock		  "Switch Case Action\nSubsystem1"
	  DstPort		  1
	}
	Branch {
	  DstBlock		  "Mux"
	  DstPort		  2
	}
      }
    }
    Line {
      SrcBlock		      "Switch Case Action\nSubsystem1"
      SrcPort		      1
      DstBlock		      "Mux"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Switch Case Action\nSubsystem2"
      SrcPort		      1
      DstBlock		      "Mux1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux1"
      SrcPort		      1
      DstBlock		      "responses"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Switch Case Action\nSubsystem3"
      SrcPort		      1
      DstBlock		      "Mux3"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      Points		      [30, 0; 0, 85]
      DstBlock		      "responses"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux3"
      SrcPort		      1
      Points		      [30, 0; 0, -85]
      DstBlock		      "responses"
      DstPort		      3
    }
    Line {
      SrcBlock		      "Switch Case"
      SrcPort		      3
      Points		      [10, 0; 0, 110; 75, 0]
      DstBlock		      "Switch Case Action\nSubsystem3"
      DstPort		      ifaction
    }
    Line {
      SrcBlock		      "Manual Switch"
      SrcPort		      1
      DstBlock		      "Manual Switch1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Manual Switch1"
      SrcPort		      1
      DstBlock		      "Switch Case"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Ex3"
      SrcPort		      1
      Points		      [90, 0; 0, -65]
      DstBlock		      "Manual Switch1"
      DstPort		      2
    }
    Annotation {
      Name		      "PID CONTROLLER DESIGN"
      Position		      [244, 324]
      ForegroundColor	      "white"
      BackgroundColor	      "blue"
      FontName		      "Arial"
      FontSize		      18
      FontWeight	      "bold"
    }
    Annotation {
      Name		      "The difference between cases 1 & 2  is in the\n"
"implementation of the antiwindup feature"
      Position		      [241, 54]
      ForegroundColor	      "red"
      FontName		      "Arial"
      FontSize		      12
    }
    Annotation {
      Name		      "Stop time=1"
      Position		      [48, 96]
      ForegroundColor	      "red"
      FontName		      "Arial"
      FontSize		      12
    }
    Annotation {
      Name		      "Stop time=100"
      Position		      [48, 221]
      ForegroundColor	      "red"
      FontName		      "Arial"
      FontSize		      12
    }
  }
}

⌨️ 快捷键说明

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