Model { Name "pid" 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 "Sun Aug 03 22:10:53 2003" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "thwang" ModifiedDateFormat "%" LastModifiedDate "Sun Aug 03 22:56:38 2003" 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 "ode45" SolverMode "Auto" StartTime "0.0" StopTime "10.0" MaxOrder 5 MaxStep "auto" MinStep "auto" MaxNumMinSteps "-1" InitialStep "auto" FixedStep "auto" 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 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 Outport Port "1" OutputWhenDisabled "held" InitialOutput "[]" } 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 SignalGenerator WaveForm "sine" Amplitude "1" Frequency "1" Units "Hertz" VectorParams1D 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 } } 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 "pid" Location [454, 274, 882, 586] 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 "PID" Ports [1, 1] Position [165, 123, 225, 187] TreatAsAtomicUnit off MaskPromptString "Proportional Constant:|Integral Constant:|Deriv" "ative Constant:" MaskStyleString "edit,edit,edit" MaskTunableValueString "on,on,on" MaskCallbackString "||" MaskEnableString "on,on,on" MaskVisibilityString "on,on,on" MaskToolTipString "on,on,on" MaskVarAliasString ",," MaskVariables "P=@1;I=@2;D=@3;" MaskInitialization "plabel=sprintf('P=%1.1f',P);\nilabel=sprintf('I" "=%1.1f',I);\ndlabel=sprintf('D=%1.1f',D);" MaskDisplay "text(0.25,0.7,plabel);\ntext(0.25,0.5,ilabel);" "\ntext(0.25,0.3,dlabel);" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "normalized" MaskValueString "2|0|0" System { Name "PID" Location [444, 294, 854, 566] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" ZoomFactor "100" Block { BlockType Inport Name "In1" Position [25, 130, 55, 144] } Block { BlockType Derivative Name "Derivative" Position [200, 195, 230, 225] } Block { BlockType Gain Name "Gain" Position [110, 45, 140, 75] Gain "P" } Block { BlockType Gain Name "Gain1" Position [110, 120, 140, 150] Gain "I" } Block { BlockType Gain Name "Gain2" Position [110, 195, 140, 225] Gain "D" } Block { BlockType Integrator Name "Integrator" Ports [1, 1] Position [200, 120, 230, 150] } Block { BlockType Sum Name "Sum" Ports [3, 1] Position [310, 25, 330, 245] ShowName off Inputs "+++" InputSameDT off OutDataTypeMode "Inherit via internal rule" } Block { BlockType Outport Name "Out1" Position [355, 130, 385, 144] } Line { SrcBlock "In1" SrcPort 1 Points [0, 0; 15, 0] Branch { Points [0, 75] DstBlock "Gain2" DstPort 1 } Branch { Points [0, -75] DstBlock "Gain" DstPort 1 } Branch { DstBlock "Gain1" DstPort 1 } } Line { SrcBlock "Gain1" SrcPort 1 DstBlock "Integrator" DstPort 1 } Line { SrcBlock "Integrator" SrcPort 1 DstBlock "Sum" DstPort 2 } Line { SrcBlock "Gain" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Gain2" SrcPort 1 DstBlock "Derivative" DstPort 1 } Line { SrcBlock "Derivative" SrcPort 1 DstBlock "Sum" DstPort 3 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Out1" DstPort 1 } } } Block { BlockType Scope Name "Scope" Ports [1] Position [355, 139, 385, 171] Location [188, 365, 512, 604] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } List { ListType SelectedSignals axes1 "" } DataFormat "StructureWithTime" } Block { BlockType SignalGenerator Name "Signal\nGenerator" Position [20, 140, 50, 170] Frequency "0.1" } Line { SrcBlock "PID" SrcPort 1 DstBlock "Scope" DstPort 1 } Line { SrcBlock "Signal\nGenerator" SrcPort 1 DstBlock "PID" DstPort 1 } } }