📄 disturb.mdl
字号:
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 "disturb"
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 [760, 210, 765, 270]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType SubSystem
Name "NineState"
Ports [2, 1]
Position [470, 387, 565, 458]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "NineState"
Location [268, 234, 713, 420]
Open off
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 [305, 135, 375, 175]
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 [855, 224, 885, 256]
Floating off
Location [1, 52, 1017, 729]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "20"
YMin "0"
YMax "1.4"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Step
Name "Step"
Position [180, 355, 210, 385]
Time "0"
SampleTime "0.1"
}
Block {
BlockType Step
Name "Step1"
Position [415, 235, 445, 265]
Time "5"
After "5"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [265, 145, 285, 165]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [455, 145, 475, 165]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [600, 415, 620, 435]
NamePlacement "alternate"
ShowName off
IconShape "round"
Inputs "++|"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [805, 130, 865, 160]
VariableName "simout"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Structure With Time"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn"
Position [540, 137, 600, 173]
Numerator "[3]"
Denominator "[2 3 4 ]"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn1"
Position [640, 407, 700, 443]
Numerator "[3]"
Denominator "[2 3 4 ]"
}
Line {
SrcBlock "Transfer Fcn"
SrcPort 1
Points [120, 0; 0, 65]
Branch {
Points [0, 5]
DstBlock "Mux"
DstPort 1
}
Branch {
Points [0, -5; -75, 0; 0, 70; -375, 0]
DstBlock "Sum"
DstPort 2
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "PID"
DstPort 1
}
Line {
SrcBlock "Step"
SrcPort 1
Points [0, 0; 35, 0]
Branch {
Points [135, 0; 0, 35]
DstBlock "NineState"
DstPort 1
}
Branch {
DstBlock "Sum"
DstPort 1
}
}
Line {
SrcBlock "NineState"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
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 [0, 0; 25, 0]
Branch {
Points [-5, 0]
DstBlock "To Workspace2"
DstPort 1
}
Branch {
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "PID"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Transfer Fcn"
DstPort 1
}
Line {
SrcBlock "Step1"
SrcPort 1
Points [15, 0; 0, -5]
Branch {
DstBlock "Sum1"
DstPort 2
}
Branch {
Points [145, 0]
DstBlock "Sum2"
DstPort 1
}
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Transfer Fcn1"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -