📄 fuzzymodel.mdl
字号:
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
IgnoreLimit off
ZeroCross on
}
Block {
BlockType Merge
Inputs "2"
InitialOutput "[]"
AllowUnequalInputPortWidths off
InputPortOffsets "[]"
}
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 TransferFcn
Numerator "[1]"
Denominator "[1 2 1]"
AbsoluteTolerance "auto"
Realization "auto"
}
}
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 "zuoye"
Location [-1, 100, 1267, 763]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Sum
Name "Add"
Ports [3, 1]
Position [505, 126, 540, 224]
Inputs "+++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 3]
Position [335, 308, 355, 362]
BackgroundColor "black"
ShowName off
Outputs "3"
DisplayOption "bar"
}
Block {
BlockType Derivative
Name "Derivative"
Position [220, 220, 250, 250]
}
Block {
BlockType Derivative
Name "Derivative1"
Position [120, 345, 150, 375]
}
Block {
BlockType Reference
Name "Fuzzy Logic \nController"
Ports [1, 1]
Position [260, 311, 320, 359]
FontName "Arial"
SourceBlock "fuzblock/Fuzzy Logic \nController"
SourceType "FIS"
ShowPortLabels on
fis "ZUOYE"
}
Block {
BlockType Gain
Name "Gain"
Position [160, 160, 190, 190]
Gain "2"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain1"
Position [160, 220, 190, 250]
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain2"
Position [160, 105, 190, 135]
Gain "3"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain3"
Position [165, 290, 195, 320]
Gain "0.1"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain4"
Position [165, 345, 195, 375]
Gain "0.1"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [225, 160, 255, 190]
IgnoreLimit off
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [220, 306, 240, 364]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [400, 172, 430, 203]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [410, 232, 440, 263]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product2"
Ports [2, 1]
Position [390, 112, 420, 143]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Saturate
Name "Saturation"
Position [595, 160, 625, 190]
UpperLimit "10"
LowerLimit "-10"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [835, 159, 865, 191]
Floating off
Location [5, 57, 1276, 765]
Open off
NumInputPorts "1"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Step
Name "Step"
Position [15, 160, 45, 190]
Time "0"
After "10"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [65, 165, 85, 185]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType TransferFcn
Name "Transfer Fcn1"
Position [670, 141, 760, 209]
Numerator "[40]"
Denominator "[1 1.966 4.256]"
}
Line {
SrcBlock "Step"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [25, 0]
Branch {
Points [0, -55]
DstBlock "Gain2"
DstPort 1
}
Branch {
Labels [1, 0]
Points [-5, 0; 5, 0]
Branch {
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, 55]
Branch {
Points [0, 5]
DstBlock "Gain1"
DstPort 1
}
Branch {
Points [-10, 0; 0, 75]
Branch {
DstBlock "Derivative1"
DstPort 1
}
Branch {
DstBlock "Gain3"
DstPort 1
}
}
}
}
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Derivative"
DstPort 1
}
Line {
SrcBlock "Transfer Fcn1"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Scope"
DstPort 1
}
Branch {
Points [0, 100; -705, 0]
DstBlock "Sum"
DstPort 2
}
}
Line {
SrcBlock "Derivative1"
SrcPort 1
DstBlock "Gain4"
DstPort 1
}
Line {
SrcBlock "Gain3"
SrcPort 1
Points [5, 0]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Gain4"
SrcPort 1
Points [5, 0]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Fuzzy Logic \nController"
DstPort 1
}
Line {
SrcBlock "Fuzzy Logic \nController"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Product2"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [15, 0]
DstBlock "Product2"
DstPort 2
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [125, 0]
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [25, 0]
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [140, 0]
DstBlock "Product1"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [35, 0]
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "Product2"
SrcPort 1
Points [20, 0; 0, 15]
DstBlock "Add"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
Points [15, 0; 0, -15]
DstBlock "Add"
DstPort 2
}
Line {
SrcBlock "Product1"
SrcPort 1
Points [10, 0; 0, -45]
DstBlock "Add"
DstPort 3
}
Line {
SrcBlock "Add"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "Saturation"
SrcPort 1
DstBlock "Transfer Fcn1"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -