Model { Name "INV_PEND" Version 5.0 SaveDefaultBlockParams on SampleTimeColors off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ExecutionOrder 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 Apr 04 10:54:54 2005" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" ModifiedDateFormat "%" LastModifiedDate "Fri Apr 08 11:49:14 2005" ModelVersionFormat "1.%" 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 "ode45" SolverMode "Auto" StartTime "0.0" StopTime "50.0" MaxOrder 5 MaxStep "auto" 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 on TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput on OutputSaveName "yout" SaveFinalState off FinalStateName "xFinal" SaveFormat "Array" Decimation "1" LimitDataPoints on 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 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 Ground } Block { BlockType Inport Port "1" PortDimensions "-1" SampleTime "-1" ShowAdditionalParam off LatchInput off 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" ZeroCross on } Block { BlockType MATLABFcn MATLABFcn "sin" OutputDimensions "-1" OutputSignalType "auto" Output1D on } Block { BlockType Mux Inputs "4" DisplayOption "none" } Block { BlockType Outport Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType "S-Function" FunctionName "system" PortCounts "[]" SFunctionModules "''" } Block { BlockType Step Time "1" Before "0" After "1" SampleTime "-1" VectorParams1D on ZeroCross on } 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 Switch Criteria "u2 >= Threshold" Threshold "0" ShowAdditionalParam off InputSameDT on OutDataTypeMode "Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow on ZeroCross on } Block { BlockType ToWorkspace VariableName "simulink_output" MaxDataPoints "1000" Decimation "1" SampleTime "0" } Block { BlockType TransferFcn Numerator "[1]" Denominator "[1 2 1]" AbsoluteTolerance "auto" Realization "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 "INV_PEND" Location [19, 92, 583, 463] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" ReportName "simulink-default.rpt" Block { BlockType Reference Name "CLOSED/OPEN LOOP" Ports [2, 1] Position [175, 382, 205, 418] Orientation "left" SourceBlock "simulink/Signal\nRouting/Manual Switch" SourceType "Manual Switch" sw "1" action "0" } Block { BlockType SubSystem Name "Gangguan" Ports [0, 1] Position [15, 99, 115, 141] TreatAsAtomicUnit off System { Name "Gangguan" Location [204, 153, 706, 508] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" Block { BlockType Reference Name "CLOSED/OPEN LOOP" Ports [2, 1] Position [105, 127, 135, 163] Orientation "left" SourceBlock "simulink/Signal\nRouting/Manual Switch" SourceType "Manual Switch" sw "1" action "0" } Block { BlockType Gain Name "Gain" Position [160, 120, 190, 150] Orientation "left" Gain "-1" } Block { BlockType Ground Name "Ground" Position [190, 205, 210, 225] Orientation "left" } Block { BlockType Step Name "Step" Position [390, 75, 420, 105] Orientation "left" Time "0.1" SampleTime "0" } Block { BlockType Step Name "Step1" Position [390, 130, 420, 160] Orientation "left" After "-3" SampleTime "0" } Block { BlockType Step Name "Step3" Position [390, 175, 420, 205] Orientation "left" Time "2" After "3" SampleTime "0" } Block { BlockType Step Name "Step4" Position [330, 200, 360, 230] Orientation "left" Time "3" After "-1" SampleTime "0" ZeroCross off } Block { BlockType Sum Name "Sum" Ports [4, 1] Position [260, 125, 290, 155] Orientation "left" ShowName off IconShape "round" Inputs "|++++" InputSameDT off OutDataTypeMode "Inherit via internal rule" } Block { BlockType Outport Name "Out1" Position [75, 38, 105, 52] } Line { SrcBlock "Sum" SrcPort 1 Points [0, -5] DstBlock "Gain" DstPort 1 } Line { SrcBlock "Step" SrcPort 1 Points [-30, 0; 0, 29] DstBlock "Sum" DstPort 1 } Line { SrcBlock "Step1" SrcPort 1 Points [-80, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Step3" SrcPort 1 Points [-89, 0] DstBlock "Sum" DstPort 3 } Line { SrcBlock "Step4" SrcPort 1 Points [-50, 0] DstBlock "Sum" DstPort 4 } Line { SrcBlock "Gain" SrcPort 1 DstBlock "CLOSED/OPEN LOOP" DstPort 1 } Line { SrcBlock "CLOSED/OPEN LOOP" SrcPort 1 Points [-65, 0; 0, -100] DstBlock "Out1" DstPort 1 } Line { SrcBlock "Ground" SrcPort 1 Points [-20, 0; 0, -60] DstBlock "CLOSED/OPEN LOOP" DstPort 2 } Annotation { Name "masukan u" Position [69, 123] } } } Block { BlockType Ground Name "Ground" Position [285, 440, 305, 460] Orientation "left" } Block { BlockType Integrator Name "Integrator4" Ports [1, 1] Position [80, 25, 110, 55] } Block { BlockType SubSystem Name "Inverted Pendulum" Ports [1, 4] Position [250, 83, 355, 317] TreatAsAtomicUnit off System { Name "Inverted Pendulum" Location [237, 176, 838, 585] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" Block { BlockType Inport Name "In1" Position [15, 348, 45, 362] } Block { BlockType MATLABFcn Name "Batas Kec. Sudut" Position [345, 310, 405, 340] MATLABFcn "batas_tetadot" } Block { BlockType MATLABFcn Name "Batas Kecepatan" Position [350, 120, 410, 150] MATLABFcn "batas_xdot" } Block { BlockType MATLABFcn Name "Batas Posisi" Position [350, 30, 410, 60] MATLABFcn "batas_x" } Block { BlockType MATLABFcn Name "Batas Sudut" Position [350, 205, 410, 235] MATLABFcn "batas_teta" } Block { BlockType MATLABFcn Name "Fungsi X2DOT" Position [135, 130, 195, 160] MATLABFcn "x2dot" } Block { BlockType MATLABFcn Name "Fungsi X4DOT" Position [125, 320, 185, 350] MATLABFcn "x4dot" } Block { BlockType Integrator Name "Integrator" Ports [1, 1] Position [265, 30, 295, 60] } Block { BlockType Integrator Name "Integrator1" Ports [1, 1] Position [255, 130, 285, 160] } Block { BlockType Integrator Name "Integrator2" Ports [1, 1] Position [255, 205, 285, 235] } Block { BlockType Integrator Name "Integrator3" Ports [1, 1] Position [250, 320, 280, 350] } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [320, 116, 325, 154] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [315, 306, 320, 344] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux2" Ports [2, 1] Position [95, 126, 100, 164] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux3" Ports [3, 1] Position [85, 316, 90, 354] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Outport Name "x1" Position [515, 38, 545, 52] } Block { BlockType Outport Name "x2" Position [520, 128, 550, 142] Port "2" } Block { BlockType Outport Name "x3" Position [515, 213, 545, 227] Port "3" } Block { BlockType Outport Name "x4" Position [515, 318, 545, 332] Port "4" } Line { SrcBlock "Batas Posisi" SrcPort 1 Points [0, 0; 55, 0] Branch { Points [0, 45; -175, 0; 0, 35] DstBlock "Mux" DstPort 1 } Branch { DstBlock "x1" DstPort 1 } } Line { SrcBlock "Batas Kecepatan" SrcPort 1 Points [0, 0; 45, 0] Branch { Points [0, -35; -235, 0; 0, -55] DstBlock "Integrator" DstPort 1 } Branch { DstBlock "x2" DstPort 1 } } Line { SrcBlock "Batas Sudut" SrcPort 1 Points [0, 0; 20, 0] Branch { Points [0, 55; -140, 0] Branch { Labels [1, 0] Points [0, 40] DstBlock "Mux1" DstPort 1 } Branch { Points [-245, 0; 0, 50] DstBlock "Mux3" DstPort 1 } } Branch { Labels [1, 0] Points [0, -30; -385, 0; 0, -35] DstBlock "Mux2" DstPort 2 } Branch { DstBlock "x3" DstPort 1 } } Line { SrcBlock "Batas Kec. Sudut" SrcPort 1 Points [0, 0; 55, 0] Branch { Points [0, -35; -240, 0] Branch { Points [0, -70] DstBlock "Integrator2" DstPort 1 } Branch { Labels [1, 0] Points [-190, 0; 0, 45] DstBlock "Mux3" DstPort 2 } } Branch { DstBlock "x4" DstPort 1 } } Line { SrcBlock "Integrator" SrcPort 1 DstBlock "Batas Posisi" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Batas Kecepatan" DstPort 1 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "Batas Kec. Sudut" DstPort 1 } Line { SrcBlock "Integrator2" SrcPort 1 DstBlock "Batas Sudut" DstPort 1 } Line { SrcBlock "Integrator3" SrcPort 1 DstBlock "Mux1" DstPort 2 } Line { SrcBlock "Integrator1" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "Fungsi X2DOT" SrcPort 1 DstBlock "Integrator1" DstPort 1 } Line { SrcBlock "Fungsi X4DOT" SrcPort 1 Points [0, 0; 20, 0] Branch { DstBlock "Integrator3" DstPort 1 } Branch { Points [0, -85; -195, 0; 0, -115] DstBlock "Mux2" DstPort 1 } } Line { SrcBlock "Mux2" SrcPort 1 DstBlock "Fungsi X2DOT" DstPort 1 } Line { SrcBlock "Mux3" SrcPort 1 DstBlock "Fungsi X4DOT" DstPort 1 } Line { SrcBlock "In1" SrcPort 1 Points [10, 0; 0, -10] DstBlock "Mux3" DstPort 3 } Annotation { Name "x1" Position [434, 38] } Annotation { Name "x2" Position [435, 128] } Annotation { Name "x3" Position [429, 227] } Annotation { Name "x4" Position [430, 313] } Annotation { Name "x1dot" Position [234, 35] } Annotation { Name "x2dot" Position [226, 137] } Annotation { Name "x3dot" Position [227, 209] } Annotation { Name "x4dot" Position [221, 323] } } } Block { BlockType ToWorkspace Name "Isyarat Masukan u" Position [35, 170, 95, 200] Orientation "left" VariableName "u" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "Kecepatan Kereta" Position [500, 155, 560, 185] VariableName "kecepatan" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "Kecepatan Sudut" Position [500, 275, 560, 305] VariableName "omega" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType Mux Name "Mux" Ports [4, 1] Position [355, 355, 360, 420] Orientation "left" ShowName off DisplayOption "bar" } Block { BlockType ToWorkspace Name "Pencatat Waktu" Position [145, 25, 205, 55] VariableName "time" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "Posisi Kereta" Position [500, 95, 560, 125] VariableName "posisi" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "Posisi Sudut" Position [500, 215, 560, 245] VariableName "teta" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType MATLABFcn Name "State Variable \n Feedback" Position [265, 375, 325, 405] Orientation "left" MATLABFcn "state_control" } Block { BlockType Step Name "Step2" Position [25, 25, 55, 55] Time "0" SampleTime "0" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [160, 110, 180, 130] ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" } Block { BlockType TransferFcn Name "rad to degree1" Position [435, 212, 465, 248] Numerator "[180]" Denominator "[pi]" } Line { SrcBlock "Step2" SrcPort 1 DstBlock "Integrator4" DstPort 1 } Line { SrcBlock "Integrator4" SrcPort 1 DstBlock "Pencatat Waktu" DstPort 1 } Line { SrcBlock "Inverted Pendulum" SrcPort 1 Points [15, 0] Branch { DstBlock "Posisi Kereta" DstPort 1 } Branch { DstBlock "Mux" DstPort 1 } } Line { SrcBlock "Inverted Pendulum" SrcPort 2 Points [30, 0] Branch { DstBlock "Kecepatan Kereta" DstPort 1 } Branch { Points [0, 210] DstBlock "Mux" DstPort 2 } } Line { SrcBlock "rad to degree1" SrcPort 1 DstBlock "Posisi Sudut" DstPort 1 } Line { SrcBlock "Inverted Pendulum" SrcPort 4 Points [60, 0] Branch { DstBlock "Kecepatan Sudut" DstPort 1 } Branch { Points [0, 120] DstBlock "Mux" DstPort 4 } } Line { SrcBlock "Sum" SrcPort 1 Points [25, 0; 0, 80] DstBlock "Inverted Pendulum" DstPort 1 } Line { SrcBlock "Inverted Pendulum" SrcPort 3 Points [45, 0] Branch { DstBlock "rad to degree1" DstPort 1 } Branch { Points [0, 165] DstBlock "Mux" DstPort 3 } } Line { SrcBlock "Mux" SrcPort 1 DstBlock "State Variable \n Feedback" DstPort 1 } Line { SrcBlock "State Variable \n Feedback" SrcPort 1 DstBlock "CLOSED/OPEN LOOP" DstPort 1 } Line { SrcBlock "Ground" SrcPort 1 Points [-45, 0; 0, -40] DstBlock "CLOSED/OPEN LOOP" DstPort 2 } Line { SrcBlock "CLOSED/OPEN LOOP" SrcPort 1 DstBlock "Sum" DstPort 2 } Line { SrcBlock "Gangguan" SrcPort 1 Points [5, 0] Branch { DstBlock "Sum" DstPort 1 } Branch { Points [0, 65] DstBlock "Isyarat Masukan u" DstPort 1 } } } }