Model { Name "hw4cartpend" Version 4.00 SampleTimeColors off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes off ShowStorageClass off ExecutionOrder off RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off Created "Sun Oct 20 09:36:58 2002" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "timothyc" ModifiedDateFormat "%" LastModifiedDate "Sun Oct 20 10:43:31 2002" ModelVersionFormat "1.%" ConfigurationManager "None" SimParamPage "Solver" StartTime "0.0" StopTime "10.0" SolverMode "Auto" Solver "ode45" RelTol "1e-3" AbsTol "auto" Refine "1" MaxStep "auto" MinStep "auto" MaxNumMinSteps "-1" InitialStep "auto" FixedStep "auto" MaxOrder 5 OutputOption "RefineOutputTimes" OutputTimes "[]" LoadExternalInput off ExternalInput "[t, u]" SaveTime on TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput on OutputSaveName "yout" LoadInitialState off InitialState "xInitial" SaveFinalState off FinalStateName "xFinal" SaveFormat "Array" LimitDataPoints on MaxDataPoints "1000" Decimation "1" AlgebraicLoopMsg "warning" MinStepSizeMsg "warning" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" InheritedTsInSrcMsg "warning" SingleTaskRateTransMsg "none" MultiTaskRateTransMsg "error" IntegerOverflowMsg "warning" CheckForMatrixSingularity "none" UnnecessaryDatatypeConvMsg "none" Int32ToFloatConvMsg "warning" InvalidFcnCallConnMsg "error" SignalLabelMismatchMsg "none" LinearizationMsg "none" VectorMatrixConversionMsg "none" SfunCompatibilityCheckMsg "none" BlockPriorityViolationMsg "warning" ArrayBoundsChecking "none" ConsistencyChecking "none" ZeroCross on Profile off SimulationMode "normal" RTWSystemTargetFile "grt.tlc" RTWInlineParameters off RTWRetainRTWFile off RTWTemplateMakefile "grt_default_tmf" RTWMakeCommand "make_rtw" RTWGenerateCodeOnly off TLCProfiler off TLCDebug off TLCCoverage off 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 OptimizeBlockIOStorage on BufferReuse on ParameterPooling on BlockReductionOpt on RTWExpressionDepthLimit 5 BooleanDataType off BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } 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 "hw4cartpend" Location [250, 154, 1372, 933] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "automatic" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "106" ReportName "simulink-default.rpt" Block { BlockType Inport Name "u" Position [20, 103, 50, 117] Port "1" LatchInput off Interpolate on } Block { BlockType Gain Name "-m*g*l" Position [315, 490, 345, 520] Gain "-m*g*l" Multiplication "Element-wise(K.*u)" SaturateOnIntegerOverflow on Port { PortNumber 1 Name "-m*g*l*sin(theta)" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType Gain Name "-m*l" Position [315, 435, 345, 465] Gain "-m*l" Multiplication "Element-wise(K.*u)" SaturateOnIntegerOverflow on } Block { BlockType Gain Name "1/(J+m*l^2)" Position [565, 565, 595, 595] Gain "1/(J+m*l^2)" Multiplication "Element-wise(K.*u)" SaturateOnIntegerOverflow on Port { PortNumber 1 Name "thetaddot" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType Gain Name "1/(M+m)" Position [620, 145, 650, 175] Gain "1/(M+m)" Multiplication "Element-wise(K.*u)" SaturateOnIntegerOverflow on Port { PortNumber 1 Name "xddot" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType Gain Name "1/(M+m)1" Position [515, 55, 545, 85] Orientation "left" Gain "-b" Multiplication "Element-wise(K.*u)" SaturateOnIntegerOverflow on } Block { BlockType Math Name "Math\nFunction" Ports [1, 1] Position [660, 375, 690, 405] Orientation "left" Operator "square" OutputSignalType "auto" } Block { BlockType Mux Name "Mux" Ports [4, 1] Position [980, 172, 990, 363] ShowName off Inputs "4" DisplayOption "bar" } Block { BlockType Product Name "Product1" Ports [2, 1] Position [405, 414, 450, 461] Inputs "2" Multiplication "Element-wise(.*)" SaturateOnIntegerOverflow on } Block { BlockType Product Name "Product2" Ports [2, 1] Position [415, 179, 460, 226] Inputs "2" Multiplication "Element-wise(.*)" SaturateOnIntegerOverflow on } Block { BlockType Product Name "Product3" Ports [2, 1] Position [580, 314, 625, 361] Inputs "2" Multiplication "Element-wise(.*)" SaturateOnIntegerOverflow on Port { PortNumber 1 Name "m*l*sin(theta)*(thetadot)^2" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [505, 570, 525, 590] ShowName off IconShape "rectangular" Inputs "++" SaturateOnIntegerOverflow on } Block { BlockType Sum Name "Sum2" Ports [4, 1] Position [540, 142, 560, 178] ShowName off IconShape "rectangular" Inputs "++++" SaturateOnIntegerOverflow on } Block { BlockType Trigonometry Name "cos(theta)" Ports [1, 1] Position [215, 435, 245, 465] Operator "cos" OutputSignalType "auto" Port { PortNumber 1 Name "cos(theta)" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType Integrator Name "make theta" Ports [1, 1] Position [780, 565, 810, 595] ExternalReset "none" InitialConditionSource "internal" InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" Port { PortNumber 1 Name "theta" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType Integrator Name "make thetadot" Ports [1, 1] Position [665, 565, 695, 595] ExternalReset "none" InitialConditionSource "internal" InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "make x" Ports [1, 1] Position [820, 145, 850, 175] ExternalReset "none" InitialConditionSource "internal" InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" Port { PortNumber 1 Name "x" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType Integrator Name "make xdot" Ports [1, 1] Position [720, 145, 750, 175] ExternalReset "none" InitialConditionSource "internal" InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" Port { PortNumber 1 Name "xdot" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType Trigonometry Name "sin(theta)" Ports [1, 1] Position [215, 490, 245, 520] Operator "sin" OutputSignalType "auto" } Block { BlockType Outport Name "z" Position [1015, 263, 1045, 277] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock "sin(theta)" SrcPort 1 DstBlock "-m*g*l" DstPort 1 } Line { Name "-m*g*l*sin(theta)" Labels [0, 0] SrcBlock "-m*g*l" SrcPort 1 Points [0, 0; 60, 0] Branch { Points [0, 80] DstBlock "Sum1" DstPort 2 } Branch { Points [125, 0; 0, -180] DstBlock "Product3" DstPort 1 } } Line { Name "x" Labels [0, 0] SrcBlock "make x" SrcPort 1 Points [100, 0; 0, 40] DstBlock "Mux" DstPort 1 } Line { Name "thetaddot" Labels [0, 0] SrcBlock "1/(J+m*l^2)" SrcPort 1 Points [0, 0; 5, 0] Branch { DstBlock "make thetadot" DstPort 1 } Branch { Labels [3, 1] Points [0, -175; -215, 0; 0, -190] DstBlock "Product2" DstPort 2 } } Line { Name "cos(theta)" Labels [0, 0] SrcBlock "cos(theta)" SrcPort 1 DstBlock "-m*l" DstPort 1 } Line { SrcBlock "-m*l" SrcPort 1 Points [0, 0; 5, 0] Branch { DstBlock "Product1" DstPort 2 } Branch { Points [0, -260] DstBlock "Product2" DstPort 1 } } Line { SrcBlock "Product1" SrcPort 1 Points [20, 0; 0, 135] DstBlock "Sum1" DstPort 1 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "1/(J+m*l^2)" DstPort 1 } Line { SrcBlock "make thetadot" SrcPort 1 Points [0, 0; 30, 0] Branch { DstBlock "make theta" DstPort 1 } Branch { Points [0, -190] Branch { DstBlock "Math\nFunction" DstPort 1 } Branch { Points [0, -55] DstBlock "Mux" DstPort 4 } } } Line { Name "theta" Labels [2, 1] SrcBlock "make theta" SrcPort 1 Points [0, 0; 40, 0] Branch { Points [15, 0; 0, 60; -770, 0; 0, -135] Branch { Labels [2, 0] Points [0, -55] DstBlock "cos(theta)" DstPort 1 } Branch { DstBlock "sin(theta)" DstPort 1 } } Branch { Labels [2, 0] Points [0, -325; 110, 0] DstBlock "Mux" DstPort 2 } } Line { SrcBlock "u" SrcPort 1 Points [80, 0; 0, 45] DstBlock "Sum2" DstPort 2 } Line { SrcBlock "Product2" SrcPort 1 Points [30, 0; 0, -40] DstBlock "Sum2" DstPort 3 } Line { SrcBlock "Math\nFunction" SrcPort 1 Points [-100, 0; 0, -40] DstBlock "Product3" DstPort 2 } Line { Name "m*l*sin(theta)*(thetadot)^2" Labels [3, 0] SrcBlock "Product3" SrcPort 1 Points [15, 0; 0, -120; -130, 0; 0, -45] DstBlock "Sum2" DstPort 4 } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "1/(M+m)" DstPort 1 } Line { Name "xddot" Labels [0, 0] SrcBlock "1/(M+m)" SrcPort 1 Points [0, 0; 20, 0] Branch { DstBlock "make xdot" DstPort 1 } Branch { Points [0, 125; -355, 0; 0, 140] DstBlock "Product1" DstPort 1 } } Line { Name "xdot" Labels [0, 0] SrcBlock "make xdot" SrcPort 1 Points [0, 0; 20, 0] Branch { Points [10, 0] Branch { DstBlock "make x" DstPort 1 } Branch { Points [0, 125; 180, 0] DstBlock "Mux" DstPort 3 } } Branch { Labels [2, 0] Points [0, -90] DstBlock "1/(M+m)1" DstPort 1 } } Line { SrcBlock "1/(M+m)1" SrcPort 1 Points [-50, 0; 0, 75] DstBlock "Sum2" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "z" DstPort 1 } Annotation { Position [182, 497] Text "theta" } Annotation { Position [279, 501] Text "sin(theta)" } Annotation { Position [965, 382] Text "thetadot" } Annotation { Position [937, 286] Text "xdot" } Annotation { Position [366, 431] Text "xddot" } Annotation { Position [736, 584] Text "thetadot" } Annotation { Position [315, 258] Text "-m*l*cos(theta)" } Annotation { Position [598, 385] Text "(thetadot)^2" } Annotation { Position [493, 136] Text "-b*xdot" } } }