📄 fuzzypidcontroller.mdl
字号:
BlockType Product
Name "Product"
Ports [2, 1]
Position [69, 75, 116, 110]
Orientation "down"
NamePlacement "alternate"
InputSameDT off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [159, 75, 206, 110]
Orientation "down"
NamePlacement "alternate"
InputSameDT off
}
Block {
BlockType Product
Name "Product2"
Ports [2, 1]
Position [244, 75, 291, 110]
Orientation "down"
NamePlacement "alternate"
InputSameDT off
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [135, 220, 155, 240]
ShowName off
IconShape "round"
Inputs "++|"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum2"
Ports [3, 1]
Position [285, 170, 305, 190]
ShowName off
IconShape "round"
Inputs "+++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum5"
Ports [2, 1]
Position [175, 170, 195, 190]
ShowName off
IconShape "round"
Inputs "++|"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum6"
Ports [2, 1]
Position [260, 130, 280, 150]
ShowName off
IconShape "round"
Inputs "++|"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Gain
Name "kd"
Position [55, 215, 85, 245]
Gain "0.15"
}
Block {
BlockType Gain
Name "ki"
Position [105, 165, 135, 195]
Gain "0.12"
}
Block {
BlockType Gain
Name "kp"
Position [205, 125, 235, 155]
Gain "0.2"
}
Block {
BlockType Outport
Name "Out1"
Position [330, 173, 360, 187]
}
Line {
SrcBlock "Product"
SrcPort 1
Points [0, 15; 50, 0]
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "kp"
SrcPort 1
DstBlock "Sum6"
DstPort 2
}
Line {
SrcBlock "ki"
SrcPort 1
DstBlock "Sum5"
DstPort 2
}
Line {
SrcBlock "Sum5"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Integrator"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Derivative1"
SrcPort 1
Points [65, 0]
DstBlock "Sum2"
DstPort 3
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Derivative1"
DstPort 1
}
Line {
SrcBlock "Sum6"
SrcPort 1
Points [10, 0]
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "kd"
SrcPort 1
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Product1"
SrcPort 1
DstBlock "Sum5"
DstPort 1
}
Line {
SrcBlock "Product2"
SrcPort 1
DstBlock "Sum6"
DstPort 1
}
Line {
SrcBlock "e"
SrcPort 1
Points [0, 0; 0, 15]
Branch {
Points [0, 80]
Branch {
Points [0, 40]
Branch {
DstBlock "kd"
DstPort 1
}
Branch {
DstBlock "ki"
DstPort 1
}
}
Branch {
DstBlock "kp"
DstPort 1
}
}
Branch {
Points [40, 0]
Branch {
Points [90, 0]
Branch {
DstBlock "Product2"
DstPort 1
}
Branch {
DstBlock "Product1"
DstPort 1
}
}
Branch {
DstBlock "Product"
DstPort 1
}
}
}
Line {
SrcBlock "Δkd"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Δki"
SrcPort 1
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "Δkp"
SrcPort 1
DstBlock "Product2"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Step
Name "Step"
Position [15, 105, 45, 135]
Time "0"
After "3"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [65, 110, 85, 130]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn"
Position [210, 232, 270, 268]
Numerator "[2 5]"
Denominator "[1 3 2]"
}
Block {
BlockType TransportDelay
Name "Transport\nDelay1"
Position [300, 235, 330, 265]
DelayTime "2"
BufferSize "2500"
}
Block {
BlockType Gain
Name "ke"
Position [125, 75, 155, 105]
Gain "0.1"
}
Block {
BlockType Gain
Name "kec"
Position [220, 120, 250, 150]
Gain "0.01"
}
Block {
BlockType Gain
Name "ku"
Position [385, 110, 415, 140]
Gain "0.01"
}
Block {
BlockType Saturate
Name "limited"
Position [165, 119, 195, 151]
UpperLimit "0.1"
LowerLimit "-0.1"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Scope
Name "scope"
Ports [1]
Position [380, 223, 420, 277]
Location [254, 181, 606, 481]
Open off
NumInputPorts "1"
TickLabels "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "20"
YMin "5.55112e-017"
YMax "1.4"
SaveName "ScopeData1"
DataFormat "Array"
Decimation "0.1"
SampleInput on
SampleTime "0.1"
}
Block {
BlockType Gain
Name "Δkd"
Position [460, 135, 490, 165]
Gain "0.1"
}
Block {
BlockType Gain
Name "Δki"
Position [495, 110, 525, 140]
Gain "0.06"
}
Block {
BlockType Gain
Name "Δkp"
Position [460, 85, 490, 115]
NamePlacement "alternate"
Gain "0.1"
}
Line {
SrcBlock "Step"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "ke"
SrcPort 1
Points [40, 0; 0, 20]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "kec"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Fuzzy Logic \nController \nwith Ruleviewer"
DstPort 1
}
Line {
SrcBlock "Fuzzy Logic \nController \nwith Ruleviewer"
SrcPort 1
DstBlock "ku"
DstPort 1
}
Line {
SrcBlock "ku"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 3
DstBlock "Δkd"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
DstBlock "Δkp"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
DstBlock "Derivative"
DstPort 1
}
Branch {
Points [0, -30]
Branch {
DstBlock "ke"
DstPort 1
}
Branch {
Points [0, -30; 430, 0; 0, 15]
DstBlock "PID Controller"
DstPort 1
}
}
}
Line {
Labels [0, 0]
SrcBlock "Δkd"
SrcPort 1
DstBlock "PID Controller"
DstPort 4
}
Line {
SrcBlock "Δkp"
SrcPort 1
DstBlock "PID Controller"
DstPort 2
}
Line {
SrcBlock "Δki"
SrcPort 1
DstBlock "PID Controller"
DstPort 3
}
Line {
SrcBlock "Demux"
SrcPort 2
DstBlock "Δki"
DstPort 1
}
Line {
SrcBlock "Transfer Fcn"
SrcPort 1
DstBlock "Transport\nDelay1"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
DstBlock "limited"
DstPort 1
}
Line {
SrcBlock "limited"
SrcPort 1
DstBlock "kec"
DstPort 1
}
Line {
SrcBlock "PID Controller"
SrcPort 1
Points [10, 0; 0, 85]
DstBlock "MinMax"
DstPort 1
}
Line {
SrcBlock " max voltage\n"
SrcPort 1
Points [-5, 0; 0, -30]
DstBlock "MinMax"
DstPort 2
}
Line {
SrcBlock "MinMax"
SrcPort 1
Points [-250, 0]
DstBlock "Transfer Fcn"
DstPort 1
}
Line {
SrcBlock "Transport\nDelay1"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "scope"
DstPort 1
}
Branch {
Points [0, 50; -275, 0]
DstBlock "Sum"
DstPort 2
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -