Model {
  Name			  "Basic_1dof_State_Variable_Model"
  Version		  5.1
  SaveDefaultBlockParams  on
  SampleTimeColors	  off
  LibraryLinkDisplay	  "none"
  WideLines		  off
  ShowLineDimensions	  off
  ShowPortDataTypes	  off
  ShowLoopsOnError	  on
  IgnoreBidirectionalLines off
  ShowStorageClass	  off
  SortedOrder		  off
  RecordCoverage	  off
  CovPath		  "/"
  CovSaveName		  "covdata"
  CovMetricSettings	  "dw"
  CovNameIncrementing	  off
  CovHtmlReporting	  on
  covSaveCumulativeToWorkspaceVar on
  CovSaveSingleToWorkspaceVar on
  CovCumulativeVarName	  "covCumulativeData"
  CovCumulativeReport	  off
  DataTypeOverride	  "UseLocalSettings"
  MinMaxOverflowLogging	  "UseLocalSettings"
  MinMaxOverflowArchiveMode "Overwrite"
  BlockNameDataTip	  off
  BlockParametersDataTip  off
  BlockDescriptionStringDataTip	off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  Created		  "Mon Jul 31 20:59:39 2000"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "throne"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Thu Apr 28 09:52:47 2005"
  ModelVersionFormat	  "1.%<AutoIncrement:124>"
  ConfigurationManager	  "None"
  SimParamPage		  "Solver"
  LinearizationMsg	  "none"
  Profile		  off
  ParamWorkspaceSource	  "MATLABWorkspace"
  AccelSystemTargetFile	  "accel.tlc"
  AccelTemplateMakefile	  "accel_default_tmf"
  AccelMakeCommand	  "make_rtw"
  TryForcingSFcnDF	  off
  ExtModeMexFile	  "rtwinext"
  ExtModeBatchMode	  off
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "normal"
  ExtModeTrigPort	  "1"
  ExtModeTrigElement	  "any"
  ExtModeTrigDuration	  10000
  ExtModeTrigHoldOff	  0
  ExtModeTrigDelay	  0
  ExtModeTrigDirection	  "rising"
  ExtModeTrigLevel	  0
  ExtModeArchiveMode	  "off"
  ExtModeAutoIncOneShot	  off
  ExtModeIncDirWhenArm	  off
  ExtModeAddSuffixToVar	  off
  ExtModeWriteAllDataToWs off
  ExtModeArmWhenConnect	  on
  ExtModeSkipDownloadWhenConnect off
  ExtModeLogAll		  on
  ExtModeAutoUpdateStatusClock on
  BufferReuse		  on
  RTWExpressionDepthLimit 5
  SimulationMode	  "normal"
  Solver		  "ode45"
  SolverMode		  "Auto"
  StartTime		  "0.0"
  StopTime		  "Tf"
  MaxOrder		  5
  MaxStep		  "0.0001"
  MinStep		  "auto"
  MaxNumMinSteps	  "-1"
  InitialStep		  "auto"
  FixedStep		  "auto"
  RelTol		  "1e-3"
  AbsTol		  "auto"
  OutputOption		  "RefineOutputTimes"
  OutputTimes		  "[]"
  Refine		  "1"
  LoadExternalInput	  off
  ExternalInput		  "[t, u]"
  LoadInitialState	  off
  InitialState		  "xInitial"
  SaveTime		  off
  TimeSaveName		  "tout"
  SaveState		  off
  StateSaveName		  "xout"
  SaveOutput		  off
  OutputSaveName	  "yout"
  SaveFinalState	  off
  FinalStateName	  "xFinal"
  SaveFormat		  "Array"
  Decimation		  "1"
  LimitDataPoints	  on
  MaxDataPoints		  "10000"
  SignalLoggingName	  "sigsOut"
  ConsistencyChecking	  "none"
  ArrayBoundsChecking	  "none"
  AlgebraicLoopMsg	  "warning"
  BlockPriorityViolationMsg "warning"
  MinStepSizeMsg	  "warning"
  InheritedTsInSrcMsg	  "warning"
  DiscreteInheritContinuousMsg "warning"
  MultiTaskRateTransMsg	  "error"
  SingleTaskRateTransMsg  "none"
  CheckForMatrixSingularity "none"
  IntegerOverflowMsg	  "warning"
  Int32ToFloatConvMsg	  "warning"
  ParameterDowncastMsg	  "error"
  ParameterOverflowMsg	  "error"
  ParameterPrecisionLossMsg "warning"
  UnderSpecifiedDataTypeMsg "none"
  UnnecessaryDatatypeConvMsg "none"
  VectorMatrixConversionMsg "none"
  InvalidFcnCallConnMsg	  "error"
  SignalLabelMismatchMsg  "none"
  UnconnectedInputMsg	  "warning"
  UnconnectedOutputMsg	  "warning"
  UnconnectedLineMsg	  "warning"
  SfunCompatibilityCheckMsg "none"
  RTWInlineParameters	  off
  BlockReductionOpt	  on
  BooleanDataType	  on
  ConditionallyExecuteInputs on
  ParameterPooling	  on
  OptimizeBlockIOStorage  on
  ZeroCross		  on
  AssertionControl	  "UseLocalSettings"
  ProdHWDeviceType	  "Microprocessor"
  ProdHWWordLengths	  "8,16,32,32"
  RTWSystemTargetFile	  "rtwin.tlc"
  RTWTemplateMakefile	  "rtwintmf"
  RTWMakeCommand	  "make_rtw"
  RTWGenerateCodeOnly	  off
  RTWRetainRTWFile	  off
  TLCProfiler		  off
  TLCDebug		  off
  TLCCoverage		  off
  TLCAssertion		  off
  RTWOptions		  " -aCCOptimize=1 -aEnforceIntegerDowncast=1 -aExtMod"
"e=1 -aFoldNonRolledExpr=1 -aForceParamTrailComments=0 -aGenerateComments=1 -a"
"GenerateReport=0 -aIncDataTypeInIds=0 -aIncHierarchyInIds=0 -aInlineInvariant"
"Signals=0 -aInlineParameters=0 -aInlinedPrmAccess=\"Literals\" -aLocalBlockOu"
"tputs=1 -aMaxRTWIdLen=31 -aPrefixModelToSubsysFcnNames=1 -aRTWVerbose=1 -aReb"
"uildAll=0 -aRollThreshold=5 -aShowEliminatedStatements=0"
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  BlockParameterDefaults {
    Block {
      BlockType		      Clock
      DisplayTime	      off
    }
    Block {
      BlockType		      Demux
      Outputs		      "4"
      DisplayOption	      "none"
      BusSelectionMode	      off
    }
    Block {
      BlockType		      Gain
      Gain		      "1"
      Multiplication	      "Element-wise(K.*u)"
      ShowAdditionalParam     off
      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
    }
    Block {
      BlockType		      Integrator
      ExternalReset	      "none"
      InitialConditionSource  "internal"
      InitialCondition	      "0"
      LimitOutput	      off
      UpperSaturationLimit    "inf"
      LowerSaturationLimit    "-inf"
      ShowSaturationPort      off
      ShowStatePort	      off
      AbsoluteTolerance	      "auto"
      ZeroCross		      on
    }
    Block {
      BlockType		      Saturate
      UpperLimit	      "0.5"
      LowerLimit	      "-0.5"
      LinearizeAsGain	      on
      ZeroCross		      on
    }
    Block {
      BlockType		      Step
      Time		      "1"
      Before		      "0"
      After		      "1"
      VectorParams1D	      on
      ZeroCross		      on
    }
    Block {
      BlockType		      Sum
      IconShape		      "rectangular"
      Inputs		      "++"
      ShowAdditionalParam     off
      InputSameDT	      on
      OutDataTypeMode	      "Same as first input"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
    }
    Block {
      BlockType		      ToWorkspace
      VariableName	      "simulink_output"
      MaxDataPoints	      "1000"
      Decimation	      "1"
    }
  }
  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		    "Basic_1dof_State_Variable_Model"
    Location		    [48, 135, 765, 548]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Gain
      Name		      "A"
      Position		      [405, 150, 435, 180]
      Orientation	      "left"
      Gain		      "A"
      Multiplication	      "Matrix(K*u)"
    }
    Block {
      BlockType		      Gain
      Name		      "B"
      Position		      [305, 95, 335, 125]
      Gain		      "B"
      Multiplication	      "Matrix(K*u)"
    }
    Block {
      BlockType		      Gain
      Name		      "C"
      Position		      [565, 205, 595, 235]
      Gain		      "C"
      Multiplication	      "Matrix(K*u)"
    }
    Block {
      BlockType		      Clock
      Name		      "Clock"
      Position		      [15, 190, 35, 210]
      Decimation	      "1"
    }
    Block {
      BlockType		      Demux
      Name		      "Demux"
      Ports		      [1, 2]
      Position		      [560, 51, 565, 169]
      BackgroundColor	      "black"
      ShowName		      off
      Outputs		      "2"
    }
    Block {
      BlockType		      Gain
      Name		      "Gpf"
      Position		      [100, 85, 130, 115]
      Gain		      "Gpf"
    }
    Block {
      BlockType		      Integrator
      Name		      "Integrator"
      Ports		      [1, 1]
      Position		      [430, 95, 460, 125]
      InitialCondition	      "[ic_x; ic_x_dot];"
    }
    Block {
      BlockType		      Gain
      Name		      "K"
      Position		      [320, 205, 350, 235]
      Orientation	      "left"
      Gain		      "K"
      Multiplication	      "Matrix(K*u)"
    }
    Block {
      BlockType		      Saturate
      Name		      "Saturation"
      Position		      [240, 95, 270, 125]
      UpperLimit	      "saturation_level"
      LowerLimit	      "-saturation_level"
    }
    Block {
      BlockType		      Step
      Name		      "Step"
      Position		      [45, 85, 75, 115]
      Time		      "0"
      After		      "Amp"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      Ports		      [2, 1]
      Position		      [190, 82, 210, 138]
      ShowName		      off
      Inputs		      "|+|-|"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum2"
      Ports		      [2, 1]
      Position		      [360, 100, 380, 120]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|++"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace"
      Position		      [640, 65, 700, 95]
      VariableName	      "m_x1"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace1"
      Position		      [635, 125, 695, 155]
      VariableName	      "m_x1_dot"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace2"
      Position		      [635, 205, 695, 235]
      VariableName	      "m_y"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace3"
      Position		      [80, 185, 140, 215]
      VariableName	      "m_time"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace5"
      Position		      [335, 35, 395, 65]
      VariableName	      "m_u"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace6"
      Position		      [135, 20, 195, 50]
      VariableName	      "m_r"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Line {
      SrcBlock		      "Clock"
      SrcPort		      1
      DstBlock		      "To Workspace3"
      DstPort		      1
    }
    Line {
      SrcBlock		      "A"
      SrcPort		      1
      Points		      [-30, 0]
      DstBlock		      "Sum2"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Sum2"
      SrcPort		      1
      DstBlock		      "Integrator"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Integrator"
      SrcPort		      1
      Points		      [0, 0; 10, 0]
      Branch {
	Points			[0, 55]
	DstBlock		"A"
	DstPort			1
      }
      Branch {
	Points			[40, 0]
	Branch {
	  DstBlock		  "Demux"
	  DstPort		  1
	}
	Branch {
	  Points		  [0, 110]
	  Branch {
	    DstBlock		    "C"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "K"
	    DstPort		    1
	  }
	}
      }
    }
    Line {
      SrcBlock		      "Gpf"
      SrcPort		      1
      DstBlock		      "Sum"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Step"
      SrcPort		      1
      Points		      [0, 0; 5, 0]
      Branch {
	DstBlock		"Gpf"
	DstPort			1
      }
      Branch {
	Points			[0, -65]
	DstBlock		"To Workspace6"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "B"
      SrcPort		      1
      DstBlock		      "Sum2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Saturation"
      SrcPort		      1
      Points		      [0, 0; 10, 0]
      Branch {
	DstBlock		"B"
	DstPort			1
      }
      Branch {
	Points			[0, -60]
	DstBlock		"To Workspace5"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Sum"
      SrcPort		      1
      DstBlock		      "Saturation"
      DstPort		      1
    }
    Line {
      SrcBlock		      "C"
      SrcPort		      1
      DstBlock		      "To Workspace2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      1
      DstBlock		      "To Workspace"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      2
      DstBlock		      "To Workspace1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "K"
      SrcPort		      1
      Points		      [-150, 0; 0, -100]
      DstBlock		      "Sum"
      DstPort		      2
    }
  }
}
