📄 s4stp.mdl
字号:
Model {
Name "s4stp"
Version 2.00
SimParamPage Solver
SampleTimeColors off
WideVectorLines off
PaperOrientation landscape
StartTime "0.0"
StopTime "1.2"
Solver ode15s
RelTol "1e-6"
AbsTol "1e-6"
Refine "1"
MaxStep "0.0005"
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 "s4stp"
Location [76, 59, 630, 240]
Open on
ScreenColor white
Block {
BlockType Clock
Name "Clock"
Position [325, 90, 345, 110]
Orientation down
DeleteFcn "simclock BlockIsBeingDestroyed"
PostSaveFcn "simclock Save"
Location [30, 40, 140, 75]
}
Block {
BlockType SubSystem
Name "m4stp"
Position [327, 22, 407, 59]
DropShadow on
OpenFcn "m4stp"
ShowPortLabels off
MaskType "Masked block of m4stp.m"
MaskHelp "Uses m4stp.m to initialize and plot"
MaskDisplay "disp('Initialize\\nand plot')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits autoscale
System {
Name "m4stp"
Location [275, 32767, 520, 32767]
Open off
ScreenColor white
Annotation {
Position [142, 48]
VerticalAlignment top
Text "This masked block uses m4stp.m\nto initiali"
"ze the s4stp.m with\nmachine parameters "
"and plot the simulated\nresults."
}
}
}
Block {
BlockType Mux
Name "Mux"
Position [360, 111, 390, 144]
Inputs "2"
}
Block {
BlockType Scope
Name "Scope"
Position [435, 74, 460, 96]
Floating off
Location [74, 236, 660, 455]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "1.200000"
YMin "-2.000000"
YMax "2.000000"
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Terminator
Name "Term"
Position [280, 39, 290, 51]
}
Block {
BlockType Terminator
Name "Term1"
Position [280, 69, 290, 81]
}
Block {
BlockType Terminator
Name "Term2"
Position [285, 99, 295, 111]
}
Block {
BlockType Constant
Name "Tmech"
Position [85, 120, 145, 140]
Value "-Tb"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [425, 122, 475, 138]
VariableName "y"
Buffer "500"
Decimation "1"
SampleTime "0"
}
Block {
BlockType Ground
Name "Vdse"
Position [130, 80, 150, 100]
}
Block {
BlockType SubSystem
Name "Vqse"
Position [85, 33, 145, 67]
ShowPortLabels off
MaskType "Repeating table"
MaskDescription "Repeating table.\nEnter values of time and "
"output for first cycle."
MaskHelp "Repeats cycle given in table. Time values "
"should be monotonically increasing."
MaskPromptString "Time values:|Output values:"
MaskStyleString "edit,edit"
MaskInitialization "period = max(@1); t = @1; y = @2;"
MaskDisplay "plot([t,t+period,t+2*period],[y,y,y])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits autoscale
MaskValueString "[0 1 1 1.2]|[Vm Vm Vm+1 Vm+1]"
System {
Name "Vqse"
Location [5, 40, 315, 196]
Open off
ScreenColor white
Block {
BlockType Clock
Name "Clock"
Position [45, 60, 65, 80]
DeleteFcn "simclock BlockIsBeingDestroyed"
PostSaveFcn "simclock Save"
Location [30, 40, 140, 75]
}
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 "t"
OutputValues "y"
}
Block {
BlockType Outport
Name "out_1"
Position [285, 60, 305, 80]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "Fcn1"
SrcPort 1
DstBlock "Look-Up Table"
DstPort 1
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "Fcn1"
DstPort 1
}
Line {
SrcBlock "Look-Up Table"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "S4EIG"
Position [180, 26, 260, 154]
ShowPortLabels off
System {
Name "S4EIG"
Location [99, 120, 718, 538]
Open off
ScreenColor white
Block {
BlockType Inport
Name "in_vqse"
Position [50, 45, 70, 65]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_vdse"
Position [50, 225, 70, 245]
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_Tmech"
Position [50, 285, 70, 305]
Port "3"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType SubSystem
Name "Daxis"
Position [155, 225, 190, 280]
ShowPortLabels off
System {
Name "Daxis"
Location [213, 440, 1045, 854]
Open off
ScreenColor white
Block {
BlockType Inport
Name "in_vds"
Position [40, 130, 60, 150]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_(wr/wb)*psiqr'"
Position [40, 290, 60, 310]
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_psiqs"
Position [35, 170, 55, 190]
Port "3"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Fcn
Name "Fcn"
Position [130, 135, 370, 165]
Expr "wb*(u[2]+(we/wb)*u[4]+(rs/xls)*(u[1]-u[3"
"]))"
}
Block {
BlockType Fcn
Name "Fcn2"
Position [165, 284, 345, 316]
Expr "wb*(-u[2] +(rpr/xplr)*(u[3]-u[1]))"
}
Block {
BlockType Fcn
Name "Fcn3"
Position [535, 207, 685, 243]
Expr "xM*(u[1]/xls+u[2]/xplr)"
}
Block {
BlockType Fcn
Name "Fcn4"
Position [545, 126, 635, 154]
Expr "(u[1]-u[2])/xls"
}
Block {
BlockType Fcn
Name "Fcn5"
Position [540, 300, 635, 330]
Expr "(u[1]-u[2])/xplr"
}
Block {
BlockType Mux
Name "Mux"
Position [95, 108, 115, 192]
Inputs "4"
}
Block {
BlockType Mux
Name "Mux1"
Position [100, 262, 120, 338]
Inputs "3"
}
Block {
BlockType Mux
Name "Mux2"
Position [500, 286, 520, 339]
Inputs "2"
}
Block {
BlockType Mux
Name "Mux3"
Position [495, 193, 515, 257]
Inputs "2"
}
Block {
BlockType Mux
Name "Mux4"
Position [500, 114, 520, 161]
Inputs "2"
}
Block {
BlockType Integrator
Name "psidr'_"
Position [395, 287, 425, 313]
ExternalReset none
InitialConditionSource internal
InitialCondition "Psipdro"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Integrator
Name "psids_"
Position [390, 136, 415, 164]
ExternalReset none
InitialConditionSource internal
InitialCondition "Psidso"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Outport
Name "out_psids"
Position [785, 65, 805, 85]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_ids"
Position [785, 130, 805, 150]
Port "2"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_idr'"
Position [785, 305, 805, 325]
Port "3"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_psidr'"
Position [785, 260, 805, 280]
Port "4"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "in_psiqs"
SrcPort 1
DstBlock "Mux"
DstPort 4
}
Line {
SrcBlock "Fcn5"
SrcPort 1
DstBlock "out_idr'"
DstPort 1
}
Line {
SrcBlock "in_(wr/wb)*psiqr'"
SrcPort 1
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "in_vds"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Fcn4"
SrcPort 1
DstBlock "out_ids"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Fcn"
DstPort 1
}
Line {
SrcBlock "Fcn"
SrcPort 1
DstBlock "psids_"
DstPort 1
}
Line {
SrcBlock "Fcn2"
SrcPort 1
DstBlock "psidr'_"
DstPort 1
}
Line {
SrcBlock "Mux3"
SrcPort 1
DstBlock "Fcn3"
DstPort 1
}
Line {
SrcBlock "Mux4"
SrcPort 1
DstBlock "Fcn4"
DstPort 1
}
Line {
SrcBlock "psids_"
SrcPort 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -