Model { Name "main" Version 6.6 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.314" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "ISO-8859-1" SaveDefaultBlockParams on SampleTimeColors off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowViewerIcons on SortedOrder off ExecutionContextIcon off ShowLinearizationAnnotations on ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off Created "Fri Jun 14 16:06:08 2002" Creator "Mattone" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "Mattone" ModifiedDateFormat "%" LastModifiedDate "Wed Feb 21 17:42:38 2007" ModelVersionFormat "1.%" ConfigurationManager "None" SimulationMode "normal" LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" AccelVerboseBuild off TryForcingSFcnDF off RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off CovReportOnPause on 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 off BufferReuse off ProdHWDeviceType "32-bit Generic" ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off Array { Type "Handle" Dimension 1 Simulink.ConfigSet { $ObjectID 1 Version "1.2.0" Array { Type "Handle" Dimension 7 Simulink.SolverCC { $ObjectID 2 Version "1.2.0" StartTime "0.0" StopTime "800" AbsTol "auto" FixedStep "auto" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ConsecutiveZCsStepRelTol "10*128*eps" MaxConsecutiveZCs "1000" ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "auto" MinStep "auto" MaxConsecutiveMinStep "1" RelTol "1e-3" SolverMode "Auto" Solver "ode45" SolverName "ode45" ZeroCrossControl "UseLocalSettings" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" RateTranMode "Deterministic" } Simulink.DataIOCC { $ObjectID 3 Version "1.2.0" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints on 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.2.0" BlockReduction on BooleanDataType off ConditionallyExecuteInputs on InlineParams off InlineInvariantSignals off OptimizeBlockIOStorage off BufferReuse off EnforceIntegerDowncast on ExpressionFolding off ExpressionDepthLimit 2147483647 FoldNonRolledExpr on LocalBlockOutputs off RollThreshold 5 SystemCodeInlineAuto off StateBitsets off DataBitsets off UseTempVars off ZeroExternalMemoryAtStartup on ZeroInternalMemoryAtStartup on InitFltsAndDblsToZero on NoFixptDivByZeroProtection off EfficientFloat2IntCast off OptimizeModelRefInitCode off LifeSpan "inf" BufferReusableBoundary on } Simulink.DebuggingCC { $ObjectID 5 Version "1.2.0" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" SignalInfNanChecking "none" ReadBeforeWriteMsg "UseLocalSettings" WriteAfterWriteMsg "UseLocalSettings" WriteAfterReadMsg "UseLocalSettings" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" CheckSSInitialOutputMsg on 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" ModelReferenceSimTargetVerbose off UnknownTsInhSupMsg "warning" ModelReferenceDataLoggingMessage "warning" ModelReferenceSymbolNameMessage "warning" ModelReferenceExtraNoncontSigs "error" StateNameClashWarn "warning" StrictBusMsg "None" } Simulink.HardwareCC { $ObjectID 6 Version "1.2.0" 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.2.0" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" ModelReferenceNumInstancesAllowed "Multi" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 8 Version "1.2.0" 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 IncludeHyperlinkInReport off LaunchReport off TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off IncludeERTFirstTime on Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 9 Version "1.2.0" ForceParamTrailComments off GenerateComments on IgnoreCustomStorageClasses on IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off IncDataTypeInIds off PrefixModelToSubsysFcnNames on 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 } Simulink.STFCustomTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 10 Version "1.2.0" TargetFcnLib "ansi_tfl_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" GenFloatMathFcnCalls "ANSI_C" UtilityFuncGeneration "Auto" GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant off IncludeMdlTerminateFcn on CombineOutputUpdateFcns off SuppressErrorStatus off IncludeFileDelimiter "Auto" ERTCustomFileBanners off SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging off MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime on SupportNonInlinedSFcns on EnableShiftOperators on ParenthesesLevel "Nominal" PortableWordSizes off ModelStepFunctionPrototypeControlCompliant off SystemTargetFile "grt.tlc" DialogCategory 0 } PropName "Components" } } PropName "Components" } Name "Configuration" CurrentDlgPage "Solver" } 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 } BlockParameterDefaults { Block { BlockType Clock DisplayTime off } Block { BlockType Constant Value "1" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "inf" FramePeriod "inf" } Block { BlockType Inport Port "1" UseBusObject off BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" DataType "auto" OutDataType "sfix(16)" OutScaling "2^0" 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 MATLABFcn MATLABFcn "sin" OutputDimensions "-1" OutputSignalType "auto" Output1D on SampleTime "-1" } 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" DataType "auto" OutDataType "sfix(16)" OutScaling "2^0" SignalType "auto" SamplingMode "auto" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Saturate UpperLimit "0.5" LowerLimit "-0.5" LinearizeAsGain on ZeroCross 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 Selector NumberOfDimensions "1" IndexMode "One-based" InputPortWidth "-1" SampleTime "-1" } Block { BlockType "S-Function" FunctionName "system" SFunctionModules "''" PortCounts "[]" } Block { BlockType Sin SineType "Time based" TimeSource "Use simulation time" Amplitude "1" Bias "0" Frequency "1" Phase "0" Samples "10" Offset "0" SampleTime "-1" VectorParams1D on } Block { BlockType SubSystem ShowPortLabels "FromPortIcon" Permissions "ReadWrite" PermitHierarchicalResolution "All" TreatAsAtomicUnit 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 OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Switch Criteria "u2 >= Threshold" Threshold "0" InputSameDT on OutDataTypeMode "Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow on ZeroCross on SampleTime "-1" } Block { BlockType ToWorkspace VariableName "simulink_output" MaxDataPoints "1000" Decimation "1" SampleTime "0" FixptAsFi off } } 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" } System { Name "main" Location [356, 96, 1059, 518] 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 Clock Name "Clock" Position [325, 255, 345, 275] Decimation "10" } Block { BlockType SubSystem Name "Control" Ports [3, 1] Position [110, 55, 185, 115] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Control" Location [215, 197, 1027, 611] 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 "reference" Position [25, 28, 55, 42] IconDisplay "Port number" } Block { BlockType Inport Name "q,qdot" Position [25, 88, 55, 102] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Fm" Position [25, 153, 55, 167] Port "3" IconDisplay "Port number" } Block { BlockType SubSystem Name "Controller" Ports [3, 1] Position [140, 64, 190, 126] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Controller" Location [533, 101, 797, 310] 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 "reference" Position [30, 28, 60, 42] IconDisplay "Port number" } Block { BlockType Inport Name "q,qdot" Position [25, 73, 55, 87] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "Fm" Position [25, 138, 55, 152] Port "3" IconDisplay "Port number" } Block { BlockType MATLABFcn Name "Control Fcn" Ports [1, 1] Position [125, 65, 185, 95] MATLABFcn "dec_lin_control" OutputDimensions "2" } Block { BlockType Mux Name "Mux" Ports [3, 1] Position [105, 61, 110, 99] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Outport Name "u" Position [205, 73, 235, 87] IconDisplay "Port number" } Line { SrcBlock "reference" SrcPort 1 Points [25, 0] DstBlock "Mux" DstPort 1 } Line { SrcBlock "q,qdot" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "Fm" SrcPort 1 Points [30, 0] DstBlock "Mux" DstPort 3 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Control Fcn" DstPort 1 } Line { SrcBlock "Control Fcn" SrcPort 1 DstBlock "u" DstPort 1 } } } Block { BlockType Saturate Name "Saturation" Position [215, 80, 245, 110] UpperLimit "10" LowerLimit "-10" } Block { BlockType Outport Name "u" Position [270, 88, 300, 102] IconDisplay "Port number" } Line { SrcBlock "reference" SrcPort 1 Points [65, 0] DstBlock "Controller" DstPort 1 } Line { SrcBlock "q,qdot" SrcPort 1 DstBlock "Controller" DstPort 2 } Line { SrcBlock "Fm" SrcPort 1 Points [65, 0] DstBlock "Controller" DstPort 3 } Line { SrcBlock "Controller" SrcPort 1 DstBlock "Saturation" DstPort 1 } Line { SrcBlock "Saturation" SrcPort 1 DstBlock "u" DstPort 1 } } } Block { BlockType SubSystem Name "External\nForces" Ports [0, 1] Position [35, 250, 75, 310] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "External\nForces" Location [393, 353, 841, 694] 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 Constant Name "Constant1" Position [85, 45, 115, 75] Value "0" } Block { BlockType Constant Name "Constant2" Position [85, 100, 115, 130] } Block { BlockType Constant Name "Constant3" Position [80, 160, 110, 190] Value "0" } Block { BlockType Constant Name "Constant4" Position [80, 215, 110, 245] Value "3" } Block { BlockType Reference Name "Manual Switch" Ports [2, 1] Position [175, 62, 205, 98] SourceBlock "simulink/Signal\nRouting/Manual Switch" SourceType "Manual Switch" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData off RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" sw "0" action "0" varsize off } Block { BlockType Reference Name "Manual Switch1" Ports [2, 1] Position [170, 177, 200, 213] SourceBlock "simulink/Signal\nRouting/Manual Switch" SourceType "Manual Switch" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData off RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" sw "0" action "0" varsize off } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [295, 71, 300, 109] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Outport Name "F" Position [330, 83, 360, 97] IconDisplay "Port number" } Line { SrcBlock "Manual Switch" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "Constant1" SrcPort 1 Points [20, 0; 0, 10] DstBlock "Manual Switch" DstPort 1 } Line { SrcBlock "Constant2" SrcPort 1 Points [20, 0; 0, -25] DstBlock "Manual Switch" DstPort 2 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "F" DstPort 1 } Line { SrcBlock "Manual Switch1" SrcPort 1 Points [40, 0; 0, -95] DstBlock "Mux" DstPort 2 } Line { SrcBlock "Constant3" SrcPort 1 Points [20, 0; 0, 10] DstBlock "Manual Switch1" DstPort 1 } Line { SrcBlock "Constant4" SrcPort 1 Points [20, 0; 0, -30; 20, 0] DstBlock "Manual Switch1" DstPort 2 } } } Block { BlockType SubSystem Name "Robot" Ports [2, 1] Position [290, 65, 330, 140] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "Robot" Location [288, 448, 864, 994] Open on ModelBrowserVisibility off ModelBrowserWidth 212 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "88" Block { BlockType Inport Name "u_a" Position [140, 208, 170, 222] IconDisplay "Port number" } Block { BlockType Inport Name "F" Position [140, 288, 170, 302] Port "2" IconDisplay "Port number" } Block { BlockType MATLABFcn Name "Direct dynamics" Ports [1, 1] Position [245, 215, 305, 245] MATLABFcn "dd_2R" OutputDimensions "2" OutputSignalType "real" Output1D off } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [545, 134, 550, 196] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Mux Name "Mux1" Ports [3, 1] Position [210, 166, 215, 294] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Integrator Name "q" Ports [1, 1] Position [315, 90, 345, 120] InitialCondition "[-pi/2; 0]" } Block { BlockType Integrator Name "qdot" Ports [1, 1] Position [325, 215, 355, 245] InitialCondition "[0; 0]" } Block { BlockType Outport Name "q, qdot" Position [615, 158, 645, 172] IconDisplay "Port number" } Line { SrcBlock "u_a" SrcPort 1 Points [20, 0] DstBlock "Mux1" DstPort 2 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "Direct dynamics" DstPort 1 } Line { SrcBlock "Direct dynamics" SrcPort 1 DstBlock "qdot" DstPort 1 } Line { SrcBlock "qdot" SrcPort 1 Points [0, 0; 0, -50] Branch { DstBlock "Mux" DstPort 2 } Branch { Points [-60, 0] DstBlock "q" DstPort 1 } } Line { SrcBlock "Mux" SrcPort 1 Points [20, 0] Branch { DstBlock "q, qdot" DstPort 1 } Branch { Points [0, -110; -380, 0] DstBlock "Mux1" DstPort 1 } } Line { SrcBlock "F" SrcPort 1 Points [20, 0] DstBlock "Mux1" DstPort 3 } Line { SrcBlock "q" SrcPort 1 Points [165, 0; 0, 45] DstBlock "Mux" DstPort 1 } } } Block { BlockType Scope Name "Scope Q" Ports [1] Position [575, 15, 605, 45] Floating off Location [553, 136, 995, 606] Open off NumInputPorts "1" ZoomMode "yonly" List { ListType AxesTitles axes1 "%" } TimeRange "200" YMin "-2" YMax "2.5" SaveToWorkspace on SaveName "Q_noF" DataFormat "Array" MaxDataPoints "1000" SampleTime "0" } Block { BlockType Scope Name "Scope uc" Ports [1] Position [175, 15, 205, 45] Orientation "up" Floating off Location [6, 60, 418, 437] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } TimeRange "200" YMin "-10" YMax "10" SaveName "ScopeData7" DataFormat "StructureWithTime" MaxDataPoints "500" SampleTime "0" } Block { BlockType ToWorkspace Name "To Workspace" Position [455, 90, 515, 120] VariableName "Q" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace1" Position [390, 250, 450, 280] VariableName "t" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType Selector Name "q1, q2" Ports [1, 1] Position [335, 50, 365, 75] Orientation "up" IndexOptions "Index vector (dialog)" Indices "[1 2]" OutputSizes "1" InputPortWidth "4" } Block { BlockType SubSystem Name "sinusoidal" Ports [0, 1] Position [15, 40, 55, 100] MinAlgLoopOccurrences off RTWSystemCode "Auto" FunctionWithSeparateData off MaskHideContents off System { Name "sinusoidal" Location [620, 82, 997, 634] 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 Constant Name "Constant" Position [55, 15, 85, 45] Value "pi/6" } Block { BlockType Constant Name "Constant1" Position [55, 105, 85, 135] Value "0" } Block { BlockType Mux Name "Mux" Ports [6, 1] Position [210, 127, 215, 203] ShowName off Inputs "6" DisplayOption "bar" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [105, 20, 125, 40] ShowName off IconShape "round" Inputs "|++" } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [105, 110, 125, 130] ShowName off IconShape "round" Inputs "|++" } Block { BlockType Sin Name "q1" Ports [0, 1] Position [15, 45, 45, 75] SineType "Time based" Amplitude "A" Frequency "f" SampleTime "0" } Block { BlockType Sin Name "q2" Ports [0, 1] Position [15, 135, 45, 165] SineType "Time based" Amplitude "A" Frequency "f" SampleTime "0" } Block { BlockType Sin Name "qddot1" Ports [0, 1] Position [30, 320, 60, 350] SineType "Time based" Amplitude "A" Frequency "f" Phase "pi" SampleTime "0" } Block { BlockType Sin Name "qddot2" Ports [0, 1] Position [30, 370, 60, 400] SineType "Time based" Amplitude "A" Frequency "f" Phase "pi" SampleTime "0" } Block { BlockType Sin Name "qdot1" Ports [0, 1] Position [30, 200, 60, 230] SineType "Time based" Amplitude "A" Frequency "f" Phase "pi/2" SampleTime "0" } Block { BlockType Sin Name "qdot2" Ports [0, 1] Position [30, 255, 60, 285] SineType "Time based" Amplitude "A" Frequency "f" Phase "pi/2" SampleTime "0" } Block { BlockType Outport Name "ref" Position [265, 158, 295, 172] IconDisplay "Port number" } Line { SrcBlock "Mux" SrcPort 1 DstBlock "ref" DstPort 1 } Line { SrcBlock "qdot1" SrcPort 1 Points [65, 0; 0, -55] DstBlock "Mux" DstPort 3 } Line { SrcBlock "qdot2" SrcPort 1 Points [80, 0; 0, -100] DstBlock "Mux" DstPort 4 } Line { SrcBlock "qddot1" SrcPort 1 Points [105, 0; 0, -155] DstBlock "Mux" DstPort 5 } Line { SrcBlock "qddot2" SrcPort 1 Points [130, 0] DstBlock "Mux" DstPort 6 } Line { SrcBlock "Constant" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "q1" SrcPort 1 Points [65, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Sum" SrcPort 1 Points [30, 0; 0, 110] DstBlock "Mux" DstPort 1 } Line { SrcBlock "Constant1" SrcPort 1 DstBlock "Sum1" DstPort 1 } Line { SrcBlock "q2" SrcPort 1 Points [65, 0] DstBlock "Sum1" DstPort 2 } Line { SrcBlock "Sum1" SrcPort 1 Points [15, 0; 0, 30] DstBlock "Mux" DstPort 2 } } } Line { SrcBlock "Control" SrcPort 1 Points [0, 0] Branch { DstBlock "Scope uc" DstPort 1 } Branch { DstBlock "Robot" DstPort 1 } } Line { Labels [0, 0] SrcBlock "Robot" SrcPort 1 Points [5, 0] Branch { Points [10, 0] DstBlock "q1, q2" DstPort 1 } Branch { DstBlock "To Workspace" DstPort 1 } Branch { Points [75, 0; 0, 70; -320, 0] DstBlock "Control" DstPort 2 } } Line { SrcBlock "sinusoidal" SrcPort 1 Points [35, 0] DstBlock "Control" DstPort 1 } Line { SrcBlock "External\nForces" SrcPort 1 Points [190, 0] Branch { Points [0, -160] DstBlock "Robot" DstPort 2 } Branch { Points [0, -45; -185, 0; 0, -130] DstBlock "Control" DstPort 3 } } Line { SrcBlock "q1, q2" SrcPort 1 Points [0, -15] DstBlock "Scope Q" DstPort 1 } Line { SrcBlock "Clock" SrcPort 1 DstBlock "To Workspace1" DstPort 1 } Annotation { Position [232, 288] } } }