Model { Name "PID_joint_lab" Version 6.3 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.108" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "windows-1252" 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 RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off CovReportOnPause 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 "Wed Jul 30 14:07:26 2008" Creator "pavlict" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "tpavlic" ModifiedDateFormat "%" LastModifiedDate "Fri Aug 8 12:36:23 2008" ModelVersionFormat "1.%" ConfigurationManager "None" LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" TryForcingSFcnDF off 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 StrictBusMsg "Warning" ProdHWDeviceType "32-bit Generic" ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off Array { Type "Handle" Dimension 1 Simulink.ConfigSet { $ObjectID 1 Version "1.1.0" Array { Type "Handle" Dimension 7 Simulink.SolverCC { $ObjectID 2 Version "1.1.0" StartTime "0.0" StopTime "3" AbsTol "auto" FixedStep "0.001" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "auto" MinStep "auto" RelTol "1e-3" SolverMode "Auto" Solver "ode5" SolverName "ode5" ZeroCrossControl "UseLocalSettings" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" RateTranMode "Deterministic" } Simulink.DataIOCC { $ObjectID 3 Version "1.1.0" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints off MaxDataPoints "1000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveFormat "Array" SaveOutput off SaveState off SignalLogging off InspectSignalLogs off SaveTime off StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "logsout" OutputOption "RefineOutputTimes" OutputTimes "[]" Refine "1" } Simulink.OptimizationCC { $ObjectID 4 Array { Type "Cell" Dimension 5 Cell "ZeroExternalMemoryAtStartup" Cell "ZeroInternalMemoryAtStartup" Cell "InitFltsAndDblsToZero" Cell "OptimizeModelRefInitCode" Cell "NoFixptDivByZeroProtection" PropName "DisabledProps" } Version "1.1.0" BlockReduction off BooleanDataType off ConditionallyExecuteInputs off InlineParams off InlineInvariantSignals off OptimizeBlockIOStorage off BufferReuse off EnforceIntegerDowncast on ExpressionFolding off FoldNonRolledExpr on LocalBlockOutputs off ParameterPooling on 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.1.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 "UseLocalSettings" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" SolverPrmCheckMsg "warning" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskDSMMsg "error" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" TasksWithSamePriorityMsg "warning" SigSpecEnsureSampleTimeMsg "warning" CheckMatrixSingularityMsg "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "error" ParameterOverflowMsg "error" ParameterUnderflowMsg "none" ParameterPrecisionLossMsg "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" } Simulink.HardwareCC { $ObjectID 6 Version "1.1.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 off ProdEqTarget on } Simulink.ModelReferenceCC { $ObjectID 7 Version "1.1.0" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" ModelReferenceNumInstancesAllowed "Multi" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 8 Array { Type "Cell" Dimension 1 Cell "IncludeHyperlinkInReport" PropName "DisabledProps" } Version "1.1.0" SystemTargetFile "grt.tlc" GenCodeOnly off MakeCommand "make_rtw" 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" Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 9 Array { Type "Cell" Dimension 16 Cell "IgnoreCustomStorageClasses" Cell "InsertBlockDesc" Cell "SFDataObjDesc" Cell "SimulinkDataObjDesc" Cell "DefineNamingRule" Cell "SignalNamingRule" Cell "ParamNamingRule" Cell "InlinedPrmAccess" Cell "CustomSymbolStr" Cell "CustomSymbolStrGlobalVar" Cell "CustomSymbolStrType" Cell "CustomSymbolStrField" Cell "CustomSymbolStrFcn" Cell "CustomSymbolStrBlkIO" Cell "CustomSymbolStrTmpVar" Cell "CustomSymbolStrMacro" PropName "DisabledProps" } Version "1.1.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 CustomSymbolStr "$R$N$M" MangleLength 1 DefineNamingRule "None" ParamNamingRule "None" SignalNamingRule "None" InsertBlockDesc off SimulinkBlockComments on EnableCustomComments off InlinedPrmAccess "Literals" ReqsInCode off } Simulink.GRTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 10 Array { Type "Cell" Dimension 15 Cell "IncludeMdlTerminateFcn" Cell "CombineOutputUpdateFcns" Cell "SuppressErrorStatus" Cell "ERTCustomFileBanners" Cell "GenerateSampleERTMain" Cell "GenerateTestInterfaces" Cell "ModelStepFunctionPrototypeControlComp" "liant" Cell "MultiInstanceERTCode" Cell "PurelyIntegerCode" Cell "SupportNonFinite" Cell "SupportComplex" Cell "SupportAbsoluteTime" Cell "SupportContinuousTime" Cell "SupportNonInlinedSFcns" Cell "PortableWordSizes" PropName "DisabledProps" } Version "1.1.0" TargetFcnLib "ansi_tfl_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" GenFloatMathFcnCalls "ANSI_C" UtilityFuncGeneration "Auto" GenerateFullHeader on GenerateSampleERTMain off IsPILTarget off ModelReferenceCompliant on IncludeMdlTerminateFcn on CombineOutputUpdateFcns off SuppressErrorStatus off IncludeFileDelimiter "Auto" ERTCustomFileBanners off SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging on MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime on SupportNonInlinedSFcns on ExtMode off ExtModeStaticAlloc off ExtModeTesting off ExtModeStaticAllocSize 1000000 ExtModeTransport 0 ExtModeMexFile "ext_comm" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates off GenerateASAP2 off } PropName "Components" } } PropName "Components" } Name "Configuration" SimulationMode "normal" CurrentDlgPage "Solver" } PropName "ConfigurationSets" } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" $ObjectID 1 } BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Arial" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } BlockParameterDefaults { Block { BlockType Clock DisplayTime off } Block { BlockType DeadZone LowerValue "-0.5" UpperValue "0.5" SaturateOnIntegerOverflow on LinearizeAsGain on ZeroCross on SampleTime "-1" } Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" 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 SampleTime "-1" } 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 } Block { BlockType Quantizer QuantizationInterval "0.5" LinearizeAsGain on SampleTime "-1" } Block { BlockType RateLimiter RisingSlewLimit "1" FallingSlewLimit "-1" SampleTimeMode "continuous" InitialCondition "0" LinearizeAsGain on } 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 Step Time "1" Before "0" After "1" SampleTime "-1" VectorParams1D on ZeroCross on } Block { BlockType Sum IconShape "rectangular" Inputs "++" InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType ToWorkspace VariableName "simulink_output" MaxDataPoints "1000" Decimation "1" SampleTime "0" FixptAsFi off } 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 "Arial" FontSize 10 FontWeight "normal" FontAngle "normal" } LineDefaults { FontName "Arial" FontSize 9 FontWeight "normal" FontAngle "normal" } System { Name "PID_joint_lab" Location [1474, 53, 2601, 839] Open on ModelBrowserVisibility off ModelBrowserWidth 212 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" ReportName "simulink-default.rpt" Block { BlockType RateLimiter Name "+/- 1000 rad/s\nSlew Rate" Position [60, 470, 90, 500] NamePlacement "alternate" RisingSlewLimit "1000" FallingSlewLimit "-1000" SampleTimeMode "inherited" Port { PortNumber 1 Name "r_lab" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Saturate Name "+/- 5V\nSaturation" Position [515, 495, 545, 525] NamePlacement "alternate" UpperLimit "5" LowerLimit "-5" } Block { BlockType Sum Name "Add2" Ports [3, 1] Position [475, 413, 495, 607] ShowName off Inputs "+|+|-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutScaling "2^-10" SaturateOnIntegerOverflow off } Block { BlockType Clock Name "Clock" Position [45, 575, 65, 595] Orientation "down" NamePlacement "alternate" ShowName off Decimation "10" } Block { BlockType Quantizer Name "DAC" Position [560, 495, 590, 525] QuantizationInterval "2*10/2^16" Port { PortNumber 1 Name "u_lab" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType TransferFcn Name "Derivative Filter\n(a = 200)" Position [395, 570, 455, 610] Numerator "[1 0]" Denominator "[(1/200) 1]" } Block { BlockType Quantizer Name "Encoder 1" Position [920, 330, 950, 360] QuantizationInterval "2*pi/1024" Port { PortNumber 1 Name "theta_q" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Quantizer Name "Encoder 2" Position [920, 530, 950, 560] QuantizationInterval "2*pi/1024" Port { PortNumber 1 Name "alpha_q" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Integrator Name "Integrator" Ports [1, 1] Position [410, 495, 440, 525] IgnoreLimit off } Block { BlockType Gain Name "Kd2" Position [345, 575, 375, 605] ShowName off Gain "Kd" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Kp1" Position [345, 495, 375, 525] ShowName off Gain "Ki" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Kp2" Position [345, 415, 375, 445] ShowName off Gain "Kp" ParameterDataTypeMode "Inherit via internal rule" OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType DeadZone Name "Static\nFriction" Position [625, 495, 655, 525] LowerValue "-0.1" UpperValue "0.1" Port { PortNumber 1 Name "vin" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Step Name "Step" Position [15, 470, 45, 500] Time "0" SampleTime "0" Port { PortNumber 1 Name "r" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [885, 435, 905, 455] ShowName off IconShape "round" Inputs "+|+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum4" Ports [2, 1] Position [205, 475, 225, 495] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "e_lab" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Sum Name "Sum5" Ports [2, 1] Position [1060, 440, 1080, 460] ShowName off IconShape "round" Inputs "+|+" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "total_q" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType ToWorkspace Name "To Workspace1" Position [36, 615, 74, 650] Orientation "down" NamePlacement "alternate" ShowName off FontSize 14 VariableName "t_lab" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace14" Position [265, 346, 315, 374] ShowName off FontSize 14 VariableName "e_lab" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace15" Position [625, 356, 675, 384] ShowName off FontSize 14 VariableName "u_lab" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace16" Position [950, 409, 1035, 431] ShowName off FontSize 14 VariableName "total_lab" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace2" Position [808, 610, 882, 635] Orientation "down" NamePlacement "alternate" ShowName off FontSize 14 VariableName "alpha_lab" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace3" Position [121, 405, 169, 425] Orientation "up" ShowName off FontSize 14 VariableName "r_lab" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType Scope Name "alpha_lab" Ports [1] Position [919, 605, 951, 635] Orientation "down" Floating off Location [184, 340, 516, 633] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-0.4" YMax "0.4" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "e_lab" Ports [1] Position [265, 389, 295, 421] Floating off Location [184, 340, 516, 633] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-0.4" YMax "1" SaveName "ScopeData13" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "r_lab" Ports [1] Position [129, 530, 161, 560] Orientation "down" NamePlacement "alternate" Floating off Location [188, 390, 512, 629] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "2" SaveName "ScopeData2" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "total_lab" Ports [1] Position [975, 444, 1005, 476] Floating off Location [40, 236, 364, 475] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "0" YMax "1.4" SaveName "ScopeData15" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType Scope Name "u_lab" Ports [1] Position [635, 399, 665, 431] Floating off Location [184, 340, 516, 633] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "-2" SaveName "ScopeData14" DataFormat "StructureWithTime" LimitDataPoints off SampleTime "0" } Block { BlockType TransferFcn Name "vin to alpha" Position [715, 526, 810, 564] Numerator "Alpha" Denominator "Vin" Port { PortNumber 1 Name "alpha_lab" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType TransferFcn Name "vin to theta" Position [715, 326, 810, 364] Numerator "Theta" Denominator "Vin" Port { PortNumber 1 Name "theta" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Line { SrcBlock "Clock" SrcPort 1 DstBlock "To Workspace1" DstPort 1 } Line { Name "r" SrcBlock "Step" SrcPort 1 DstBlock "+/- 1000 rad/s\nSlew Rate" DstPort 1 } Line { Name "r_lab" SrcBlock "+/- 1000 rad/s\nSlew Rate" SrcPort 1 Points [50, 0] Branch { DstBlock "r_lab" DstPort 1 } Branch { DstBlock "To Workspace3" DstPort 1 } Branch { Labels [1, 0] DstBlock "Sum4" DstPort 1 } } Line { Name "e_lab" Labels [0, 0] SrcBlock "Sum4" SrcPort 1 Points [0, 0; 10, 0] Branch { Points [0, -80] Branch { Points [0, -45] DstBlock "To Workspace14" DstPort 1 } Branch { DstBlock "e_lab" DstPort 1 } } Branch { Points [75, 0] Branch { Points [0, -55] DstBlock "Kp2" DstPort 1 } Branch { Points [0, 25] DstBlock "Kp1" DstPort 1 } } } Line { SrcBlock "Kp2" SrcPort 1 Points [80, 0] DstBlock "Add2" DstPort 1 } Line { SrcBlock "Add2" SrcPort 1 DstBlock "+/- 5V\nSaturation" DstPort 1 } Line { SrcBlock "+/- 5V\nSaturation" SrcPort 1 DstBlock "DAC" DstPort 1 } Line { SrcBlock "Kd2" SrcPort 1 DstBlock "Derivative Filter\n(a = 200)" DstPort 1 } Line { Name "u_lab" Labels [0, 0] SrcBlock "DAC" SrcPort 1 Points [0, 0; 10, 0] Branch { Points [0, -95] Branch { DstBlock "u_lab" DstPort 1 } Branch { Points [0, -45] DstBlock "To Workspace15" DstPort 1 } } Branch { DstBlock "Static\nFriction" DstPort 1 } } Line { Name "theta" Labels [0, 0] SrcBlock "vin to theta" SrcPort 1 Points [0, 0; 80, 0] Branch { DstBlock "Encoder 1" DstPort 1 } Branch { DstBlock "Sum1" DstPort 1 } } Line { Name "alpha_lab" Labels [0, 0] SrcBlock "vin to alpha" SrcPort 1 Points [0, 0; 80, 0] Branch { DstBlock "Sum1" DstPort 2 } Branch { Points [0, 45] Branch { Points [-50, 0] DstBlock "To Workspace2" DstPort 1 } Branch { DstBlock "alpha_lab" DstPort 1 } } Branch { DstBlock "Encoder 2" DstPort 1 } } Line { Name "vin" Labels [2, 0] SrcBlock "Static\nFriction" SrcPort 1 Points [0, 0; 25, 0] Branch { Points [0, -165] DstBlock "vin to theta" DstPort 1 } Branch { Points [0, 35] DstBlock "vin to alpha" DstPort 1 } } Line { Name "theta_q" Labels [0, 0] SrcBlock "Encoder 1" SrcPort 1 Points [115, 0] DstBlock "Sum5" DstPort 1 } Line { Name "alpha_q" Labels [0, 0] SrcBlock "Encoder 2" SrcPort 1 Points [115, 0] DstBlock "Sum5" DstPort 2 } Line { Name "total_q" Labels [2, 0] SrcBlock "Sum5" SrcPort 1 Points [0, 200; -870, 0; 0, -60] Branch { DstBlock "Sum4" DstPort 2 } Branch { DstBlock "Kd2" DstPort 1 } } Line { SrcBlock "Sum1" SrcPort 1 Points [0, 0; 25, 0] Branch { Points [0, 15] DstBlock "total_lab" DstPort 1 } Branch { DstBlock "To Workspace16" DstPort 1 } } Line { SrcBlock "Derivative Filter\n(a = 200)" SrcPort 1 DstBlock "Add2" DstPort 3 } Line { SrcBlock "Kp1" SrcPort 1 Points [15, 0] DstBlock "Integrator" DstPort 1 } Line { SrcBlock "Integrator" SrcPort 1 Points [15, 0] DstBlock "Add2" DstPort 2 } Annotation { Name "In the lab, we \n\"differentiate\"\nthe output " "rather \nthan the error." Position [263, 557] BackgroundColor "green" DropShadow on UseDisplayTextAsClickCallback off } Annotation { Name "THIS MODEL ASSUMES YOUR TRANSFER FUNCTIONS ALL " "HAVE\nTHE SAME DENOMINATOR POLYNOMIALS! \n\n(note: if you want, you can modif" "y the model, but all of your transfer functions \n*should* have the same pole" "s)\n\nBefore running this model, set these variables in your base workspace:" "\n\n Vin = [ vector of s-domain denominator coefficients ]\n Theta = [ " "vector of s-domain numerator coefficients for Theta/Vin ]\n Alpha = [ vect" "or of s-domain numerator coefficients for Alpha/Vin ] \n\n Kp = Proportion" "al/Potential PID coefficient\n Ki = Integral PID coefficient (initially ze" "ro)\n Kd = Derivative/Damping PID coefficient (initially VERY low)\n\nAfte" "r setting these in your base workspace, run the model and plot the results. " Position [13, 159] HorizontalAlignment "left" BackgroundColor "lightBlue" DropShadow on UseDisplayTextAsClickCallback off FontSize 16 } Annotation { Name "Copyright (c) 2008 by Theodore P. Pavlic\n\nThi" "s work is licensed under the Creative Commons Attribution-Noncommercial 3.0 U" "nited States License.\nTo view a copy of this license, visit http://creativec" "ommons.org/licenses/by-nc/3.0/us/ or send a\nletter to Creative Commons, 171 " "Second Street, Suite 300, San Francisco, California, 94105, USA." Position [537, 720] BackgroundColor "gray" DropShadow on UseDisplayTextAsClickCallback off } Annotation { Name "The output is the total deflection: \n\nMotor d" "eflection angle (theta)\n+\nArm deflection angle (alpha)" Position [785, 441] ForegroundColor "cyan" BackgroundColor "black" DropShadow on UseDisplayTextAsClickCallback off FontSize 12 } Annotation { Position [280, 435] UseDisplayTextAsClickCallback off } Annotation { Name "Quick changes in output\n(i.e., oscillations)\n" "result in immediate subtraction\nfrom control. Derivative control uses\na fas" "t control response for damping." Position [584, 600] BackgroundColor "green" DropShadow on UseDisplayTextAsClickCallback off } } }