📄 tppfc.mdl
字号:
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock "Ua"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
Name "Ubata"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "Ubata"
DstPort 1
}
Line {
SrcBlock "Ub"
SrcPort 1
Points [120, 0]
DstBlock " SFunction "
DstPort 2
}
Line {
SrcBlock "Uc"
SrcPort 1
DstBlock " SFunction "
DstPort 3
}
Line {
Name "Ualfa"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 3
DstBlock "Ualfa"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "Ubata"
Position [210, 43, 240, 57]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Ualfa"
Position [210, 73, 240, 87]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Embedded\nMATLAB Function1"
SrcPort 1
Points [0, 0]
DstBlock "Ubata"
DstPort 1
}
Line {
SrcBlock "Embedded\nMATLAB Function1"
SrcPort 2
Points [0, 0]
DstBlock "Ualfa"
DstPort 1
}
Line {
SrcBlock "Ua"
SrcPort 1
Points [15, 0; 0, 10]
DstBlock "Embedded\nMATLAB Function1"
DstPort 1
}
Line {
SrcBlock "Ub"
SrcPort 1
Points [0, 0]
DstBlock "Embedded\nMATLAB Function1"
DstPort 2
}
Line {
SrcBlock "Vc"
SrcPort 1
Points [15, 0; 0, -10]
DstBlock "Embedded\nMATLAB Function1"
DstPort 3
}
Annotation {
Position [34, 114]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "Uc"
Position [41, 108]
UseDisplayTextAsClickCallback off
}
}
}
Block {
BlockType SubSystem
Name "3 to 2"
Ports [3, 2]
Position [90, 25, 130, 115]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "3 to 2"
Location [246, 163, 511, 289]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "Ia"
Position [25, 28, 55, 42]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Ib"
Position [25, 58, 55, 72]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Ic"
Position [25, 88, 55, 102]
Port "3"
IconDisplay "Port number"
}
Block {
BlockType SubSystem
Name "Embedded\nMATLAB Function1"
Ports [3, 2]
Position [105, 34, 175, 96]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
Array {
Type "Handle"
Dimension 0
PropName "AvailSigsLoadSave"
}
MaskHideContents off
MaskType "Stateflow"
MaskDescription "Embedded MATLAB block"
MaskDisplay "disp('fcn');"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Embedded\nMATLAB Function1"
Location [257, 457, 812, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "Ia"
Position [20, 101, 40, 119]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Ib"
Position [20, 136, 40, 154]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Ic"
Position [20, 171, 40, 189]
Port "3"
IconDisplay "Port number"
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 180, 320, 220]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function tppfc 2"
Ports [3, 3]
Position [180, 100, 230, 180]
FunctionName "sf_sfun"
PortCounts "[3 3]"
Port {
PortNumber 2
Name "Ibata"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
Port {
PortNumber 3
Name "Ialfa"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 191, 480, 209]
}
Block {
BlockType Outport
Name "Ibata"
Position [460, 101, 480, 119]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Ialfa"
Position [460, 136, 480, 154]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [0, 85]
DstBlock " Demux "
DstPort 1
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock "Ia"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
Name "Ibata"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "Ibata"
DstPort 1
}
Line {
SrcBlock "Ib"
SrcPort 1
Points [120, 0]
DstBlock " SFunction "
DstPort 2
}
Line {
SrcBlock "Ic"
SrcPort 1
DstBlock " SFunction "
DstPort 3
}
Line {
Name "Ialfa"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 3
DstBlock "Ialfa"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "Ibata"
Position [210, 43, 240, 57]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Valfa"
Position [210, 73, 240, 87]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Embedded\nMATLAB Function1"
SrcPort 1
Points [0, 0]
DstBlock "Ibata"
DstPort 1
}
Line {
SrcBlock "Embedded\nMATLAB Function1"
SrcPort 2
Points [0, 0]
DstBlock "Valfa"
DstPort 1
}
Line {
SrcBlock "Ia"
SrcPort 1
Points [15, 0; 0, 10]
DstBlock "Embedded\nMATLAB Function1"
DstPort 1
}
Line {
SrcBlock "Ib"
SrcPort 1
Points [0, 0]
DstBlock "Embedded\nMATLAB Function1"
DstPort 2
}
Line {
SrcBlock "Ic"
SrcPort 1
Points [15, 0; 0, -10]
DstBlock "Embedded\nMATLAB Function1"
DstPort 3
}
}
}
Block {
BlockType Sum
Name "Add"
Ports [2, 1]
Position [565, 72, 595, 103]
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Add1"
Ports [2, 1]
Position [575, 277, 605, 308]
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain"
Position [340, 60, 370, 90]
Gain "0.0038"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain1"
Position [350, 385, 380, 415]
Gain "0.0049"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType SubSystem
Name "PI\n"
Ports [2, 1]
Position [345, 120, 385, 180]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "PI\n"
Location [2, 82, 1270, 977]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "in"
Position [25, 33, 55, 47]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "ref\n"
Position [25, 93, 55, 107]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [305, 105, 335, 135]
IgnoreLimit off
}
Block {
BlockType Gain
Name "Ki"
Position [200, 105, 230, 135]
Gain "0.000305"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Kp"
Position [200, 25, 230, 55]
Gain "0.0189"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Saturate
Name "Saturation"
Position [455, 25, 485, 55]
UpperLimit "0.05"
LowerLimit "-0.05"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [385, 30, 405, 50]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [95, 30, 115, 50]
ShowName off
IconShape "round"
Inputs "|-+"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Out1"
Position [545, 33, 575, 47]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Sum2"
SrcPort 1
Points [0, 0; 30, 0]
Branch {
DstBlock "Kp"
DstPort 1
}
Branch {
Points [0, 80]
DstBlock "Ki"
DstPort 1
}
}
Line {
SrcBlock "Kp"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Ki"
SrcPort 1
Points [0, 0]
DstBlock "Integrator"
DstPort 1
}
Line {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -