📄 fm_lib.mdl
字号:
}
Block {
BlockType SubSystem
Name "Link"
Tag "PSATblock"
Description "Connection"
Ports [1, 1, 1, 0, 0]
Position [114, 115, 146, 145]
Orientation "down"
ShowName off
ShowPortLabels on
MaskType "Link"
MaskDescription "Link block"
MaskInitialization "if strcmp(get_param(gcb,'NamePlacement'),'a"
"lternate')\n rot = 0;\nelse\n rot = 1;\nend\n\n"
MaskDisplay "plot([0.45 0],[0.5 0.5],[1 0.55],[0.5 0.5],"
"[0.5 0.5],rot*0.45+[0.1 0.45])\nplot([0.45 0.55 0.55 0.45 0.45],[0.45 0.45 0."
"55 0.55 0.45])\nplot([0.45 0.55 0.55 0.45 0.45],rot*0.9+[0 0 0.1 0.1 0],1-rot"
",1-rot)\n"
MaskSelfModifiable on
MaskIconFrame off
MaskIconOpaque on
MaskIconRotate "port"
MaskIconUnits "autoscale"
System {
Name "Link"
Location [202, 335, 468, 506]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [50, 55, 70, 75]
Port "1"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType EnablePort
Name "Enable"
Ports [0, 0, 0, 0, 0]
Position [115, 110, 135, 130]
StatesWhenEnabling "held"
ShowOutputPort off
}
Block {
BlockType Outport
Name "out_1"
Position [180, 55, 200, 75]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Annotation {
Text "Link"
Position [125, 26]
}
}
}
Annotation {
Text "Buses & Connections"
Position [175, 32]
ForegroundColor "blue"
FontSize 12
}
Annotation {
Text "Link"
Position [156, 128]
}
}
}
Block {
BlockType SubSystem
Name "Controls"
Tag "PSATfolder"
Description "Controls"
Ports [0, 0, 0, 0, 0]
Position [278, 136, 339, 194]
FontSize 12
ShowPortLabels on
MaskDisplay "image(imread([Path.images,'sim_controls.jpg'],'"
"jpeg'))"
MaskIconFrame off
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Controls"
Location [148, 132, 497, 347]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType SubSystem
Name "AVR"
Tag "PSATblock"
Description "Controls"
Ports [2, 1, 0, 0, 0]
Position [160, 64, 205, 91]
ShowName off
ShowPortLabels on
MaskType "Exc"
MaskDescription "This block defines an Automatic Voltage Reg"
"ulator."
MaskHelp "This block defines an Automatic Voltage Reg"
"ulator.\nThere are three kind of regulators:\n\nType 1:\n\n IEEE Model 1"
"\n\nType 2:\n\n IEEE Model 2\n\nType 3:\n \n IEEE Model 3"
MaskPromptString "Automatic Voltage Regulator Type|Maximum Re"
"gulator Voltage [p.u.]|Minimum Regulator Voltage [p.u.]|Regulator Gain m0 [p."
"u./p.u.]|First Regulator Pole T1 [s]|First Regulator Zero T2 [s]|Second Regul"
"ator Pole T3 [s]|Second Regulator Zero T4 [s]|Time Constant of the Field Circ"
"uit Td [s]|Time Delay of the Measurement System Tr [s]|Coefficient of the Cei"
"ling Function (A B)|Number of input signals"
MaskStyleString "popup(1|2|3),edit,edit,edit,edit,edit,edit,"
"edit,edit,edit,edit,popup(0|1|2|3)"
MaskTunableValueString "on,on,on,on,on,on,on,on,on,on,on,on"
MaskCallbackString "fm_block|||||||||||"
MaskEnableString "on,on,on,on,on,on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on,on,on,on,on,on,on"
MaskVariables "p2q=@1;p3q=@2;p4q=@3;p5q=@4;p6q=@5;p7q=@6;p"
"8q=@7;p9q=@8;p10q=@9;p11q=@10;p12_13q=@11;in=@12;"
MaskInitialization "fm_inout\n[x,y] = fm_draw('R');"
MaskDisplay "plot([-1.3 -0.5],[-1 1],[-0.5 0.3],[1 -1],["
"-0.9 -0.1],[0.0 0.0])\nplot(2.8+1.3*x,2*y,1.5+[-1.3 -0.5],[1 -1],1.5+[-0.5 0."
"3],[-1 1])\nplot([-1.8 4.1 4.1 -1.8 -1.8],[-1.5 -1.5 1.5 1.5 -1.5])"
MaskIconFrame off
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "1|5.00|-5.00|400|0.10|0.45|1.00|0.01|1.00|0"
".001|[0.0006 0.9]|2"
System {
Name "AVR"
Location [158, 247, 492, 439]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [25, 25, 45, 45]
Port "1"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType Inport
Name "in_2"
Position [25, 75, 45, 95]
Port "2"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType Constant
Name "Constant"
Position [170, 100, 200, 130]
ShowName off
Value "1"
}
Block {
BlockType Terminator
Name "t1"
Position [80, 20, 105, 50]
}
Block {
BlockType Terminator
Name "t2"
Position [80, 70, 105, 100]
}
Block {
BlockType Outport
Name "Out1"
Position [240, 105, 260, 125]
ShowName off
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "t1"
DstPort 1
}
Line {
SrcBlock "in_2"
SrcPort 1
DstBlock "t2"
DstPort 1
}
Annotation {
Text "Automatic Voltage Regulator"
Position [234, 30]
}
}
}
Block {
BlockType SubSystem
Name "CAC"
Tag "PSATblock"
Description "Controls"
Ports [1, 2, 0, 0, 0]
Position [260, 129, 305, 156]
ShowName off
ShowPortLabels on
MaskType "Cac"
MaskDescription "This block defines a Central Area Controlle"
"r"
MaskPromptString "Number of connected clusters|Integral gain "
"constant KI|Proportional gain constant KP|Control signal limits q_max, q_min"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskVariables "p4q=@1;p6q=@2;p7q=@3;p8_9q=@4;"
MaskInitialization "fm_inout\n[x,y] = fm_draw('C');"
MaskDisplay "plot([1 0 0 1 1],[1 1 0 0 1])\nplot([0.35 0"
".5 0.65],[0.2 0.8 0.2],[0.4 0.6],[0.4 0.4])\nplot(0.1+0.2*x,0.5+0.6*y,0.7+0.2"
"*x,0.5+0.6*y)"
MaskIconFrame off
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "2|0.02|1|[1.1 0.9]"
System {
Name "CAC"
Location [381, 229, 701, 459]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [130, 150, 150, 170]
ShowName off
Port "1"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType Constant
Name "Constant"
Position [55, 85, 85, 115]
ShowName off
Value "1"
}
Block {
BlockType Constant
Name "Constant1"
Position [170, 85, 200, 115]
ShowName off
Value "1"
}
Block {
BlockType Terminator
Name "Terminator4"
Position [180, 150, 200, 170]
ShowName off
}
Block {
BlockType Outport
Name "Out1"
Position [125, 93, 155, 107]
ShowName off
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "Out2"
Position [240, 93, 270, 107]
ShowName off
Port "2"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Constant1"
SrcPort 1
DstBlock "Out2"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Terminator4"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Annotation {
Text "Central Area Control"
Position [164, 45]
}
}
}
Block {
BlockType SubSystem
Name "Cluster"
Tag "PSATblock"
Description "Controls"
Ports [1, 1, 0, 0, 0]
Position [265, 61, 295, 89]
ShowName off
ShowPortLabels on
MaskType "Cluster"
MaskDescription "This block defines Cluster Controler (Secon"
"dary Voltage Regulator)."
MaskPromptString "Integral time constant T [s]|Equivalent rea"
"ctance Xtg [p.u.]|Equivalent reactance Xeq [p.u.]|Output signal limits Vs_max"
", Vs_min"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskVariables "p4q=@1;p5q=@2;p6q=@3;p8_9q=@4;"
MaskInitialization "[x,y] = fm_draw('C');"
MaskDisplay "plot([1 0 0 1 1],[1 1 0 0 1])\nplot(0.1+0.3"
"*x,0.5+0.6*y,0.6+0.3*x,0.5+0.6*y)"
MaskIconFrame off
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "5|0|1|[0.15 -0.2]"
System {
Name "Cluster"
Location [381, 229, 648, 436]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -