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

📄 engine2.mdl

📁 基于Matlab simulink的系统仿真设计及应用的函数文件代码
💻 MDL
📖 第 1 页 / 共 4 页
字号:
	  UpperLimit		  "70"
	  LowerLimit		  "0"
	  LinearizeAsGain	  on
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "prevent windup"
	  Ports			  [2, 1]
	  Position		  [200, 152, 320, 208]
	  ShowPortLabels	  on
	  TreatAsAtomicUnit	  off
	  RTWSystemCode		  "Auto"
	  RTWFcnNameOpts	  "Auto"
	  RTWFileNameOpts	  "Auto"
	  System {
	    Name		    "prevent windup"
	    Location		    [402, 277, 876, 638]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "integrator\ninput"
	      Position		      [30, 56, 60, 74]
	      NamePlacement	      "alternate"
	      Port		      "1"
	      LatchInput	      off
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "controller\noutput"
	      Position		      [30, 116, 60, 134]
	      NamePlacement	      "alternate"
	      Port		      "2"
	      LatchInput	      off
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant"
	      Position		      [117, 300, 133, 320]
	      Orientation	      "up"
	      NamePlacement	      "alternate"
	      ShowName		      off
	      Value		      "70"
	      VectorParams1D	      on
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant2"
	      Position		      [117, 225, 133, 245]
	      Orientation	      "up"
	      NamePlacement	      "alternate"
	      ShowName		      off
	      Value		      "0"
	      VectorParams1D	      on
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant3"
	      Position		      [107, 150, 123, 170]
	      Orientation	      "up"
	      NamePlacement	      "alternate"
	      ShowName		      off
	      Value		      "0"
	      VectorParams1D	      on
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant4"
	      Position		      [112, 90, 128, 110]
	      Orientation	      "up"
	      NamePlacement	      "alternate"
	      ShowName		      off
	      Value		      "0"
	      VectorParams1D	      on
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator"
	      Ports		      [2, 1]
	      Position		      [220, 200, 255, 235]
	      ShowName		      off
	      Operator		      "AND"
	      Inputs		      "2"
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator1"
	      Ports		      [2, 1]
	      Position		      [215, 65, 250, 100]
	      ShowName		      off
	      Operator		      "AND"
	      Inputs		      "2"
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator2"
	      Ports		      [2, 1]
	      Position		      [315, 145, 350, 180]
	      ShowName		      off
	      Operator		      "NOR"
	      Inputs		      "2"
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator"
	      Position		      [140, 260, 175, 295]
	      NamePlacement	      "alternate"
	      ShowName		      off
	      Operator		      ">="
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator1"
	      Position		      [145, 192, 175, 223]
	      ShowName		      off
	      Operator		      ">="
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator2"
	      Position		      [135, 115, 170, 150]
	      NamePlacement	      "alternate"
	      ShowName		      off
	      Operator		      "<="
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator3"
	      Position		      [135, 57, 165, 88]
	      ShowName		      off
	      Operator		      "<="
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "enable\nintegration"
	      Position		      [400, 157, 430, 173]
	      Port		      "1"
	      OutputWhenDisabled      "held"
	      InitialOutput	      "0"
	    }
	    Line {
	      SrcBlock		      "Logical\nOperator2"
	      SrcPort		      1
	      DstBlock		      "enable\nintegration"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Logical\nOperator"
	      SrcPort		      1
	      Points		      [20, 0; 0, -50]
	      DstBlock		      "Logical\nOperator2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Logical\nOperator1"
	      SrcPort		      1
	      Points		      [25, 0; 0, 70]
	      DstBlock		      "Logical\nOperator2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Relational\nOperator"
	      SrcPort		      1
	      Points		      [25, 0]
	      DstBlock		      "Logical\nOperator"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Relational\nOperator1"
	      SrcPort		      1
	      DstBlock		      "Logical\nOperator"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Constant"
	      SrcPort		      1
	      DstBlock		      "Relational\nOperator"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Constant2"
	      SrcPort		      1
	      Points		      [0, -5]
	      DstBlock		      "Relational\nOperator1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "controller\noutput"
	      SrcPort		      1
	      Points		      [20, 0]
	      Branch {
		DstBlock		"Relational\nOperator2"
		DstPort			1
	      }
	      Branch {
		Points			[0, 145]
		DstBlock		"Relational\nOperator"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "integrator\ninput"
	      SrcPort		      1
	      Points		      [35, 0]
	      Branch {
		DstBlock		"Relational\nOperator3"
		DstPort			1
	      }
	      Branch {
		Points			[0, 135]
		DstBlock		"Relational\nOperator1"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Relational\nOperator2"
	      SrcPort		      1
	      Points		      [25, 0]
	      DstBlock		      "Logical\nOperator1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Relational\nOperator3"
	      SrcPort		      1
	      DstBlock		      "Logical\nOperator1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Constant4"
	      SrcPort		      1
	      DstBlock		      "Relational\nOperator3"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Constant3"
	      SrcPort		      1
	      Points		      [0, -5]
	      DstBlock		      "Relational\nOperator2"
	      DstPort		      2
	    }
	  }
	}
	Block {
	  BlockType		  Gain
	  Name			  "rpm\nto\nrad/s"
	  Position		  [70, 45, 105, 85]
	  Gain			  "pi/30"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Outport
	  Name			  "Throttle Ang."
	  Position		  [660, 80, 680, 100]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "8.973"
	}
	Line {
	  SrcBlock		  "rpm\nto\nrad/s"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Discrete-Time\nIntegrator"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "limit\noutput"
	  SrcPort		  1
	  Points		  [25, 0]
	  Branch {
	    Points		    [0, 140; -455, 0; 0, -35]
	    DstBlock		    "prevent windup"
	    DstPort		    2
	  }
	  Branch {
	    DstBlock		    "Throttle Ang."
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "prevent windup"
	  SrcPort		  1
	  Points		  [10, 0; 0, -65]
	  DstBlock		  "Switch"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  DstBlock		  "limit\noutput"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Switch"
	  SrcPort		  1
	  DstBlock		  "Discrete-Time\nIntegrator"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Proportional Gain"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant1"
	  SrcPort		  1
	  Points		  [0, -10]
	  DstBlock		  "Switch"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Integral Gain"
	  SrcPort		  1
	  DstBlock		  "Switch"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    Points		    [0, 40]
	    Branch {
	      Points		      [0, 60]
	      DstBlock		      "prevent windup"
	      DstPort		      1
	    }
	    Branch {
	      DstBlock		      "Integral Gain"
	      DstPort		      1
	    }
	  }
	  Branch {
	    DstBlock		    "Proportional Gain"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "N"
	  SrcPort		  1
	  Points		  [95, 0]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Desired\nrpm"
	  SrcPort		  1
	  DstBlock		  "rpm\nto\nrad/s"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Drag Torque"
      Ports		      [0, 1]
      Position		      [510, 239, 565, 271]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      System {
	Name			"Drag Torque"
	Location		[536, 381, 780, 558]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Step
	  Name			  "Step"
	  Position		  [20, 25, 40, 45]
	  Time			  "2"
	  Before		  "25"
	  After			  "20"
	  SampleTime		  "0"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  Step
	  Name			  "Step1"
	  Position		  [20, 90, 40, 110]
	  Time			  "8"
	  Before		  "0"
	  After			  "5"
	  SampleTime		  "0"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1]
	  Position		  [110, 60, 130, 80]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "++"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Outport
	  Name			  "Load"
	  Position		  [185, 60, 205, 80]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  DstBlock		  "Load"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Step"
	  SrcPort		  1
	  Points		  [75, 0]
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Step1"
	  SrcPort		  1
	  Points		  [75, 0]
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
      }
    }
    Block {
      BlockType		      Scope
      Name		      "Engine\nSpeed\n(rpm)"
      Ports		      [1]
      Position		      [745, 181, 775, 219]
      NamePlacement	      "alternate"
      Floating		      off
      Location		      [17, 469, 376, 668]
      Open		      off
      NumInputPorts	      "1"
      TickLabels	      "on"
      ZoomMode		      "on"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      Grid		      "on"
      TimeRange		      "auto"
      YMin		      "1500"
      YMax		      "3500"
      SaveToWorkspace	      on
      SaveName		      "N"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
      MaxDataPoints	      "5000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Integrator
      Name		      "Intake"
      Ports		      [2, 1, 0, 0, 1]
      Position		      [325, 200, 360, 260]
      ExternalReset	      "either"
      InitialConditionSource  "internal"
      InitialCondition	      "0"
      LimitOutput	      off
      UpperSaturationLimit    "inf"
      LowerSaturationLimit    "-inf"
      ShowSaturationPort      off
      ShowStatePort	      on
      AbsoluteTolerance	      "auto"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      Ports		      [2, 1]
      Position		      [675, 263, 680, 327]
      BackgroundColor	      "black"
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      Terminator
      Name		      "Terminator"
      Position		      [380, 223, 395, 237]
      ShowName		      off
    }
    Block {
      BlockType		      SubSystem
      Name		      "Throttle & Manifold"
      Ports		      [2, 1]
      Position		      [190, 177, 290, 248]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      System {
	Name			"Throttle & Manifold"
	Location		[169, 219, 945, 572]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Throttle Ang."
	  Position		  [20, 25, 40, 45]
	  Port			  "1"
	  LatchInput		  off
	  Interpolate		  on
	}
	Block {
	  BlockType		  Inport
	  Name			  "Engine Speed, N"
	  Position		  [260, 140, 280, 160]
	  Port			  "2"
	  LatchInput		  off
	  Interpolate		  on
	}
	Block {
	  BlockType		  Saturate
	  Name			  "0 <= theta <= 90"

⌨️ 快捷键说明

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