Model { Name "pend" Version 2.00 SimParamPage Solver SampleTimeColors off WideVectorLines off PaperOrientation landscape StartTime "0.0" StopTime "10.0" Solver ode45 RelTol "1e-3" AbsTol "1e-6" Refine "1" MaxStep "auto" 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" LimitMaxRows off MaxRows "1000" Decimation "1" AlgebraicLoopMsg warning MinStepSizeMsg warning UnconnectedInputMsg warning UnconnectedOutputMsg warning UnconnectedLineMsg warning ConsistencyChecking off ZeroCross on 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 } System { Name "pend" Location [314, 119, 970, 582] Open on ScreenColor white Block { BlockType Inport Name "F" Position [15, 70, 35, 90] Port "1" PortWidth "-1" SampleTime "-1" } Block { BlockType Gain Name "Cart\nMass" Position [230, 65, 260, 95] Gain "1/M" } Block { BlockType Gain Name "Damping" Position [230, 15, 260, 45] Orientation left Gain "b" } Block { BlockType Constant Name "Gravity" Position [200, 150, 220, 170] Orientation left Value "g" } Block { BlockType ElementaryMath Name "Horizontal" Position [515, 320, 545, 350] Orientation left Operator sin } Block { BlockType Integrator Name "Integrator" Position [340, 400, 370, 430] ExternalReset none InitialConditionSource internal InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "Integrator1" Position [505, 400, 535, 430] ExternalReset none InitialConditionSource internal InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "Integrator2" Position [340, 65, 370, 95] ExternalReset none InitialConditionSource internal InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "Integrator3" Position [505, 65, 535, 95] ExternalReset none InitialConditionSource internal InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Gain Name "Pend. Len." Position [460, 270, 490, 300] Orientation left Gain "l" } Block { BlockType Gain Name "Pend. Len.1" Position [460, 320, 490, 350] Orientation left Gain "l" } Block { BlockType Gain Name "Pend. Mass" Position [95, 130, 125, 160] Orientation left Gain "m" } Block { BlockType Gain Name "Pend. Mass1" Position [95, 185, 125, 215] Orientation left Gain "m" } Block { BlockType Gain Name "Pendulum\nInertia" Position [225, 400, 255, 430] Gain "1/i" } Block { BlockType Product Name "Product" Position [42, 350, 73, 385] Orientation down NamePlacement alternate Inputs "2" } Block { BlockType Product Name "Product1" Position [80, 350, 115, 385] Orientation down Inputs "2" } Block { BlockType Product Name "Product2" Position [250, 225, 285, 260] Orientation up NamePlacement alternate Inputs "2" } Block { BlockType Product Name "Product3" Position [290, 225, 325, 260] Orientation up Inputs "2" } Block { BlockType Product Name "Product4" Position [375, 210, 410, 245] Orientation up NamePlacement alternate Inputs "2" } Block { BlockType Product Name "Product5" Position [415, 210, 450, 245] Orientation up Inputs "2" } Block { BlockType Sum Name "Sum Forces\non Cart" Position [115, 64, 145, 96] Inputs "-+-" } Block { BlockType Sum Name "Sum Torques\non Pend" Position [115, 397, 145, 428] Inputs "++" } Block { BlockType Sum Name "Sum1" Position [220, 187, 250, 218] Orientation left Inputs "--" } Block { BlockType Sum Name "Sum2" Position [230, 129, 260, 161] Orientation left Inputs "++-" } Block { BlockType Sum Name "Sum4" Position [140, 182, 170, 213] Orientation left Inputs "++" } Block { BlockType ElementaryMath Name "Vertical" Position [515, 270, 545, 300] Orientation left Operator cos } Block { BlockType Product Name "d/dt(theta)^2" Position [405, 355, 440, 390] Orientation up NamePlacement alternate Inputs "2" } Block { BlockType Outport Name "Theta" Position [595, 405, 615, 425] Port "1" OutputWhenDisabled held InitialOutput "0" } Block { BlockType Outport Name "x" Position [590, 70, 610, 90] Port "2" OutputWhenDisabled held InitialOutput "0" } Line { SrcBlock "Product2" SrcPort 1 Points [0, -10] DstBlock "Sum1" DstPort 2 } Line { SrcBlock "Product3" SrcPort 1 Points [0, -65] DstBlock "Sum2" DstPort 3 } Line { SrcBlock "Product4" SrcPort 1 Points [0, -10] DstBlock "Sum1" DstPort 1 } Line { SrcBlock "Product5" SrcPort 1 Points [0, -60] 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 [-15, 0] Branch { DstBlock "Product5" DstPort 2 } Branch { Points [-180, 0] Branch { DstBlock "Product2" DstPort 1 } Branch { Points [-145, 0] DstBlock "Product1" DstPort 2 } } } Line { SrcBlock "Pend. Len." SrcPort 1 Points [-70, 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 [0, -90] Branch { DstBlock "Product4" DstPort 2 } Branch { DstBlock "Product5" DstPort 1 } } Line { SrcBlock "Pendulum\nInertia" SrcPort 1 Points [15, 0] Branch { Points [0, -140] Branch { DstBlock "Product2" DstPort 2 } Branch { 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 [-10, 0] DstBlock "Sum4" DstPort 1 } Line { SrcBlock "Pend. Mass" SrcPort 1 Points [-5, 0] Branch { Points [0, -55] DstBlock "Sum Forces\non Cart" DstPort 3 } Branch { Points [-35, 0] 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 { Position [197, 133] Text "d2/dt2(xp)" } Annotation { Position [198, 222] Text "d2/dt2(yp)" } Annotation { Position [78, 199] Text "P" } Annotation { Position [41, 146] Text "N" } Annotation { Position [147, 322] Text "l sin(theta)" } Annotation { Position [146, 274] Text "l cos(theta)" } Annotation { Position [561, 66] Text "x" } Annotation { Position [431, 67] Text "d/dt(x)" } Annotation { Position [289, 69] Text "d2/dt2(x)" } Annotation { Position [297, 435] Text "d2/dt2(theta)" } Annotation { Position [428, 435] Text "d/dt(theta)" } Annotation { Position [573, 435] Text "theta" } } }