📄 mohu.mdl
字号:
SampleTime "-1"
}
Block {
BlockType Inport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
Interpolate on
}
Block {
BlockType Merge
Inputs "2"
InitialOutput "[]"
AllowUnequalInputPortWidths off
InputPortOffsets "[]"
}
Block {
BlockType MinMax
Function "min"
Inputs "1"
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
UseBusObject off
BusObject "BusObject"
NonVirtualBus off
}
Block {
BlockType Outport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Saturate
UpperLimit "0.5"
LowerLimit "-0.5"
LinearizeAsGain on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Scope
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 "-1"
}
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 Switch
Criteria "u2 >= Threshold"
Threshold "0"
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross 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"
}
Block {
BlockType TransportDelay
DelayTime "1"
InitialOutput "0"
BufferSize "1024"
FixedBuffer off
TransDelayFeedthrough off
PadeOrder "0"
}
}
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 "mohu"
Location [529, 208, 1361, 438]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType DeadZone
Name "Dead Zone"
Position [480, 165, 510, 195]
}
Block {
BlockType Derivative
Name "Derivative"
Position [130, 100, 160, 130]
}
Block {
BlockType Reference
Name "Fuzzy Logic \nController"
Ports [1, 1]
Position [245, 71, 305, 119]
SourceBlock "fuzblock/Fuzzy Logic \nController"
SourceType "FIS"
ShowPortLabels on
fis "zdh"
}
Block {
BlockType Gain
Name "Gain"
Position [180, 100, 210, 130]
Gain "0.5"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain1"
Position [150, 55, 180, 85]
Gain "1.7"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain2"
Position [335, 80, 365, 110]
Gain "0.171"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [225, 49, 230, 136]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [680, 14, 690, 121]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Saturate
Name "Saturation"
Position [565, 165, 595, 195]
UpperLimit "0.6"
LowerLimit "-0.6"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [715, 54, 745, 86]
Floating off
Location [647, 450, 986, 742]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "0"
YMax "1.5"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [145, 154, 175, 186]
Floating off
Location [297, 449, 641, 748]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "-1.2"
YMax "0.2"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope2"
Ports [1]
Position [380, 134, 410, 166]
Floating off
Location [991, 449, 1332, 747]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "0"
YMax "6"
SaveName "ScopeData2"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Step
Name "Step"
Position [15, 55, 45, 85]
Time "0"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [80, 60, 100, 80]
ShowName off
IconShape "round"
Inputs "|-+"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [715, 115, 750, 145]
VariableName "c"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn"
Position [465, 77, 525, 113]
Numerator "[5]"
Denominator "[1 1]"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn1"
Position [545, 77, 605, 113]
Denominator "[1 2 3]"
}
Block {
BlockType TransportDelay
Name "Transport\nDelay"
Position [625, 80, 655, 110]
DelayTime "1.5"
}
Line {
SrcBlock "Derivative"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Step"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, -30]
DstBlock "Mux1"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
Points [0, 0]
Branch {
DstBlock "Gain1"
DstPort 1
}
Branch {
DstBlock "Derivative"
DstPort 1
}
}
Branch {
Points [0, 100]
DstBlock "Scope1"
DstPort 1
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Fuzzy Logic \nController"
DstPort 1
}
Line {
SrcBlock "Fuzzy Logic \nController"
SrcPort 1
Points [0, 0; 25, 0]
Branch {
DstBlock "Gain2"
DstPort 1
}
Branch {
Points [-20, 0; 0, 55]
DstBlock "Scope2"
DstPort 1
}
}
Line {
SrcBlock "Transfer Fcn"
SrcPort 1
DstBlock "Transfer Fcn1"
DstPort 1
}
Line {
SrcBlock "Transport\nDelay"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
Points [0, 110; -575, 0]
DstBlock "Sum"
DstPort 2
}
Branch {
DstBlock "Mux1"
DstPort 2
}
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Mux1"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
DstBlock "Scope"
DstPort 1
}
Branch {
DstBlock "To Workspace2"
DstPort 1
}
}
Line {
SrcBlock "Transfer Fcn1"
SrcPort 1
DstBlock "Transport\nDelay"
DstPort 1
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Transfer Fcn"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -