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

📄 ias_stateflow_rev_a.mdl

📁 Indicated Airspeed Simulink Model (very easy for learning)
💻 MDL
📖 第 1 页 / 共 4 页
字号:
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Array {
	Type			"Handle"
	Dimension		0
	PropName		"AvailSigsLoadSave"
      }
      MaskType		      "Stateflow"
      MaskDescription	      "Stateflow diagram"
      MaskDisplay	      "plot(sf('Private','sfblk','xIcon'),sf('Private','sfblk','yIcon'));text(0.5,0,sf('Private', 'sfblk', 'tIcon'),'HorizontalAl','Center','VerticalAl','Bottom');"
      MaskSelfModifiable      on
      MaskIconFrame	      off
      MaskIconOpaque	      off
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"IAS_CAS_Statechart"
	Location		[257, 457, 812, 717]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "dpressure"
	  Position		  [20, 101, 40, 119]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Demux
	  Name			  " Demux "
	  Ports			  [1, 1]
	  Position		  [270, 160, 320, 200]
	  Outputs		  "1"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  " SFunction "
	  Tag			  "Stateflow S-Function ias_stateflow_rev_a 1"
	  Ports			  [1, 2]
	  Position		  [180, 100, 230, 160]
	  FunctionName		  "sf_sfun"
	  PortCounts		  "[1 2]"
	  EnableBusSupport	  on
	  Port {
	    PortNumber		    2
	    Name		    "switch"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	}
	Block {
	  BlockType		  Terminator
	  Name			  " Terminator "
	  Position		  [460, 171, 480, 189]
	}
	Block {
	  BlockType		  Outport
	  Name			  "switch"
	  Position		  [460, 101, 480, 119]
	  IconDisplay		  "Port number"
	}
	Line {
	  SrcBlock		  " Demux "
	  SrcPort		  1
	  DstBlock		  " Terminator "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  " SFunction "
	  SrcPort		  1
	  Points		  [0, 65]
	  DstBlock		  " Demux "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "dpressure"
	  SrcPort		  1
	  DstBlock		  " SFunction "
	  DstPort		  1
	}
	Line {
	  Name			  "switch"
	  Labels		  [0, 0]
	  SrcBlock		  " SFunction "
	  SrcPort		  2
	  DstBlock		  "switch"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      "Lookup_n-D"
      Name		      "Lookup\nTable (n-D)"
      Ports		      [1, 1]
      Position		      [105, 129, 160, 181]
      NumberOfTableDimensions "1"
      BreakpointsForDimension1 "[2,6,8]"
      IndexSearchMethod	      "Binary search"
      Table		      "[5000,11000,25000]"
      InterpMethod	      "Cubic spline"
      ExtrapMethod	      "Cubic spline"
    }
    Block {
      BlockType		      Product
      Name		      "Product"
      Ports		      [2, 1]
      Position		      [595, 117, 625, 148]
      CollapseMode	      "All dimensions"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Product
      Name		      "Product1"
      Ports		      [2, 1]
      Position		      [600, 197, 630, 228]
      CollapseMode	      "All dimensions"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Constant
      Name		      "air_density_sealevel"
      Position		      [355, 35, 415, 65]
      Value		      "1.2250"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
    }
    Block {
      BlockType		      Constant
      Name		      "pressure_sealevel"
      Position		      [365, 255, 425, 285]
      Value		      "101325"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
    }
    Block {
      BlockType		      Outport
      Name		      "airspeed"
      Position		      [750, 158, 780, 172]
      IconDisplay	      "Port number"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
    }
    Block {
      BlockType		      SignalViewerScope
      Name		      "Scope"
      Ports		      []
      Position		      [20, 15, 60, 55]
      IOType		      "viewer"
      List {
	ListType		IOSignalStrings
	set0ParseKeys		"21"
	set0Sigs		"Lookup Table (n-D):o1"
	set1ParseKeys		"6,6"
	set1Sigs		"Add:o1IAS:o1"
      }
      Location		      [32, 138, 625, 676]
      Open		      on
      NumInputPorts	      "2"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
	axes2			"%<SignalLabel>"
      }
      ShowDataMarkers	      off
      ShowLegends	      off
      TimeRange		      "1.6"
      YMin		      "-5~150.4971751412429"
      YMax		      "5~182.4971751412429"
      DataFormat	      "Array"
      MaxDataPoints	      "7500"
      RefreshTime	      0.035000
    }
    Line {
      SrcBlock		      "Lookup\nTable (n-D)"
      SrcPort		      1
      Points		      [35, 0; 0, -5]
      Branch {
	Points			[0, 5]
	DstBlock		"IAS_CAS_Statechart"
	DstPort			1
      }
      Branch {
	Points			[0, -60]
	DstBlock		"IAS"
	DstPort			2
      }
      Branch {
	Points			[0, 90]
	DstBlock		"CAS"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "air_density_sealevel"
      SrcPort		      1
      Points		      [40, 0]
      Branch {
	Points			[-10, 0; 0, 160]
	DstBlock		"CAS"
	DstPort			1
      }
      Branch {
	DstBlock		"IAS"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "pressure_sealevel"
      SrcPort		      1
      DstBlock		      "CAS"
      DstPort		      3
    }
    Line {
      SrcBlock		      "IAS"
      SrcPort		      1
      Points		      [25, 0; 0, 55]
      DstBlock		      "Product"
      DstPort		      1
    }
    Line {
      SrcBlock		      "CAS"
      SrcPort		      1
      Points		      [20, 0; 0, -20]
      DstBlock		      "Product1"
      DstPort		      2
    }
    Line {
      SrcBlock		      "IAS_CAS_Statechart"
      SrcPort		      1
      Points		      [120, 0]
      Branch {
	Points			[0, 15; 105, 0; 0, 35]
	DstBlock		"Product1"
	DstPort			1
      }
      Branch {
	Points			[0, -15]
	DstBlock		"Compare\nTo Zero"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Compare\nTo Zero"
      SrcPort		      1
      DstBlock		      "Product"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Product"
      SrcPort		      1
      Points		      [0, 20]
      DstBlock		      "Add"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Product1"
      SrcPort		      1
      Points		      [15, 0; 0, -45]
      DstBlock		      "Add"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Add"
      SrcPort		      1
      DstBlock		      "airspeed"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Digital Clock"
      SrcPort		      1
      DstBlock		      "Lookup\nTable (n-D)"
      DstPort		      1
    }
  }
}
# Finite State Machines
#
#    Stateflow Version 6.7 (R2007b) dated Aug  7 2007, 16:48:14
#
#


Stateflow {
  machine {
    id			    1
    name		    "ias_stateflow_rev_a"
    created		    "16-Apr-2009 11:10:34"
    isLibrary		    0
    firstTarget		    13
    sfVersion		    67014000.000001
  }
  chart {
    id			    2
    name		    "IAS_CAS_Statechart"
    windowPosition	    [360 165.75 443.25 370.5]
    viewLimits		    [0 332.992 0 278.638]
    zoomFactor		    0.833
    screen		    [1 1 1280 960 1.333333333333333]
    treeNode		    [0 5 0 0]
    firstTransition	    7
    viewObj		    2
    machine		    1
    subviewS {
      zoomFactor	      0.833
    }
    decomposition	    SET_CHART
    firstData		    10
    chartFileNumber	    1
    userSpecifiedStateTransitionExecutionOrder 1
    disableImplicitCasting  1
  }
  state {
    id			    3
    labelString		    "IAS_Calc"
    position		    [28.9583 51.5 90 60]
    fontSize		    12
    chart		    2
    treeNode		    [5 0 0 4]
    superState		    GROUPED
    subviewer		    2
    type		    OR_STATE
    decomposition	    CLUSTER_STATE
  }
  state {
    id			    4
    labelString		    "CAS_Calc"
    position		    [158.5317 125.4426 90 60]
    fontSize		    12
    chart		    2
    treeNode		    [5 0 3 0]
    subviewer		    2
    type		    OR_STATE
    decomposition	    CLUSTER_STATE
  }
  state {
    id			    5
    labelString		    "Running"
    position		    [14.2708 14.0625 257.1303 180.2077]
    fontSize		    12
    chart		    2
    treeNode		    [2 3 0 6]
    firstTransition	    8
    subviewer		    2
    type		    AND_STATE
    decomposition	    CLUSTER_STATE
    executionOrder	    1
  }
  state {
    id			    6
    labelString		    "Switch\nduring:switch=in(Running.CAS_Calc);"
    position		    [17.9762 203.2155 272.6142 45.7582]
    fontSize		    12
    chart		    2
    treeNode		    [2 0 5 0]
    superState		    GROUPED
    subviewer		    2
    type		    AND_STATE
    decomposition	    CLUSTER_STATE
    executionOrder	    2
    debug		    [0 1 0]
  }
  transition {
    id			    7
    labelPosition	    [80.684 17.926 8.118 14.965]
    fontSize		    12
    src {
      intersection	      [0 0 1 0.236 77.934 4.9243 0 4.7964]
    }
    dst {
      id		      3
      intersection	      [1 0 -1 0.5442 77.934 51.5 0 -4.7964]
    }
    midPoint		    [77.934 24.9639]
    chart		    2
    linkNode		    [2 0 0]
    dataLimits		    [75.534 80.334 4.924 51.5]
    subviewer		    2
    drawStyle		    SMART
    executionOrder	    1
  }
  transition {
    id			    8
    labelString		    "[dpressure > 17732.5]"
    labelPosition	    [136.007 64.536 118.645 14.965]
    fontSize		    12
    src {
      id		      3
      intersection	      [2 1 0 0.4819 118.9583 80.4123 0 -31.0877]
    }
    dst {
      id		      4
      intersection	      [1 0 -1 0.4742 201.2057 125.4426 0 42.674]
    }
    midPoint		    [166.25 87.5]
    chart		    2
    linkNode		    [5 0 9]
    dataLimits		    [118.958 203.606 80.412 125.443]
    stampAngle		    -1
    subviewer		    2
    drawStyle		    SMART
    slide {
      mode		      MIRROR_SLIDE
      sticky		      BOTH_STICK
      midPointSticky	      1
    }
    executionOrder	    1
  }
  transition {
    id			    9
    labelString		    "[dpressure <= 17732.5]"
    labelPosition	    [32.422 159.017 125.514 14.965]
    fontSize		    12
    src {
      id		      4
      intersection	      [4 -1 0 0.4819 158.5317 156.5293 0 -31.0867]
    }
    dst {
      id		      3
      intersection	      [3 0 1 0.4742 76.2843 111.5 0 42.674]
    }
    midPoint		    [103.5376 149.0153]
    chart		    2
    linkNode		    [5 8 0]
    dataLimits		    [73.884 158.532 111.5 156.74]
    stampAngle		    -1
    subviewer		    2
    drawStyle		    SMART
    slide {
      mode		      MIRROR_SLIDE
      sticky		      BOTH_STICK
      midPointSticky	      1
    }
    executionOrder	    1
  }
  data {
    id			    10
    name		    "dpressure"
    description		    "Velocidade aerodin鈓ica"
    linkNode		    [2 0 11]
    scope		    INPUT_DATA
    machine		    1
    props {
      array {
	size			"-1"
      }
      type {
	method			SF_INHERITED_TYPE
	primitive		SF_DOUBLE_TYPE
	isSigned		1
	wordLength		"16"
      }
      frame		      SF_FRAME_INHERITED
    }
    dataType		    "inherited"
  }
  data {
    id			    11
    name		    "switch"
    linkNode		    [2 10 0]
    scope		    OUTPUT_DATA
    machine		    1
    props {
      initialValue	      "0"
      type {
	primitive		SF_INT8_TYPE
	isSigned		1
	wordLength		"16"
      }
      frame		      SF_FRAME_NO
    }
    dataType		    "int8"
  }
  instance {
    id			    12
    name		    "IAS_CAS_Statechart"
    machine		    1
    chart		    2
  }
  target {
    id			    13
    name		    "sfun"
    description		    "Default Simulink S-Function Target."
    machine		    1
    linkNode		    [1 0 14]
  }
  target {
    id			    14
    name		    "rtw"
    codeFlags		    " comments=1 statebitsets=1 databitsets=1 emitlogicalops=1 elseifdetection=1 constantfolding=1 redundantloadelimination=0 preservenames=0 preservenameswithparent=0 exportcharts=0"
    machine		    1
    linkNode		    [1 13 0]
  }
}

⌨️ 快捷键说明

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