Model {
  Name			  "DT_sv1_optimal_tracker"
  Version		  5.1
  SaveDefaultBlockParams  on
  SampleTimeColors	  off
  LibraryLinkDisplay	  "none"
  WideLines		  on
  ShowLineDimensions	  on
  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		  "Thu Feb 10 13:34:53 2005"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "throne"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Sat Feb 04 14:31:38 2006"
  ModelVersionFormat	  "1.%<AutoIncrement:133>"
  ConfigurationManager	  "None"
  SimParamPage		  "Solver"
  LinearizationMsg	  "none"
  Profile		  off
  ParamWorkspaceSource	  "MATLABWorkspace"
  AccelSystemTargetFile	  "accel.tlc"
  AccelTemplateMakefile	  "accel_default_tmf"
  AccelMakeCommand	  "make_rtw"
  TryForcingSFcnDF	  off
  ExtModeMexFile	  "ext_comm"
  ExtModeBatchMode	  off
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "normal"
  ExtModeTrigPort	  "1"
  ExtModeTrigElement	  "any"
  ExtModeTrigDuration	  1000
  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		  "FixedStepDiscrete"
  SolverMode		  "Auto"
  StartTime		  "0.0"
  StopTime		  "Tf"
  MaxOrder		  5
  MaxStep		  "1e-5"
  MinStep		  "auto"
  MaxNumMinSteps	  "-1"
  InitialStep		  "auto"
  FixedStep		  "Ts"
  RelTol		  "1e-4"
  AbsTol		  "auto"
  OutputOption		  "RefineOutputTimes"
  OutputTimes		  "[]"
  Refine		  "1"
  LoadExternalInput	  off
  ExternalInput		  "KK"
  LoadInitialState	  off
  InitialState		  "xInitial"
  SaveTime		  on
  TimeSaveName		  "tout"
  SaveState		  off
  StateSaveName		  "xout"
  SaveOutput		  on
  OutputSaveName	  "yout"
  SaveFinalState	  off
  FinalStateName	  "xFinal"
  SaveFormat		  "Structure"
  Decimation		  "1"
  LimitDataPoints	  off
  MaxDataPoints		  "1000"
  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	  "grt.tlc"
  RTWTemplateMakefile	  "grt_default_tmf"
  RTWMakeCommand	  "make_rtw"
  RTWGenerateCodeOnly	  off
  RTWRetainRTWFile	  off
  TLCProfiler		  off
  TLCDebug		  off
  TLCCoverage		  off
  TLCAssertion		  off
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  BlockParameterDefaults {
    Block {
      BlockType		      Demux
      Outputs		      "4"
      DisplayOption	      "none"
      BusSelectionMode	      off
    }
    Block {
      BlockType		      DigitalClock
    }
    Block {
      BlockType		      FromWorkspace
      VariableName	      "simulink_input"
      Interpolate	      on
      OutputAfterFinalValue   "Extrapolation"
    }
    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		      Inport
      Port		      "1"
      PortDimensions	      "-1"
      ShowAdditionalParam     off
      LatchInput	      off
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      Interpolate	      on
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Block {
      BlockType		      Saturate
      UpperLimit	      "0.5"
      LowerLimit	      "-0.5"
      LinearizeAsGain	      on
      ZeroCross		      on
    }
    Block {
      BlockType		      "S-Function"
      FunctionName	      "system"
      PortCounts	      "[]"
      SFunctionModules	      "''"
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      on
      Permissions	      "ReadWrite"
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
    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"
    }
    Block {
      BlockType		      UnitDelay
      X0		      "0"
      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		    "DT_sv1_optimal_tracker"
    Location		    [353, 86, 1375, 516]
    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		      "Cy"
      Position		      [670, 165, 700, 195]
      Orientation	      "down"
      NamePlacement	      "alternate"
      Gain		      "Cy"
      Multiplication	      "Matrix(K*u)"
    }
    Block {
      BlockType		      Demux
      Name		      "Demux"
      Ports		      [1, 3]
      Position		      [725, 101, 730, 139]
      BackgroundColor	      "black"
      ShowName		      off
      Outputs		      "3"
    }
    Block {
      BlockType		      DigitalClock
      Name		      "Digital Clock"
      Position		      [30, 18, 95, 42]
      SampleTime	      "Ts"
    }
    Block {
      BlockType		      Reference
      Name		      "Dot Product"
      Ports		      [2, 1]
      Position		      [335, 246, 365, 279]
      Orientation	      "left"
      SourceBlock	      "simulink/Math\nOperations/Dot Product"
      SourceType	      "Dot Product"
    }
    Block {
      BlockType		      FromWorkspace
      Name		      "From\nWorkspace"
      Position		      [65, 108, 130, 132]
      VariableName	      "uff"
      SampleTime	      "Ts"
      Interpolate	      off
      OutputAfterFinalValue   "Setting to zero"
    }
    Block {
      BlockType		      FromWorkspace
      Name		      "From\nWorkspace1"
      Position		      [310, 338, 375, 362]
      VariableName	      "KK"
      SampleTime	      "Ts"
      OutputAfterFinalValue   "Setting to zero"
    }
    Block {
      BlockType		      Gain
      Name		      "G"
      Position		      [450, 175, 480, 205]
      Orientation	      "left"
      ForegroundColor	      "[0.000000, 0.000000, 1.000000]"
      BackgroundColor	      "[1.000000, 1.000000, 0.000000]"
      Gain		      "G"
      Multiplication	      "Matrix(K*u)"
    }
    Block {
      BlockType		      Gain
      Name		      "H"
      Position		      [330, 105, 360, 135]
      ForegroundColor	      "[0.000000, 0.000000, 1.000000]"
      BackgroundColor	      "[1.000000, 1.000000, 0.000000]"
      Gain		      "H"
      Multiplication	      "Matrix(K*u)"
    }
    Block {
      BlockType		      Saturate
      Name		      "Saturation"
      Position		      [245, 105, 275, 135]
      ForegroundColor	      "[0.000000, 0.000000, 1.000000]"
      BackgroundColor	      "[1.000000, 1.000000, 0.000000]"
      UpperLimit	      "saturation_level"
      LowerLimit	      "-saturation_level"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      Ports		      [2, 1]
      Position		      [190, 110, 210, 130]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|+-"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum1"
      Ports		      [2, 1]
      Position		      [390, 110, 410, 130]
      ForegroundColor	      "[0.000000, 0.000000, 1.000000]"
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|++"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace"
      Position		      [790, 205, 850, 235]
      VariableName	      "m_y"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace1"
      Position		      [400, 45, 460, 75]
      VariableName	      "m_u"
      MaxDataPoints	      "inf"
      SampleTime	      "Ts"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace11"
      Position		      [790, 140, 850, 170]
      VariableName	      "m_ud"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace2"
      Position		      [125, 15, 185, 45]
      VariableName	      "m_time"
      MaxDataPoints	      "inf"
      SampleTime	      "Ts"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace3"
      Position		      [210, 50, 270, 80]
      VariableName	      "m_uf"
      MaxDataPoints	      "inf"
      SampleTime	      "Ts"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace4"
      Position		      [790, 30, 850, 60]
      VariableName	      "m_x1"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace5"
      Position		      [795, 85, 855, 115]
      VariableName	      "m_x1_dot"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace6"
      Position		      [475, 285, 535, 315]
      VariableName	      "m_k"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      UnitDelay
      Name		      "Unit Delay"
      Position		      [455, 100, 490, 140]
      ForegroundColor	      "[0.000000, 0.000000, 1.000000]"
      BackgroundColor	      "[1.000000, 1.000000, 0.000000]"
      X0		      "[0;0;0]"
      SampleTime	      "Ts"
    }
    Line {
      SrcBlock		      "Digital Clock"
      SrcPort		      1
      DstBlock		      "To Workspace2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "H"
      SrcPort		      1
      DstBlock		      "Sum1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      1
      Points		      [20, 0; 0, -65]
      DstBlock		      "To Workspace4"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      2
      Points		      [25, 0; 0, -20]
      DstBlock		      "To Workspace5"
      DstPort		      1
    }
    Line {
      SrcBlock		      "From\nWorkspace"
      SrcPort		      1
      Points		      [25, 0]
      Branch {
	DstBlock		"Sum"
	DstPort			1
      }
      Branch {
	Points			[0, -55]
	DstBlock		"To Workspace3"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Sum1"
      SrcPort		      1
      DstBlock		      "Unit Delay"
      DstPort		      1
    }
    Line {
      SrcBlock		      "G"
      SrcPort		      1
      Points		      [-45, 0]
      DstBlock		      "Sum1"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Cy"
      SrcPort		      1
      Points		      [0, 20]
      DstBlock		      "To Workspace"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Unit Delay"
      SrcPort		      1
      Points		      [40, 0]
      Branch {
	Points			[5, 0; 0, 70]
	DstBlock		"G"
	DstPort			1
      }
      Branch {
	Points			[80, 0]
	Branch {
	  Points		  [65, 0]
	  Branch {
	    DstBlock		    "Demux"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [5, 0]
	    DstBlock		    "Cy"
	    DstPort		    1
	  }
	}
	Branch {
	  Points		  [0, 135]
	  DstBlock		  "Dot Product"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      3
      Points		      [40, 0]
      DstBlock		      "To Workspace11"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Dot Product"
      SrcPort		      1
      Points		      [-130, 0]
      DstBlock		      "Sum"
      DstPort		      2
    }
    Line {
      SrcBlock		      "From\nWorkspace1"
      SrcPort		      1
      Points		      [35, 0; 0, -55]
      Branch {
	Points			[0, -25]
	DstBlock		"Dot Product"
	DstPort			2
      }
      Branch {
	Points			[0, 5]
	DstBlock		"To Workspace6"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Saturation"
      SrcPort		      1
      Points		      [20, 0]
      Branch {
	DstBlock		"H"
	DstPort			1
      }
      Branch {
	Points			[0, -60]
	DstBlock		"To Workspace1"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Sum"
      SrcPort		      1
      DstBlock		      "Saturation"
      DstPort		      1
    }
  }
}