📄 pid.mdl
字号:
Model {
Name "PID"
Version 4.00
SampleTimeColors off
LibraryLinkDisplay "none"
WideLines off
ShowLineDimensions off
ShowPortDataTypes off
ShowStorageClass off
ExecutionOrder off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovMetricSettings "dw"
CovNameIncrementing off
CovHtmlReporting on
BlockNameDataTip off
BlockParametersDataTip off
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
Created "Sun Oct 27 19:28:12 2002"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "Zervin"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Sat Dec 07 00:57:51 2002"
ModelVersionFormat "1.%<AutoIncrement:7>"
ConfigurationManager "None"
SimParamPage "Solver"
StartTime "0.0"
StopTime "10.0"
SolverMode "Auto"
Solver "ode45"
RelTol "1e-3"
AbsTol "auto"
Refine "1"
MaxStep "auto"
MinStep "auto"
MaxNumMinSteps "-1"
InitialStep "auto"
FixedStep "auto"
MaxOrder 5
OutputOption "RefineOutputTimes"
OutputTimes "[]"
LoadExternalInput off
ExternalInput "[t, u]"
SaveTime on
TimeSaveName "tout"
SaveState off
StateSaveName "xout"
SaveOutput on
OutputSaveName "yout"
LoadInitialState off
InitialState "xInitial"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Array"
LimitDataPoints on
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"
InvalidFcnCallConnMsg "error"
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"
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
OptimizeBlockIOStorage on
BufferReuse on
ParameterPooling on
BlockReductionOpt on
RTWExpressionDepthLimit 5
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 "PID"
Location [252, 107, 763, 457]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "gray"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "More Info"
Ports []
Position [185, 295, 326, 320]
ForegroundColor "red"
BackgroundColor "cyan"
DropShadow on
ShowName off
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskDisplay "disp('Click here more information')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "More Info"
Location [276, 104, 699, 410]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Annotation {
Position [180, 81]
Text "Before starting the simulation of the \nsys"
"tem, the constant parameters of the system \nmust first be supplied to the mo"
"del. "
}
Annotation {
Position [180, 127]
ForegroundColor "red"
Text "Here are the parameters that needs to be sp"
"ecified:"
}
Annotation {
Position [50, 175]
HorizontalAlignment "left"
ForegroundColor "blue"
Text "1.) for the Temp. set point block, the Temp"
"erature set point or the desired \n temperature\n2.) for the PID controll"
"er block, the value of Kp, Ki and Kd\n3.) for the process block, the Temperat"
"ure of the incoming flows, the flowrate \n of the cold water and the volu"
"me of the tank.\n"
}
Annotation {
Position [195, 236]
ForegroundColor "green"
BackgroundColor "black"
Text "The response or the result of the simulatio"
"n can be viewed\nby double-clicking the scope blocks."
}
}
}
Block {
BlockType SubSystem
Name "PID"
Ports [1, 1]
Position [160, 106, 240, 154]
ForegroundColor "blue"
BackgroundColor "yellow"
DropShadow on
AncestorBlock "thesis_lib/PID"
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskType "PID Controller (Zervin's block)"
MaskDescription "This Block is a model of a PID controller"
MaskHelp "Enter a value for Kp, Ki, and Kd."
MaskPromptString "Proportional Gain, Kp|Integral Gain, Ki|Derivat"
"ive Gain, Kd"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVariables "P=@1;I=@2;D=@3;"
MaskDisplay "disp('PID \\n\\n');\ndisp('Controller');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0|0|0"
MaskVariableAliases ",,"
Port {
PortNumber 1
Name "F2"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
}
System {
Name "PID"
Location [265, 156, 690, 363]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 98, 55, 112]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Derivative
Name "Derivative"
Position [225, 150, 255, 180]
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [225, 90, 255, 120]
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "0"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Gain
Name "Kd"
Position [130, 150, 160, 180]
Gain "D"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Gain
Name "Ki"
Position [130, 90, 160, 120]
Gain "I"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Gain
Name "Kp"
Position [130, 25, 160, 55]
Gain "P"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1]
Position [320, 90, 345, 130]
ShowName off
IconShape "rectangular"
Inputs "|+++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Name "Out1"
Position [370, 103, 400, 117]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [20, 0; 0, -40]
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [45, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Kp"
SrcPort 1
Points [140, 0]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Kd"
SrcPort 1
DstBlock "Derivative"
DstPort 1
}
Line {
SrcBlock "Ki"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Ki"
DstPort 1
}
Branch {
Points [0, -65]
DstBlock "Kp"
DstPort 1
}
Branch {
Points [0, 60]
DstBlock "Kd"
DstPort 1
}
}
}
}
Block {
BlockType SubSystem
Name "Process"
Ports [1, 1]
Position [275, 108, 345, 152]
ForegroundColor "red"
DropShadow on
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskType "Process"
MaskDescription "The values for the temperature should be expres"
"sed in either degree Rankine or Kelvin."
MaskPromptString "Temperature of hot water|Temperature of cold wa"
"ter|Flow rate of cold water|Volume of the tank"
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"
MaskVariables "T2=@1;T1=@2;F1=@3;V=@4;"
MaskDisplay "disp('PROCESS')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "473|283|4|6"
MaskVariableAliases ",,,"
Port {
PortNumber 1
Name "Tm"
PropagatedSignals "T3"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
}
System {
Name "Process"
Location [2, 74, 790, 569]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -