# $Revision: 1.1.8.3 $ Model { Name "mod_penddemo" Version 6.6 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.6" NumModelReferences 0 NumTestPointedSignals 0 } Description "Inverted Pendulum with Animation\n\nThe animation i" "s created using MATLAB's Handle Graphics. The animation block is a masked\nS" "-function. For more information, use the context menu to look under the Anim" "ation block's mask\nand open the S-function for editing." SavedCharacterEncoding "US-ASCII" 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 ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off Created "Sun Apr 24 22:05:55 2005" Creator "The MathWorks Inc." UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "kobayasi" ModifiedDateFormat "%" LastModifiedDate "Thu Nov 28 00:07:20 2013" ModelVersionFormat "1.%" ConfigurationManager "None" SimulationMode "normal" LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" AccelVerboseBuild off TryForcingSFcnDF off RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off CovReportOnPause on ExtModeBatchMode off ExtModeEnableFloating on ExtModeTrigType "manual" ExtModeTrigMode "normal" 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 on ExtModeSkipDownloadWhenConnect off ExtModeLogAll on ExtModeAutoUpdateStatusClock off BufferReuse on ProdHWDeviceType "32-bit Generic" ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off Array { Type "Handle" Dimension 1 Simulink.ConfigSet { $ObjectID 1 Version "1.2.0" Array { Type "Handle" Dimension 7 Simulink.SolverCC { $ObjectID 2 Version "1.2.0" StartTime "0" StopTime "inf" AbsTol "1e-6" FixedStep "auto" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ConsecutiveZCsStepRelTol "10*128*eps" MaxConsecutiveZCs "1000" ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "0.02" MinStep "auto" MaxConsecutiveMinStep "1" RelTol "1e-3" SolverMode "SingleTasking" Solver "ode45" SolverName "ode45" ZeroCrossControl "UseLocalSettings" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" RateTranMode "Deterministic" } Simulink.DataIOCC { $ObjectID 3 Version "1.2.0" Decimation "1" ExternalInput "[]" FinalStateName "xFinal" InitialState "[]" LimitDataPoints off MaxDataPoints "1000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveFormat "Array" SaveOutput off SaveState off SignalLogging on InspectSignalLogs off SaveTime off StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" 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.2.0" BlockReduction off BooleanDataType off ConditionallyExecuteInputs on InlineParams off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse on EnforceIntegerDowncast on ExpressionFolding on ExpressionDepthLimit 2147483647 FoldNonRolledExpr on LocalBlockOutputs 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.2.0" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" SignalInfNanChecking "none" ReadBeforeWriteMsg "UseLocalSettings" WriteAfterWriteMsg "UseLocalSettings" WriteAfterReadMsg "UseLocalSettings" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" CheckSSInitialOutputMsg on CheckExecutionContextPreStartOutputMsg off CheckExecutionContextRuntimeOutputMsg off SignalResolutionControl "TryResolveAllWithWarning" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" TimeAdjustmentMsg "none" MaxConsecutiveZCsMsg "error" SolverPrmCheckMsg "none" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskDSMMsg "warning" MultiTaskCondExecSysMsg "none" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" TasksWithSamePriorityMsg "warning" SigSpecEnsureSampleTimeMsg "none" CheckMatrixSingularityMsg "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "error" ParameterOverflowMsg "error" ParameterUnderflowMsg "none" ParameterPrecisionLossMsg "warning" ParameterTunabilityLossMsg "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" StateNameClashWarn "warning" StrictBusMsg "None" } Simulink.HardwareCC { $ObjectID 6 Version "1.2.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.2.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.2.0" SystemTargetFile "grt.tlc" GenCodeOnly off MakeCommand "make_rtw" GenerateMakefile on 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" IncludeBusHierarchyInRTWFileBlockHierarchyMap off IncludeERTFirstTime on 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.2.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 MangleLength 1 CustomSymbolStrGlobalVar "$R$N$M" CustomSymbolStrType "$N$R$M" CustomSymbolStrField "$N$M" CustomSymbolStrFcn "$R$N$M$F" CustomSymbolStrBlkIO "rtb_$N$M" CustomSymbolStrTmpVar "$N$M" CustomSymbolStrMacro "$R$N$M" 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.2.0" TargetFcnLib "ansi_tfl_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" GenFloatMathFcnCalls "ANSI_C" UtilityFuncGeneration "Auto" GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces 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 EnableShiftOperators on ParenthesesLevel "Nominal" PortableWordSizes off ModelStepFunctionPrototypeControlCompliant off 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" 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 Clock DisplayTime off } Block { BlockType Constant Value "1" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Fcn Expr "sin(u[1])" SampleTime "-1" } Block { BlockType Inport Port "1" UseBusObject off BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" DataType "auto" OutDataType "sfix(16)" OutScaling "2^0" SignalType "auto" SamplingMode "auto" LatchByDelayingOutsideSignal off LatchByCopyingInsideSignal off 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 ContinuousStateAttributes "''" } 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 "S-Function" FunctionName "system" SFunctionModules "''" PortCounts "[]" } Block { BlockType SignalGenerator WaveForm "sine" TimeSource "Use simulation time" Amplitude "1" Frequency "1" Units "Hertz" VectorParams1D on } Block { BlockType StateSpace A "1" B "1" C "1" D "1" X0 "0" AbsoluteTolerance "auto" ContinuousStateAttributes "''" Realization "auto" } Block { BlockType SubSystem ShowPortLabels "FromPortIcon" Permissions "ReadWrite" PermitHierarchicalResolution "All" TreatAsAtomicUnit off SystemSampleTime "-1" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" SimViewingDevice off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" } Block { BlockType Sum IconShape "rectangular" Inputs "++" CollapseMode "All dimensions" CollapseDim "1" InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType ToWorkspace VariableName "simulink_output" MaxDataPoints "1000" Decimation "1" SampleTime "0" FixptAsFi off } } AnnotationDefaults { HorizontalAlignment "center" VerticalAlignment "middle" ForegroundColor "black" BackgroundColor "white" DropShadow off FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" UseDisplayTextAsClickCallback off } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight "normal" FontAngle "normal" } System { Name "mod_penddemo" Location [555, 376, 1247, 747] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" ReportName "simulink-default.rpt" Block { BlockType SubSystem Name "Animation" Ports [1] Position [615, 45, 670, 95] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off MaskType "Pendulum plot" MaskDescription "Pendulum plot" MaskHelp "Pendulum animation function using Handle graphi" "cs." MaskPromptString "DC reference signal block name:" MaskStyleString "edit" MaskTunableValueString "on" MaskEnableString "on" MaskVisibilityString "on" MaskToolTipString "on" MaskInitialization "RefBlock=&1;\n" MaskDisplay "plot([-10 10],[0 0],[-2 -2 2 2],[0 1 1 0],[0 3]" ",[1 5])" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "Reference" System { Name "Animation" Location [636, 545, 877, 643] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "in_1" Position [40, 25, 60, 45] IconDisplay "Port number" } Block { BlockType "S-Function" Name "S-function" Ports [1] Position [95, 23, 150, 47] DeleteFcn "pendan([],[],[],'DeleteBlock');" FunctionName "pendan" Parameters "RefBlock" } Line { SrcBlock "in_1" SrcPort 1 DstBlock "S-function" DstPort 1 } } } Block { BlockType Clock Name "Clock" Position [565, 165, 585, 185] ShowName off Decimation "10" } Block { BlockType SubSystem Name "More Info" Ports [] Position [25, 20, 52, 45] DropShadow on OpenFcn "showdemo(bdroot(gcb))" MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off MaskDisplay "disp('?')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "More Info" Location [209, 71, 557, 254] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" } } Block { BlockType Mux Name "Mux" Ports [3, 1] Position [545, 54, 575, 86] ShowName off Inputs "3" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [235, 141, 240, 179] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType SubSystem Name "Pendulum" Ports [1, 2] Position [430, 132, 480, 183] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off MaskType "Inverted pendulum on cart" MaskDescription "Unmask and double-click to see dynamics" MaskHelp "Nonlinear dynamics of inverted pendulum on cart" "." MaskPromptString "Mass of cart (kg):|Mass of pendulum (kg):|Dista" "nce to pendulum center of mass(m):|Acceleration of gravity (m/s^2):" MaskStyleString "edit,edit,edit,edit" MaskTunableValueString "on,on,on,on" MaskCallbackString "|||" MaskEnableString "on,on,on,on" MaskVisibilityString "on,on,on,on" MaskToolTipString "on,on,on,on" MaskVarAliasString ",,," MaskInitialization "M=@1; m=@2; l=@3; g=@4;" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "0.455|0.21|0.61/2|9.8" MaskTabNameString ",,," System { Name "Pendulum" Location [113, 142, 622, 314] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "U" Position [15, 20, 35, 40] IconDisplay "Port number" } Block { BlockType Fcn Name "Fcn1" Position [210, 30, 250, 50] ShowName off Expr "(u[1]/m - g*sin(u[3])*cos(u[3]) + l*power(u" "[2],2)*sin(u[3]))/(M/m + power(sin(u[3]),2))" } Block { BlockType Fcn Name "Fcn2" Position [210, 115, 250, 135] ShowName off Expr "(-u[1]*cos(u[3])/m + (M+m)*g*sin(u[3])/m - " "l*power(u[2],2)*sin(u[3])*cos(u[3]))/(l*(M/m + power(sin(u[3]),2)))" } Block { BlockType Integrator Name "Integrator1" Ports [1, 1] Position [385, 30, 405, 50] ShowName off IgnoreLimit off } Block { BlockType Integrator Name "Integrator2" Ports [1, 1] Position [385, 115, 405, 135] ShowName off IgnoreLimit off } Block { BlockType Integrator Name "Integrator3" Ports [1, 1] Position [305, 115, 325, 135] ShowName off IgnoreLimit off } Block { BlockType Integrator Name "Integrator4" Ports [1, 1] Position [305, 30, 325, 50] ShowName off IgnoreLimit off } Block { BlockType Mux Name "Mux" Ports [3, 1] Position [140, 109, 170, 141] ShowName off Inputs "3" } Block { BlockType Mux Name "Mux1" Ports [3, 1] Position [140, 24, 170, 56] ShowName off Inputs "3" } Block { BlockType Outport Name "Cart" Position [470, 30, 490, 50] IconDisplay "Port number" BusOutputAsStruct off InitialOutput "0" } Block { BlockType Outport Name "Pendulum" Position [470, 115, 490, 135] Port "2" IconDisplay "Port number" BusOutputAsStruct off InitialOutput "0" } Line { SrcBlock "Integrator1" SrcPort 1 DstBlock "Cart" DstPort 1 } Line { SrcBlock "Fcn2" SrcPort 1 DstBlock "Integrator3" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Fcn2" DstPort 1 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "Fcn1" DstPort 1 } Line { SrcBlock "Fcn1" SrcPort 1 DstBlock "Integrator4" DstPort 1 } Line { SrcBlock "Integrator4" SrcPort 1 DstBlock "Integrator1" DstPort 1 } Line { SrcBlock "U" SrcPort 1 Points [30, 0] Branch { DstBlock "Mux1" DstPort 1 } Branch { Points [0, 85] DstBlock "Mux" DstPort 1 } } Line { SrcBlock "Integrator3" SrcPort 1 Points [20, 0] Branch { DstBlock "Integrator2" DstPort 1 } Branch { Points [0, -35; -270, 0] Branch { Points [0, -50] DstBlock "Mux1" DstPort 2 } Branch { Points [0, 35] DstBlock "Mux" DstPort 2 } } } Line { SrcBlock "Integrator2" SrcPort 1 Points [20, 0] Branch { DstBlock "Pendulum" DstPort 1 } Branch { Points [0, -50; -335, 0] Branch { Points [0, -25] DstBlock "Mux1" DstPort 3 } Branch { Points [0, 60] DstBlock "Mux" DstPort 3 } } } } } Block { BlockType Constant Name "Reference" Position [15, 205, 65, 225] Value "0.62449" } Block { BlockType SignalGenerator Name "Signal Gen." Ports [0, 1] Position [15, 138, 60, 172] ShowName off WaveForm "square" Amplitude "0.000000" Frequency "0.400000" Units "rad/sec" } Block { BlockType StateSpace Name "State-Space" Position [310, 143, 370, 177] A "K.a" B "K.b" C "K.c" D "K.d" } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [145, 145, 165, 165] ShowName off Inputs "+-" CollapseMode "All dimensions" } Block { BlockType Sum Name "Sum3" Ports [2, 1] Position [90, 150, 110, 170] ShowName off CollapseMode "All dimensions" } Block { BlockType ToWorkspace Name "To Workspace" Position [625, 121, 660, 139] ShowName off VariableName "y" SampleTime "0.1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace1" Position [625, 166, 660, 184] ShowName off VariableName "t" SampleTime "0.1" SaveFormat "Array" } Line { SrcBlock "Mux" SrcPort 1 Points [0, 0; 10, 0] Branch { Points [0, 60] DstBlock "To Workspace" DstPort 1 } Branch { DstBlock "Animation" DstPort 1 } } Line { SrcBlock "Pendulum" SrcPort 2 Points [0, 0; 35, 0] Branch { Points [0, -90] DstBlock "Mux" DstPort 3 } Branch { Points [0, 85; -300, 0] DstBlock "Mux1" DstPort 2 } } Line { SrcBlock "Sum3" SrcPort 1 Points [0, 0] Branch { Points [0, -100] DstBlock "Mux" DstPort 1 } Branch { DstBlock "Sum2" DstPort 2 } } Line { SrcBlock "Reference" SrcPort 1 Points [0, -50] DstBlock "Sum3" DstPort 2 } Line { SrcBlock "Signal Gen." SrcPort 1 Points [0, 0] DstBlock "Sum3" DstPort 1 } Line { SrcBlock "Pendulum" SrcPort 1 Points [20, 0; 0, -75] Branch { Points [-375, 0] DstBlock "Sum2" DstPort 1 } Branch { DstBlock "Mux" DstPort 2 } } Line { SrcBlock "State-Space" SrcPort 1 DstBlock "Pendulum" DstPort 1 } Line { SrcBlock "Clock" SrcPort 1 Points [0, 0] DstBlock "To Workspace1" DstPort 1 } Line { SrcBlock "Sum2" SrcPort 1 Points [25, 0; 0, -5] DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "State-Space" DstPort 1 } Annotation { Name "Inverted pendulum on cart with Animation" Position [353, 27] FontSize 14 } Annotation { Name "To start and stop the simulation, use the \"Sta" "rt/Stop\"\nselection in the \"Simulation\" pull-down menu" Position [361, 312] } Annotation { Name "Copyright 1990-2005 The MathWorks Inc." Position [359, 346] } } }