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

📄 engine1.mdl

📁 matlab的大量实例代码
💻 MDL
📖 第 1 页 / 共 3 页
字号:
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      System {
	Name			"Vehicle\nDynamics"
	Location		[394, 285, 764, 433]
	Open			on
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"portrait"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Teng"
	  Position		  [40, 25, 60, 45]
	  Port			  "1"
	  LatchInput		  off
	  Interpolate		  on
	}
	Block {
	  BlockType		  Inport
	  Name			  "Tload"
	  Position		  [40, 85, 60, 105]
	  Port			  "2"
	  LatchInput		  off
	  Interpolate		  on
	}
	Block {
	  BlockType		  Gain
	  Name			  "Inverse Inertia,\n1/J"
	  Position		  [155, 50, 235, 80]
	  Gain			  "1/0.14"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [110, 55, 130, 75]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "+-"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Integrator
	  Name			  "w = T/J\nw0 = 209 rad/s"
	  Ports			  [1, 1]
	  Position		  [260, 46, 290, 84]
	  ExternalReset		  "none"
	  InitialConditionSource  "internal"
	  InitialCondition	  "209.48"
	  LimitOutput		  off
	  UpperSaturationLimit	  "inf"
	  LowerSaturationLimit	  "-inf"
	  ShowSaturationPort	  off
	  ShowStatePort		  off
	  AbsoluteTolerance	  "auto"
	}
	Block {
	  BlockType		  Outport
	  Name			  "N"
	  Position		  [320, 55, 340, 75]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Tload"
	  SrcPort		  1
	  Points		  [55, 0]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Teng"
	  SrcPort		  1
	  Points		  [55, 0]
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Inverse Inertia,\n1/J"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "w = T/J\nw0 = 209 rad/s"
	  SrcPort		  1
	  DstBlock		  "N"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Inverse Inertia,\n1/J"
	  SrcPort		  1
	  DstBlock		  "w = T/J\nw0 = 209 rad/s"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Gain
      Name		      "rad/s\nto rpm"
      Position		      [655, 182, 705, 218]
      NamePlacement	      "alternate"
      Gain		      "30/pi"
      Multiplication	      "Element-wise(K.*u)"
      SaturateOnIntegerOverflow	on
    }
    Block {
      BlockType		      Step
      Name		      "throttle\n(degrees)"
      Position		      [35, 167, 75, 223]
      Time		      "5"
      Before		      "8.973"
      After		      "11.93"
      SampleTime	      "0"
      VectorParams1D	      on
    }
    Block {
      BlockType		      Scope
      Name		      "throttle deg (purple)\nload torque Nm (yellow)"
      Ports		      [1]
      Position		      [700, 295, 730, 335]
      NamePlacement	      "alternate"
      Floating		      off
      Location		      [387, 479, 758, 682]
      Open		      on
      NumInputPorts	      "1"
      TickLabels	      "on"
      ZoomMode		      "on"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      Grid		      "on"
      TimeRange		      "auto"
      YMin		      "5"
      YMax		      "30"
      SaveToWorkspace	      on
      SaveName		      "Tth"
      DataFormat	      "Structure"
      LimitDataPoints	      off
      MaxDataPoints	      "5000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      SubSystem
      Name		      "valve timing"
      Ports		      [1, 1]
      Position		      [435, 79, 500, 111]
      Orientation	      "left"
      NamePlacement	      "alternate"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      System {
	Name			"valve timing"
	Location		[413, 138, 831, 379]
	Open			on
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"portrait"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "N"
	  Position		  [330, 50, 350, 70]
	  Orientation		  "left"
	  Port			  "1"
	  LatchInput		  off
	  Interpolate		  on
	  Port {
	    PortNumber		    1
	    Name		    "rad/sec"
	    TestPoint		    off
	    LinearAnalysisOutput    off
	    LinearAnalysisInput	    off
	    RTWStorageClass	    "Auto"
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "TDC and BDC detection"
	  Ports			  [1, 1]
	  Position		  [185, 37, 250, 83]
	  Orientation		  "left"
	  ShowPortLabels	  on
	  TreatAsAtomicUnit	  off
	  RTWSystemCode		  "Auto"
	  RTWFcnNameOpts	  "Auto"
	  RTWFileNameOpts	  "Auto"
	  System {
	    Name		    "TDC and BDC detection"
	    Location		    [106, 129, 499, 336]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "portrait"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "N"
	      Position		      [55, 103, 85, 117]
	      Port		      "1"
	      LatchInput	      off
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant"
	      Position		      [50, 140, 80, 160]
	      ShowName		      off
	      Value		      "pi"
	      VectorParams1D	      on
	    }
	    Block {
	      BlockType		      Integrator
	      Name		      "Get Crank\nAngle\nIC 0"
	      Ports		      [2, 1, 0, 0, 1]
	      Position		      [215, 96, 250, 154]
	      NamePlacement	      "alternate"
	      ExternalReset	      "rising"
	      InitialConditionSource  "internal"
	      InitialCondition	      "0"
	      LimitOutput	      off
	      UpperSaturationLimit    "inf"
	      LowerSaturationLimit    "-inf"
	      ShowSaturationPort      off
	      ShowStatePort	      on
	      AbsoluteTolerance	      "auto"
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator"
	      Position		      [115, 113, 145, 162]
	      ShowName		      off
	      Operator		      ">="
	    }
	    Block {
	      BlockType		      Terminator
	      Name		      "Terminator"
	      Position		      [300, 105, 320, 125]
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "trigger"
	      Position		      [310, 153, 340, 167]
	      Port		      "1"
	      OutputWhenDisabled      "held"
	      InitialOutput	      "0"
	    }
	    Line {
	      SrcBlock		      "N"
	      SrcPort		      1
	      DstBlock		      "Get Crank\nAngle\nIC 0"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Relational\nOperator"
	      SrcPort		      1
	      Points		      [0, 0; 5, 0]
	      Branch {
		Points			[0, 20]
		DstBlock		"trigger"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Get Crank\nAngle\nIC 0"
		DstPort			2
	      }
	    }
	    Line {
	      SrcBlock		      "Constant"
	      SrcPort		      1
	      DstBlock		      "Relational\nOperator"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Get Crank\nAngle\nIC 0"
	      SrcPort		      state
	      Points		      [0, 16; -130, 0]
	      DstBlock		      "Relational\nOperator"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Get Crank\nAngle\nIC 0"
	      SrcPort		      1
	      Points		      [0, -10]
	      DstBlock		      "Terminator"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "positive edge to\ndual edge conversion"
	  Ports			  [0, 1, 0, 1]
	  Position		  [100, 93, 155, 137]
	  Orientation		  "left"
	  ShowPortLabels	  on
	  TreatAsAtomicUnit	  on
	  RTWSystemCode		  "Auto"
	  RTWFcnNameOpts	  "Auto"
	  RTWFileNameOpts	  "Auto"
	  System {
	    Name		    "positive edge to\ndual edge conversion"
	    Location		    [679, 310, 939, 538]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "portrait"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      TriggerPort
	      Name		      "Trigger"
	      Ports		      []
	      Position		      [15, 60, 35, 80]
	      TriggerType	      "rising"
	      ShowOutputPort	      off
	      OutputDataType	      "auto"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain"
	      Position		      [95, 85, 125, 115]
	      Orientation	      "left"
	      Gain		      "-1"
	      Multiplication	      "Element-wise(K.*u)"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      UnitDelay
	      Name		      "Unit Delay"
	      Position		      [105, 25, 135, 55]
	      X0		      "1"
	      SampleTime	      "-1"
	      RTWStateStorageClass    "Auto"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "trigger"
	      Position		      [180, 34, 205, 46]
	      Port		      "1"
	      OutputWhenDisabled      "held"
	      InitialOutput	      "-1"
	    }
	    Line {
	      SrcBlock		      "Unit Delay"
	      SrcPort		      1
	      Points		      [0, 0; 10, 0]
	      Branch {
		Points			[0, 60]
		DstBlock		"Gain"
		DstPort			1
	      }
	      Branch {
		DstBlock		"trigger"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Gain"
	      SrcPort		      1
	      Points		      [-15, 0; 0, -60]
	      DstBlock		      "Unit Delay"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Outport
	  Name			  "edge180"
	  Position		  [45, 105, 65, 125]
	  Orientation		  "left"
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "-1"
	}
	Line {
	  Name			  "rad/sec"
	  Labels		  [1, 0]
	  SrcBlock		  "N"
	  SrcPort		  1
	  DstBlock		  "TDC and BDC detection"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "positive edge to\ndual edge conversion"
	  SrcPort		  1
	  DstBlock		  "edge180"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "TDC and BDC detection"
	  SrcPort		  1
	  Points		  [-55, 0]
	  DstBlock		  "positive edge to\ndual edge conversion"
	  DstPort		  trigger
	}
      }
    }
    Block {
      BlockType		      Outport
      Name		      "crank speed\n(rad/sec)"
      Position		      [660, 85, 680, 105]
      Port		      "1"
      OutputWhenDisabled      "held"
      InitialOutput	      "0"
    }
    Line {
      SrcBlock		      "valve timing"
      SrcPort		      1
      Points		      [-55, 0]
      DstBlock		      "Compression"
      DstPort		      trigger
    }
    Line {
      SrcBlock		      "Intake"
      SrcPort		      state
      Points		      [0, -10]
      DstBlock		      "Compression"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Intake"
      SrcPort		      1
      DstBlock		      "Terminator"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Throttle & Manifold"
      SrcPort		      1
      DstBlock		      "Intake"
      DstPort		      1
    }
    Line {
      SrcBlock		      "throttle\n(degrees)"
      SrcPort		      1
      Points		      [15, 0]
      Branch {
	Points			[0, 125]
	DstBlock		"Mux"
	DstPort			2
      }
      Branch {
	DstBlock		"Throttle & Manifold"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Compression"
      SrcPort		      2
      Points		      [15, 0; 0, 75; -170, 0]
      DstBlock		      "Intake"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Vehicle\nDynamics"
      SrcPort		      1
      Points		      [0, 0; 10, 0]
      Branch {
	DstBlock		"rad/s\nto rpm"
	DstPort			1
      }
      Branch {
	Points			[0, -105]
	Branch {
	  DstBlock		  "crank speed\n(rad/sec)"
	  DstPort		  1
	}
	Branch {
	  DstBlock		  "valve timing"
	  DstPort		  1
	}
      }
      Branch {
	Points			[0, 90; -190, 0]
	Branch {
	  Points		  [0, -90]
	  DstBlock		  "Combustion"
	  DstPort		  2
	}
	Branch {
	  Points		  [-330, 0; 0, -60]
	  DstBlock		  "Throttle & Manifold"
	  DstPort		  2
	}
      }
    }
    Line {
      SrcBlock		      "Compression"
      SrcPort		      1
      DstBlock		      "Combustion"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Combustion"
      SrcPort		      1
      DstBlock		      "Vehicle\nDynamics"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      DstBlock		      "throttle deg (purple)\nload torque Nm (yellow)"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Drag Torque"
      SrcPort		      1
      Points		      [0, 0; 15, 0]
      Branch {
	Points			[0, -30]
	DstBlock		"Vehicle\nDynamics"
	DstPort			2
      }
      Branch {
	Points			[0, 55]
	DstBlock		"Mux"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "rad/s\nto rpm"
      SrcPort		      1
      DstBlock		      "Engine\nSpeed\n(rpm)"
      DstPort		      1
    }
    Annotation {
      Position		      [75, 127]
      Text		      "engine1.mdl"
      FontName		      "Arial"
      FontSize		      12
      FontWeight	      "bold"
    }
  }
}

⌨️ 快捷键说明

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