📄 fuzblock.mdl
字号:
DstPort 1
}
Line {
SrcBlock "mu"
SrcPort 1
Points [45, 0]
DstBlock "Sum"
DstPort 2
}
Line {
Name "x-c"
Labels [0, 0]
SrcBlock "Sum"
SrcPort 1
DstBlock "Product\n(gaussmf)"
DstPort 1
}
Line {
SrcBlock "sigma"
SrcPort 1
Points [80, 0; 0, -90]
DstBlock "Product\n(gaussmf)"
DstPort 2
}
Line {
SrcBlock "Exponential\n(gaussmf)"
SrcPort 1
DstBlock "MF"
DstPort 1
}
Line {
SrcBlock "Squaring\n(gaussmf)"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
Name "2b"
Labels [0, 0]
SrcBlock "Gain"
SrcPort 1
DstBlock "Exponential\n(gaussmf)"
DstPort 1
}
Line {
Labels [0, 0]
SrcBlock "Product\n(gaussmf)"
SrcPort 1
DstBlock "Squaring\n(gaussmf)"
DstPort 1
}
Annotation {
Name "(x-mu)/sigma"
Position [227, 51]
}
}
}
Block {
BlockType SubSystem
Name "Gaussian2 MF"
Ports [1, 1]
Position [155, 107, 200, 153]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskType "gauss2mf"
MaskDescription "\"Combination of two Gaussians\" membership"
" function. The two Gaussian functions are given by\n\n fk ( x ) = exp "
"^ ( ( - 0.5 ( x - ck) ^ 2 ) / sigmak ^ 2 ) k=1,2\n\nThe parameters c1 and "
"sigma1 are the mean and variance defining the leftmost curve. The parameters "
"c2 and sigma2 are the mean and variance defining the rightmost curve."
MaskHelp "eval('doc gauss2mf')"
MaskPromptString "Variance for left curve sigma1:|Mean for le"
"ft curve c1:|Variance for right curve sigma2:|Mean for right curve c2:"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskVariables "sigma1=@1;mu1=@2;sigma2=@3;mu2=@4;"
MaskInitialization "x=-10:0.5:10;\nparams=[3 -1 1 5];\ny=gauss2"
"mf(x,params);"
MaskDisplay "plot(x,y);"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "3|-1|1|5"
MaskTabNameString ",,,"
System {
Name "Gaussian2 MF"
Location [131, 549, 756, 1043]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "x"
Position [35, 235, 55, 255]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType SubSystem
Name "If Action\nSubsystem"
Ports [1, 1, 0, 0, 0, 0, 0, 1]
Position [280, 97, 350, 133]
ShowName off
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "If Action\nSubsystem"
Location [226, 56, 636, 244]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [75, 103, 105, 117]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType ActionPort
Name "Action Port"
Position [170, 15, 229, 43]
}
Block {
BlockType Reference
Name "Gaussian MF"
Ports [1, 1]
Position [185, 85, 230, 135]
SourceBlock "fuzblock/Membership \nFunctions/Gau"
"ssian MF"
SourceType "gaussmf"
ShowPortLabels "on"
sigma "sigma1"
mu "mu1"
}
Block {
BlockType Outport
Name "Out1"
Position [325, 103, 355, 117]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Gaussian MF"
DstPort 1
}
Line {
SrcBlock "Gaussian MF"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "If Action\nSubsystem1"
Ports [0, 1, 0, 0, 0, 0, 0, 1]
Position [285, 177, 355, 213]
ShowName off
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "If Action\nSubsystem1"
Location [342, 471, 784, 610]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType ActionPort
Name "Action Port"
Position [170, 15, 229, 43]
}
Block {
BlockType Constant
Name "0"
Position [80, 70, 110, 100]
}
Block {
BlockType Outport
Name "Out1"
Position [325, 78, 355, 92]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "1"
}
Line {
SrcBlock "0"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "If Action\nSubsystem2"
Ports [1, 1, 0, 0, 0, 0, 0, 1]
Position [280, 332, 350, 368]
ShowName off
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "If Action\nSubsystem2"
Location [226, 56, 636, 244]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [75, 103, 105, 117]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType ActionPort
Name "Action Port"
Position [170, 15, 229, 43]
}
Block {
BlockType Reference
Name "Gaussian MF"
Ports [1, 1]
Position [185, 85, 230, 135]
SourceBlock "fuzblock/Membership \nFunctions/Gau"
"ssian MF"
SourceType "gaussmf"
ShowPortLabels "on"
sigma "sigma2"
mu "mu2"
}
Block {
BlockType Outport
Name "Out1"
Position [325, 103, 355, 117]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "Gaussian MF"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Gaussian MF"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "If Action\nSubsystem3"
Ports [0, 1, 0, 0, 0, 0, 0, 1]
Position [285, 412, 355, 448]
ShowName off
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "If Action\nSubsystem3"
Location [342, 471, 784, 610]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType ActionPort
Name "Action Port"
Position [170, 15, 229, 43]
}
Block {
BlockType Constant
Name "0"
Position [80, 70, 110, 100]
}
Block {
BlockType Outport
Name "Out1"
Position [325, 78, 355, 92]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "1"
}
Line {
SrcBlock "0"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType If
Name "If x<mu1"
Ports [1, 2]
Position [145, 22, 250, 198]
IfExpression "u1 <= mu1"
ZeroCross off
}
Block {
BlockType If
Name "If x>mu2"
Ports [1, 2]
Position [145, 257, 250, 433]
IfExpression "u1 >= mu2"
ZeroCross off
}
Block {
BlockType Merge
Name "Merge"
Ports [2, 1]
Position [405, 77, 455, 233]
}
Block {
BlockType Merge
Name "Merge1"
Ports [2, 1]
Position [405, 312, 455, 468]
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [530, 247, 560, 278]
ShowName off
RndMeth "Floor"
}
Block {
BlockType Outport
Name "MF"
Position [585, 257, 600, 273]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "If x<mu1"
SrcPort 1
Points [60, 0]
DstBlock "If Action\nSubsystem"
DstPort ifaction
}
Line {
SrcBlock "Merge"
SrcPort 1
Points [25, 0; 0, 100]
DstBlock "Product1"
DstPort 1
}
Line {
SrcBlock "If Action\nSubsystem"
SrcPort 1
DstBlock "Merge"
DstPort 1
}
Line {
SrcBlock "If x<mu1"
SrcPort 2
Points [65, 0]
DstBlock "If Action\nSubsystem1"
DstPort ifaction
}
Line {
SrcBlock "If Action\nSubsystem1"
SrcPort 1
DstBlock "Merge"
DstPort 2
}
Line {
SrcBlock "Product1"
SrcPort 1
DstBlock "MF"
DstPort 1
}
Line {
SrcBlock "If x>mu2"
SrcPort 1
Points [60, 0]
DstBlock "If Action\nSubsystem2"
DstPort ifaction
}
Line {
SrcBlock "If Action\nSubsystem2"
SrcPort 1
DstBlock "Merge1"
DstPort 1
}
Line {
SrcBlock "If x>mu2"
SrcPort 2
Points [65, 0]
DstBlock "If Action\nSubsystem3"
DstPort ifaction
}
Line {
SrcBlock "If Action\nSubsystem3"
SrcPort 1
DstBlock "Merge1"
DstPort 2
}
Line {
SrcBlock "Merge1"
SrcPort 1
Points [25, 0; 0, -120]
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "x"
SrcPort 1
Points [0, 0; 35, 0]
Branch {
Points [0, -130]
Branch {
Points [0, -5]
DstBlock "If x<mu1"
DstPort 1
}
Branch {
DstBlock "If Action\nSubsystem"
DstPort 1
}
}
Branch {
Points [0, 100]
Branch {
DstBlock "If x>mu2"
DstPort 1
}
Branch {
Points [0, 5]
DstBlock "If Action\nSubsystem2"
DstPort 1
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -