Model { Name "ball" 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 "ball" Location [70, 200, 509, 329] Open on ScreenColor white Block { BlockType Inport Name "theta" Position [15, 60, 35, 80] Port "1" PortWidth "-1" SampleTime "-1" } Block { BlockType Fcn Name "Ball-Beam\nLagrangian\nModel" Position [210, 50, 270, 80] Expr "(-1/(J/(R^2)+m))*(m*g*sin(u[3])-m*u[1]*(u[4])^2)" } Block { BlockType Derivative Name "Derivative" Position [100, 80, 130, 110] } Block { BlockType Gain Name "Gain" Position [50, 55, 80, 85] Gain "d/L" } Block { BlockType Integrator Name "Integrator" Position [285, 50, 315, 80] ExternalReset none InitialConditionSource internal InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "Integrator1" Position [350, 50, 380, 80] ExternalReset none InitialConditionSource internal InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Mux Name "Mux" Position [150, 47, 185, 83] Inputs "4" } Block { BlockType Outport Name "r" Position [410, 55, 430, 75] Port "1" OutputWhenDisabled held InitialOutput "0" } Line { SrcBlock "Gain" SrcPort 1 Points [0, 0] Branch { DstBlock "Mux" DstPort 3 } Branch { DstBlock "Derivative" DstPort 1 } } Line { SrcBlock "theta" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "Derivative" SrcPort 1 DstBlock "Mux" DstPort 4 } Line { SrcBlock "Integrator1" SrcPort 1 Points [5, 0] Branch { Points [0, -55; -275, 0; 0, 40] DstBlock "Mux" DstPort 1 } Branch { DstBlock "r" DstPort 1 } } Line { SrcBlock "Integrator" SrcPort 1 Points [10, 0] Branch { Points [0, -40; -205, 0; 0, 35] DstBlock "Mux" DstPort 2 } Branch { DstBlock "Integrator1" DstPort 1 } } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Ball-Beam\nLagrangian\nModel" DstPort 1 } Line { SrcBlock "Ball-Beam\nLagrangian\nModel" SrcPort 1 DstBlock "Integrator" DstPort 1 } Annotation { Position [101, 61] Text "alpha" } Annotation { Position [392, 75] Text "r" } Annotation { Position [333, 75] Text "d/dt(r)" } } }