📄 fuzzypid.mdl
字号:
SrcPort 1
Points [5, 0; 0, 25]
DstBlock "gain2"
DstPort 1
}
Line {
SrcBlock "gain2"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Ki"
SrcPort 1
Points [50, 0; 0, -15]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Kd'"
SrcPort 1
Points [25, 0; 0, 20]
DstBlock "gain3"
DstPort 1
}
Line {
SrcBlock "gain3"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Kd"
SrcPort 1
Points [55, 0; 0, -20]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "E"
SrcPort 1
Points [0, 0; 20, 0]
Branch {
Points [0, 80]
DstBlock "Derivative"
DstPort 1
}
Branch {
DstBlock "Integrator"
DstPort 1
}
Branch {
Points [0, -60]
DstBlock "gain4"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [20, 0]
DstBlock "Kup"
DstPort 1
}
Line {
SrcBlock "gain4"
SrcPort 1
DstBlock "Kup"
DstPort 2
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [5, 0; 0, 100]
DstBlock "Kup1"
DstPort 1
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [155, 0; 0, -60]
DstBlock "Kup1"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
Points [10, 0; 0, 100]
DstBlock "Kup2"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [370, 0; 0, -145]
DstBlock "Kup2"
DstPort 2
}
Line {
SrcBlock "Kup2"
SrcPort 1
DstBlock "Sum3"
DstPort 1
}
Line {
SrcBlock "Kup1"
SrcPort 1
Points [100, 0; 0, 45]
DstBlock "Sum3"
DstPort 2
}
Line {
SrcBlock "Kup"
SrcPort 1
Points [80, 0; 0, 95]
DstBlock "Sum3"
DstPort 3
}
Line {
SrcBlock "Sum3"
SrcPort 1
DstBlock "u"
DstPort 1
}
}
}
Block {
BlockType Clock
Name "Clock"
Position [115, 125, 135, 145]
FontName "Arial"
FontSize 12
Decimation "10"
}
Block {
BlockType Demux
Name "Demux1"
Ports [1, 3]
Position [540, 197, 545, 303]
BackgroundColor "black"
ShowName off
FontSize 12
Outputs "3"
DisplayOption "bar"
}
Block {
BlockType Derivative
Name "Derivative"
Position [245, 260, 275, 290]
FontSize 12
}
Block {
BlockType Reference
Name "Fuzzy Logic \nController"
Ports [1, 1]
Position [475, 224, 520, 276]
FontName "Arial"
FontSize 12
SourceBlock "fuzblock/Fuzzy Logic \nController"
SourceType "FIS"
ShowPortLabels on
fis "fpid"
}
Block {
BlockType Gain
Name "Ke"
Position [295, 210, 325, 240]
FontSize 12
Gain "0.50"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Kec"
Position [310, 260, 340, 290]
FontSize 12
Gain "2.00"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Ku"
Position [670, 255, 700, 285]
FontSize 12
Gain "1.00"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Mux
Name "Mux3"
Ports [2, 1]
Position [445, 199, 450, 301]
ShowName off
FontSize 12
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Saturate
Name "Saturation1"
Position [375, 210, 405, 240]
FontSize 12
UpperLimit "3"
LowerLimit "-3"
}
Block {
BlockType Saturate
Name "Saturation2"
Position [375, 260, 405, 290]
FontSize 12
UpperLimit "3"
LowerLimit "-3"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [925, 254, 955, 286]
FontSize 12
Location [6, 55, 1030, 737]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "0"
YMax "13"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
}
Block {
BlockType Step
Name "Step"
Position [100, 260, 130, 290]
FontSize 12
After "10"
SampleTime "1"
}
Block {
BlockType Sum
Name "Sum6"
Ports [2, 1]
Position [165, 265, 185, 285]
ShowName off
FontSize 12
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [165, 120, 225, 150]
FontName "Arial"
FontSize 12
VariableName "simout"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Structure"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [905, 145, 965, 175]
FontSize 12
VariableName "simout1"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Structure"
}
Block {
BlockType TransportDelay
Name "Transport\nDelay"
Position [810, 250, 855, 290]
FontSize 12
DelayTime "5"
}
Block {
BlockType TransferFcn
Name "controller"
Position [725, 252, 785, 288]
FontSize 12
Numerator "[0.8]"
Denominator "[60 1]"
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "To Workspace"
DstPort 1
}
Line {
Labels [1, 0]
SrcBlock "Step"
SrcPort 1
DstBlock "Sum6"
DstPort 1
}
Line {
SrcBlock "Fuzzy Logic \nController"
SrcPort 1
DstBlock "Demux1"
DstPort 1
}
Line {
SrcBlock "Mux3"
SrcPort 1
DstBlock "Fuzzy Logic \nController"
DstPort 1
}
Line {
SrcBlock "Kec"
SrcPort 1
DstBlock "Saturation2"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
DstBlock "Kec"
DstPort 1
}
Line {
SrcBlock "Ke"
SrcPort 1
DstBlock "Saturation1"
DstPort 1
}
Line {
SrcBlock "controller"
SrcPort 1
DstBlock "Transport\nDelay"
DstPort 1
}
Line {
SrcBlock "Sum6"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Derivative"
DstPort 1
}
Branch {
Points [0, -50]
DstBlock "Ke"
DstPort 1
}
Branch {
Points [0, 45]
DstBlock "Advance PID"
DstPort 4
}
}
Line {
SrcBlock "Demux1"
SrcPort 1
DstBlock "Advance PID"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 2
DstBlock "Advance PID"
DstPort 2
}
Line {
SrcBlock "Demux1"
SrcPort 3
DstBlock "Advance PID"
DstPort 3
}
Line {
SrcBlock "Advance PID"
SrcPort 1
DstBlock "Ku"
DstPort 1
}
Line {
SrcBlock "Transport\nDelay"
SrcPort 1
Points [-5, 0; 20, 0]
Branch {
Points [0, 0]
Branch {
Points [0, 135; -700, 0]
DstBlock "Sum6"
DstPort 2
}
Branch {
DstBlock "Scope"
DstPort 1
}
}
Branch {
Points [0, -110]
DstBlock "To Workspace1"
DstPort 1
}
}
Line {
SrcBlock "Saturation1"
SrcPort 1
Points [-5, 0]
DstBlock "Mux3"
DstPort 1
}
Line {
SrcBlock "Saturation2"
SrcPort 1
Points [-5, 0]
DstBlock "Mux3"
DstPort 2
}
Line {
SrcBlock "Ku"
SrcPort 1
DstBlock "controller"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -