📄 chap9_4.mdl
字号:
Model {
Name "chap9_4"
Version 3.00
SimParamPage "Solver"
SampleTimeColors off
InvariantConstants off
WideVectorLines off
ShowLineWidths off
ShowPortDataTypes off
StartTime "0.0"
StopTime "3"
SolverMode "Auto"
Solver "ode45"
RelTol "1e-3"
AbsTol "auto"
Refine "1"
MaxStep "auto"
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 "Matrix"
LimitMaxRows off
MaxRows "1000"
Decimation "1"
AlgebraicLoopMsg "warning"
MinStepSizeMsg "warning"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
InheritedTsInSrcMsg "warning"
IntegerOverflowMsg "warning"
UnnecessaryDatatypeConvMsg "none"
Int32ToFloatConvMsg "warning"
SignalLabelMismatchMsg "none"
ConsistencyChecking "off"
ZeroCross on
SimulationMode "normal"
BlockDataTips on
BlockParametersDataTip on
BlockAttributesDataTip off
BlockPortWidthsDataTip off
BlockDescriptionStringDataTip off
BlockMaskParametersDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
OptimizeBlockIOStorage on
BufferReuse on
BooleanDataType off
RTWSystemTargetFile "grt.tlc"
RTWInlineParameters off
RTWRetainRTWFile off
RTWTemplateMakefile "grt_default_tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "oneshot"
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 off
Created "Sun Sep 03 10:58:19 2000"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "Administrator"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Mon Jun 28 14:36:42 2004"
ModelVersionFormat "1.%<AutoIncrement:233>"
ConfigurationManager "none"
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 "chap9_4"
Location [-5, 76, 791, 557]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
ReportName "simulink-default.rpt"
Block {
BlockType Clock
Name "Clock"
Position [160, 365, 180, 385]
DisplayTime off
Decimation "10"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 3, 0, 0, 0]
Position [460, 122, 500, 178]
ShowName off
Outputs "3"
}
Block {
BlockType Derivative
Name "Derivative"
Position [295, 305, 325, 335]
}
Block {
BlockType Derivative
Name "Derivative1"
Position [285, 75, 315, 105]
Orientation "left"
}
Block {
BlockType Derivative
Name "Derivative2"
Position [370, 75, 400, 105]
Orientation "left"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1, 0, 0, 0]
Position [590, 102, 625, 138]
Inputs "2"
DisplayOption "none"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1, 0, 0, 0]
Position [585, 292, 620, 328]
Inputs "2"
DisplayOption "none"
}
Block {
BlockType Mux
Name "Mux2"
Ports [2, 1, 0, 0, 0]
Position [285, 132, 320, 168]
Inputs "2"
DisplayOption "none"
}
Block {
BlockType Mux
Name "Mux3"
Ports [2, 1, 0, 0, 0]
Position [585, 217, 620, 253]
Inputs "2"
DisplayOption "none"
}
Block {
BlockType SubSystem
Name "PID \nController1"
Ports [1, 1, 0, 0, 0]
Position [220, 144, 260, 176]
ShowPortLabels off
MaskType "PID Controller"
MaskDescription "Enter expressions for proportional, integral, a"
"nd derivative terms.\nP+I/s+Ds"
MaskHelp "This block implements a PID controller where pa"
"rameters are entered for the Proportional, Integral and Derivative terms. Unm"
"ask this block to see how it works. The derivative term is implemented using "
"a true derivative block."
MaskPromptString "Proportional:|Integral|Derivative:"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskInitialization "P=@1; I=@2; D=@3;"
MaskDisplay "disp('PID')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "200|0|40"
System {
Name "PID \nController1"
Location [10, 74, 372, 318]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Inport
Name "In_1"
Position [25, 65, 45, 85]
Port "1"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType Gain
Name "D"
Position [95, 129, 115, 151]
Gain "D"
SaturateOnIntegerOverflow on
}
Block {
BlockType Derivative
Name "Derivative"
Position [150, 128, 190, 152]
}
Block {
BlockType TransferFcn
Name "Integral"
Position [110, 57, 145, 93]
Numerator "[I]"
Denominator "[1 0]"
}
Block {
BlockType Gain
Name "Proportional"
Position [120, 13, 140, 37]
Gain "P"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1, 0, 0, 0]
Position [245, 57, 265, 93]
IconShape "rectangular"
Inputs "+++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Name "Out_1"
Position [290, 65, 310, 85]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "D"
SrcPort 1
DstBlock "Derivative"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Out_1"
DstPort 1
}
Line {
SrcBlock "In_1"
SrcPort 1
Points [15, 0]
Branch {
Points [0, 65]
DstBlock "D"
DstPort 1
}
Branch {
Points [15, 0]
Branch {
Points [0, -50]
DstBlock "Proportional"
DstPort 1
}
Branch {
DstBlock "Integral"
DstPort 1
}
}
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [20, 0; 0, -55]
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "Integral"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Proportional"
SrcPort 1
Points [65, 0; 0, 40]
DstBlock "Sum"
DstPort 1
}
}
}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [1, 1, 0, 0, 0]
Position [350, 134, 435, 166]
FunctionName "chap9_4plant"
PortCounts "[]"
SFunctionModules "''"
}
Block {
BlockType SignalGenerator
Name "Signal\nGenerator"
Position [100, 135, 130, 165]
WaveForm "sine"
Amplitude "0.1"
Frequency "1"
Units "Hertz"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1, 0, 0, 0]
Position [175, 142, 205, 173]
IconShape "rectangular"
Inputs "+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [240, 363, 295, 387]
VariableName "t"
Buffer "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Matrix"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [655, 109, 685, 131]
VariableName "y"
Buffer "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Matrix"
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [650, 224, 680, 246]
VariableName "Ff"
Buffer "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Matrix"
}
Block {
BlockType ToWorkspace
Name "To Workspace3"
Position [650, 299, 680, 321]
VariableName "dy"
Buffer "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Matrix"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "PID \nController1"
DstPort 1
}
Line {
SrcBlock "S-Function"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "To Workspace1"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "Mux"
DstPort 2
}
Branch {
Points [0, 80; -380, 0]
DstBlock "Sum"
DstPort 2
}
Branch {
Points [0, -40]
DstBlock "Derivative2"
DstPort 1
}
}
Line {
SrcBlock "Mux2"
SrcPort 1
DstBlock "S-Function"
DstPort 1
}
Line {
SrcBlock "PID \nController1"
SrcPort 1
DstBlock "Mux2"
DstPort 2
}
Line {
SrcBlock "Derivative1"
SrcPort 1
Points [-15, 0; 0, 50]
DstBlock "Mux2"
DstPort 1
}
Line {
SrcBlock "Derivative2"
SrcPort 1
DstBlock "Derivative1"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [10, 0; 0, 75]
DstBlock "Mux3"
DstPort 2
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [55, 0; 0, 75]
Branch {
Points [0, 75]
DstBlock "Mux1"
DstPort 1
}
Branch {
DstBlock "Mux3"
DstPort 1
}
}
Line {
SrcBlock "Mux3"
SrcPort 1
DstBlock "To Workspace2"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "To Workspace3"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "Signal\nGenerator"
SrcPort 1
Points [10, 0]
Branch {
Points [0, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, -110; 430, 0]
DstBlock "Mux"
DstPort 1
}
}
Branch {
Points [0, 170]
DstBlock "Derivative"
DstPort 1
}
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "To Workspace"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -