Model {
  Name			  "enginewc"
  Version		  6.2
  MdlSubVersion		  0
  GraphicalInterface {
    NumRootInports	    0
    NumRootOutports	    1
    Outport {
      BusObject		      ""
      BusOutputAsStruct	      "off"
      Name		      "crank speed (rad/sec)"
    }
    ParameterArgumentNames  ""
    ComputedModelVersion    "1.20"
    NumModelReferences	    0
    NumTestPointedSignals   0
  }
  SavedCharacterEncoding  "US-ASCII"
  PreLoadFcn		  "Kp=0.0614;Ki=0.0723;"
  SaveDefaultBlockParams  on
  SampleTimeColors	  off
  LibraryLinkDisplay	  "none"
  WideLines		  on
  ShowLineDimensions	  off
  ShowPortDataTypes	  off
  ShowLoopsOnError	  on
  IgnoreBidirectionalLines off
  ShowStorageClass	  off
  ShowTestPointIcons	  on
  ShowViewerIcons	  on
  SortedOrder		  off
  ExecutionContextIcon	  off
  ShowLinearizationAnnotations on
  RecordCoverage	  off
  CovPath		  "/"
  CovSaveName		  "covdata"
  CovMetricSettings	  "d"
  CovNameIncrementing	  off
  CovHtmlReporting	  on
  covSaveCumulativeToWorkspaceVar on
  CovSaveSingleToWorkspaceVar on
  CovCumulativeVarName	  "covCumulativeData"
  CovCumulativeReport	  off
  CovReportOnPause	  on
  ScopeRefreshTime	  0.035000
  OverrideScopeRefreshTime on
  DisableAllScopes	  off
  DataTypeOverride	  "UseLocalSettings"
  MinMaxOverflowLogging	  "UseLocalSettings"
  MinMaxOverflowArchiveMode "Overwrite"
  BlockNameDataTip	  off
  BlockParametersDataTip  on
  BlockDescriptionStringDataTip	off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  Created		  "Thu Jul 16 14:11:19 1998"
  Creator		  "The MathWorks Inc."
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "batserve"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Sat Jan 22 19:08:26 2005"
  ModelVersionFormat	  "1.%<AutoIncrement:20>"
  ConfigurationManager	  "none"
  LinearizationMsg	  "none"
  Profile		  off
  ParamWorkspaceSource	  "MATLABWorkspace"
  AccelSystemTargetFile	  "accel.tlc"
  AccelTemplateMakefile	  "accel_default_tmf"
  AccelMakeCommand	  "make_rtw"
  TryForcingSFcnDF	  off
  ExtModeBatchMode	  off
  ExtModeEnableFloating	  on
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "oneshot"
  ExtModeTrigPort	  "1"
  ExtModeTrigElement	  "any"
  ExtModeTrigDuration	  1000
  ExtModeTrigDurationFloating "auto"
  ExtModeTrigHoldOff	  0
  ExtModeTrigDelay	  0
  ExtModeTrigDirection	  "rising"
  ExtModeTrigLevel	  0
  ExtModeArchiveMode	  "off"
  ExtModeAutoIncOneShot	  off
  ExtModeIncDirWhenArm	  off
  ExtModeAddSuffixToVar	  off
  ExtModeWriteAllDataToWs off
  ExtModeArmWhenConnect	  off
  ExtModeSkipDownloadWhenConnect off
  ExtModeLogAll		  on
  ExtModeAutoUpdateStatusClock off
  BufferReuse		  on
  StrictBusMsg		  "None"
  ProdHWDeviceType	  "32-bit Generic"
  ShowModelReferenceBlockVersion off
  ShowModelReferenceBlockIO off
  Array {
    Type		    "Handle"
    Dimension		    1
    Simulink.ConfigSet {
      $ObjectID		      1
      Version		      "1.1.0"
      Array {
	Type			"Handle"
	Dimension		7
	Simulink.SolverCC {
	  $ObjectID		  2
	  Version		  "1.1.0"
	  StartTime		  "0.0"
	  StopTime		  "10"
	  AbsTol		  "1e-6"
	  FixedStep		  "auto"
	  InitialStep		  "auto"
	  MaxNumMinSteps	  "-1"
	  MaxOrder		  5
	  ExtrapolationOrder	  4
	  NumberNewtonIterations  1
	  MaxStep		  "auto"
	  MinStep		  "auto"
	  RelTol		  "1e-3"
	  SolverMode		  "SingleTasking"
	  Solver		  "ode23s"
	  SolverName		  "ode23s"
	  ZeroCrossControl	  "UseLocalSettings"
	  AlgebraicLoopSolver	  "TrustRegion"
	  SolverResetMethod	  "Fast"
	  PositivePriorityOrder	  off
	  AutoInsertRateTranBlk	  off
	  SampleTimeConstraint	  "Unconstrained"
	  RateTranMode		  "Deterministic"
	}
	Simulink.DataIOCC {
	  $ObjectID		  3
	  Version		  "1.1.0"
	  Decimation		  "1"
	  ExternalInput		  "[]"
	  FinalStateName	  "xFinal"
	  InitialState		  "[]"
	  LimitDataPoints	  off
	  MaxDataPoints		  "1000"
	  LoadExternalInput	  off
	  LoadInitialState	  off
	  SaveFinalState	  off
	  SaveFormat		  "Array"
	  SaveOutput		  on
	  SaveState		  on
	  SignalLogging		  on
	  SaveTime		  on
	  StateSaveName		  "x"
	  TimeSaveName		  "t"
	  OutputSaveName	  "y"
	  SignalLoggingName	  "logsout"
	  OutputOption		  "RefineOutputTimes"
	  OutputTimes		  "[]"
	  Refine		  "1"
	}
	Simulink.OptimizationCC {
	  $ObjectID		  4
	  Array {
	    Type		    "Cell"
	    Dimension		    5
	    Cell		    "ZeroExternalMemoryAtStartup"
	    Cell		    "ZeroInternalMemoryAtStartup"
	    Cell		    "InitFltsAndDblsToZero"
	    Cell		    "OptimizeModelRefInitCode"
	    Cell		    "NoFixptDivByZeroProtection"
	    PropName		    "DisabledProps"
	  }
	  Version		  "1.1.0"
	  BlockReduction	  off
	  BooleanDataType	  off
	  ConditionallyExecuteInputs on
	  InlineParams		  off
	  InlineInvariantSignals  off
	  OptimizeBlockIOStorage  on
	  BufferReuse		  on
	  EnforceIntegerDowncast  on
	  ExpressionFolding	  on
	  FoldNonRolledExpr	  on
	  LocalBlockOutputs	  on
	  ParameterPooling	  on
	  RollThreshold		  5
	  SystemCodeInlineAuto	  off
	  StateBitsets		  off
	  DataBitsets		  off
	  UseTempVars		  off
	  ZeroExternalMemoryAtStartup on
	  ZeroInternalMemoryAtStartup on
	  InitFltsAndDblsToZero	  on
	  NoFixptDivByZeroProtection off
	  EfficientFloat2IntCast  off
	  OptimizeModelRefInitCode off
	  LifeSpan		  "inf"
	  BufferReusableBoundary  on
	}
	Simulink.DebuggingCC {
	  $ObjectID		  5
	  Version		  "1.1.0"
	  RTPrefix		  "error"
	  ConsistencyChecking	  "none"
	  ArrayBoundsChecking	  "none"
	  SignalInfNanChecking	  "none"
	  AlgebraicLoopMsg	  "warning"
	  ArtificialAlgebraicLoopMsg "warning"
	  CheckSSInitialOutputMsg on
	  CheckExecutionContextPreStartOutputMsg off
	  CheckExecutionContextRuntimeOutputMsg	off
	  SignalResolutionControl "TryResolveAllWithWarning"
	  BlockPriorityViolationMsg "warning"
	  MinStepSizeMsg	  "warning"
	  SolverPrmCheckMsg	  "none"
	  InheritedTsInSrcMsg	  "warning"
	  DiscreteInheritContinuousMsg "warning"
	  MultiTaskDSMMsg	  "warning"
	  MultiTaskRateTransMsg	  "error"
	  SingleTaskRateTransMsg  "none"
	  TasksWithSamePriorityMsg "warning"
	  CheckMatrixSingularityMsg "none"
	  IntegerOverflowMsg	  "none"
	  Int32ToFloatConvMsg	  "warning"
	  ParameterDowncastMsg	  "error"
	  ParameterOverflowMsg	  "error"
	  ParameterPrecisionLossMsg "warning"
	  UnderSpecifiedDataTypeMsg "none"
	  UnnecessaryDatatypeConvMsg "none"
	  VectorMatrixConversionMsg "none"
	  InvalidFcnCallConnMsg	  "error"
	  FcnCallInpInsideContextMsg "Use local settings"
	  SignalLabelMismatchMsg  "none"
	  UnconnectedInputMsg	  "warning"
	  UnconnectedOutputMsg	  "warning"
	  UnconnectedLineMsg	  "warning"
	  SFcnCompatibilityMsg	  "none"
	  UniqueDataStoreMsg	  "none"
	  BusObjectLabelMismatch  "warning"
	  RootOutportRequireBusObject "warning"
	  AssertControl		  "UseLocalSettings"
	  EnableOverflowDetection off
	  ModelReferenceIOMsg	  "none"
	  ModelReferenceVersionMismatchMessage "none"
	  ModelReferenceIOMismatchMessage "none"
	  ModelReferenceCSMismatchMessage "none"
	  ModelReferenceSimTargetVerbose off
	  UnknownTsInhSupMsg	  "warning"
	  ModelReferenceDataLoggingMessage "warning"
	  ModelReferenceSymbolNameMessage "warning"
	  ModelReferenceExtraNoncontSigs "error"
	}
	Simulink.HardwareCC {
	  $ObjectID		  6
	  Version		  "1.1.0"
	  ProdBitPerChar	  8
	  ProdBitPerShort	  16
	  ProdBitPerInt		  32
	  ProdBitPerLong	  32
	  ProdIntDivRoundTo	  "Undefined"
	  ProdEndianess		  "Unspecified"
	  ProdWordSize		  32
	  ProdShiftRightIntArith  on
	  ProdHWDeviceType	  "32-bit Generic"
	  TargetBitPerChar	  8
	  TargetBitPerShort	  16
	  TargetBitPerInt	  32
	  TargetBitPerLong	  32
	  TargetShiftRightIntArith on
	  TargetIntDivRoundTo	  "Undefined"
	  TargetEndianess	  "Unspecified"
	  TargetWordSize	  32
	  TargetTypeEmulationWarnSuppressLevel 0
	  TargetPreprocMaxBitsSint 32
	  TargetPreprocMaxBitsUint 32
	  TargetHWDeviceType	  "Specified"
	  TargetUnknown		  on
	  ProdEqTarget		  on
	}
	Simulink.ModelReferenceCC {
	  $ObjectID		  7
	  Version		  "1.1.0"
	  UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
	  CheckModelReferenceTargetMessage "error"
	  ModelReferenceNumInstancesAllowed "Multi"
	  ModelReferencePassRootInputsByReference on
	  ModelReferenceMinAlgLoopOccurrences off
	}
	Simulink.RTWCC {
	  $BackupClass		  "Simulink.RTWCC"
	  $ObjectID		  8
	  Array {
	    Type		    "Cell"
	    Dimension		    1
	    Cell		    "IncludeHyperlinkInReport"
	    PropName		    "DisabledProps"
	  }
	  Version		  "1.1.0"
	  SystemTargetFile	  "grt.tlc"
	  GenCodeOnly		  off
	  MakeCommand		  "make_rtw"
	  TemplateMakefile	  "grt_default_tmf"
	  GenerateReport	  off
	  SaveLog		  off
	  RTWVerbose		  on
	  RetainRTWFile		  off
	  ProfileTLC		  off
	  TLCDebug		  off
	  TLCCoverage		  off
	  TLCAssert		  off
	  ProcessScriptMode	  "Default"
	  ConfigurationMode	  "Optimized"
	  ConfigAtBuild		  off
	  IncludeHyperlinkInReport off
	  LaunchReport		  off
	  TargetLang		  "C"
	  Array {
	    Type		    "Handle"
	    Dimension		    2
	    Simulink.CodeAppCC {
	      $ObjectID		      9
	      Array {
		Type			"Cell"
		Dimension		9
		Cell			"IgnoreCustomStorageClasses"
		Cell			"InsertBlockDesc"
		Cell			"SFDataObjDesc"
		Cell			"SimulinkDataObjDesc"
		Cell			"DefineNamingRule"
		Cell			"SignalNamingRule"
		Cell			"ParamNamingRule"
		Cell			"InlinedPrmAccess"
		Cell			"CustomSymbolStr"
		PropName		"DisabledProps"
	      }
	      Version		      "1.1.0"
	      ForceParamTrailComments off
	      GenerateComments	      on
	      IgnoreCustomStorageClasses on
	      IncHierarchyInIds	      off
	      MaxIdLength	      31
	      PreserveName	      off
	      PreserveNameWithParent  off
	      ShowEliminatedStatement off
	      IncAutoGenComments      off
	      SimulinkDataObjDesc     off
	      SFDataObjDesc	      off
	      IncDataTypeInIds	      off
	      PrefixModelToSubsysFcnNames on
	      CustomSymbolStr	      "$R$N$M"
	      MangleLength	      1
	      DefineNamingRule	      "None"
	      ParamNamingRule	      "None"
	      SignalNamingRule	      "None"
	      InsertBlockDesc	      off
	      SimulinkBlockComments   on
	      EnableCustomComments    off
	      InlinedPrmAccess	      "Literals"
	      ReqsInCode	      off
	    }
	    Simulink.GRTTargetCC {
	      $BackupClass	      "Simulink.TargetCC"
	      $ObjectID		      10
	      Array {
		Type			"Cell"
		Dimension		12
		Cell			"IncludeMdlTerminateFcn"
		Cell			"CombineOutputUpdateFcns"
		Cell			"SuppressErrorStatus"
		Cell			"ERTCustomFileBanners"
		Cell			"GenerateSampleERTMain"
		Cell			"MultiInstanceERTCode"
		Cell			"PurelyIntegerCode"
		Cell			"SupportNonFinite"
		Cell			"SupportComplex"
		Cell			"SupportAbsoluteTime"
		Cell			"SupportContinuousTime"
		Cell			"SupportNonInlinedSFcns"
		PropName		"DisabledProps"
	      }
	      Version		      "1.1.0"
	      TargetFcnLib	      "ansi_tfl_tmw.mat"
	      TargetLibSuffix	      ""
	      TargetPreCompLibLocation ""
	      GenFloatMathFcnCalls    "ANSI_C"
	      UtilityFuncGeneration   "Auto"
	      GenerateFullHeader      on
	      GenerateSampleERTMain   off
	      IsPILTarget	      off
	      ModelReferenceCompliant on
	      IncludeMdlTerminateFcn  on
	      CombineOutputUpdateFcns off
	      SuppressErrorStatus     off
	      IncludeFileDelimiter    "Auto"
	      ERTCustomFileBanners    off
	      SupportAbsoluteTime     on
	      LogVarNameModifier      "rt_"
	      MatFileLogging	      on
	      MultiInstanceERTCode    off
	      SupportNonFinite	      on
	      SupportComplex	      on
	      PurelyIntegerCode	      off
	      SupportContinuousTime   on
	      SupportNonInlinedSFcns  on
	      ExtMode		      off
	      ExtModeStaticAlloc      off
	      ExtModeTesting	      off
	      ExtModeStaticAllocSize  1000000
	      ExtModeTransport	      0
	      ExtModeMexFile	      "ext_comm"
	      RTWCAPISignals	      off
	      RTWCAPIParams	      off
	      RTWCAPIStates	      off
	      GenerateASAP2	      off
	    }
	    PropName		    "Components"
	  }
	}
	PropName		"Components"
      }
      Name		      "Configuration"
      SimulationMode	      "normal"
      CurrentDlgPage	      "Solver"
    }
    PropName		    "ConfigurationSets"
  }
  Simulink.ConfigSet {
    $PropName		    "ActiveConfigurationSet"
    $ObjectID		    1
  }
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  BlockParameterDefaults {
    Block {
      BlockType		      Constant
      Value		      "1"
      VectorParams1D	      on
      OutDataTypeMode	      "Inherit from 'Constant value'"
      OutDataType	      "sfix(16)"
      ConRadixGroup	      "Use specified scaling"
      OutScaling	      "2^0"
      SampleTime	      "inf"
    }
    Block {
      BlockType		      DiscreteIntegrator
      IntegratorMethod	      "Integration: Forward Euler"
      gainval		      "1.0"
      ExternalReset	      "none"
      InitialConditionSource  "internal"
      InitialCondition	      "0"
      InitialConditionMode    "State and output"
      SampleTime	      "1"
      OutDataTypeMode	      "Inherit via internal rule"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	off
      LimitOutput	      off
      UpperSaturationLimit    "inf"
      LowerSaturationLimit    "-inf"
      ShowSaturationPort      off
      ShowStatePort	      off
      IgnoreLimit	      off
      StateMustResolveToSignalObject off
      RTWStateStorageClass    "Auto"
    }
    Block {
      BlockType		      Fcn
      Expr		      "sin(u[1])"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Gain
      Gain		      "1"
      Multiplication	      "Element-wise(K.*u)"
      ParameterDataTypeMode   "Same as input"
      ParameterDataType	      "sfix(16)"
      ParameterScalingMode    "Best Precision: Matrix-wise"
      ParameterScaling	      "2^0"
      OutDataTypeMode	      "Same as input"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      InitialCondition
      Value		      "1"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Inport
      UseBusObject	      off
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      Interpolate	      on
    }
    Block {
      BlockType		      Integrator
      ExternalReset	      "none"
      InitialConditionSource  "internal"
      InitialCondition	      "0"
      LimitOutput	      off
      UpperSaturationLimit    "inf"
      LowerSaturationLimit    "-inf"
      ShowSaturationPort      off
      ShowStatePort	      off
      AbsoluteTolerance	      "auto"
      IgnoreLimit	      off
      ZeroCross		      on
    }
    Block {
      BlockType		      Logic
      Operator		      "AND"
      Inputs		      "2"
      AllPortsSameDT	      on
      OutDataTypeMode	      "Logical (see Configuration Parameters: Optimiza"
"tion)"
      LogicDataType	      "uint(8)"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      MinMax
      Function		      "min"
      Inputs		      "1"
      InputSameDT	      on
      OutDataTypeMode	      "Inherit via internal rule"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      ZeroCross		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Mux
      Inputs		      "4"
      DisplayOption	      "none"
      UseBusObject	      off
      BusObject		      "BusObject"
      NonVirtualBus	      off
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      UseBusObject	      off
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Block {
      BlockType		      Product
      Inputs		      "2"
      Multiplication	      "Element-wise(.*)"
      InputSameDT	      on
      OutDataTypeMode	      "Same as first input"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Zero"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      RelationalOperator
      Operator		      ">="
      InputSameDT	      on
      LogicOutDataTypeMode    "Logical (see Configuration Parameters: Optimiza"
"tion)"
      LogicDataType	      "uint(8)"
      ZeroCross		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Saturate
      UpperLimit	      "0.5"
      LowerLimit	      "-0.5"
      LinearizeAsGain	      on
      ZeroCross		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Scope
      Floating		      off
      ModelBased	      off
      TickLabels	      "OneTimeTick"
      ZoomMode		      "on"
      Grid		      "on"
      TimeRange		      "auto"
      YMin		      "-5"
      YMax		      "5"
      SaveToWorkspace	      off
      SaveName		      "ScopeData"
      LimitDataPoints	      on
      MaxDataPoints	      "5000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Signum
      ZeroCross		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Step
      Time		      "1"
      Before		      "0"
      After		      "1"
      SampleTime	      "-1"
      VectorParams1D	      on
      ZeroCross		      on
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      on
      Permissions	      "ReadWrite"
      PermitHierarchicalResolution "All"
      SystemSampleTime	      "-1"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
    Block {
      BlockType		      Sum
      IconShape		      "rectangular"
      Inputs		      "++"
      InputSameDT	      on
      OutDataTypeMode	      "Same as first input"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Switch
      Criteria		      "u2 >= Threshold"
      Threshold		      "0"
      InputSameDT	      on
      OutDataTypeMode	      "Inherit via internal rule"
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      ZeroCross		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Terminator
    }
    Block {
      BlockType		      TriggerPort
      TriggerType	      "rising"
      StatesWhenEnabling      "inherit"
      ShowOutputPort	      off
      OutputDataType	      "auto"
      SampleTimeType	      "triggered"
      SampleTime	      "1"
      ZeroCross		      on
    }
    Block {
      BlockType		      UnitDelay
      X0		      "0"
      SampleTime	      "1"
      StateMustResolveToSignalObject off
      RTWStateStorageClass    "Auto"
    }
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  LineDefaults {
    FontName		    "Helvetica"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  System {
    Name		    "enginewc"
    Location		    [23, 98, 816, 435]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      SubSystem
      Name		      "Combustion"
      Ports		      [2, 1]
      Position		      [510, 151, 570, 209]
      DropShadow	      on
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      System {
	Name			"Combustion"
	Location		[83, 353, 964, 568]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Air Charge"
	  Position		  [45, 25, 65, 45]
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Inport
	  Name			  "N"
	  Position		  [160, 130, 180, 150]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [4, 1]
	  Position		  [225, 17, 230, 158]
	  BackgroundColor	  "black"
	  ShowName		  off
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Spark Advance\n(degrees BTDC)"
	  Position		  [50, 94, 85, 116]
	  Value			  "15.0"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Stoichiometric Fuel"
	  Position		  [125, 56, 175, 84]
	  Gain			  "1/14.6"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [790, 85, 810, 105]
	  ShowName		  off
	  IconShape		  "round"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Torque Gen"
	  Position		  [280, 49, 770, 71]
	  Expr			  "-181.3 + 379.36*u[1] + 21.91*u[1]/u[2] - (0"
".85*u[1]*u[1])/(u[2]*u[2]) + 0.26*u[3] - 0.0028*u[3]*u[3] "
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Torque Gen2"
	  Position		  [280, 107, 770, 133]
	  Expr			  "0.027*u[4] - 0.000107*u[4]*u[4] + 0.00048*u"
"[4]*u[3] + 2.55*u[3]*u[1] - 0.05*u[3]*u[3]*u[1]"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Torque"
	  Position		  [845, 85, 865, 105]
	  IconDisplay		  "Port number"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Stoichiometric Fuel"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Spark Advance\n(degrees BTDC)"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "N"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  4
	}
	Line {
	  SrcBlock		  "Air Charge"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    Points		    [0, 35]
	    DstBlock		    "Stoichiometric Fuel"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Mux"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  Points		  [20, 0]
	  Branch {
	    Points		    [0, -30]
	    DstBlock		    "Torque Gen"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 30]
	    DstBlock		    "Torque Gen2"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Torque Gen2"
	  SrcPort		  1
	  Points		  [0, 0]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Torque Gen"
	  SrcPort		  1
	  Points		  [25, 0]
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Torque"
	  DstPort		  1
	}
	Annotation {
	  Name			  "Engine Torque"
	  Position		  [426, 187]
	  FontSize		  16
	  FontWeight		  "bold"
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Compression"
      Ports		      [1, 2, 0, 1]
      Position		      [405, 141, 460, 234]
      DropShadow	      on
      TreatAsAtomicUnit	      on
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      System {
	Name			"Compression"
	Location		[560, 451, 800, 631]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "mass(k+1)"
	  Position		  [25, 30, 45, 50]
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  TriggerPort
	  Name			  "Trigger"
	  Ports			  [0, 1]
	  Position		  [45, 100, 65, 120]
	  TriggerType		  "either"
	  ShowOutputPort	  on
	}
	Block {
	  BlockType		  InitialCondition
	  Name			  "Init"
	  Position		  [75, 20, 115, 60]
	  Value			  "0.152"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay"
	  Position		  [145, 17, 165, 63]
	  X0			  "0.152"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  Outport
	  Name			  "mass(k)"
	  Position		  [205, 30, 225, 50]
	  IconDisplay		  "Port number"
	  InitialOutput		  "0.152"
	}
	Block {
	  BlockType		  Outport
	  Name			  "trigger"
	  Position		  [175, 100, 195, 120]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  InitialOutput		  "-1"
	}
	Line {
	  SrcBlock		  "Init"
	  SrcPort		  1
	  DstBlock		  "Unit Delay"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "mass(k+1)"
	  SrcPort		  1
	  DstBlock		  "Init"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Unit Delay"
	  SrcPort		  1
	  DstBlock		  "mass(k)"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Trigger"
	  SrcPort		  1
	  DstBlock		  "trigger"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Controller"
      Ports		      [2, 1, 0, 1]
      Position		      [70, 163, 145, 227]
      DropShadow	      on
      TreatAsAtomicUnit	      on
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      System {
	Name			"Controller"
	Location		[58, 44, 785, 326]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Desired\nrpm"
	  Position		  [20, 55, 40, 75]
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Inport
	  Name			  "N"
	  Position		  [20, 155, 40, 175]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	}
	Block {
	  BlockType		  TriggerPort
	  Name			  "Trigger"
	  Ports			  []
	  Position		  [360, 250, 380, 270]
	  ShowName		  off
	  TriggerType		  "either"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant1"
	  Position		  [347, 140, 363, 160]
	  Orientation		  "up"
	  NamePlacement		  "alternate"
	  ShowName		  off
	  Value			  "0"
	}
	Block {
	  BlockType		  DiscreteIntegrator
	  Name			  "Discrete-Time\nIntegrator"
	  Ports			  [1, 1]
	  Position		  [440, 97, 480, 133]
	  IntegratorMethod	  "Integration: Forward Euler"
	  ExternalReset		  "none"
	  InitialConditionSource  "internal"
	  InitialCondition	  "8.973"
	  SampleTime		  "-1"
	  ICPrevOutput		  "DiscIntNeverNeededParam"
	  ICPrevScaledInput	  "DiscIntNeverNeededParam"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Integral Gain"
	  Position		  [225, 88, 260, 122]
	  Gain			  "Ki"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Proportional Gain"
	  Position		  [340, 51, 380, 79]
	  Gain			  "Kp"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [130, 55, 150, 75]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1]
	  Position		  [505, 80, 525, 100]
	  ShowName		  off
	  IconShape		  "round"
	}
	Block {
	  BlockType		  Switch
	  Name			  "Switch"
	  Position		  [380, 100, 410, 130]
	  ShowName		  off
	  Threshold		  "0.5"
	}
	Block {
	  BlockType		  Saturate
	  Name			  "limit\noutput"
	  Position		  [560, 75, 590, 105]
	  UpperLimit		  "70"
	  LowerLimit		  "0"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "prevent windup"
	  Ports			  [2, 1]
	  Position		  [200, 152, 320, 208]
	  TreatAsAtomicUnit	  off
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "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"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "controller\noutput"
	      Position		      [30, 116, 60, 134]
	      NamePlacement	      "alternate"
	      Port		      "2"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant"
	      Position		      [117, 300, 133, 320]
	      Orientation	      "up"
	      NamePlacement	      "alternate"
	      ShowName		      off
	      Value		      "70"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant2"
	      Position		      [117, 225, 133, 245]
	      Orientation	      "up"
	      NamePlacement	      "alternate"
	      ShowName		      off
	      Value		      "0"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant3"
	      Position		      [107, 150, 123, 170]
	      Orientation	      "up"
	      NamePlacement	      "alternate"
	      ShowName		      off
	      Value		      "0"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant4"
	      Position		      [112, 90, 128, 110]
	      Orientation	      "up"
	      NamePlacement	      "alternate"
	      ShowName		      off
	      Value		      "0"
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator"
	      Ports		      [2, 1]
	      Position		      [220, 200, 255, 235]
	      ShowName		      off
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator1"
	      Ports		      [2, 1]
	      Position		      [215, 65, 250, 100]
	      ShowName		      off
	    }
	    Block {
	      BlockType		      Logic
	      Name		      "Logical\nOperator2"
	      Ports		      [2, 1]
	      Position		      [315, 145, 350, 180]
	      ShowName		      off
	      Operator		      "NOR"
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator"
	      Position		      [140, 260, 175, 295]
	      NamePlacement	      "alternate"
	      ShowName		      off
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator1"
	      Position		      [145, 192, 175, 223]
	      ShowName		      off
	    }
	    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]
	      IconDisplay	      "Port number"
	      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"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Throttle Ang."
	  Position		  [660, 80, 680, 100]
	  IconDisplay		  "Port number"
	  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		      Scope
      Name		      "Engine\nSpeed\n(rpm)"
      Ports		      [1]
      Position		      [735, 181, 765, 219]
      NamePlacement	      "alternate"
      Location		      [17, 469, 376, 668]
      Open		      on
      NumInputPorts	      "1"
      TickLabels	      "on"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "1500"
      YMax		      "3500"
      SaveToWorkspace	      on
      SaveName		      "N"
      DataFormat	      "Structure"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Integrator
      Name		      "Intake"
      Ports		      [2, 1, 0, 0, 1]
      Position		      [325, 201, 360, 259]
      DropShadow	      on
      ExternalReset	      "either"
      ShowStatePort	      on
    }
    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		      [195, 179, 290, 246]
      DropShadow	      on
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      System {
	Name			"Throttle & Manifold"
	Location		[163, 230, 743, 583]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Throttle Ang."
	  Position		  [30, 50, 50, 70]
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Inport
	  Name			  "Engine Speed, N"
	  Position		  [130, 220, 150, 240]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Saturate
	  Name			  "0 <= theta <= 90"
	  Position		  [115, 48, 135, 72]
	  UpperLimit		  "90"
	  LowerLimit		  "0"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Atmospheric\nPressure, Pa\n(bar)"
	  Position		  [100, 110, 120, 130]
	  Value			  "1.0"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Intake Manifold"
	  Ports			  [2, 2]
	  Position		  [215, 178, 450, 247]
	  TreatAsAtomicUnit	  off
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  System {
	    Name		    "Intake Manifold"
	    Location		    [74, 82, 649, 351]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "mdot Input \n(g/s)"
	      Position		      [30, 80, 50, 100]
	      Port		      "1"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "N (rad/sec)"
	      Position		      [240, 140, 260, 160]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Mux
	      Name		      "Mux"
	      Ports		      [2, 1]
	      Position		      [340, 61, 345, 179]
	      BackgroundColor	      "black"
	      ShowName		      off
	      Inputs		      "2"
	      DisplayOption	      "bar"
	    }
	    Block {
	      BlockType		      Fcn
	      Name		      "Pumping"
	      Position		      [390, 109, 445, 131]
	      Expr		      "-0.366 + 0.08979*u[1]*u[2] - 0.0337*u[2"
"]*u[1]*u[1] + 0.0001*u[1]*u[2]*u[2]"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "RT/Vm"
	      Position		      [160, 70, 255, 110]
	      Gain		      "0.41328"
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum1"
	      Ports		      [2, 1]
	      Position		      [105, 80, 125, 100]
	      ShowName		      off
	      IconShape		      "round"
	      Inputs		      "|+-"
	    }
	    Block {
	      BlockType		      Integrator
	      Name		      "p0 = 0.543 bar"
	      Ports		      [1, 1]
	      Position		      [275, 61, 305, 119]
	      InitialCondition	      ".543"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "mdot to \nCylinder\n (g/s)"
	      Position		      [530, 110, 550, 130]
	      IconDisplay	      "Port number"
	      InitialOutput	      "0"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Manifold Pressure,\nPm (bar)"
	      Position		      [420, 15, 440, 35]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      InitialOutput	      "0"
	    }
	    Line {
	      SrcBlock		      "Pumping"
	      SrcPort		      1
	      Points		      [30, 0]
	      Branch {
		DstBlock		"mdot to \nCylinder\n (g/s)"
		DstPort			1
	      }
	      Branch {
		Points			[0, 90; -365, 0]
		DstBlock		"Sum1"
		DstPort			2
	      }
	    }
	    Line {
	      SrcBlock		      "Sum1"
	      SrcPort		      1
	      DstBlock		      "RT/Vm"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "p0 = 0.543 bar"
	      SrcPort		      1
	      Points		      [5, 0]
	      Branch {
		Points			[0, -65]
		DstBlock		"Manifold Pressure,\nPm (bar)"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Mux"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Mux"
	      SrcPort		      1
	      DstBlock		      "Pumping"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "N (rad/sec)"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "RT/Vm"
	      SrcPort		      1
	      DstBlock		      "p0 = 0.543 bar"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "mdot Input \n(g/s)"
	      SrcPort		      1
	      DstBlock		      "Sum1"
	      DstPort		      1
	    }
	    Annotation {
	      Name		      "Intake Manifold Vacuum"
	      Position		      [277, 238]
	      FontSize		      16
	      FontWeight	      "bold"
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Throttle"
	  Ports			  [3, 1]
	  Position		  [180, 48, 485, 132]
	  TreatAsAtomicUnit	  off
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  System {
	    Name		    "Throttle"
	    Location		    [37, 210, 621, 616]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Throttle Angle,\ntheta (deg)"
	      Position		      [65, 65, 85, 85]
	      NamePlacement	      "alternate"
	      Port		      "1"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Manifold Pressure,\nPm (bar)"
	      Position		      [65, 110, 85, 130]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Atmospheric Pressure,\nPa (bar) "
	      Position		      [65, 180, 85, 200]
	      Port		      "3"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      MinMax
	      Name		      "MinMax"
	      Ports		      [2, 1]
	      Position		      [240, 100, 265, 215]
	      ShowName		      off
	      Function		      "min"
	      Inputs		      "2"
	      Port {
		PortNumber		1
		Name			"pratio"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
		ShowSigGenPortName	on
	      }
	    }
	    Block {
	      BlockType		      Product
	      Name		      "Product"
	      Ports		      [3, 1]
	      Position		      [470, 22, 490, 338]
	      ShowName		      off
	      Inputs		      "3"
	    }
	    Block {
	      BlockType		      Product
	      Name		      "Product1"
	      Ports		      [2, 1]
	      Position		      [180, 112, 210, 143]
	      ShowName		      off
	      Inputs		      "*/"
	    }
	    Block {
	      BlockType		      Product
	      Name		      "Product2"
	      Ports		      [2, 1]
	      Position		      [180, 167, 210, 198]
	      ShowName		      off
	      Inputs		      "/*"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Sonic Flow "
	      Position		      [345, 190, 365, 210]
	      Value		      "1.0"
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum"
	      Ports		      [2, 1]
	      Position		      [150, 275, 170, 295]
	      ShowName		      off
	      IconShape		      "round"
	      Inputs		      "+-|"
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "Switch"
	      Position		      [420, 148, 445, 212]
	      ShowName		      off
	      Threshold		      "0.5"
	    }
	    Block {
	      BlockType		      Fcn
	      Name		      "f(theta)"
	      Position		      [110, 64, 440, 86]
	      NamePlacement	      "alternate"
	      Expr		      "2.821 - 0.05231*u[1] + 0.10299*u[1]*u[1"
"] - 0.00063*u[1]*u[1]*u[1]"
	    }
	    Block {
	      BlockType		      Signum
	      Name		      "flow direction"
	      Position		      [300, 269, 335, 301]
	    }
	    Block {
	      BlockType		      Fcn
	      Name		      "g(pratio)"
	      Position		      [315, 148, 390, 172]
	      NamePlacement	      "alternate"
	      Expr		      "2*sqrt(u - u*u)"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Throttle \nFlow, mdot\n (g/s)"
	      Position		      [535, 170, 555, 190]
	      IconDisplay	      "Port number"
	      InitialOutput	      "0"
	    }
	    Line {
	      SrcBlock		      "f(theta)"
	      SrcPort		      1
	      DstBlock		      "Product"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Product"
	      SrcPort		      1
	      DstBlock		      "Throttle \nFlow, mdot\n (g/s)"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Throttle Angle,\ntheta (deg)"
	      SrcPort		      1
	      DstBlock		      "f(theta)"
	      DstPort		      1
	    }
	    Line {
	      Name		      "pratio"
	      Labels		      [1, 0]
	      SrcBlock		      "MinMax"
	      SrcPort		      1
	      Points		      [20, 0]
	      Branch {
		DstBlock		"g(pratio)"
		DstPort			1
	      }
	      Branch {
		Points			[0, 20]
		DstBlock		"Switch"
		DstPort			2
	      }
	    }
	    Line {
	      SrcBlock		      "Sum"
	      SrcPort		      1
	      DstBlock		      "flow direction"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "flow direction"
	      SrcPort		      1
	      DstBlock		      "Product"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Switch"
	      SrcPort		      1
	      DstBlock		      "Product"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Sonic Flow "
	      SrcPort		      1
	      DstBlock		      "Switch"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "g(pratio)"
	      SrcPort		      1
	      DstBlock		      "Switch"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Atmospheric Pressure,\nPa (bar) "
	      SrcPort		      1
	      Points		      [70, 0]
	      Branch {
		Points			[0, -55]
		DstBlock		"Product1"
		DstPort			2
	      }
	      Branch {
		Points			[0, 0]
		Branch {
		  DstBlock		  "Product2"
		  DstPort		  2
		}
		Branch {
		  DstBlock		  "Sum"
		  DstPort		  1
		}
	      }
	    }
	    Line {
	      SrcBlock		      "Product1"
	      SrcPort		      1
	      DstBlock		      "MinMax"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Product2"
	      SrcPort		      1
	      DstBlock		      "MinMax"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Manifold Pressure,\nPm (bar)"
	      SrcPort		      1
	      Points		      [40, 0]
	      Branch {
		DstBlock		"Product1"
		DstPort			1
	      }
	      Branch {
		Points			[0, 55]
		Branch {
		  DstBlock		  "Product2"
		  DstPort		  1
		}
		Branch {
		  Points		  [0, 110]
		  DstBlock		  "Sum"
		  DstPort		  2
		}
	      }
	    }
	    Annotation {
	      Name		      "Throttle Flow vs. Valve Angle and Press"
"ure"
	      Position		      [291, 372]
	      FontSize		      16
	      FontWeight	      "bold"
	    }
	  }
	}
	Block {
	  BlockType		  Outport
	  Name			  "Mass Airflow Rate"
	  Position		  [510, 185, 530, 205]
	  IconDisplay		  "Port number"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Atmospheric\nPressure, Pa\n(bar)"
	  SrcPort		  1
	  DstBlock		  "Throttle"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Intake Manifold"
	  SrcPort		  1
	  DstBlock		  "Mass Airflow Rate"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Intake Manifold"
	  SrcPort		  2
	  Points		  [20, 0; 0, 40; -410, 0; 0, -180]
	  DstBlock		  "Throttle"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Engine Speed, N"
	  SrcPort		  1
	  DstBlock		  "Intake Manifold"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Throttle"
	  SrcPort		  1
	  Points		  [35, 0; 0, 70; -330, 0; 0, 35]
	  DstBlock		  "Intake Manifold"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Throttle Ang."
	  SrcPort		  1
	  DstBlock		  "0 <= theta <= 90"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "0 <= theta <= 90"
	  SrcPort		  1
	  DstBlock		  "Throttle"
	  DstPort		  1
	}
	Annotation {
	  Name			  "Air Intake Dynamics"
	  Position		  [302, 318]
	  FontSize		  16
	  FontWeight		  "bold"
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Vehicle\nDynamics"
      Ports		      [2, 1]
      Position		      [600, 164, 635, 231]
      DropShadow	      on
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      System {
	Name			"Vehicle\nDynamics"
	Location		[403, 319, 773, 467]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Teng"
	  Position		  [40, 40, 60, 60]
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Inport
	  Name			  "Tload"
	  Position		  [40, 80, 60, 100]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Gain
	  Name			  "Inverse Inertia,\n1/J"
	  Position		  [165, 36, 215, 64]
	  Gain			  "1/0.14"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [110, 40, 130, 60]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-"
	}
	Block {
	  BlockType		  Integrator
	  Name			  "w = T/J\nw0 = 209 rad/s"
	  Ports			  [1, 1]
	  Position		  [250, 32, 270, 68]
	  InitialCondition	  "209.48"
	}
	Block {
	  BlockType		  Outport
	  Name			  "N"
	  Position		  [305, 40, 325, 60]
	  IconDisplay		  "Port number"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Inverse Inertia,\n1/J"
	  SrcPort		  1
	  DstBlock		  "w = T/J\nw0 = 209 rad/s"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "w = T/J\nw0 = 209 rad/s"
	  SrcPort		  1
	  DstBlock		  "N"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Inverse Inertia,\n1/J"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Teng"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Tload"
	  SrcPort		  1
	  Points		  [55, 0]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "drag torque"
      Ports		      [0, 1]
      Position		      [515, 241, 570, 269]
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      System {
	Name			"drag torque"
	Location		[668, 439, 912, 616]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Step
	  Name			  "Step"
	  Position		  [20, 25, 40, 45]
	  Time			  "2"
	  Before		  "25"
	  After			  "20"
	  SampleTime		  "0"
	}
	Block {
	  BlockType		  Step
	  Name			  "Step1"
	  Position		  [20, 95, 40, 115]
	  Time			  "8"
	  After			  "5"
	  SampleTime		  "0"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1]
	  Position		  [100, 60, 120, 80]
	  ShowName		  off
	  IconShape		  "round"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Load"
	  Position		  [185, 60, 205, 80]
	  IconDisplay		  "Port number"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  DstBlock		  "Load"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Step"
	  SrcPort		  1
	  Points		  [65, 0]
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Step1"
	  SrcPort		  1
	  Points		  [65, 0]
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
	Annotation {
	  Name			  "Torque Disturbances"
	  Position		  [126, 156]
	  FontSize		  14
	  FontWeight		  "bold"
	}
      }
    }
    Block {
      BlockType		      Gain
      Name		      "rad/s\nto rpm"
      Position		      [675, 183, 715, 217]
      NamePlacement	      "alternate"
      Gain		      "30/pi"
    }
    Block {
      BlockType		      Step
      Name		      "speed\nset\npoint"
      Position		      [15, 170, 35, 190]
      Time		      "5"
      Before		      "2000"
      After		      "3000"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "throttle deg (purple)\nload torque Nm\n(yellow)"
      Ports		      [1]
      Position		      [725, 275, 755, 315]
      NamePlacement	      "alternate"
      Location		      [377, 446, 751, 644]
      Open		      on
      NumInputPorts	      "1"
      TickLabels	      "on"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "5"
      YMax		      "30"
      SaveToWorkspace	      on
      SaveName		      "Tth"
      DataFormat	      "Structure"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      SubSystem
      Name		      "valve timing"
      Ports		      [1, 1]
      Position		      [555, 94, 620, 126]
      Orientation	      "left"
      ForegroundColor	      "red"
      DropShadow	      on
      NamePlacement	      "alternate"
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      System {
	Name			"valve timing"
	Location		[131, 153, 549, 394]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "N"
	  Position		  [390, 55, 410, 75]
	  Orientation		  "left"
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	  Port {
	    PortNumber		    1
	    Name		    "rad/sec"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	    ShowSigGenPortName	    on
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "TDC and BDC detection"
	  Ports			  [1, 1]
	  Position		  [235, 42, 300, 88]
	  Orientation		  "left"
	  TreatAsAtomicUnit	  off
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  System {
	    Name		    "TDC and BDC detection"
	    Location		    [106, 129, 499, 336]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "N"
	      Position		      [55, 103, 85, 117]
	      Port		      "1"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant"
	      Position		      [50, 140, 80, 160]
	      ShowName		      off
	      Value		      "pi"
	    }
	    Block {
	      BlockType		      Integrator
	      Name		      "Get Crank\nAngle\nIC 0"
	      Ports		      [2, 1, 0, 0, 1]
	      Position		      [215, 96, 250, 154]
	      NamePlacement	      "alternate"
	      ExternalReset	      "rising"
	      ShowStatePort	      on
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator"
	      Position		      [115, 113, 145, 162]
	      ShowName		      off
	    }
	    Block {
	      BlockType		      Terminator
	      Name		      "Terminator"
	      Position		      [300, 105, 320, 125]
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "trigger"
	      Position		      [310, 153, 340, 167]
	      IconDisplay	      "Port number"
	      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
	    }
	    Annotation {
	      Name		      "Look for next top dead center.and\nbott"
"om dead center.\nProduce two pulses per revolution."
	      Position		      [38, 50]
	      HorizontalAlignment     "left"
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "positive edge to\ndual edge conversion"
	  Ports			  [0, 1, 0, 1]
	  Position		  [120, 93, 175, 137]
	  Orientation		  "left"
	  TreatAsAtomicUnit	  on
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  System {
	    Name		    "positive edge to\ndual edge conversion"
	    Location		    [735, 312, 941, 540]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      TriggerPort
	      Name		      "Trigger"
	      Ports		      []
	      Position		      [105, 150, 125, 170]
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain"
	      Position		      [70, 85, 100, 115]
	      Orientation	      "left"
	      Gain		      "-1"
	    }
	    Block {
	      BlockType		      UnitDelay
	      Name		      "Unit Delay"
	      Position		      [80, 25, 110, 55]
	      X0		      "1"
	      SampleTime	      "-1"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "trigger"
	      Position		      [155, 34, 180, 46]
	      IconDisplay	      "Port number"
	      InitialOutput	      "-1"
	    }
	    Line {
	      SrcBlock		      "Gain"
	      SrcPort		      1
	      Points		      [-15, 0; 0, -60]
	      DstBlock		      "Unit Delay"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Unit Delay"
	      SrcPort		      1
	      Points		      [10, 0]
	      Branch {
		DstBlock		"trigger"
		DstPort			1
	      }
	      Branch {
		Points			[0, 60]
		DstBlock		"Gain"
		DstPort			1
	      }
	    }
	  }
	}
	Block {
	  BlockType		  Outport
	  Name			  "edge180"
	  Position		  [45, 105, 65, 125]
	  Orientation		  "left"
	  IconDisplay		  "Port number"
	  InitialOutput		  "-1"
	}
	Line {
	  SrcBlock		  "TDC and BDC detection"
	  SrcPort		  1
	  Points		  [-85, 0]
	  DstBlock		  "positive edge to\ndual edge conversion"
	  DstPort		  trigger
	}
	Line {
	  SrcBlock		  "positive edge to\ndual edge conversion"
	  SrcPort		  1
	  DstBlock		  "edge180"
	  DstPort		  1
	}
	Line {
	  Name			  "rad/sec"
	  Labels		  [-1, 0]
	  SrcBlock		  "N"
	  SrcPort		  1
	  DstBlock		  "TDC and BDC detection"
	  DstPort		  1
	}
	Annotation {
	  Name			  "Rotational Velocity to Synchronized \nDiscr"
"ete Event Conversion"
	  Position		  [224, 198]
	  FontSize		  14
	  FontWeight		  "bold"
	}
      }
    }
    Block {
      BlockType		      Outport
      Name		      "crank speed\n(rad/sec)"
      Position		      [690, 100, 710, 120]
      NamePlacement	      "alternate"
      IconDisplay	      "Port number"
      InitialOutput	      "0"
    }
    Line {
      SrcBlock		      "speed\nset\npoint"
      SrcPort		      1
      DstBlock		      "Controller"
      DstPort		      1
    }
    Line {
      SrcBlock		      "drag torque"
      SrcPort		      1
      Points		      [10, 0]
      Branch {
	Points			[0, 25]
	DstBlock		"Mux"
	DstPort			1
      }
      Branch {
	DstBlock		"Vehicle\nDynamics"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "Controller"
      SrcPort		      1
      Points		      [10, 0]
      Branch {
	DstBlock		"Throttle & Manifold"
	DstPort			1
      }
      Branch {
	Points			[0, 115]
	DstBlock		"Mux"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "Compression"
      SrcPort		      1
      DstBlock		      "Combustion"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Throttle & Manifold"
      SrcPort		      1
      DstBlock		      "Intake"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Intake"
      SrcPort		      1
      DstBlock		      "Terminator"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Intake"
      SrcPort		      state
      Points		      [0, -6]
      DstBlock		      "Compression"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Compression"
      SrcPort		      2
      Points		      [10, 0; 0, 70; -170, 0; 0, -35]
      DstBlock		      "Intake"
      DstPort		      2
    }
    Line {
      SrcBlock		      "valve timing"
      SrcPort		      1
      Points		      [-120, 0]
      Branch {
	Points			[-325, 0]
	DstBlock		"Controller"
	DstPort			trigger
      }
      Branch {
	DstBlock		"Compression"
	DstPort			trigger
      }
    }
    Line {
      SrcBlock		      "Combustion"
      SrcPort		      1
      DstBlock		      "Vehicle\nDynamics"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Vehicle\nDynamics"
      SrcPort		      1
      Points		      [15, 0]
      Branch {
	Points			[0, 95; -165, 0]
	Branch {
	  Points		  [-320, 0]
	  Branch {
	    Points		    [-125, 0; 0, -85]
	    DstBlock		    "Controller"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [0, -65]
	    DstBlock		    "Throttle & Manifold"
	    DstPort		    2
	  }
	}
	Branch {
	  Points		  [0, -100]
	  DstBlock		  "Combustion"
	  DstPort		  2
	}
      }
      Branch {
	Points			[0, -90]
	Branch {
	  DstBlock		  "valve timing"
	  DstPort		  1
	}
	Branch {
	  DstBlock		  "crank speed\n(rad/sec)"
	  DstPort		  1
	}
      }
      Branch {
	DstBlock		"rad/s\nto rpm"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "rad/s\nto rpm"
      SrcPort		      1
      DstBlock		      "Engine\nSpeed\n(rpm)"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      DstBlock		      "throttle deg (purple)\nload torque Nm\n(yellow)"
      DstPort		      1
    }
    Annotation {
      Name		      "Closed-Loop Engine Speed Control"
      Position		      [388, 33]
      FontName		      "times"
      FontSize		      24
      FontWeight	      "bold"
      FontAngle		      "italic"
    }
    Annotation {
      Name		      "choose Start from\nthe Simulation \nmenu to run"
      Position		      [108, 63]
      FontName		      "times"
      FontSize		      12
      FontWeight	      "bold"
      FontAngle		      "italic"
    }
  }
}
