📄 flc3a_sample.mdl
字号:
BlockType Outport
Port "1"
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
Floating off
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 "0"
}
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 "flc3A_sample"
Location [296, 83, 784, 373]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Derivative
Name "Derivative"
Position [150, 95, 180, 125]
}
Block {
BlockType SubSystem
Name "Fuzzy Subsystem"
Ports [2, 1]
Position [215, 81, 260, 114]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Fuzzy Subsystem"
Location [298, 246, 761, 377]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 33, 55, 47]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "In2"
Position [25, 78, 55, 92]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Reference
Name "Fuzzy Logic \nController"
Ports [1, 1]
Position [290, 25, 325, 55]
FontName "Arial"
SourceBlock "fuzblock/Fuzzy Logic \nController"
SourceType "FIS"
ShowPortLabels on
fis "fuzzy1"
}
Block {
BlockType Gain
Name "Gain"
Position [85, 25, 115, 55]
Gain "1.54"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain1"
Position [85, 69, 135, 101]
Gain "0.5"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain2"
Position [355, 25, 385, 55]
Gain "1.38"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [260, 21, 265, 59]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Saturate
Name "Saturation"
Position [165, 15, 195, 45]
UpperLimit "1.8"
LowerLimit "-1.8"
}
Block {
BlockType Saturate
Name "Saturation1"
Position [155, 70, 185, 100]
UpperLimit "1.8"
LowerLimit "-1.8"
}
Block {
BlockType Outport
Name "Out1"
Position [425, 33, 455, 47]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Fuzzy Logic \nController"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "Fuzzy Logic \nController"
DstPort 1
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [0, -10]
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Saturation1"
DstPort 1
}
Line {
SrcBlock "Saturation"
SrcPort 1
DstBlock "Mux1"
DstPort 1
}
Line {
SrcBlock "Saturation1"
SrcPort 1
Points [35, 0; 0, -35]
DstBlock "Mux1"
DstPort 2
}
}
}
Block {
BlockType Gain
Name "Gain1"
Position [170, 20, 200, 50]
Gain "1.07"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain2"
Position [160, 205, 190, 235]
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1]
Position [350, 141, 355, 179]
ShowName off
Inputs "3"
DisplayOption "bar"
}
Block {
BlockType Reference
Name "PID Controller"
Ports [1, 1]
Position [240, 205, 270, 235]
SourceBlock "simulink_extras/Additional\nLinear/PID Controll"
"er"
SourceType "PID Controller"
ShowPortLabels on
P "1"
I "0.5"
D "0.1"
}
Block {
BlockType DiscretePulseGenerator
Name "Pulse\nGenerator"
Ports [0, 1]
Position [20, 70, 50, 100]
PulseType "Time based"
Period "40"
PulseWidth "50"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [375, 144, 405, 176]
Location [6, 56, 285, 261]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "20"
YMin "0"
YMax "1.5"
SaveToWorkspace on
SaveName "Y"
DataFormat "Array"
MaxDataPoints "50000"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [90, 75, 110, 95]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [90, 210, 110, 230]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [285, 75, 305, 95]
ShowName off
IconShape "round"
Inputs "|++"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn1"
Position [320, 201, 400, 239]
Denominator "[1 3 3 1]"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn2"
Position [320, 66, 400, 104]
Denominator "[1 3 3 1]"
}
Line {
SrcBlock "Transfer Fcn2"
SrcPort 1
Points [5, 0; 0, 50; -170, 0]
Branch {
Points [-140, 0]
DstBlock "Sum"
DstPort 2
}
Branch {
Points [0, 25]
DstBlock "Mux"
DstPort 2
}
}
Line {
SrcBlock "Pulse\nGenerator"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, 65]
Branch {
DstBlock "Mux"
DstPort 1
}
Branch {
Points [0, 70]
DstBlock "Sum1"
DstPort 1
}
}
Branch {
Points [0, -50]
DstBlock "Gain1"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [0, 25; 15, 0]
Branch {
DstBlock "Derivative"
DstPort 1
}
Branch {
Points [0, -20]
DstBlock "Fuzzy Subsystem"
DstPort 1
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "PID Controller"
SrcPort 1
DstBlock "Transfer Fcn1"
DstPort 1
}
Line {
SrcBlock "Transfer Fcn1"
SrcPort 1
Points [5, 0; 0, 50; -115, 0]
Branch {
Points [-195, 0]
DstBlock "Sum1"
DstPort 2
}
Branch {
Points [0, -100]
DstBlock "Mux"
DstPort 3
}
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [10, 0; 0, -5]
DstBlock "Fuzzy Subsystem"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Transfer Fcn2"
DstPort 1
}
Line {
SrcBlock "Fuzzy Subsystem"
SrcPort 1
Points [15, 0; 0, 15; 15, 0]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [55, 0; 0, 30; 10, 0]
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "PID Controller"
DstPort 1
}
Annotation {
Name "SIMULINK BLOCK DIAGRAM for FLC design\nChou, Pe"
"nchen, 8/9/2001, 2004/1/6\nflc3A_sample.mdl Use with Matlab 7.x only."
Position [369, 35]
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -