📄 fuzzypidcontroller.mdl
字号:
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "ec"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [280, 70, 285, 110]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [680, 71, 685, 109]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType SubSystem
Name "PID controller"
Ports [1, 1]
Position [230, 162, 290, 208]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "PID controller"
Location [286, 394, 859, 616]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "e"
Position [45, 118, 75, 132]
IconDisplay "Port number"
}
Block {
BlockType Sum
Name "Add"
Ports [3, 1]
Position [470, 107, 500, 143]
Inputs "+++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Derivative
Name "Derivative"
Position [325, 70, 355, 100]
}
Block {
BlockType Gain
Name "Gain3"
Position [250, 139, 300, 171]
Gain "0.05"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [325, 140, 355, 170]
IgnoreLimit off
}
Block {
BlockType Gain
Name "Kd"
Position [250, 72, 300, 98]
Gain "12"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Kp"
Position [105, 110, 160, 140]
Gain "25"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "u"
Position [525, 108, 555, 122]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Add"
SrcPort 1
DstBlock "u"
DstPort 1
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [45, 0; 0, -20]
DstBlock "Add"
DstPort 3
}
Line {
SrcBlock "Kp"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "Add"
DstPort 2
}
Branch {
Points [0, -40]
DstBlock "Kd"
DstPort 1
}
Branch {
Points [0, 30]
DstBlock "Gain3"
DstPort 1
}
}
Line {
SrcBlock "e"
SrcPort 1
Points [0, 0]
DstBlock "Kp"
DstPort 1
}
Line {
SrcBlock "Kd"
SrcPort 1
DstBlock "Derivative"
DstPort 1
}
Line {
SrcBlock "Gain3"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [45, 0; 0, 30]
DstBlock "Add"
DstPort 1
}
}
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [730, 74, 760, 106]
Floating off
Location [361, 361, 685, 600]
Open off
NumInputPorts "1"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "0"
YMax "1.4"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Step
Name "Step"
Position [30, 75, 60, 105]
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [100, 80, 120, 100]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [155, 175, 175, 195]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [720, 120, 780, 150]
VariableName "simout"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Structure"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn"
Position [520, 62, 580, 98]
Denominator "[480 1]"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn1"
Position [410, 167, 470, 203]
Denominator "[480 1]"
}
Block {
BlockType TransportDelay
Name "Transport\nDelay"
Position [605, 65, 635, 95]
}
Block {
BlockType TransportDelay
Name "Transport\nDelay1"
Position [505, 170, 535, 200]
}
Line {
SrcBlock "Step"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, 95]
DstBlock "Sum1"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
Points [10, 0]
Branch {
Points [0, -40]
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, 20]
DstBlock "Derivative"
DstPort 1
}
}
Branch {
Labels [-1, 0]
Points [0, -70; 310, 0]
DstBlock "Fuzzy-PID controller"
DstPort 1
}
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [0, 0]
DstBlock "Gain1"
DstPort 1
}
Line {
Name "e"
Labels [3, 0]
SrcBlock "Gain"
SrcPort 1
Points [30, 0; 0, 30]
DstBlock "Mux"
DstPort 1
}
Line {
Name "ec"
Labels [-1, 1]
SrcBlock "Gain1"
SrcPort 1
Points [5, 0]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "PID controller"
DstPort 1
}
Line {
SrcBlock "PID controller"
SrcPort 1
DstBlock "Transfer Fcn1"
DstPort 1
}
Line {
SrcBlock "Fuzzy-PID controller"
SrcPort 1
DstBlock "Transfer Fcn"
DstPort 1
}
Line {
SrcBlock "Transfer Fcn"
SrcPort 1
DstBlock "Transport\nDelay"
DstPort 1
}
Line {
SrcBlock "Transfer Fcn1"
SrcPort 1
DstBlock "Transport\nDelay1"
DstPort 1
}
Line {
SrcBlock "Transport\nDelay1"
SrcPort 1
Points [30, 0]
Branch {
Points [0, 45; -405, 0]
DstBlock "Sum1"
DstPort 2
}
Branch {
Points [95, 0]
DstBlock "Mux1"
DstPort 2
}
}
Line {
SrcBlock "Fuzzy Logic \nController"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Fuzzy Logic \nController"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [10, 0; 0, -10]
DstBlock "Fuzzy-PID controller"
DstPort 2
}
Line {
SrcBlock "Demux"
SrcPort 2
DstBlock "Fuzzy-PID controller"
DstPort 3
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [15, 0]
DstBlock "Fuzzy-PID controller"
DstPort 4
}
Line {
SrcBlock "Mux1"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Scope"
DstPort 1
}
Branch {
Points [0, 45]
DstBlock "To Workspace"
DstPort 1
}
}
Line {
SrcBlock "Transport\nDelay"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Mux1"
DstPort 1
}
Branch {
Points [0, 75; -540, 0]
DstBlock "Sum"
DstPort 2
}
}
}
}
# Finite State Machines
#
# Stateflow Version 6.2 (R14SP2) dated Aug 4 2005, 10:13:39
#
#
Stateflow {
machine {
id 1
name "FuzzyPIDcontroller"
created "07-Jan-2008 21:55:28"
isLibrary 0
firstTarget 2
sfVersion 62014000
}
target {
id 2
name "sfun"
description "Default Simulink S-Function Target."
machine 1
linkNode [1 0 0]
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -