📄 fuzzy_pid.mdl
字号:
Port "3"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "Kd"
Position [35, 233, 65, 247]
Port "4"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Sum
Name "Add"
Ports [2, 1]
Position [330, 23, 345, 87]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Add1"
Ports [2, 1]
Position [330, 107, 345, 163]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Add2"
Ports [2, 1]
Position [330, 196, 345, 254]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Add3"
Ports [3, 1]
Position [400, 89, 420, 181]
Inputs "+++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Derivative
Name "Derivative"
Position [110, 170, 140, 200]
}
Block {
BlockType Gain
Name "Gain"
Position [165, 170, 195, 200]
Gain "280"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain1"
Position [105, 55, 135, 85]
Gain "300"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain2"
Position [165, 100, 195, 130]
Gain "0.3"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [105, 100, 135, 130]
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [190, 22, 220, 53]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [245, 132, 275, 163]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product2"
Ports [2, 1]
Position [245, 217, 275, 248]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Out1"
Position [445, 128, 475, 142]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "e"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Product"
DstPort 1
}
Branch {
Points [0, 85]
Branch {
Points [0, -45]
DstBlock "Gain1"
DstPort 1
}
Branch {
DstBlock "Integrator"
DstPort 1
}
Branch {
Points [0, 70]
DstBlock "Derivative"
DstPort 1
}
}
}
Line {
SrcBlock "Ki"
SrcPort 1
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
DstBlock "Gain2"
DstPort 1
}
Branch {
Points [0, 30; 85, 0]
DstBlock "Product1"
DstPort 1
}
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, 40]
DstBlock "Product2"
DstPort 1
}
}
Line {
SrcBlock "Kd"
SrcPort 1
DstBlock "Product2"
DstPort 2
}
Line {
SrcBlock "Product2"
SrcPort 1
Points [15, 0; 0, 5]
DstBlock "Add2"
DstPort 2
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [55, 0; 0, 25]
DstBlock "Add2"
DstPort 1
}
Line {
SrcBlock "Product1"
SrcPort 1
DstBlock "Add1"
DstPort 2
}
Line {
SrcBlock "Gain2"
SrcPort 1
Points [55, 0; 0, 5]
DstBlock "Add1"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Add"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Add"
DstPort 2
}
Line {
SrcBlock "Add"
SrcPort 1
Points [15, 0; 0, 50]
DstBlock "Add3"
DstPort 1
}
Line {
SrcBlock "Add1"
SrcPort 1
DstBlock "Add3"
DstPort 2
}
Line {
SrcBlock "Add2"
SrcPort 1
Points [15, 0; 0, -60]
DstBlock "Add3"
DstPort 3
}
Line {
SrcBlock "Add3"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Kp"
SrcPort 1
Points [0, -45]
DstBlock "Product"
DstPort 2
}
Annotation {
Position [536, 342]
}
}
}
Block {
BlockType Outport
Name "Out1"
Position [445, 128, 475, 142]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "e"
SrcPort 1
Points [75, 0; 0, 90]
DstBlock "Subsystem"
DstPort 1
}
Line {
SrcBlock "Kp"
SrcPort 1
Points [70, 0; 0, 45]
DstBlock "Subsystem"
DstPort 2
}
Line {
SrcBlock "Subsystem"
SrcPort 1
Points [75, 0; 0, -10]
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Ki"
SrcPort 1
Points [70, 0; 0, -5]
DstBlock "Subsystem"
DstPort 3
}
Line {
SrcBlock "Kd"
SrcPort 1
Points [70, 0; 0, -75]
DstBlock "Subsystem"
DstPort 4
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [150, 180, 170, 200]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType TransferFcn
Name "Transfer Fcn"
Position [645, 216, 675, 254]
Numerator "[0.5]"
Denominator "[1 1]"
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Fuzzy Logic \nController"
DstPort 1
}
Line {
SrcBlock "Fuzzy Logic \nController"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, -55; 350, 0; 0, 25]
DstBlock "Subsystem"
DstPort 1
}
Branch {
DstBlock "Gain1"
DstPort 1
}
}
Line {
SrcBlock "Step"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
DstBlock "Gain5"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 3
DstBlock "Gain4"
DstPort 1
}
Line {
SrcBlock "Subsystem"
SrcPort 1
DstBlock "Transfer Fcn"
DstPort 1
}
Line {
SrcBlock "Transfer Fcn"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Scope"
DstPort 1
}
Branch {
Points [0, 130; -530, 0]
DstBlock "Sum"
DstPort 2
}
}
Line {
SrcBlock "Derivative"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Derivative"
DstPort 1
}
Line {
SrcBlock "Gain2"
SrcPort 1
Points [10, 0; 0, 5]
DstBlock "Add"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
DstBlock "Add"
DstPort 2
}
Line {
SrcBlock "Gain5"
SrcPort 1
DstBlock "Add1"
DstPort 1
}
Line {
SrcBlock "Constant2"
SrcPort 1
Points [5, 0]
DstBlock "Add1"
DstPort 2
}
Line {
SrcBlock "Gain4"
SrcPort 1
Points [20, 0; 0, -5]
DstBlock "Add2"
DstPort 1
}
Line {
SrcBlock "Constant3"
SrcPort 1
Points [15, 0; 0, -10]
DstBlock "Add2"
DstPort 2
}
Line {
SrcBlock "Add"
SrcPort 1
Points [15, 0; 0, 20]
DstBlock "Subsystem"
DstPort 2
}
Line {
SrcBlock "Add1"
SrcPort 1
Points [15, 0; 0, 10]
DstBlock "Subsystem"
DstPort 3
}
Line {
SrcBlock "Add2"
SrcPort 1
DstBlock "Subsystem"
DstPort 4
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -