Model { Name "ballandbeamlinear" Version 4.00 SampleTimeColors off LibraryLinkDisplay "none" WideLines on ShowLineDimensions off ShowPortDataTypes off RecordCoverage off CovPath "/" CovSaveName "covdata" CovNameIncrementing off CovHtmlReporting on BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off Created "Thu Oct 14 13:34:31 2004" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "Jacek Nawrot" ModifiedDateFormat "%" LastModifiedDate "Fri Oct 29 16:47:58 2004" ModelVersionFormat "1.%" ConfigurationManager "None" SimParamPage "Solver" StartTime "0" StopTime "1000" SolverMode "SingleTasking" Solver "ode45" RelTol "1e-3" AbsTol "1e-6" Refine "1" MaxStep "0.05" MinStep "auto" MaxNumMinSteps "-1" InitialStep "auto" FixedStep "auto" MaxOrder 5 OutputOption "RefineOutputTimes" OutputTimes "[]" LoadExternalInput off ExternalInput "[]" SaveTime off TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput off OutputSaveName "yout" LoadInitialState off InitialState "[]" SaveFinalState off FinalStateName "xFinal" SaveFormat "Array" LimitDataPoints off 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" 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" 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 ExtModeLogAll on OptimizeBlockIOStorage on BufferReuse on ParameterPooling on BlockReductionOpt on 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 "ballandbeamlinear" Location [543, 637, 1290, 951] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on ReportName "simulink-default.rpt" Block { BlockType Clock Name "Clock" Position [620, 170, 640, 190] ShowName off DisplayTime off Decimation "10" } Block { BlockType SubSystem Name "Controller" Ports [2, 1] Position [300, 240, 340, 275] Orientation "left" NamePlacement "alternate" ShowPortLabels on TreatAsAtomicUnit off RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" System { Name "Controller" Location [173, 178, 1229, 521] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType Inport Name "y" Position [55, 213, 85, 227] Port "1" Interpolate on } Block { BlockType Inport Name "r_ref" Position [130, 268, 160, 282] Port "2" Interpolate on } Block { BlockType Outport Name "u" Position [945, 103, 975, 117] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } } } Block { BlockType Demux Name "Demux" Ports [1, 2] Position [535, 136, 540, 174] BackgroundColor "black" ShowName off Outputs "2" BusSelectionMode off } Block { BlockType SubSystem Name "Linear Plant\n" Ports [2, 1] Position [325, 136, 365, 169] ShowPortLabels on TreatAsAtomicUnit off RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" System { Name "Linear Plant\n" Location [738, 366, 1236, 666] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType Inport Name "r_ref\n" Position [50, 23, 80, 37] Port "1" Interpolate on } Block { BlockType Inport Name "u\n" Position [50, 143, 80, 157] Port "2" Interpolate on } Block { BlockType SubSystem Name "Animation" Ports [1] Position [395, 55, 450, 105] ShowPortLabels on TreatAsAtomicUnit off RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" MaskType "Pendulum plot" MaskDescription "Pendulum plot" MaskHelp "Pendulum animation function using Handle gr" "aphics." MaskPromptString "DC reference signal block name:|Radius of B" "all|Length of Beam|Initial ball position|Initial beam angle|Pause between fra" "me|Mass of ball|Beam's moment of inertia|Drawing Scale|Km" MaskStyleString "edit,edit,edit,edit,edit,edit,edit,edit,edi" "t,edit" MaskTunableValueString "on,on,on,on,on,on,on,on,on,on" MaskCallbackString "|||||||||" MaskEnableString "on,on,on,on,on,on,on,on,on,on" MaskVisibilityString "on,on,on,on,on,on,on,on,on,on" MaskToolTipString "on,on,on,on,on,on,on,on,on,on" MaskVariables "RefBlock=&1;BallRadius=@2;BeamLength=@3;ini" "t_r=@4;init_angle=@5;pauseTime=@6;Mball=@7;Ibeam=@8;DrawingScale=@9;Km=@10;" MaskDisplay "plot([-10 10 10 -10 -10],[0 0 3 3 0],[-2 0 " "2],[0 1 0],[-7 -7 7 7 -7],[1 1.5 1.5 1 1])\nplot([ 5.2500\n 5.1915\n " " 5.0434\n 4.8750\n 4.7651\n 4.7651\n 4.8750\n 5.0434\n 5.19" "15\n 5.2500], [ 1.7500\n 1.9107\n 1.9962\n 1.9665\n 1.8355" "\n 1.6645\n 1.5335\n 1.5038\n 1.5893\n 1.7500])" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "Reference|Rball|Lbeam|x_init_plant(2)|x_ini" "t_plant(4)|[0]|m|JB|20|Km" MaskVariableAliases ",,,,,,,,," System { Name "Animation" Location [560, 319, 988, 455] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType Inport Name "in_1" Position [40, 25, 60, 45] Port "1" Interpolate on } Block { BlockType "S-Function" Name "S-function" Ports [1, 1] Position [95, 22, 210, 48] DeleteFcn "pendan([],[],[],'DeleteBlock');" FunctionName "s_ball_and_beam_an" Parameters "RefBlock,Lbeam,Rball,[init_r init_angle" "],pauseTime,Ibeam,Mball,DrawingScale,Km" PortCounts "[]" SFunctionModules "''" } Block { BlockType Stop Name "Stop Simulation" Position [295, 17, 330, 53] } Block { BlockType Display Name "u" Ports [1] Position [315, 85, 405, 115] Format "short" Decimation "1" Floating off SampleTime "-1" } Line { SrcBlock "in_1" SrcPort 1 DstBlock "S-function" DstPort 1 } Line { SrcBlock "S-function" SrcPort 1 Points [30, 0] Branch { DstBlock "Stop Simulation" DstPort 1 } Branch { Points [0, 65] DstBlock "u" DstPort 1 } } } } Block { BlockType Demux Name "Demux" Ports [1, 4] Position [235, 106, 240, 194] BackgroundColor "black" ShowName off Outputs "4" BusSelectionMode off } Block { BlockType StateSpace Name "Linear Plant" Position [140, 133, 200, 167] A "A" B "B" C "eye(4)" D "zeros(4,1)" X0 "x_init_plant" Realization "auto" AbsoluteTolerance "auto" } Block { BlockType Mux Name "Mux" Ports [6, 1] Position [330, 19, 335, 141] ShowName off Inputs "6" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [2, 1] Position [350, 231, 355, 269] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Outport Name "y\n" Position [385, 243, 415, 257] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock "u\n" SrcPort 1 Points [20, 0] Branch { DstBlock "Linear Plant" DstPort 1 } Branch { Points [0, 65; 210, 0] DstBlock "Mux" DstPort 6 } } Line { SrcBlock "r_ref\n" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "Linear Plant" SrcPort 1 DstBlock "Demux" DstPort 1 } Line { SrcBlock "Demux" SrcPort 3 Points [60, 0; 0, -50] DstBlock "Mux" DstPort 5 } Line { SrcBlock "Demux" SrcPort 1 Points [20, 0; 0, -30] DstBlock "Mux" DstPort 4 } Line { SrcBlock "Demux" SrcPort 2 Points [35, 0] Branch { Points [0, 0; 0, -90] DstBlock "Mux" DstPort 2 } Branch { Points [0, 100] DstBlock "Mux1" DstPort 1 } } Line { SrcBlock "Demux" SrcPort 4 Points [10, 0] Branch { Points [40, 0; 0, -110] DstBlock "Mux" DstPort 3 } Branch { Points [0, 80] DstBlock "Mux1" DstPort 2 } } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Animation" DstPort 1 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "y\n" DstPort 1 } } } Block { BlockType Gain Name "Linearization\nGain\n" Position [190, 145, 220, 175] Gain "m*g/Km" Multiplication "Element-wise(K.*u)" SaturateOnIntegerOverflow on } Block { BlockType Mux Name "Mux" Ports [3, 1] Position [600, 56, 605, 94] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Constant Name "Reference" Position [45, 30, 95, 50] Value "0.5" VectorParams1D on } Block { BlockType Reference Name "Reference Switch" Ports [2, 1] Position [185, 45, 220, 85] SourceBlock "simulink3/Nonlinear/Manual Switch" SourceType "Manual Switch" sw "0" action "0" Port { PortNumber 1 Name "r_ref" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" } } Block { BlockType Scope Name "Scope" Ports [2] Position [650, 221, 680, 254] Floating off Location [430, 489, 1248, 956] Open off NumInputPorts "2" TickLabels "OneTimeTick" ZoomMode "on" List { ListType AxesTitles axes1 "%" axes2 "%" } Grid "on" TimeRange "auto" YMin "-7~-0.45" YMax "8~0.3" SaveToWorkspace off SaveName "ScopeData" DataFormat "StructureWithTime" LimitDataPoints off MaxDataPoints "5000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType Step Name "Step" Position [50, 80, 80, 110] Time "2" Before "0" After "0.40" SampleTime "0" VectorParams1D on } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [245, 150, 265, 170] ShowName off IconShape "round" Inputs "|++" SaturateOnIntegerOverflow on } Block { BlockType ToWorkspace Name "To Workspace" Position [680, 126, 715, 144] ShowName off VariableName "y" MaxDataPoints "1000" Decimation "1" SampleTime "0.1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace1" Position [680, 171, 715, 189] ShowName off VariableName "t" MaxDataPoints "1000" Decimation "1" SampleTime "0.1" SaveFormat "Array" } Line { SrcBlock "Mux" SrcPort 1 Points [25, 0; 0, 60] DstBlock "To Workspace" DstPort 1 } Line { SrcBlock "Clock" SrcPort 1 DstBlock "To Workspace1" DstPort 1 } Line { SrcBlock "Reference" SrcPort 1 Points [5, 0; 0, 15] DstBlock "Reference Switch" DstPort 1 } Line { SrcBlock "Linear Plant\n" SrcPort 1 Points [40, 0] Branch { Points [0, 95] DstBlock "Controller" DstPort 1 } Branch { DstBlock "Demux" DstPort 1 } } Line { SrcBlock "Demux" SrcPort 1 Points [0, 0; 20, 0] Branch { Points [0, -70] DstBlock "Mux" DstPort 2 } Branch { Points [0, 85] DstBlock "Scope" DstPort 1 } } Line { SrcBlock "Demux" SrcPort 2 Points [0, 0; 30, 0] Branch { Points [0, -80] DstBlock "Mux" DstPort 3 } Branch { Points [0, 80] DstBlock "Scope" DstPort 2 } } Line { SrcBlock "Step" SrcPort 1 Points [25, 0; 0, -20] DstBlock "Reference Switch" DstPort 2 } Line { Name "r_ref" SrcBlock "Reference Switch" SrcPort 1 Points [65, 0] Branch { Labels [1, 0] Points [180, 0] Branch { DstBlock "Mux" DstPort 1 } Branch { Points [0, 200] DstBlock "Controller" DstPort 2 } } Branch { Points [0, 55] Branch { Points [-130, 0; 0, 40] DstBlock "Linearization\nGain\n" DstPort 1 } Branch { Points [0, 25] DstBlock "Linear Plant\n" DstPort 1 } } } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Linear Plant\n" DstPort 2 } Line { Labels [1, 0] SrcBlock "Linearization\nGain\n" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Controller" SrcPort 1 Points [-40, 0] DstBlock "Sum" DstPort 2 } } }