Model { Name "TestFriction" Version 5.0 SaveDefaultBlockParams on SampleTimeColors off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ExecutionOrder off RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off Created "Thu Feb 03 09:35:16 2005" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "tomz" ModifiedDateFormat "%" LastModifiedDate "Mon Jun 06 19:26:17 2005" ModelVersionFormat "1.%" ConfigurationManager "None" SimParamPage "Solver" LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" TryForcingSFcnDF off 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 ExtModeSkipDownloadWhenConnect off ExtModeLogAll on ExtModeAutoUpdateStatusClock on BufferReuse on RTWExpressionDepthLimit 5 SimulationMode "normal" Solver "ode4" SolverMode "Auto" StartTime "0.0" StopTime "25" MaxOrder 5 MaxStep "auto" MinStep "auto" MaxNumMinSteps "-1" InitialStep "auto" FixedStep "0.001" RelTol "1e-3" AbsTol "auto" OutputOption "RefineOutputTimes" OutputTimes "[]" Refine "1" LoadExternalInput off ExternalInput "[t, u]" LoadInitialState off InitialState "xInitial" SaveTime on TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput on OutputSaveName "yout" SaveFinalState off FinalStateName "xFinal" SaveFormat "Array" Decimation "1" LimitDataPoints on MaxDataPoints "1000" SignalLoggingName "sigsOut" ConsistencyChecking "none" ArrayBoundsChecking "none" AlgebraicLoopMsg "warning" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" CheckForMatrixSingularity "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "error" ParameterOverflowMsg "error" ParameterPrecisionLossMsg "warning" UnderSpecifiedDataTypeMsg "none" UnnecessaryDatatypeConvMsg "none" VectorMatrixConversionMsg "none" InvalidFcnCallConnMsg "error" SignalLabelMismatchMsg "none" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" SfunCompatibilityCheckMsg "none" RTWInlineParameters off BlockReductionOpt on BooleanDataType on ConditionallyExecuteInputs on ParameterPooling on OptimizeBlockIOStorage on ZeroCross on AssertionControl "UseLocalSettings" ProdHWDeviceType "Microprocessor" ProdHWWordLengths "8,16,32,32" RTWSystemTargetFile "grt.tlc" RTWTemplateMakefile "grt_default_tmf" RTWMakeCommand "make_rtw" RTWGenerateCodeOnly off RTWRetainRTWFile off TLCProfiler off TLCDebug off TLCCoverage off TLCAssertion off BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } BlockParameterDefaults { Block { BlockType Abs SaturateOnIntegerOverflow on ZeroCross on } Block { BlockType Clock DisplayTime off } Block { BlockType Constant Value "1" VectorParams1D on ShowAdditionalParam off OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" } Block { BlockType Derivative } Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" ShowAdditionalParam off ParameterDataTypeMode "Same as input" ParameterDataType "sfix(16)" ParameterScalingMode "Best Precision: Matrix-wise" ParameterScaling "2^0" OutDataTypeMode "Same as input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on } Block { BlockType Inport Port "1" PortDimensions "-1" SampleTime "-1" ShowAdditionalParam off LatchInput off DataType "auto" OutDataType "sfix(16)" OutScaling "2^0" SignalType "auto" SamplingMode "auto" Interpolate on } Block { BlockType Integrator ExternalReset "none" InitialConditionSource "internal" InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" ZeroCross on } Block { BlockType Math Operator "exp" OutputSignalType "auto" } Block { BlockType MinMax Function "min" Inputs "1" ZeroCross on } Block { BlockType Mux Inputs "4" DisplayOption "none" } Block { BlockType Outport Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Product Inputs "2" Multiplication "Element-wise(.*)" ShowAdditionalParam off InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on } Block { BlockType RelationalOperator Operator ">=" ShowAdditionalParam off InputSameDT on LogicOutDataTypeMode "Logical (see Advanced Sim. Parameters)" LogicDataType "uint(8)" ZeroCross on } Block { BlockType Scope Floating off 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 "0" } Block { BlockType "S-Function" FunctionName "system" PortCounts "[]" SFunctionModules "''" } Block { BlockType Signum ZeroCross on } Block { BlockType Step Time "1" Before "0" After "1" SampleTime "-1" VectorParams1D on ZeroCross on } Block { BlockType SubSystem ShowPortLabels on Permissions "ReadWrite" RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" SimViewingDevice off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" } Block { BlockType Sum IconShape "rectangular" Inputs "++" ShowAdditionalParam off InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on } Block { BlockType Switch Criteria "u2 >= Threshold" Threshold "0" ShowAdditionalParam off InputSameDT on OutDataTypeMode "Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow on ZeroCross on } Block { BlockType TransferFcn Numerator "[1]" Denominator "[1 2 1]" AbsoluteTolerance "auto" Realization "auto" } } 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 "TestFriction" Location [-42, 632, 723, 899] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" ZoomFactor "100" ReportName "simulink-default.rpt" Block { BlockType SubSystem Name "DC Motor + Friction" Ports [1, 3] Position [425, 77, 505, 143] TreatAsAtomicUnit off MaskPromptString "ks|J|Coulomb|Static|Viscous|StribeckVel|alpha|F" "riction ON" MaskStyleString "edit,edit,edit,edit,edit,edit,edit,checkbox" MaskTunableValueString "on,on,on,on,on,on,on,on" MaskCallbackString "|||||||" MaskEnableString "on,on,on,on,on,on,on,on" MaskVisibilityString "on,on,on,on,on,on,on,on" MaskToolTipString "on,on,on,on,on,on,on,on" MaskVarAliasString ",,,,,,," MaskVariables "ks=@1;J=@2;Coulomb=@3;Static=@4;Viscous=@5;Stri" "beckVel=@6;alpha=@7;FrictON=@8;" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "1|1|0.5|3|1|0.1|0.01|on" Port { PortNumber 2 Name "vel" PropagatedSignals "vel" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } Port { PortNumber 3 Name "frict" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } System { Name "DC Motor + Friction" Location [2, 82, 1270, 978] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" ZoomFactor "100" Block { BlockType Inport Name "u" Position [25, 33, 55, 47] BackgroundColor "green" } Block { BlockType Abs Name "Abs1" Position [420, 383, 435, 397] ShowName off } Block { BlockType Abs Name "Abs2" Position [400, 248, 415, 262] Orientation "left" ShowName off } Block { BlockType Constant Name "Constant1" Position [590, 317, 610, 333] Orientation "left" ShowName off } Block { BlockType Constant Name "Constant2" Position [315, 287, 335, 303] Orientation "left" ShowName off } Block { BlockType Constant Name "Constant4" Position [540, 262, 560, 278] Orientation "left" ShowName off } Block { BlockType SubSystem Name "Friction" Ports [1, 1] Position [360, 93, 400, 127] Orientation "left" TreatAsAtomicUnit off MaskPromptString "Coulomb|Static|Viscous|StribeckVel" 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 ",,," MaskVariables "Coulomb=@1;Static=@2;Viscous=@3;StribeckVel" "=@4;" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "Coulomb|Static|Viscous|StribeckVel" System { Name "Friction" Location [209, 684, 1030, 974] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" ZoomFactor "100" Block { BlockType Inport Name "vel" Position [755, 33, 785, 47] Orientation "left" } Block { BlockType Gain Name "1/StribeckVel" Position [590, 79, 635, 111] Orientation "left" Gain "1/StribeckVel" } Block { BlockType Gain Name "1/V1" Position [430, 29, 455, 61] Orientation "left" ShowName off Gain "-1" } Block { BlockType Abs Name "Abs" Position [615, 191, 640, 209] Orientation "left" ShowName off } Block { BlockType Constant Name "Constant" Position [650, 88, 670, 102] Orientation "left" ShowName off } Block { BlockType Constant Name "Constant1" Position [410, 137, 430, 153] Orientation "left" ShowName off } Block { BlockType Constant Name "Constant4" Position [410, 82, 430, 98] Orientation "left" ShowName off } Block { BlockType Gain Name "Coulomb" Position [350, 130, 380, 160] Orientation "left" Gain "Coulomb" } Block { BlockType Math Name "Math\nFunction" Ports [1, 1] Position [480, 30, 510, 60] Orientation "left" ShowName off Operator "square" } Block { BlockType Math Name "Math\nFunction1" Ports [1, 1] Position [370, 30, 400, 60] Orientation "left" ShowName off } Block { BlockType Product Name "Product" Ports [2, 1] Position [535, 34, 560, 56] Orientation "left" ShowName off InputSameDT off } Block { BlockType Product Name "Product2" Ports [2, 1] Position [250, 36, 275, 69] Orientation "left" ShowName off InputSameDT off } Block { BlockType Gain Name "Static" Position [355, 73, 380, 107] Orientation "left" Gain "Static" } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [210, 75, 230, 95] Orientation "left" ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [145, 75, 165, 95] Orientation "left" ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" } Block { BlockType Sum Name "Sum4" Ports [2, 1] Position [305, 65, 325, 85] Orientation "left" ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" } Block { BlockType Gain Name "Viscous" Position [425, 185, 455, 215] Orientation "left" Gain "Viscous" } Block { BlockType Outport Name "frict" Position [75, 78, 105, 92] Orientation "left" } Line { SrcBlock "Constant" SrcPort 1 DstBlock "1/StribeckVel" DstPort 1 } Line { SrcBlock "1/StribeckVel" SrcPort 1 Points [0, -45] DstBlock "Product" DstPort 2 } Line { SrcBlock "Product" SrcPort 1 DstBlock "Math\nFunction" DstPort 1 } Line { SrcBlock "Math\nFunction" SrcPort 1 DstBlock "1/V1" DstPort 1 } Line { SrcBlock "1/V1" SrcPort 1 DstBlock "Math\nFunction1" DstPort 1 } Line { SrcBlock "Math\nFunction1" SrcPort 1 DstBlock "Product2" DstPort 1 } Line { SrcBlock "Constant1" SrcPort 1 DstBlock "Coulomb" DstPort 1 } Line { SrcBlock "Coulomb" SrcPort 1 Points [0, 0; -35, 0] Branch { Points [-90, 0] DstBlock "Sum1" DstPort 2 } Branch { Points [0, -45] DstBlock "Sum4" DstPort 2 } } Line { SrcBlock "Constant4" SrcPort 1 DstBlock "Static" DstPort 1 } Line { SrcBlock "Static" SrcPort 1 Points [-5, 0; 0, -15] DstBlock "Sum4" DstPort 1 } Line { SrcBlock "Sum4" SrcPort 1 Points [-5, 0; 0, -15] DstBlock "Product2" DstPort 2 } Line { SrcBlock "Product2" SrcPort 1 DstBlock "Sum1" DstPort 1 } Line { SrcBlock "vel" SrcPort 1 Points [0, 0; -10, 0] Branch { DstBlock "Product" DstPort 1 } Branch { Points [0, 160] DstBlock "Abs" DstPort 1 } } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "Sum2" DstPort 1 } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "frict" DstPort 1 } Line { SrcBlock "Viscous" SrcPort 1 Points [-265, 0] DstBlock "Sum2" DstPort 2 } Line { SrcBlock "Abs" SrcPort 1 DstBlock "Viscous" DstPort 1 } } } Block { BlockType Gain Name "Gain" Position [70, 25, 100, 55] ShowName off Gain "ks" Port { PortNumber 1 Name "torque" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } } Block { BlockType Gain Name "Gain1" Position [165, 110, 195, 140] Orientation "up" ShowName off Gain "FrictON" } Block { BlockType Gain Name "Gain3" Position [225, 25, 260, 55] ShowName off Gain "1/J" } Block { BlockType Integrator Name "Integrator" Ports [2, 1] Position [355, 27, 385, 58] ShowName off ExternalReset "rising" Port { PortNumber 1 Name "vel" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } } Block { BlockType Integrator Name "Integrator1" Ports [1, 1] Position [495, 29, 525, 61] ShowName off Port { PortNumber 1 Name "pos" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } } Block { BlockType MinMax Name "MinMax" Ports [2, 1] Position [365, 317, 395, 348] Orientation "left" ShowName off Function "min" Inputs "2" } Block { BlockType Product Name "Product" Ports [2, 1] Position [325, 105, 340, 125] Orientation "left" ShowName off InputSameDT off Port { PortNumber 1 Name "slip" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } } Block { BlockType Product Name "Product1" Ports [2, 1] Position [295, 330, 310, 350] Orientation "left" ShowName off InputSameDT off Port { PortNumber 1 Name "stick\n" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } } Block { BlockType Product Name "Product2" Ports [2, 1] Position [280, 175, 295, 195] Orientation "left" ShowName off InputSameDT off } Block { BlockType Product Name "Product3" Ports [2, 1] Position [215, 260, 230, 280] Orientation "left" ShowName off InputSameDT off } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [350, 247, 380, 278] Orientation "left" ShowName off Operator ">" ShowAdditionalParam on InputSameDT off LogicOutDataTypeMode "Specify via dialog" } Block { BlockType Signum Name "Sign" Position [370, 149, 395, 171] Orientation "left" ShowName off } Block { BlockType Signum Name "Sign1" Position [330, 350, 350, 370] Orientation "up" NamePlacement "alternate" ShowName off } Block { BlockType Gain Name "Static" Position [525, 308, 550, 342] Orientation "left" Gain "Static" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [170, 30, 190, 50] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" Port { PortNumber 1 Name "acc" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [190, 175, 210, 195] Orientation "left" ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" } Block { BlockType Sum Name "Sum2" Ports [2, 1] Position [285, 255, 305, 275] Orientation "left" ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeMode "Inherit via internal rule" } Block { BlockType Gain Name "alpha" Position [470, 253, 495, 287] Orientation "left" Gain "alpha" } Block { BlockType Outport Name "pos" Position [680, 38, 710, 52] BackgroundColor "red" } Block { BlockType Outport Name "vel" Position [685, 178, 715, 192] BackgroundColor "red" Port "2" } Block { BlockType Outport Name "frict" Position [205, 73, 235, 87] BackgroundColor "red" Port "3" } Line { Name "vel" Labels [0, 0] SrcBlock "Integrator" SrcPort 1 Points [0, -5; 55, 0] Branch { Points [0, 70; -15, 0] Branch { DstBlock "Friction" DstPort 1 } Branch { Points [0, 50] Branch { Points [0, 25] Branch { DstBlock "vel" DstPort 1 } Branch { DstBlock "Abs2" DstPort 1 } } Branch { DstBlock "Sign" DstPort 1 } } } Branch { Points [35, 0] DstBlock "Integrator1" DstPort 1 } } Line { SrcBlock "Friction" SrcPort 1 DstBlock "Product" DstPort 1 } Line { SrcBlock "Sign" SrcPort 1 Points [-10, 0] DstBlock "Product" DstPort 2 } Line { Name "torque" Labels [0, 0] SrcBlock "Gain" SrcPort 1 Points [35, 0] Branch { DstBlock "Sum" DstPort 1 } Branch { Points [0, 350; 200, 0] Branch { DstBlock "Abs1" DstPort 1 } Branch { DstBlock "Sign1" DstPort 1 } } } Line { SrcBlock "u" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "Abs1" SrcPort 1 Points [30, 0; 0, -50] DstBlock "MinMax" DstPort 2 } Line { Name "acc" Labels [0, 0] SrcBlock "Sum" SrcPort 1 DstBlock "Gain3" DstPort 1 } Line { SrcBlock "Gain1" SrcPort 1 Points [0, -25] Branch { DstBlock "Sum" DstPort 2 } Branch { DstBlock "frict" DstPort 1 } } Line { Name "pos" Labels [0, 0] SrcBlock "Integrator1" SrcPort 1 DstBlock "pos" DstPort 1 } Line { SrcBlock "Gain3" SrcPort 1 Points [75, 0] DstBlock "Integrator" DstPort 1 } Line { SrcBlock "MinMax" SrcPort 1 DstBlock "Product1" DstPort 1 } Line { SrcBlock "Sign1" SrcPort 1 DstBlock "Product1" DstPort 2 } Line { SrcBlock "Constant4" SrcPort 1 DstBlock "alpha" DstPort 1 } Line { SrcBlock "Constant1" SrcPort 1 DstBlock "Static" DstPort 1 } Line { SrcBlock "Abs2" SrcPort 1 DstBlock "Relational\nOperator" DstPort 1 } Line { SrcBlock "alpha" SrcPort 1 DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Static" SrcPort 1 DstBlock "MinMax" DstPort 1 } Line { SrcBlock "Sum1" SrcPort 1 Points [-5, 0] DstBlock "Gain1" DstPort 1 } Line { Name "slip" Labels [0, 1] SrcBlock "Product" SrcPort 1 Points [0, 65] DstBlock "Product2" DstPort 1 } Line { SrcBlock "Relational\nOperator" SrcPort 1 Points [-10, 0] Branch { DstBlock "Sum2" DstPort 1 } Branch { Points [0, -75] DstBlock "Product2" DstPort 2 } } Line { SrcBlock "Product2" SrcPort 1 DstBlock "Sum1" DstPort 1 } Line { Name "stick\n" Labels [2, 0] SrcBlock "Product1" SrcPort 1 Points [-20, 0; 0, -65] DstBlock "Product3" DstPort 2 } Line { SrcBlock "Product3" SrcPort 1 Points [-10, 0] DstBlock "Sum1" DstPort 2 } Line { SrcBlock "Constant2" SrcPort 1 Points [-15, 0] DstBlock "Sum2" DstPort 2 } Line { SrcBlock "Sum2" SrcPort 1 Points [-25, 0] Branch { DstBlock "Product3" DstPort 1 } Branch { Points [0, -215] DstBlock "Integrator" DstPort 2 } } } } Block { BlockType Reference Name "Manual Switch" Ports [2, 1] Position [160, 87, 190, 123] ShowName off SourceBlock "simulink/Signal\nRouting/Manual Switch" SourceType "Manual Switch" sw "0" action "0" } Block { BlockType Reference Name "Manual Switch1" Ports [2, 1] Position [385, 92, 415, 128] ShowName off SourceBlock "simulink/Signal\nRouting/Manual Switch" SourceType "Manual Switch" sw "0" action "0" } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [570, 56, 575, 94] ShowName off Inputs "2" DisplayOption "bar" Port { PortNumber 1 Name "pos" PropagatedSignals ", pos" TestPoint off LinearAnalysisOutput off LinearAnalysisInput off RTWStorageClass "Auto" DataLogging off DataLoggingNameMode "SignalName" DataLoggingDecimateData off DataLoggingDecimation "2" DataLoggingLimitDataPoints off DataLoggingMaxPoints "5000" } } Block { BlockType Reference Name "PD" Ports [1, 1] Position [310, 60, 340, 90] SourceBlock "simulink_extras/Additional\nLinear/PID Controll" "er" SourceType "PID Controller" P "36" I "0" D "12" } Block { BlockType Reference Name "PID" Ports [1, 1] Position [310, 115, 340, 145] SourceBlock "simulink_extras/Additional\nLinear/PID Controll" "er" SourceType "PID Controller" P "54" I "54" D "13.5" } Block { BlockType Reference Name "Ramp2" Ports [0, 1] Position [70, 125, 100, 155] SourceBlock "simulink/Sources/Ramp" SourceType "Ramp" slope "0.1" start "0" X0 "0" VectorParams1D on } Block { BlockType Scope Name "Scope" Ports [3] Position [675, 41, 745, 169] Location [227, 98, 1251, 788] Open on NumInputPorts "3" List { ListType AxesTitles axes1 "%" axes2 "%" axes3 "%" } List { ListType SelectedSignals axes1 "" axes2 "" axes3 "" } TimeRange "25 " YMin "0~0~0" YMax "1.4~0.225~3" SaveToWorkspace on DataFormat "StructureWithTime" MaxDataPoints "5000000" } Block { BlockType Step Name "Step2" Position [70, 55, 100, 85] SampleTime "0" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [260, 95, 280, 115] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" } Line { SrcBlock "Sum" SrcPort 1 Points [5, 0] Branch { Points [0, -30] DstBlock "PD" DstPort 1 } Branch { Points [0, 25] DstBlock "PID" DstPort 1 } } Line { SrcBlock "DC Motor + Friction" SrcPort 1 Points [0, -5; 15, 0] Branch { Points [0, 85; -255, 0] DstBlock "Sum" DstPort 2 } Branch { DstBlock "Mux" DstPort 2 } } Line { SrcBlock "Manual Switch" SrcPort 1 Points [45, 0] Branch { DstBlock "Sum" DstPort 1 } Branch { Points [0, -55; 315, 0] DstBlock "Mux" DstPort 1 } } Line { Name "frict" Labels [0, 0] SrcBlock "DC Motor + Friction" SrcPort 3 Points [150, 0] DstBlock "Scope" DstPort 3 } Line { Name "vel" Labels [0, 0] SrcBlock "DC Motor + Friction" SrcPort 2 Points [150, 0] DstBlock "Scope" DstPort 2 } Line { Name "pos" Labels [0, 0] SrcBlock "Mux" SrcPort 1 Points [40, 0] Branch { Points [40, 0] DstBlock "Scope" DstPort 1 } Branch { Points [0, -5] } } Line { SrcBlock "Step2" SrcPort 1 Points [20, 0; 0, 25] DstBlock "Manual Switch" DstPort 1 } Line { SrcBlock "Ramp2" SrcPort 1 Points [20, 0; 0, -25] DstBlock "Manual Switch" DstPort 2 } Line { SrcBlock "Manual Switch1" SrcPort 1 DstBlock "DC Motor + Friction" DstPort 1 } Line { SrcBlock "PD" SrcPort 1 Points [25, 0] DstBlock "Manual Switch1" DstPort 1 } Line { SrcBlock "PID" SrcPort 1 Points [25, 0] DstBlock "Manual Switch1" DstPort 2 } } }