📄 swing2.mdl
字号:
LinearAnalysisInput off
RTWStorageClass "Auto"
}
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [295, 266, 300, 304]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Constant
Name "Pm"
Position [200, 175, 235, 205]
Value "Pm"
VectorParams1D on
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [95, 257, 125, 288]
ShowName off
Operator "<="
}
Block {
BlockType SubSystem
Name "SubSystem"
Ports []
Position [15, 149, 174, 185]
BackgroundColor "yellow"
DropShadow on
ShowName off
OpenFcn "edit(which('swing2run.m'))"
FontSize 12
FontWeight "bold"
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskDisplay "disp('Double click this block\\nto modify the p"
"arameters');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "SubSystem"
Location [152, 182, 650, 482]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
}
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [280, 20, 310, 50]
ShowName off
IconShape "round"
Inputs "|-+"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum2"
Ports [3, 1]
Position [280, 175, 310, 205]
ShowName off
IconShape "round"
Inputs "-+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Constant
Name "Xafter"
Position [140, 215, 175, 245]
Value "Xafter"
VectorParams1D on
}
Block {
BlockType Constant
Name "Xduring"
Position [140, 300, 175, 330]
Value "Xduring"
VectorParams1D on
}
Block {
BlockType Switch
Name "switch"
Position [205, 241, 245, 309]
Threshold "0.5"
Port {
PortNumber 1
Name "X"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
}
}
Block {
BlockType Gain
Name "wo\n"
Position [345, 14, 390, 56]
Gain "2*pi*f"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Constant
Name "ws"
Position [200, 20, 240, 50]
Value "1"
VectorParams1D on
}
Block {
BlockType Outport
Name "angle"
Position [530, 28, 560, 42]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "speed"
Position [535, 183, 565, 197]
Port "2"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "power"
Position [535, 278, 565, 292]
Port "3"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "ws"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
Name "delta"
Labels [1, 0]
SrcBlock "Integrator"
SrcPort 1
Points [40, 0]
Branch {
Points [0, 300; -230, 0; 0, -40]
DstBlock "Mux"
DstPort 2
}
Branch {
DstBlock "angle"
DstPort 1
}
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "wo\n"
DstPort 1
}
Line {
SrcBlock "Clearing\ntime"
SrcPort 1
Points [20, 0]
DstBlock "Relational\nOperator"
DstPort 1
}
Line {
SrcBlock "Xafter"
SrcPort 1
Points [10, 0]
DstBlock "switch"
DstPort 1
}
Line {
SrcBlock "Xduring"
SrcPort 1
Points [10, 0]
DstBlock "switch"
DstPort 3
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
DstBlock "switch"
DstPort 2
}
Line {
Name "X"
Labels [1, 0]
SrcBlock "switch"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Clock"
SrcPort 1
Points [25, 0]
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "EVsin(delta)/X"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "1/2H"
DstPort 1
}
Line {
SrcBlock "1/2H"
SrcPort 1
DstBlock "Integrator1"
DstPort 1
}
Line {
Name "wm"
Labels [1, 0]
SrcBlock "Integrator1"
SrcPort 1
Points [20, 0]
Branch {
Points [0, -100; -185, 0]
DstBlock "Sum1"
DstPort 2
}
Branch {
DstBlock "speed"
DstPort 1
}
}
Line {
SrcBlock "Pm"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "D"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "wo\n"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Integrator"
DstPort 1
}
Branch {
Points [0, 75; -105, 0]
DstBlock "D"
DstPort 1
}
}
Line {
Name "Pe"
SrcBlock "EVsin(delta)/X"
SrcPort 1
Points [15, 0]
Branch {
Labels [1, 0]
DstBlock "power"
DstPort 1
}
Branch {
Points [0, -50; -150, 0]
DstBlock "Sum2"
DstPort 3
}
}
Annotation {
Position [103, 32]
ForegroundColor "red"
Text "TRANSIENT\nSTABILITY"
FontSize 14
FontWeight "bold"
}
Annotation {
Position [257, 156]
Text "Damping"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -