📄 fuzblock.mdl
字号:
Library {
Name "fuzblock"
Version 5.0
SaveDefaultBlockParams on
LibraryLinkDisplay "none"
ShowLoopsOnError on
IgnoreBidirectionalLines off
CovSaveName "covdata"
CovMetricSettings "d"
CovNameIncrementing off
CovHtmlReporting on
covSaveCumulativeToWorkspaceVar on
CovSaveSingleToWorkspaceVar on
CovCumulativeReport off
BlockNameDataTip off
BlockParametersDataTip on
BlockDescriptionStringDataTip off
ToolBar off
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks on
Created "Mon Aug 31 10:42:19 1998"
Creator "sanjai"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "pascal"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Tue Jun 04 17:01:34 2002"
ModelVersionFormat "1.%<AutoIncrement:149>"
ConfigurationManager "none"
SimParamPage "Solver"
LinearizationMsg "none"
Profile off
ParamWorkspaceSource "MATLABWorkspace"
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "normal"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
ExtModeTrigHoldOff 0
ExtModeTrigDelay 0
ExtModeTrigDirection "rising"
ExtModeTrigLevel 0
ExtModeArchiveMode "off"
ExtModeAutoIncOneShot off
ExtModeIncDirWhenArm off
ExtModeAddSuffixToVar off
ExtModeWriteAllDataToWs off
ExtModeArmWhenConnect on
ExtModeSkipDownloadWhenConnect off
ExtModeLogAll on
ExtModeAutoUpdateStatusClock on
SimulationMode "normal"
ConsistencyChecking "none"
ArrayBoundsChecking "none"
AlgebraicLoopMsg "warning"
BlockPriorityViolationMsg "warning"
MinStepSizeMsg "warning"
InheritedTsInSrcMsg "warning"
DiscreteInheritContinuousMsg "warning"
MultiTaskRateTransMsg "error"
SingleTaskRateTransMsg "none"
CheckForMatrixSingularity "none"
IntegerOverflowMsg "warning"
Int32ToFloatConvMsg "warning"
ParameterDowncastMsg "error"
ParameterOverflowMsg "error"
ParameterPrecisionLossMsg "warning"
UnderSpecifiedDataTypeMsg "none"
UnnecessaryDatatypeConvMsg "none"
VectorMatrixConversionMsg "none"
InvalidFcnCallConnMsg "error"
SignalLabelMismatchMsg "none"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
SfunCompatibilityCheckMsg "none"
ProdHWDeviceType "Microprocessor"
ProdHWWordLengths "8,16,32,32"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
RTWRetainRTWFile off
TLCProfiler off
TLCDebug off
TLCCoverage off
TLCAssertion off
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Abs
SaturateOnIntegerOverflow on
ZeroCross on
}
Block {
BlockType ActionPort
InitializeStates "held"
ActionType "unset"
}
Block {
BlockType Constant
Value "1"
VectorParams1D on
ShowAdditionalParam off
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
}
Block {
BlockType Gain
Gain "1"
Multiplication "Element-wise(K.*u)"
ShowAdditionalParam off
ParameterDataTypeMode "Same as input"
ParameterDataType "sfix(16)"
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "2^0"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType If
NumInputs "1"
IfExpression "u1 > 0"
ShowElse on
ZeroCross on
}
Block {
BlockType Inport
Port "1"
PortDimensions "-1"
SampleTime "-1"
ShowAdditionalParam off
LatchInput off
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
Interpolate on
}
Block {
BlockType Logic
Operator "AND"
Inputs "2"
ShowAdditionalParam off
AllPortsSameDT on
OutDataTypeMode "Logical (see Advanced Sim. Parameters)"
LogicDataType "uint(8)"
}
Block {
BlockType Math
Operator "exp"
OutputSignalType "auto"
}
Block {
BlockType Merge
Inputs "2"
InitialOutput "[]"
AllowUnequalInputPortWidths off
InputPortOffsets "[]"
}
Block {
BlockType Outport
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
ShowAdditionalParam off
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType Reference
}
Block {
BlockType RelationalOperator
Operator ">="
ShowAdditionalParam off
InputSameDT on
LogicOutDataTypeMode "Logical (see Advanced Sim. Parameters)"
LogicDataType "uint(8)"
ZeroCross on
}
Block {
BlockType "S-Function"
FunctionName "system"
PortCounts "[]"
SFunctionModules "''"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
ShowAdditionalParam off
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType ZeroOrderHold
SampleTime "1"
}
}
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 "fuzblock"
Location [256, 153, 845, 617]
Open on
ModelBrowserVisibility on
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "Fuzzy Logic \nController"
Ports [1, 1]
Position [60, 24, 120, 76]
FontName "Arial"
TreatAsAtomicUnit off
MaskType "FIS"
MaskDescription "FIS"
MaskHelp "web(['file:///' docroot '/toolbox/fuzzy/fuzzylo"
"giccontroller.html']);"
MaskPromptString "FIS File or Structure:"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "fis=@1;"
MaskInitialization "fis = fuzblockmask(gcb,fis);"
MaskDisplay "plot(0, -0.3, 6, -0.3, 0, 1.2, 6, 1.2, [0 6], ["
"0 0], [1 2 3],[0 1 0],[2 3 4],[0 1 0],[3 4 5],[0 1 0])"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Fuzzy Logic \nController"
Location [251, 557, 620, 673]
Open off
ModelBrowserVisibility on
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 43, 55, 57]
}
Block {
BlockType "S-Function"
Name "FIS S-function"
Ports [1, 1]
Position [135, 24, 205, 76]
FunctionName "sffis"
Parameters "fis"
SFunctionModules "sfsup"
}
Block {
BlockType Outport
Name "Out1"
Position [305, 43, 335, 57]
}
Line {
SrcBlock "FIS S-function"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "FIS S-function"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Fuzzy Logic \nController \nwith Ruleviewer"
Ports [1, 1]
Position [60, 125, 120, 175]
TreatAsAtomicUnit off
MaskType "FIS"
MaskDescription "FIS with a ruleviewer for fuzzy logic rules."
MaskHelp "web(['file:///' docroot '/toolbox/fuzzy/fuzzylo"
"giccontrollerwithr.html']);"
MaskPromptString "FIS matrix|Refresh rate (sec)"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "fismatrix=@1;Ts=@2;"
MaskDisplay "plot(0, -0.3, 6, -0.3, 0, 1.2, 6, 1.2, [0 6], ["
"0 0], [1 2 3],[0 1 0],[2 3 4],[0 1 0],[3 4 5],[0 1 0])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "fis|2"
System {
Name "Fuzzy Logic \nController \nwith Ruleviewer"
Location [629, 446, 932, 692]
Open off
ModelBrowserVisibility on
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [15, 118, 45, 132]
}
Block {
BlockType "S-Function"
Name "Animation1"
Ports [1]
Position [185, 20, 235, 40]
FunctionName "animrule"
Parameters "fismatrix"
}
Block {
BlockType Reference
Name "Fuzzy Logic\nController"
Ports [1, 1]
Position [85, 100, 145, 150]
FontName "Arial"
SourceBlock "fuzblock/Fuzzy Logic \nController"
SourceType "FIS"
fis "fismatrix"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [85, 15, 115, 45]
SampleTime "Ts"
}
Block {
BlockType Outport
Name "Out1"
Position [190, 118, 220, 132]
InitialOutput "0"
}
Line {
SrcBlock "Zero-Order\nHold"
SrcPort 1
DstBlock "Animation1"
DstPort 1
}
Line {
SrcBlock "Fuzzy Logic\nController"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Fuzzy Logic\nController"
DstPort 1
}
Branch {
Points [0, -95]
DstBlock "Zero-Order\nHold"
DstPort 1
}
}
}
}
Block {
BlockType SubSystem
Name "Membership \nFunctions"
Ports []
Position [58, 237, 115, 285]
TreatAsAtomicUnit off
MaskType "MF Library"
MaskDisplay "disp('MF')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Membership \nFunctions"
Location [256, 153, 882, 626]
Open off
ModelBrowserVisibility on
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType SubSystem
Name "Diff. Sigmoidal MF"
Ports [1, 1]
Position [50, 190, 95, 240]
TreatAsAtomicUnit off
MaskType "dsigmf"
MaskDescription "\"Difference of two sigmoids\" membership f"
"unction. The two sigmoid curves are given by\n\n fk ( x ) = 1 / ( 1 + "
"exp( -ak ( x - ck) ) ) k=1,2\n\nThe parameters a1 and a2 control the slo"
"pes of the left and right curves. The parameters c1 and c2 control the points"
" of inflection for the left and right curves. The parameters a1 and a2 should"
" be positive."
MaskHelp "web(['file:///' docroot '/toolbox/fuzzy/mem"
"bershipfunctionslibrar.html']);"
MaskPromptString "Left curve a1:|Left curve c1:|Right curve a"
"2:|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 "a1=@1;c1=@2;a2=@3;c2=@4;"
MaskInitialization "x=-10:0.5:10;\nparams=[3 -5 1 5];\ny=dsigmf"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -