Model { Name "pendpid" Version 7.2 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.12" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "windows-1250" PreLoadFcn "%mass of the cart [kg]\nM = 0.5;\n\n%mass of the pendulum [kg]\nm = 0.2;\n\n%friction of the cart [N/" "m/sec]\nb = 0.1;\n\n%inertia of the pendulum [kg*m^2]\ni = 0.006;\n\n%gravity force [m/s^2]\ng = 9.8;\n\n%length to " "pendulum center of mass [m]\nl = 0.3;\n" SaveDefaultBlockParams on ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" Created "Wed Oct 21 12:21:25 2009" Creator "eszetam" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "szepet" ModifiedDateFormat "%" LastModifiedDate "Mon Nov 22 15:47:15 2010" RTWModifiedTimeStamp 212341598 ModelVersionFormat "1.%" ConfigurationManager "None" SampleTimeColors off SampleTimeAnnotations off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowSignalResolutionIcons on ShowViewerIcons on SortedOrder off ExecutionContextIcon off ShowLinearizationAnnotations on BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off SimulationMode "normal" LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" TryForcingSFcnDF off RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off CovReportOnPause on CovModelRefEnable "Off" 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 on BufferReuse on ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off Array { Type "Handle" Dimension 1 Simulink.ConfigSet { $ObjectID 1 Version "1.5.1" Array { Type "Handle" Dimension 8 Simulink.SolverCC { $ObjectID 2 Version "1.5.1" StartTime "0.0" StopTime "20" AbsTol "1e-6" FixedStep "auto" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ZcThreshold "auto" ConsecutiveZCsStepRelTol "10*128*eps" MaxConsecutiveZCs "1000" ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "auto" MinStep "auto" MaxConsecutiveMinStep "1" RelTol "1e-3" SolverMode "SingleTasking" Solver "ode45" SolverName "ode45" ShapePreserveControl "DisableAll" ZeroCrossControl "UseLocalSettings" ZeroCrossAlgorithm "Nonadaptive" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" InsertRTBMode "Whenever possible" SignalSizeVariationType "Allow only fixed size" } Simulink.DataIOCC { $ObjectID 3 Version "1.5.1" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints off MaxDataPoints "1000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveFormat "Array" SaveOutput on SaveState off SignalLogging on InspectSignalLogs off SaveTime on StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "logsout" OutputOption "RefineOutputTimes" OutputTimes "[]" Refine "1" } Simulink.OptimizationCC { $ObjectID 4 Version "1.5.1" Array { Type "Cell" Dimension 7 Cell "BooleansAsBitfields" Cell "PassReuseOutputArgsAs" Cell "PassReuseOutputArgsThreshold" Cell "ZeroExternalMemoryAtStartup" Cell "ZeroInternalMemoryAtStartup" Cell "OptimizeModelRefInitCode" Cell "NoFixptDivByZeroProtection" PropName "DisabledProps" } BlockReduction off BooleanDataType off ConditionallyExecuteInputs on InlineParams off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse on EnhancedBackFolding off EnforceIntegerDowncast on ExpressionFolding on EnableMemcpy on MemcpyThreshold 64 ExpressionDepthLimit 2147483647 FoldNonRolledExpr on LocalBlockOutputs on RollThreshold 5 SystemCodeInlineAuto off StateBitsets off DataBitsets off UseTempVars off ZeroExternalMemoryAtStartup on ZeroInternalMemoryAtStartup on InitFltsAndDblsToZero off NoFixptDivByZeroProtection off EfficientFloat2IntCast off EfficientMapNaN2IntZero on OptimizeModelRefInitCode off LifeSpan "inf" BufferReusableBoundary on SimCompilerOptimization "Off" AccelVerboseBuild off } Simulink.DebuggingCC { $ObjectID 5 Version "1.5.1" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" SignalInfNanChecking "none" SignalRangeChecking "none" ReadBeforeWriteMsg "UseLocalSettings" WriteAfterWriteMsg "UseLocalSettings" WriteAfterReadMsg "UseLocalSettings" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" SaveWithDisabledLinksMsg "warning" SaveWithParameterizedLinksMsg "none" CheckSSInitialOutputMsg on UnderspecifiedInitializationDetection "Classic" MergeDetectMultiDrivingBlocksExec "none" 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 "warning" 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" UnknownTsInhSupMsg "warning" ModelReferenceDataLoggingMessage "warning" ModelReferenceSymbolNameMessage "warning" ModelReferenceExtraNoncontSigs "error" StateNameClashWarn "warning" StrictBusMsg "None" LoggingUnavailableSignals "error" BlockIODiagnostic "none" } Simulink.HardwareCC { $ObjectID 6 Version "1.5.1" 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.5.1" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" ModelReferenceNumInstancesAllowed "Multi" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off } Simulink.SFSimCC { $ObjectID 8 Version "1.5.1" SFSimEnableDebug on SFSimOverflowDetection on SFSimEcho on SimUseLocalCustomCode off SimBuildMode "sf_incremental_build" } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 9 Version "1.5.1" Array { Type "Cell" Dimension 6 Cell "IncludeHyperlinkInReport" Cell "GenerateTraceInfo" Cell "GenerateTraceReport" Cell "GenerateTraceReportSl" Cell "GenerateTraceReportSf" Cell "GenerateTraceReportEml" PropName "DisabledProps" } 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 RTWUseLocalCustomCode off RTWUseSimCustomCode off IncludeHyperlinkInReport off LaunchReport off TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off IncludeERTFirstTime on GenerateTraceInfo off GenerateTraceReport off GenerateTraceReportSl off GenerateTraceReportSf off GenerateTraceReportEml off GenerateCodeInfo off RTWCompilerOptimization "Off" Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 10 Version "1.5.1" Array { Type "Cell" Dimension 19 Cell "IgnoreCustomStorageClasses" Cell "IgnoreTestpoints" Cell "InsertBlockDesc" Cell "SFDataObjDesc" Cell "SimulinkDataObjDesc" Cell "DefineNamingRule" Cell "SignalNamingRule" Cell "ParamNamingRule" Cell "InlinedPrmAccess" Cell "CustomSymbolStr" Cell "CustomSymbolStrGlobalVar" Cell "CustomSymbolStrType" Cell "CustomSymbolStrField" Cell "CustomSymbolStrFcn" Cell "CustomSymbolStrFcnArg" Cell "CustomSymbolStrBlkIO" Cell "CustomSymbolStrTmpVar" Cell "CustomSymbolStrMacro" Cell "ReqsInCode" PropName "DisabledProps" } ForceParamTrailComments off GenerateComments on IgnoreCustomStorageClasses on IgnoreTestpoints off IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off IncDataTypeInIds off 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 UseSimReservedNames off } Simulink.GRTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 11 Version "1.5.1" Array { Type "Cell" Dimension 17 Cell "GeneratePreprocessorConditionals" Cell "IncludeMdlTerminateFcn" Cell "CombineOutputUpdateFcns" Cell "SuppressErrorStatus" Cell "ERTCustomFileBanners" Cell "GenerateSampleERTMain" Cell "GenerateTestInterfaces" Cell "ModelStepFunctionPrototypeControlCompliant" Cell "CPPClassGenCompliant" Cell "MultiInstanceERTCode" Cell "PurelyIntegerCode" Cell "SupportNonFinite" Cell "SupportComplex" Cell "SupportAbsoluteTime" Cell "SupportContinuousTime" Cell "SupportNonInlinedSFcns" Cell "PortableWordSizes" PropName "DisabledProps" } TargetFcnLib "ansi_tfl_table_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" TargetFunctionLibrary "ANSI_C" UtilityFuncGeneration "Auto" ERTMultiwordTypeDef "System defined" ERTMultiwordLength 256 MultiwordLength 2048 GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant on CompOptLevelCompliant on IncludeMdlTerminateFcn on CombineOutputUpdateFcns off SuppressErrorStatus off ERTFirstTimeCompliant 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 CPPClassGenCompliant off AutosarCompliant off UseMalloc off ExtMode off ExtModeStaticAlloc off ExtModeTesting off ExtModeStaticAllocSize 1000000 ExtModeTransport 0 ExtModeMexFile "ext_comm" ExtModeIntrfLevel "Level1" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates off GenerateASAP2 off } PropName "Components" } } PropName "Components" } Name "Configuration" CurrentDlgPage "Solver" ConfigPrmDlgPosition " [ 520, 285, 1400, 915 ] " } 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 } 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" } BlockParameterDefaults { Block { BlockType Constant Value "1" VectorParams1D on SamplingMode "Sample based" OutMin "[]" OutMax "[]" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "fixdt(1,16,0)" ConRadixGroup "Use specified scaling" OutScaling "[]" OutDataTypeStr "Inherit: Inherit from 'Constant value'" LockScale off SampleTime "inf" FramePeriod "inf" } Block { BlockType Derivative LinearizePole "inf" } Block { BlockType DiscretePulseGenerator PulseType "Sample based" TimeSource "Use simulation time" Amplitude "1" Period "2" PulseWidth "1" PhaseDelay "0" SampleTime "1" VectorParams1D on } Block { BlockType ElementaryMath Operator "sin" } Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" ParamMin "[]" ParamMax "[]" ParameterDataTypeMode "Same as input" ParameterDataType "fixdt(1,16,0)" ParameterScalingMode "Best Precision: Matrix-wise" ParameterScaling "[]" ParamDataTypeStr "Inherit: Same as input" OutMin "[]" OutMax "[]" OutDataTypeMode "Same as input" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: Same as input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Inport Port "1" UseBusObject off BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" OutMin "[]" OutMax "[]" DataType "auto" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: auto" LockScale off 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" OutMin "[]" OutMax "[]" DataType "auto" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: auto" LockScale off SignalType "auto" SamplingMode "auto" SourceOfInitialOutputValue "Dialog" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Product Inputs "2" Multiplication "Element-wise(.*)" CollapseMode "All dimensions" CollapseDim "1" InputSameDT on OutMin "[]" OutMax "[]" OutDataTypeMode "Same as first input" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: Same as first input" LockScale off RndMeth "Zero" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Scope ModelBased off TickLabels "OneTimeTick" ZoomMode "on" Grid "on" TimeRange "auto" YMin "-5" YMax "5" SaveToWorkspace off SaveName "ScopeData" LimitDataPoints on MaxDataPoints "5000" Decimation "1" SampleInput off SampleTime "-1" } Block { BlockType SubSystem ShowPortLabels "FromPortIcon" Permissions "ReadWrite" PermitHierarchicalResolution "All" TreatAsAtomicUnit off CheckFcnCallInpInsideContextMsg 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 AccumDataTypeStr "Inherit: Inherit via internal rule" OutMin "[]" OutMax "[]" OutDataTypeMode "Same as first input" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: Same as first input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } } System { Name "pendpid" Location [647, 96, 1214, 445] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" ReportName "simulink-default.rpt" Block { BlockType Constant Name "Constant" Position [20, 195, 40, 215] Value "0" } Block { BlockType Derivative Name "Derivative" Position [150, 235, 180, 265] } Block { BlockType Gain Name "Gain" Position [210, 165, 240, 195] Gain "100" ParameterDataTypeMode "Inherit via internal rule" ParameterDataType "sfix(16)" ParameterScaling "2^0" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain1" Position [210, 235, 240, 265] Gain "20" ParameterDataTypeMode "Inherit via internal rule" ParameterDataType "sfix(16)" ParameterScaling "2^0" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType SubSystem Name "Inverted \nPendulum" Ports [1, 2] Position [365, 188, 410, 232] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Inverted \nPendulum" Location [237, 404, 881, 878] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "F" Position [20, 70, 40, 90] IconDisplay "Port number" } Block { BlockType Gain Name "Cart\nMass" Position [235, 65, 265, 95] Gain "1/M" } Block { BlockType Gain Name "Damping" Position [235, 15, 265, 45] Orientation "left" Gain "b" } Block { BlockType Constant Name "Gravity" Position [200, 150, 220, 170] Orientation "left" Value "g" } Block { BlockType ElementaryMath Name "Horizontal" Ports [1, 1] Position [520, 320, 550, 350] Orientation "left" } Block { BlockType Integrator Name "Integrator" Ports [1, 1] Position [345, 400, 375, 430] } Block { BlockType Integrator Name "Integrator1" Ports [1, 1] Position [510, 400, 540, 430] } Block { BlockType Integrator Name "Integrator2" Ports [1, 1] Position [345, 65, 375, 95] } Block { BlockType Integrator Name "Integrator3" Ports [1, 1] Position [510, 65, 540, 95] } Block { BlockType Gain Name "Pend. Len." Position [465, 270, 495, 300] Orientation "left" Gain "l" } Block { BlockType Gain Name "Pend. Len.1" Position [465, 320, 495, 350] Orientation "left" Gain "l" } Block { BlockType Gain Name "Pend. Mass" Position [75, 130, 105, 160] Orientation "left" Gain "m" } Block { BlockType Gain Name "Pend. Mass1" Position [100, 185, 130, 215] Orientation "left" Gain "m" } Block { BlockType Gain Name "Pendulum\nInertia" Position [230, 400, 260, 430] Gain "1/i" } Block { BlockType Product Name "Product" Ports [2, 1] Position [20, 350, 55, 385] Orientation "down" } Block { BlockType Product Name "Product1" Ports [2, 1] Position [85, 350, 120, 385] Orientation "down" NamePlacement "alternate" } Block { BlockType Product Name "Product2" Ports [2, 1] Position [295, 220, 330, 255] Orientation "up" } Block { BlockType Product Name "Product3" Ports [2, 1] Position [335, 220, 370, 255] Orientation "up" } Block { BlockType Product Name "Product4" Ports [2, 1] Position [380, 175, 415, 210] Orientation "left" NamePlacement "alternate" } Block { BlockType Product Name "Product5" Ports [2, 1] Position [500, 170, 535, 205] } Block { BlockType Sum Name "Sum Forces\non Cart" Ports [3, 1] Position [120, 64, 150, 96] Inputs "-+-" } Block { BlockType Sum Name "Sum Torques\non Pend" Ports [2, 1] Position [120, 397, 150, 428] } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [240, 187, 270, 218] Orientation "left" Inputs "--" } Block { BlockType Sum Name "Sum2" Ports [3, 1] Position [235, 129, 265, 161] Orientation "left" Inputs "++-" } Block { BlockType Sum Name "Sum4" Ports [2, 1] Position [145, 182, 175, 213] Orientation "left" } Block { BlockType ElementaryMath Name "Vertical" Ports [1, 1] Position [520, 270, 550, 300] Orientation "left" Operator "cos" } Block { BlockType Product Name "d/dt(theta)^2" Ports [2, 1] Position [410, 355, 445, 390] Orientation "up" NamePlacement "alternate" } Block { BlockType Outport Name "Theta" Position [600, 405, 620, 425] IconDisplay "Port number" InitialOutput "0" } Block { BlockType Outport Name "x" Position [595, 70, 615, 90] Port "2" IconDisplay "Port number" InitialOutput "0" } Line { SrcBlock "Product2" SrcPort 1 Points [0, -5] DstBlock "Sum1" DstPort 2 } Line { SrcBlock "Product3" SrcPort 1 Points [0, -60] DstBlock "Sum2" DstPort 3 } Line { SrcBlock "Product4" SrcPort 1 DstBlock "Sum1" DstPort 1 } Line { SrcBlock "Product5" SrcPort 1 Points [0, -45] DstBlock "Sum2" DstPort 2 } Line { SrcBlock "Integrator" SrcPort 1 Points [40, 0] Branch { Points [0, -10] Branch { DstBlock "d/dt(theta)^2" DstPort 2 } Branch { DstBlock "d/dt(theta)^2" DstPort 1 } } Branch { DstBlock "Integrator1" DstPort 1 } } Line { SrcBlock "Pend. Len.1" SrcPort 1 Points [-5, 0] Branch { Points [0, -140] DstBlock "Product5" DstPort 2 } Branch { Points [-150, 0; 0, 0] Branch { DstBlock "Product2" DstPort 1 } Branch { DstBlock "Product1" DstPort 2 } } } Line { SrcBlock "Pend. Len." SrcPort 1 Points [-30, 0] Branch { DstBlock "Product4" DstPort 1 } Branch { Points [-70, 0] Branch { DstBlock "Product3" DstPort 2 } Branch { Points [-250, 0] DstBlock "Product" DstPort 2 } } } Line { SrcBlock "d/dt(theta)^2" SrcPort 1 Points [20, 0; 0, -65] Branch { Points [0, -85] DstBlock "Product4" DstPort 2 } Branch { Points [0, -105] DstBlock "Product5" DstPort 1 } } Line { SrcBlock "Pendulum\nInertia" SrcPort 1 Points [15, 0] Branch { Points [0, -140] Branch { Points [40, 0] DstBlock "Product2" DstPort 2 } Branch { Points [65, 0] DstBlock "Product3" DstPort 1 } } Branch { DstBlock "Integrator" DstPort 1 } } Line { SrcBlock "Cart\nMass" SrcPort 1 Points [10, 0] Branch { DstBlock "Sum2" DstPort 1 } Branch { DstBlock "Integrator2" DstPort 1 } } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "Pend. Mass" DstPort 1 } Line { SrcBlock "Sum4" SrcPort 1 DstBlock "Pend. Mass1" DstPort 1 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "Sum4" DstPort 2 } Line { SrcBlock "Gravity" SrcPort 1 Points [-5, 0] DstBlock "Sum4" DstPort 1 } Line { SrcBlock "Pend. Mass" SrcPort 1 Points [-40, 0] Branch { Points [25, 0; 0, -55] DstBlock "Sum Forces\non Cart" DstPort 3 } Branch { DstBlock "Product" DstPort 1 } } Line { SrcBlock "Product1" SrcPort 1 DstBlock "Sum Torques\non Pend" DstPort 1 } Line { SrcBlock "Pend. Mass1" SrcPort 1 DstBlock "Product1" DstPort 1 } Line { SrcBlock "Product" SrcPort 1 Points [0, 30] DstBlock "Sum Torques\non Pend" DstPort 2 } Line { SrcBlock "Integrator1" SrcPort 1 Points [20, 0] Branch { Points [0, -80] Branch { DstBlock "Vertical" DstPort 1 } Branch { DstBlock "Horizontal" DstPort 1 } } Branch { DstBlock "Theta" DstPort 1 } } Line { SrcBlock "Vertical" SrcPort 1 DstBlock "Pend. Len." DstPort 1 } Line { SrcBlock "Horizontal" SrcPort 1 DstBlock "Pend. Len.1" DstPort 1 } Line { SrcBlock "F" SrcPort 1 DstBlock "Sum Forces\non Cart" DstPort 2 } Line { SrcBlock "Damping" SrcPort 1 Points [-125, 0] DstBlock "Sum Forces\non Cart" DstPort 1 } Line { SrcBlock "Integrator2" SrcPort 1 Points [10, 0] Branch { Points [0, -50] DstBlock "Damping" DstPort 1 } Branch { DstBlock "Integrator3" DstPort 1 } } Line { SrcBlock "Sum Torques\non Pend" SrcPort 1 DstBlock "Pendulum\nInertia" DstPort 1 } Line { SrcBlock "Sum Forces\non Cart" SrcPort 1 DstBlock "Cart\nMass" DstPort 1 } Line { SrcBlock "Integrator3" SrcPort 1 DstBlock "x" DstPort 1 } Annotation { Name "d2/dt2(xp)" Position [202, 133] } Annotation { Name "d2/dt2(yp)" Position [203, 222] } Annotation { Name "P" Position [83, 199] } Annotation { Name "N" Position [46, 146] } Annotation { Name "l sin(theta)" Position [152, 322] } Annotation { Name "l cos(theta)" Position [151, 274] } Annotation { Name "x" Position [566, 66] } Annotation { Name "d/dt(x)" Position [436, 67] } Annotation { Name "d2/dt2(x)" Position [294, 69] } Annotation { Name "d2/dt2(theta)" Position [302, 435] } Annotation { Name "d/dt(theta)" Position [433, 435] } Annotation { Name "theta" Position [578, 435] } } } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [205, 111, 210, 149] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType DiscretePulseGenerator Name "Pulse\nGenerator" Ports [0, 1] Position [15, 84, 45, 116] PulseType "Time based" Amplitude "-1000" Period "10" PulseWidth "0.1" PhaseDelay "5" } Block { BlockType DiscretePulseGenerator Name "Pulse\nGenerator1" Ports [0, 1] Position [15, 19, 45, 51] PulseType "Time based" Amplitude "1000" Period "10" PulseWidth "0.1" } Block { BlockType Scope Name "Scope" Ports [1] Position [455, 185, 485, 215] Floating off Location [10, 61, 334, 300] Open off NumInputPorts "1" TickLabels "on" List { ListType AxesTitles axes1 "%" } TimeRange "20" YMin "-0.5" YMax "0.5" DataFormat "Array" SampleTime "0" } Block { BlockType Scope Name "Scope1" Ports [1] Position [455, 230, 485, 260] Floating off Location [30, 81, 354, 320] Open off NumInputPorts "1" TickLabels "on" List { ListType AxesTitles axes1 "%" } TimeRange "20" YMin "-25" DataFormat "Array" SampleTime "0" } Block { BlockType Scope Name "Scope2" Ports [1] Position [455, 125, 485, 155] Floating off Location [18, 243, 471, 538] Open off NumInputPorts "1" TickLabels "on" List { ListType AxesTitles axes1 "%" } TimeRange "20" YMin "-1000" YMax "1000" SaveName "ScopeData1" DataFormat "Array" SampleTime "0" } Block { BlockType Scope Name "Scope3" Ports [1] Position [250, 115, 280, 145] Floating off Location [18, 243, 471, 538] Open off NumInputPorts "1" TickLabels "on" List { ListType AxesTitles axes1 "%" } TimeRange "20" YMin "-1000" YMax "1000" SaveName "ScopeData2" DataFormat "Array" SampleTime "0" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [70, 197, 100, 228] Inputs "+-" } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [320, 192, 350, 223] } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [195, 52, 225, 83] } Block { BlockType Sum Name "Sum3" Ports [2, 1] Position [275, 205, 295, 225] ShowName off InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Line { SrcBlock "Inverted \nPendulum" SrcPort 1 Points [10, 0] Branch { Points [0, 140; -370, 0] DstBlock "Sum" DstPort 2 } Branch { DstBlock "Scope" DstPort 1 } } Line { SrcBlock "Constant" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "Inverted \nPendulum" DstPort 1 } Line { SrcBlock "Inverted \nPendulum" SrcPort 2 Points [25, 0] DstBlock "Scope1" DstPort 1 } Line { SrcBlock "Pulse\nGenerator1" SrcPort 1 Points [130, 0] DstBlock "Sum2" DstPort 1 } Line { SrcBlock "Pulse\nGenerator" SrcPort 1 Points [130, 0] DstBlock "Sum2" DstPort 2 } Line { SrcBlock "Sum2" SrcPort 1 Points [75, 0; 0, 70] Branch { DstBlock "Sum1" DstPort 1 } Branch { DstBlock "Scope2" DstPort 1 } } Line { SrcBlock "Sum" SrcPort 1 Points [30, 0] Branch { DstBlock "Derivative" DstPort 1 } Branch { Points [0, -35; 25, 0] Branch { DstBlock "Gain" DstPort 1 } Branch { Points [0, -60] DstBlock "Mux" DstPort 1 } } } Line { SrcBlock "Derivative" SrcPort 1 Points [5, 0] Branch { DstBlock "Gain1" DstPort 1 } Branch { DstBlock "Mux" DstPort 2 } } Line { SrcBlock "Gain" SrcPort 1 Points [5, 0; 0, 30] DstBlock "Sum3" DstPort 1 } Line { SrcBlock "Gain1" SrcPort 1 Points [5, 0; 0, -30] DstBlock "Sum3" DstPort 2 } Line { SrcBlock "Sum3" SrcPort 1 DstBlock "Sum1" DstPort 2 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Scope3" DstPort 1 } } }