📄 s5.mdl
字号:
Model {
Name "s5"
Version 2.00
SimParamPage Solver
SampleTimeColors off
WideVectorLines off
PaperOrientation landscape
StartTime "0.0"
StopTime "tstop"
Solver ode15s
RelTol "1e-6"
AbsTol "1e-6"
Refine "1"
MaxStep "1e-2"
InitialStep "auto"
FixedStep "auto"
MaxOrder 5
OutputOption RefineOutputTimes
OutputTimes "[]"
LoadExternalInput off
ExternalInput "[t, u]"
SaveTime off
TimeSaveName "tout"
SaveState off
StateSaveName "xout"
SaveOutput off
OutputSaveName "yout"
LoadInitialState off
InitialState "xInitial"
SaveFinalState off
FinalStateName "xFinal"
LimitMaxRows off
MaxRows "1000"
Decimation "1"
AlgebraicLoopMsg warning
MinStepSizeMsg warning
UnconnectedInputMsg warning
UnconnectedOutputMsg warning
UnconnectedLineMsg warning
ConsistencyChecking off
ZeroCross on
BlockDefaults {
Orientation right
ForegroundColor black
BackgroundColor white
DropShadow off
NamePlacement normal
FontName "Helvetica"
FontSize 10
FontWeight normal
FontAngle normal
ShowName on
}
AnnotationDefaults {
HorizontalAlignment center
VerticalAlignment middle
ForegroundColor black
BackgroundColor white
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight normal
FontAngle normal
}
System {
Name "s5"
Location [1, 43, 768, 526]
Open on
ScreenColor white
Block {
BlockType Clock
Name "Clock"
Position [235, 125, 255, 145]
Orientation up
DeleteFcn "simclock BlockIsBeingDestroyed"
PostSaveFcn "simclock Save"
Location [30, 40, 140, 75]
}
Block {
BlockType TransferFcn
Name "Current\nController1"
Position [235, 162, 275, 198]
Numerator "[5 1]"
Denominator "[1 0]"
}
Block {
BlockType TransferFcn
Name "Current\nController2"
Position [255, 248, 295, 282]
Numerator "[5 1]"
Denominator "[1 0]"
}
Block {
BlockType SubSystem
Name "Feedback"
Position [400, 376, 460, 444]
Orientation left
ShowPortLabels off
System {
Name "Feedback"
Location [11, 196, 815, 465]
Open off
ScreenColor white
Block {
BlockType Inport
Name "cos_thetar"
Position [75, 75, 95, 95]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "sin_thetar"
Position [75, 115, 95, 135]
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "ia"
Position [75, 155, 95, 175]
Port "3"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "ib"
Position [75, 190, 95, 210]
Port "4"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "ic"
Position [75, 225, 95, 245]
Port "5"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Mux
Name "Mux3"
Position [445, 83, 470, 232]
Inputs "4"
}
Block {
BlockType Fcn
Name "Tem"
Position [500, 172, 670, 198]
Expr "u[2]*u[3] - u[1]*u[4]"
}
Block {
BlockType SubSystem
Name "abc2qd"
Position [155, 77, 210, 253]
ShowPortLabels off
System {
Name "abc2qd"
Location [50, 271, 596, 583]
Open off
ScreenColor white
Block {
BlockType Inport
Name "in_1"
Position [15, 75, 35, 95]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_2"
Position [15, 120, 35, 140]
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_3"
Position [15, 155, 35, 175]
Port "3"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_4"
Position [15, 190, 35, 210]
Port "4"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_5"
Position [15, 225, 35, 245]
Port "5"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Mux
Name "Mux"
Position [50, 148, 75, 252]
Inputs "3"
}
Block {
BlockType Mux
Name "Mux1"
Position [250, 66, 280, 239]
Inputs "4"
}
Block {
BlockType Fcn
Name "abc2d"
Position [100, 209, 225, 231]
Expr "(u[3] -u[2])/sqrt(3)"
}
Block {
BlockType Fcn
Name "abc2q"
Position [100, 163, 225, 187]
Expr "(2*u[1]- u[2] - u[3])/3"
}
Block {
BlockType Fcn
Name "qds2dr"
Position [310, 168, 445, 192]
Expr "u[2]*u[3] + u[1]*u[4] "
}
Block {
BlockType Fcn
Name "qds2qr"
Position [310, 118, 445, 142]
Expr "u[1]*u[3] - u[2]*u[4]"
}
Block {
BlockType Outport
Name "out_iq"
Position [500, 120, 520, 140]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_id"
Position [500, 170, 520, 190]
Port "2"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "in_5"
SrcPort 1
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "in_4"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "qds2dr"
SrcPort 1
DstBlock "out_id"
DstPort 1
}
Line {
SrcBlock "in_3"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "in_2"
SrcPort 1
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "qds2qr"
SrcPort 1
DstBlock "out_iq"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Mux1"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, 0]
Branch {
Points [5, 0]
DstBlock "abc2q"
DstPort 1
}
Branch {
Points [5, 0]
DstBlock "abc2d"
DstPort 1
}
}
Line {
SrcBlock "Mux1"
SrcPort 1
Points [0, 0]
Branch {
Points [5, 0; 0, -25]
DstBlock "qds2qr"
DstPort 1
}
Branch {
Points [5, 0; 0, 25]
DstBlock "qds2dr"
DstPort 1
}
}
Line {
SrcBlock "abc2q"
SrcPort 1
DstBlock "Mux1"
DstPort 3
}
Line {
SrcBlock "abc2d"
SrcPort 1
DstBlock "Mux1"
DstPort 4
}
Annotation {
Position [460, 118]
VerticalAlignment top
Text "iq"
}
Annotation {
Position [457, 167]
VerticalAlignment top
Text "id"
}
Annotation {
Position [237, 197]
VerticalAlignment top
Text "ids"
}
Annotation {
Position [237, 160]
VerticalAlignment top
Text "iqs"
}
Annotation {
Position [372, 247]
VerticalAlignment top
Text "qds2qdr"
}
Annotation {
Position [152, 272]
VerticalAlignment top
Text "abc2qd0"
}
}
}
Block {
BlockType Fcn
Name "psidgap"
Position [300, 138, 415, 162]
Expr "Ipm*xmd + u[1]*xd"
}
Block {
BlockType Fcn
Name "psigap"
Position [500, 122, 660, 148]
Expr "sqrt(u[1]*u[1] + u[2]*u[2])"
}
Block {
BlockType Fcn
Name "psiqgap"
Position [305, 94, 375, 116]
Expr "u[1]*xq"
}
Block {
BlockType Outport
Name "out_iq"
Position [705, 35, 725, 55]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_id"
Position [705, 70, 725, 90]
Port "2"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_psigap"
Position [705, 125, 725, 145]
Port "3"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_Tem"
Position [705, 175, 725, 195]
Port "4"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "abc2qd"
SrcPort 2
Points [0, 0]
Branch {
Points [50, 0; 0, -60]
DstBlock "psidgap"
DstPort 1
}
Branch {
Points [50, 0; 0, -130]
DstBlock "out_id"
DstPort 1
}
Branch {
DstBlock "Mux3"
DstPort 4
}
}
Line {
SrcBlock "abc2qd"
SrcPort 1
Points [0, 0]
Branch {
Points [20, 0; 0, -15]
DstBlock "psiqgap"
DstPort 1
}
Branch {
Points [20, 0; 0, -75]
DstBlock "out_iq"
DstPort 1
}
Branch {
Points [20, 0; 0, 55]
DstBlock "Mux3"
DstPort 3
}
}
Line {
SrcBlock "psigap"
SrcPort 1
DstBlock "out_psigap"
DstPort 1
}
Line {
SrcBlock "Tem"
SrcPort 1
DstBlock "out_Tem"
DstPort 1
}
Line {
SrcBlock "Mux3"
SrcPort 1
Points [0, 0]
Branch {
Points [0, -25]
DstBlock "psigap"
DstPort 1
}
Branch {
Points [0, 25]
DstBlock "Tem"
DstPort 1
}
}
Line {
SrcBlock "psidgap"
SrcPort 1
Points [5, 0; 0, -10]
DstBlock "Mux3"
DstPort 2
}
Line {
SrcBlock "psiqgap"
SrcPort 1
DstBlock "Mux3"
DstPort 1
}
Line {
SrcBlock "sin_thetar"
SrcPort 1
Points [20, 0; 0, 5]
DstBlock "abc2qd"
DstPort 2
}
Line {
SrcBlock "cos_thetar"
SrcPort 1
Points [35, 0; 0, 10]
DstBlock "abc2qd"
DstPort 1
}
Line {
SrcBlock "ic"
SrcPort 1
DstBlock "abc2qd"
DstPort 5
}
Line {
SrcBlock "ib"
SrcPort 1
DstBlock "abc2qd"
DstPort 4
}
Line {
SrcBlock "ia"
SrcPort 1
DstBlock "abc2qd"
DstPort 3
}
Annotation {
Position [217, 192]
VerticalAlignment top
Text "id"
}
Annotation {
Position [217, 102]
VerticalAlignment top
Text "iq"
}
}
}
Block {
BlockType TransferFcn
Name "Flux \ncontroller"
Position [160, 365, 215, 405]
Numerator "[16 4]"
Denominator "[1 0]"
}
Block {
BlockType Fcn
Name "Id-Iq"
Position [175, 229, 205, 251]
Expr "IdeIqe(1)*u[1]*u[1]+ IdeIqe(2)"
}
Block {
BlockType Constant
Name "Ipm"
Position [630, 225, 655, 245]
Value "Ipm"
}
Block {
BlockType SubSystem
Name "m5"
Position [72, 41, 145, 75]
DropShadow on
OpenFcn "m5"
ShowPortLabels off
MaskType "Masked block of m5.m"
MaskHelp "Uses m5.m to initialize and plot"
MaskDisplay "disp('Initialize\\nand plot')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits autoscale
System {
Name "m5"
Location [85, 32767, 240, 32767]
Open off
ScreenColor white
Annotation {
Position [122, 57]
VerticalAlignment top
Text "Masked block m5.m to initialize\ns5.m "
"in Chapter 10 and to plot results"
}
}
}
Block {
BlockType Mux
Name "Mux"
Position [163, 65, 877, 90]
Orientation up
Inputs "9"
}
Block {
BlockType RateLimiter
Name "Rate Limiter"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -