📄 fzy2.mdl
字号:
Cell "SupportAbsoluteTime"
Cell "SupportContinuousTime"
Cell "SupportNonInlinedSFcns"
PropName "DisabledProps"
}
Version "1.0.4"
TargetFcnLib "ansi_tfl_tmw.mat"
GenFloatMathFcnCalls "ANSI_C"
UtilityFuncGeneration "Auto"
GenerateFullHeader on
GenerateSampleERTMain off
IsPILTarget off
ModelReferenceCompliant on
IncludeMdlTerminateFcn on
CombineOutputUpdateFcns off
SuppressErrorStatus off
IncludeFileDelimiter "Auto"
ERTCustomFileBanners off
SupportAbsoluteTime on
LogVarNameModifier "rt_"
MatFileLogging on
MultiInstanceERTCode off
SupportNonFinite on
SupportComplex on
PurelyIntegerCode off
SupportContinuousTime on
SupportNonInlinedSFcns on
ExtMode off
ExtModeStaticAlloc off
ExtModeTesting off
ExtModeStaticAllocSize 1000000
ExtModeTransport 0
ExtModeMexFile "ext_comm"
RTWCAPISignals off
RTWCAPIParams off
RTWCAPIStates off
GenerateASAP2 off
}
PropName "Components"
}
}
PropName "Components"
}
Name "Configuration"
SimulationMode "normal"
CurrentDlgPage "Diagnostics"
}
PropName "ConfigurationSets"
}
Simulink.ConfigSet {
$PropName "ActiveConfigurationSet"
$ObjectID 1
}
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Clock
DisplayTime off
}
Block {
BlockType Constant
Value "1"
VectorParams1D on
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
BusObject "BusObject"
NonVirtualBus off
}
Block {
BlockType "S-Function"
FunctionName "system"
PortCounts "[]"
SFunctionModules "''"
}
Block {
BlockType Step
Time "1"
Before "0"
After "1"
SampleTime "-1"
VectorParams1D on
ZeroCross on
}
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
}
}
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 "fzy2"
Location [252, 235, 712, 554]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Clock
Name "Clock"
Position [20, 15, 40, 35]
DeleteFcn "simclock BlockIsBeingDestroyed"
PostSaveFcn "simclock Save"
Decimation "10"
}
Block {
BlockType "S-Function"
Name "Fuzzy Logic Controller"
Ports [1, 1]
Position [275, 96, 320, 154]
FunctionName "sffis"
Parameters "fismatrix"
MaskType "FIS"
MaskDescription "FIS"
MaskHelp "Fuzzy Inference System"
MaskPromptString "FIS Matrix:"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskInitialization "fismatrix = @1;"
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 "fzy2.fis"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [205, 108, 240, 137]
Inputs "2"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [400, 109, 445, 141]
VariableName "output"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [220, 215, 280, 245]
VariableName "input2"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace3"
Position [220, 165, 280, 195]
VariableName "input1"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace4"
Position [110, 220, 170, 250]
VariableName "t"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType Constant
Name "final state"
Position [15, 50, 35, 70]
Value "0"
}
Block {
BlockType Step
Name "reset at 5 sec"
Position [15, 115, 45, 145]
Time "5"
}
Block {
BlockType Switch
Name "reset pulse "
Position [120, 25, 150, 55]
Threshold "8"
}
Block {
BlockType Step
Name "set at 2 sec"
Position [15, 200, 45, 230]
Time "2"
}
Block {
BlockType Switch
Name "set pulse"
Position [120, 170, 150, 200]
Threshold "6"
}
Line {
SrcBlock "Fuzzy Logic Controller"
SrcPort 1
DstBlock "To Workspace"
DstPort 1
}
Line {
SrcBlock "reset pulse "
SrcPort 1
Points [10, 0; 0, 75]
Branch {
DstBlock "Mux1"
DstPort 1
}
Branch {
Points [0, 5; 15, 0; 0, 110]
DstBlock "To Workspace2"
DstPort 1
}
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "Fuzzy Logic Controller"
DstPort 1
}
Line {
SrcBlock "reset at 5 sec"
SrcPort 1
Points [40, 0; 0, -80]
DstBlock "reset pulse "
DstPort 3
}
Line {
SrcBlock "set at 2 sec"
SrcPort 1
Points [55, 0]
DstBlock "set pulse"
DstPort 3
}
Line {
SrcBlock "Clock"
SrcPort 1
Points [10, 0]
Branch {
Points [0, 160; 20, 0]
Branch {
Points [0, 50]
DstBlock "To Workspace4"
DstPort 1
}
Branch {
DstBlock "set pulse"
DstPort 2
}
}
Branch {
Points [15, 0; 0, 15]
DstBlock "reset pulse "
DstPort 2
}
}
Line {
SrcBlock "final state"
SrcPort 1
Points [25, 0]
Branch {
Points [15, 0; 0, -30]
DstBlock "reset pulse "
DstPort 1
}
Branch {
Points [0, 115]
DstBlock "set pulse"
DstPort 1
}
}
Line {
SrcBlock "set pulse"
SrcPort 1
Points [0, -50; 30, 0]
Branch {
Points [0, -5]
DstBlock "Mux1"
DstPort 2
}
Branch {
Points [0, 45]
DstBlock "To Workspace3"
DstPort 1
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -