📄 logic9pid.mdl
字号:
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType Step
Time "1"
Before "0"
After "1"
SampleTime "-1"
VectorParams1D on
ZeroCross on
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
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 "logic9PID"
Location [2, 78, 1022, 717]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [675, 120, 680, 180]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType SubSystem
Name "NineState"
Ports [2, 1]
Position [385, 297, 480, 368]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "NineState"
Location [268, 234, 713, 420]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "ref"
Position [25, 33, 55, 47]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "feedback"
Position [30, 98, 60, 112]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Derivative
Name "Derivative"
Position [205, 70, 235, 100]
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [270, 28, 275, 77]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [1, 1]
Position [305, 40, 365, 70]
FunctionName "NineState"
Parameters "0.01,0.01"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [115, 30, 135, 50]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Out1"
Position [390, 48, 420, 62]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [0, 0; 40, 0]
Branch {
Points [0, 45]
DstBlock "Derivative"
DstPort 1
}
Branch {
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "S-Function"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [0, -20]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "S-Function"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "ref"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "feedback"
SrcPort 1
Points [60, 0]
DstBlock "Sum1"
DstPort 2
}
Annotation {
Name "\n"
Position [287, 164]
UseDisplayTextAsClickCallback off
}
}
}
Block {
BlockType SubSystem
Name "PID"
Ports [1, 1]
Position [220, 45, 290, 85]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "PID"
Location [2, 82, 1014, 721]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [195, 153, 225, 167]
IconDisplay "Port number"
}
Block {
BlockType Derivative
Name "Derivative"
Position [350, 210, 380, 240]
}
Block {
BlockType Gain
Name "Gain"
Position [270, 78, 305, 112]
Gain "4"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain2"
Position [270, 208, 305, 242]
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1]
Position [500, 131, 555, 179]
ShowName off
Inputs "|+++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType TransferFcn
Name "Transfer Fcn1"
Position [275, 142, 335, 178]
Numerator "[2]"
Denominator "[4.56534 0]"
}
Block {
BlockType Outport
Name "Out1"
Position [580, 148, 610, 162]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [135, 0; 0, 55]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Transfer Fcn1"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [45, 0; 0, -55]
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Derivative"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [15, 0]
Branch {
Points [0, 65]
DstBlock "Gain2"
DstPort 1
}
Branch {
Points [0, -65]
DstBlock "Gain"
DstPort 1
}
Branch {
DstBlock "Transfer Fcn1"
DstPort 1
}
}
}
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [770, 134, 800, 166]
Floating off
Location [326, 613, 823, 1017]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "20"
YMin "0"
YMax "1.4"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [530, 234, 560, 266]
Floating off
Location [105, 147, 903, 762]
Open off
NumInputPorts "1"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "10"
YMin "0"
YMax "1.4"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Step
Name "Step"
Position [95, 265, 125, 295]
Time "0"
SampleTime "0.1"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [180, 55, 200, 75]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [720, 40, 780, 70]
VariableName "simout2"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Structure With Time"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn"
Position [320, 47, 380, 83]
Numerator "[3]"
Denominator "[2 3 4 ]"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn1"
Position [555, 317, 615, 353]
Numerator "[3]"
Denominator "[2 3 4 ]"
}
Line {
SrcBlock "Transfer Fcn"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
Points [0, 65; -205, 0]
DstBlock "Sum"
DstPort 2
}
Branch {
Points [40, 0; 0, 70]
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "PID"
DstPort 1
}
Line {
SrcBlock "PID"
SrcPort 1
Points [0, 0]
DstBlock "Transfer Fcn"
DstPort 1
}
Line {
SrcBlock "Step"
SrcPort 1
Points [35, 0]
Branch {
Points [135, 0; 0, 35]
DstBlock "NineState"
DstPort 1
}
Branch {
DstBlock "Sum"
DstPort 1
}
}
Line {
SrcBlock "NineState"
SrcPort 1
Points [0, 0; 30, 0]
Branch {
DstBlock "Transfer Fcn1"
DstPort 1
}
Branch {
DstBlock "Scope1"
DstPort 1
}
}
Line {
SrcBlock "Transfer Fcn1"
SrcPort 1
Points [0, 0; 20, 0]
Branch {
Points [0, 95; -360, 0; 0, -80]
DstBlock "NineState"
DstPort 2
}
Branch {
Points [0, -170]
DstBlock "Mux"
DstPort 2
}
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [25, 0]
Branch {
Points [-5, 0]
DstBlock "To Workspace2"
DstPort 1
}
Branch {
DstBlock "Scope"
DstPort 1
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -