📄 s2.mdl
字号:
Model {
Name "s2"
Version 2.00
SimParamPage Solver
SampleTimeColors off
WideVectorLines off
PaperOrientation landscape
StartTime "0.0"
StopTime "tstop"
Solver ode15s
RelTol "1e-5"
AbsTol "1e-6"
Refine "1"
MaxStep "0.0010"
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 "s2"
Location [63, 71, 682, 398]
Open on
ScreenColor white
Block {
BlockType Gain
Name "1/C"
Position [355, 133, 395, 167]
Gain "1/C"
}
Block {
BlockType Gain
Name "1/L"
Position [410, 192, 445, 228]
Orientation left
Gain "1/L"
}
Block {
BlockType Gain
Name "1/Rs"
Position [180, 119, 220, 161]
Gain "1/Rs"
}
Block {
BlockType SubSystem
Name "m2init"
Position [156, 192, 230, 235]
DropShadow on
OpenFcn "m2init"
ShowPortLabels off
MaskType "Masked block of m2init.m"
MaskHelp "Uses m2init.m to initialize"
MaskDisplay "disp('Initialize\\nm2SIM')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits autoscale
System {
Name "m2init"
Location [120, 32767, 321, 32767]
Open off
ScreenColor white
Annotation {
Position [122, 52]
VerticalAlignment top
Text "Initialize above simulation \nusing the "
"values given in \nm2init."
}
}
}
Block {
BlockType SubSystem
Name "m2plot"
Position [77, 190, 124, 234]
DropShadow on
OpenFcn "m2plot"
ShowPortLabels off
MaskType "Masked block of m2plot.m"
MaskHelp "Uses m2plot.m to plot"
MaskDisplay "disp('Plot\\nresults')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits autoscale
System {
Name "m2plot"
Location [365, 32767, 530, 32767]
Open off
ScreenColor white
Annotation {
Position [117, 57]
VerticalAlignment top
Text "Display the plots programmed in \nm2plot.m "
"in a new figure window"
}
}
}
Block {
BlockType Scope
Name "Floating\nscope"
Position [470, 20, 500, 50]
Floating on
Location [188, 334, 667, 594]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows off
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Integrator
Name "Integrator"
Position [340, 192, 375, 228]
Orientation left
ExternalReset none
InitialConditionSource internal
InitialCondition "iLo"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Integrator
Name "Integrator1"
Position [415, 133, 450, 167]
ExternalReset none
InitialConditionSource internal
InitialCondition "vCo"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Mux
Name "Mux"
Position [150, 45, 360, 65]
Orientation up
Inputs "4"
}
Block {
BlockType Scope
Name "Scope"
Position [110, 17, 135, 43]
Orientation left
Floating off
Location [58, 351, 692, 573]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Position [145, 121, 160, 159]
Inputs "-+"
}
Block {
BlockType Sum
Name "Sum1"
Position [285, 131, 300, 169]
Inputs "+-"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [400, 20, 425, 40]
VariableName "y"
Buffer "3000"
Decimation "1"
SampleTime "0"
}
Block {
BlockType Clock
Name "time"
Position [95, 71, 115, 89]
DeleteFcn "simclock BlockIsBeingDestroyed"
PostSaveFcn "simclock Save"
Location [30, 40, 140, 75]
}
Block {
BlockType Step
Name "vS"
Position [80, 134, 115, 166]
Time "tdelay"
Before "0"
After "VS_mag"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "1/Rs"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "1/C"
DstPort 1
}
Line {
SrcBlock "1/C"
SrcPort 1
DstBlock "Integrator1"
DstPort 1
}
Line {
SrcBlock "1/L"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "time"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, 0]
Branch {
Points [0, -10]
DstBlock "To Workspace"
DstPort 1
}
Branch {
Points [0, -10]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "vS"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "1/Rs"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "Sum1"
DstPort 1
}
Branch {
Points [5, 0]
DstBlock "Mux"
DstPort 2
}
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [0, 0]
Branch {
Points [-75, 0; 0, -50]
DstBlock "Sum1"
DstPort 2
}
Branch {
Points [-5, 0]
DstBlock "Mux"
DstPort 4
}
}
Line {
SrcBlock "Integrator1"
SrcPort 1
Points [0, 0]
Branch {
Points [25, 0; 0, -50; -355, 0; 0, 30]
DstBlock "Sum"
DstPort 1
}
Branch {
Points [25, 0; 0, -50; -200, 0]
DstBlock "Mux"
DstPort 3
}
Branch {
Points [25, 0; 0, 60]
DstBlock "1/L"
DstPort 1
}
}
Annotation {
Position [467, 137]
VerticalAlignment top
Text "vC"
}
Annotation {
Position [317, 192]
VerticalAlignment top
Text "iL"
}
Annotation {
Position [317, 132]
VerticalAlignment top
Text "iC"
}
Annotation {
Position [247, 127]
VerticalAlignment top
Text "iS"
}
Annotation {
Position [282, 267]
VerticalAlignment top
Text "Double click on masked block \"m2init\" "
"to initialize before starting \nsimulation. "
"After simulation, double click on masked "
"block \"m2plot\" \nto plot simulated results "
"on MATLAB window"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -