📄 s2o.mdl
字号:
}
Line {
SrcBlock "in_(wr/wb)*psidr'"
SrcPort 1
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "Fcn5"
SrcPort 1
DstBlock "out_iqr'"
DstPort 1
}
Annotation {
Position [602, 127]
VerticalAlignment top
Text "iqs"
}
Annotation {
Position [382, 132]
VerticalAlignment top
Text "psiqs"
}
Annotation {
Position [667, 207]
VerticalAlignment top
Text "psiqm"
}
Annotation {
Position [602, 299]
VerticalAlignment top
Text "iqr'"
}
Annotation {
Position [392, 283]
VerticalAlignment top
Text "psiqr'"
}
}
}
Block {
BlockType SubSystem
Name "Rotor"
Position [440, 194, 480, 266]
Orientation left
ShowPortLabels off
System {
Name "Rotor"
Location [94, 117, 729, 363]
Open off
ScreenColor white
Block {
BlockType Inport
Name "psids"
Position [65, 40, 85, 60]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "iqs"
Position [65, 80, 85, 100]
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "psiqs"
Position [65, 120, 85, 140]
Port "3"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "ids"
Position [65, 160, 85, 180]
Port "4"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "Tload"
Position [65, 200, 85, 220]
Port "5"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Integrator
Name "1/s"
Position [480, 113, 515, 147]
ExternalReset none
InitialConditionSource internal
InitialCondition "0"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Gain
Name "3P/4wb"
Position [225, 81, 315, 139]
Gain "3*P/(4*wb)"
}
Block {
BlockType Sum
Name "Sum"
Position [175, 83, 195, 132]
Inputs "+-"
}
Block {
BlockType Sum
Name "Sum1"
Position [355, 90, 375, 170]
Inputs "+-"
}
Block {
BlockType Product
Name "psidiqs"
Position [120, 50, 140, 85]
Inputs "2"
}
Block {
BlockType Product
Name "psiqids"
Position [120, 126, 140, 159]
Inputs "2"
}
Block {
BlockType Gain
Name "wb/2H"
Position [390, 104, 455, 156]
Gain "1/(2*H)"
}
Block {
BlockType Outport
Name "Tem_out"
Position [540, 60, 560, 80]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "wr/wb"
Position [545, 118, 565, 142]
Port "2"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "3P/4wb"
DstPort 1
}
Line {
SrcBlock "psiqs"
SrcPort 1
Points [5, 0; 0, 5]
DstBlock "psiqids"
DstPort 1
}
Line {
SrcBlock "iqs"
SrcPort 1
Points [5, 0; 0, -15]
DstBlock "psidiqs"
DstPort 2
}
Line {
SrcBlock "psids"
SrcPort 1
Points [5, 0; 0, 10]
DstBlock "psidiqs"
DstPort 1
}
Line {
SrcBlock "psidiqs"
SrcPort 1
Points [15, 0]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "psiqids"
SrcPort 1
Points [15, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "1/s"
SrcPort 1
DstBlock "wr/wb"
DstPort 1
}
Line {
SrcBlock "Tload"
SrcPort 1
Points [235, 0; 0, -60]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "ids"
SrcPort 1
Points [5, 0; 0, -20]
DstBlock "psiqids"
DstPort 2
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "wb/2H"
DstPort 1
}
Line {
SrcBlock "wb/2H"
SrcPort 1
DstBlock "1/s"
DstPort 1
}
Line {
SrcBlock "3P/4wb"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "Sum1"
DstPort 1
}
Branch {
Points [5, 0; 0, -40]
DstBlock "Tem_out"
DstPort 1
}
}
Annotation {
Position [277, 47]
VerticalAlignment top
Text "Rotor's Equation of Motion"
}
}
}
Block {
BlockType Scope
Name "Scope"
Position [515, 24, 530, 46]
Floating off
Location [19, 428, 750, 582]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "2"
YMin "-300"
YMax "300"
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows off
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Selector
Name "Selector"
Position [435, 26, 480, 44]
Elements "[2 3 4 7]"
InputPortWidth "7"
}
Block {
BlockType Sum
Name "Sum"
Position [690, 226, 710, 264]
Inputs "+++"
}
Block {
BlockType Terminator
Name "T"
Position [215, 256, 225, 264]
}
Block {
BlockType Terminator
Name "T1"
Position [230, 276, 240, 284]
}
Block {
BlockType Terminator
Name "T2"
Position [350, 146, 360, 154]
}
Block {
BlockType Terminator
Name "T3"
Position [365, 326, 375, 334]
}
Block {
BlockType SubSystem
Name "Tmech"
Position [405, 268, 430, 282]
ShowPortLabels off
MaskType "Repeating table"
MaskDescription "Repeating table."
MaskHelp "Repeats cycle given in table. Time values "
"should be monotonically increasing."
MaskPromptString "Time values:|Output values:"
MaskStyleString "edit,edit"
MaskVariables "rep_seq_t=@1;rep_seq_y=@2;"
MaskInitialization "period = max(rep_seq_t);\n"
MaskDisplay "plot([rep_seq_t,rep_seq_t+period,rep_seq_t+2*per"
"iod,rep_seq_t(1)+3*period],[rep_seq_y,rep_seq_y,"
"rep_seq_y,rep_seq_y(1)])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits autoscale
MaskValueString "time_tmech|tmech_tmech"
System {
Name "Tmech"
Location [382, 166, 692, 322]
Open off
ScreenColor white
Block {
BlockType Clock
Name "Clock"
Position [45, 60, 65, 80]
DeleteFcn "simclock BlockIsBeingDestroyed"
PostSaveFcn "simclock Save"
Location [30, 40, 110, 80]
}
Block {
BlockType Fcn
Name "Fcn1"
Position [110, 60, 150, 80]
Expr "rem(u[1],period)"
}
Block {
BlockType Lookup
Name "Look-Up Table"
Position [210, 58, 250, 82]
InputValues "rep_seq_t"
OutputValues "rep_seq_y"
}
Block {
BlockType Outport
Name "out_1"
Position [285, 60, 305, 80]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "Look-Up Table"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "Fcn1"
DstPort 1
}
Line {
SrcBlock "Fcn1"
SrcPort 1
DstBlock "Look-Up Table"
DstPort 1
}
}
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [280, 27, 320, 43]
Orientation left
VariableName "y"
Buffer "80000"
Decimation "2"
SampleTime "0"
}
Block {
BlockType SubSystem
Name "Variable \nFreq. source"
Position [50, 193, 95, 267]
ShowPortLabels off
System {
Name "Variable \nFreq. source"
Location [61, 189, 853, 500]
Open off
ScreenColor white
Block {
BlockType Gain
Name "-1"
Position [185, 233, 225, 267]
Gain "-1"
}
Block {
BlockType Fcn
Name "Fcn"
Position [415, 98, 535, 132]
Expr "u[1]"
}
Block {
BlockType Fcn
Name "Fcn1"
Position [410, 156, 530, 194]
Expr "(-u[1]-sqrt(3)*u[2])/2"
}
Block {
BlockType Fcn
Name "Fcn2"
Position [410, 218, 535, 252]
Expr "(-u[1]+sqrt(3)*u[2])/2"
}
Block {
BlockType SubSystem
Name "Inner\nProduct"
Position [135, 231, 160, 264]
ShowPortLabels off
MaskType "Dot Product"
MaskDescription "Inner (dot) product.\ny=sum(u1.*u2)"
MaskHelp "Computes the inner (dot) product of the "
"inputs: sum(u1.*u2). The inputs are "
"vectors of the same length. Output is "
"a scalar."
MaskDisplay "disp('.\\n')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits autoscale
System {
Name "Inner\nProduct"
Location [33, 479, 253, 634]
Open off
ScreenColor white
Block {
BlockType Inport
Name "in_1"
Position [15, 25, 35, 45]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_2"
Position [15, 90, 35, 110]
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Product
Name "Product"
Position [65, 55, 90, 75]
Inputs "2"
}
Block {
BlockType Sum
Name "Sum"
Position [125, 55, 145, 75]
Inputs "+"
}
Block {
BlockType Outport
Name "out_1"
Position [185, 55, 205, 75]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "in_2"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Inner\nProduct1"
Position [170, 120, 195, 155]
ShowPortLabels off
MaskType "Dot Product"
MaskDescription "Inner (dot) product.\ny=sum(u1.*u2)"
MaskHelp "Computes the inner (dot) product of the "
"inputs: sum(u1.*u2). The inputs are "
"vectors of the same length. Output is "
"a scalar."
MaskDisplay "disp('.\\n')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits autoscale
System {
Name "Inner\nProduct1"
Location [33, 479, 253, 634]
Open off
ScreenColor white
Block {
BlockType Inport
Name "in_1"
Position [15, 25, 35, 45]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_2"
Position [15, 90, 35, 110]
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Product
Name "Product"
Position [65, 55, 90, 75]
Inputs "2"
}
Block {
BlockType Sum
Name "Sum"
Position [125, 55, 145, 75]
Inputs "+"
}
Block {
BlockType Outport
Name "out_1"
Position [185, 55, 205, 75]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "in_2"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
}
}
Block {
BlockType Mux
Name "Mux"
Position [340, 104, 370, 246]
Inputs "2"
}
Block {
BlockType Product
Name "Product"
Position [650, 98, 680, 122]
Inputs "2"
}
Block {
BlockType Product
Name "Product1"
Position [655, 158, 685, 182]
Inputs "2"
}
Block {
BlockType Product
Name "Product2"
Position [655, 218, 685, 242]
Inputs "2"
}
Block {
BlockType SubSystem
Name "Sign"
Position [570, 102, 600, 128]
ShowPortLabels off
MaskType "Sign"
MaskDescription "y = sign(x)"
MaskHelp "Sign Function:\\n\\t\\t\\ty = 1 if x "
"> 0\\n\\t\\t\\ty = 0 if x = 0\\n\\t\\t\\ty "
"= -1 if x < 0"
MaskDisplay "plot(-50,-50,50,50,[-50,50],[0,0],[0,0],[-50"
",50],[-40,0],[-30,-30],[0,40],[30,30])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits autoscale
System {
Name "Sign"
Location [159, 417, 467, 586]
Open off
ScreenColor white
Block {
BlockType Inport
Name "in_1"
Position [35, 30, 55, 50]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Constant
Name "Constant"
Position [65, 105, 85, 125]
Value "0"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [140, 32, 170, 63]
Operator >
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator1"
Position [140, 92, 170, 123]
Operator <
}
Block {
BlockType Sum
Name "Sum"
Position [215, 64, 235, 91]
Inputs "+-"
}
Block {
BlockType Outport
Name "out_1"
Position [265, 70, 285, 90]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "in_1"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "Relational\nOperator"
DstPort 1
}
Branch {
Points [0, 60]
DstBlock "Relational\nOperator1"
DstPort 1
}
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Relational\nOperator1"
DstPort 2
}
Branch {
Points [0, -60]
DstBlock "Relational\nOperator"
DstPort 2
}
}
Line {
SrcBlock "Relational\nOperator1"
SrcPort 1
Points [10, 0; 0, -25]
DstBlock "Sum"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -