📄 demo_duffing.mdl
字号:
Model {
Name "demo_duffing"
Version 2.20
SimParamPage Solver
SampleTimeColors off
InvariantConstants off
WideVectorLines off
ShowLineWidths off
StartTime "0.0"
StopTime "5.0"
Solver ode45
RelTol "1e-3"
AbsTol "1e-6"
Refine "1"
MaxStep "auto"
InitialStep "auto"
FixedStep "auto"
MaxOrder 5
OutputOption RefineOutputTimes
OutputTimes "[]"
LoadExternalInput off
ExternalInput "[t, u]"
SaveTime on
TimeSaveName "tout"
SaveState off
StateSaveName "xout"
SaveOutput on
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
SimulationMode normal
RTWSystemTargetFile "grt.tlc"
RTWInlineParameters off
RTWPlaceOutputsASAP off
RTWRetainRTWFile off
RTWTemplateMakefile "grt_default_tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
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
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight normal
FontAngle normal
}
System {
Name "demo_duffing"
Location [4, 74, 392, 356]
Open on
ToolBar on
StatusBar on
ScreenColor white
PaperOrientation landscape
PaperPositionMode auto
PaperType usletter
PaperUnits inches
Block {
BlockType Mux
Name "Mux"
Ports [2, 1, 0, 0, 0]
Position [195, 175, 235, 180]
Orientation down
BackgroundColor black
NamePlacement alternate
ShowName off
Inputs "2"
}
Block {
BlockType Reference
Name "Phase portrait of\nDuffing Equation"
Ports [2, 0, 0, 0, 0]
Position [295, 75, 370, 155]
SourceBlock "NelinSys/Nonlinear Systems Analysis/Vector XY G"
"raph\nfor Phase Portraits"
SourceType "Vector XY Graph for Phase-Plane Portraits"
xmin "-4"
xmax "4"
ymin "-4"
ymax "4"
st "-1"
use_grid on
}
Block {
BlockType Reference
Name "Phase-plane analysis computation"
Ports [0, 2, 0, 0, 0]
Position [15, 75, 190, 155]
SourceBlock "NelinSys/Nonlinear Systems Analysis/Phase Portr"
"aits of 2nd-Order Systems"
SourceType "Phase-Plane Portrait of a 2nd-Order Autonomous "
"System"
vRovnica "D2y+2*Dy-2*y+y^3=0"
x1min "-3"
x1max "3"
x1num "15"
x2min "-3"
x2max "3"
x2num "3"
}
Block {
BlockType Scope
Name "Time\nresponses (1)"
Ports [1, 0, 0, 0, 0]
Position [35, 210, 65, 240]
Orientation left
Floating off
Location [6, 359, 398, 578]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "auto"
YMin "-4"
YMax "4"
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "Time\nresponses (2)"
Ports [1, 0, 0, 0, 0]
Position [335, 210, 365, 240]
Floating off
Location [397, 359, 795, 578]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "auto"
YMin "-1"
YMax "3"
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Selector
Name "Trajectory (1)"
Position [110, 215, 160, 235]
Orientation left
NamePlacement alternate
Elements "[1 46]"
InputPortWidth "90"
}
Block {
BlockType Selector
Name "Trajectory (2)"
Position [255, 213, 305, 237]
NamePlacement alternate
Elements "[18 63]"
InputPortWidth "90"
}
Line {
SrcBlock "Trajectory (2)"
SrcPort 1
DstBlock "Time\nresponses (2)"
DstPort 1
}
Line {
SrcBlock "Trajectory (1)"
SrcPort 1
DstBlock "Time\nresponses (1)"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, 40]
Branch {
DstBlock "Trajectory (2)"
DstPort 1
}
Branch {
DstBlock "Trajectory (1)"
DstPort 1
}
}
Line {
SrcBlock "Phase-plane analysis computation"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Phase portrait of\nDuffing Equation"
DstPort 1
}
Branch {
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "Phase-plane analysis computation"
SrcPort 2
Points [30, 0]
Branch {
DstBlock "Phase portrait of\nDuffing Equation"
DstPort 2
}
Branch {
DstBlock "Mux"
DstPort 2
}
}
Annotation {
Position [186, 22]
Text "Phase-Plane Analysis of Duffing Equation"
FontSize 14
}
Annotation {
Position [191, 42]
Text "y''(t) + 2y'(t) - 2y(t) + y^3(t) = 0"
FontSize 14
FontWeight bold
FontAngle italic
}
Annotation {
Position [136, 247]
Text "x0 = (-3, -3)"
}
Annotation {
Position [281, 247]
Text "x0 = (-0.857, +3)"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -