📄 s2.mdl
字号:
Model {
Name "s2"
Version 2.00
SimParamPage Solver
SampleTimeColors off
WideVectorLines off
PaperOrientation landscape
StartTime "0.0"
StopTime "tstop"
Solver ode5
RelTol "1e-6"
AbsTol "1e-6"
Refine "1"
MaxStep "0.005"
InitialStep "auto"
FixedStep "0.005"
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 [3, 59, 770, 397]
Open on
ScreenColor white
Block {
BlockType Clock
Name "Clock"
Position [215, 55, 235, 75]
Orientation left
DeleteFcn "simclock BlockIsBeingDestroyed"
PostSaveFcn "simclock Save"
Location [30, 40, 140, 75]
}
Block {
BlockType Fcn
Name "Fcn3"
Position [50, 23, 180, 47]
Orientation left
Expr "10*exp(-alpha*u[1])"
}
Block {
BlockType Gain
Name "Gain"
Position [485, 162, 525, 198]
Gain "0.5"
}
Block {
BlockType Gain
Name "Gain1"
Position [530, 243, 600, 287]
Gain "sqrt(3)/2"
}
Block {
BlockType Gain
Name "Gain2"
Position [480, 96, 520, 134]
Gain "1.5"
}
Block {
BlockType Gain
Name "Gain3"
Position [625, 248, 660, 282]
Gain "-1"
}
Block {
BlockType Ground
Name "Ground"
Position [270, 295, 290, 315]
}
Block {
BlockType SubSystem
Name "m2"
Position [362, 26, 422, 60]
DropShadow on
OpenFcn "m2"
ShowPortLabels off
MaskType "Masked block of m2.m"
MaskHelp "Uses m2.m to initialize and plot results"
MaskDisplay "disp('Initialize\\nand plot')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits autoscale
System {
Name "m2"
Location [275, 32767, 450, 32767]
Open off
ScreenColor white
Annotation {
Position [127, 42]
VerticalAlignment top
Text "Masked block m2.m\nto initialize s2.m "
"and plot results"
}
}
}
Block {
BlockType Mux
Name "Mux"
Position [645, 69, 670, 131]
Inputs "3"
}
Block {
BlockType Mux
Name "Mux1"
Position [12, 140, 43, 175]
Orientation down
Inputs "2"
}
Block {
BlockType Sum
Name "Sum"
Position [440, 128, 460, 232]
Inputs "+++"
}
Block {
BlockType Sum
Name "Sum1"
Position [485, 236, 505, 294]
Inputs "+-"
}
Block {
BlockType Sum
Name "Sum2"
Position [565, 133, 585, 197]
Inputs "+-"
}
Block {
BlockType Sum
Name "Sum3"
Position [370, 99, 385, 126]
Inputs "++"
}
Block {
BlockType Sum
Name "Sum4"
Position [365, 173, 380, 202]
Inputs "++"
}
Block {
BlockType Sum
Name "Sum5"
Position [370, 262, 385, 293]
Inputs "++"
}
Block {
BlockType Switch
Name "Sw"
Position [320, 74, 340, 106]
Threshold "0.5"
}
Block {
BlockType Switch
Name "Sw1"
Position [320, 149, 340, 181]
Threshold "0.5"
}
Block {
BlockType Switch
Name "Sw2"
Position [320, 239, 340, 271]
Threshold "0.5"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [690, 91, 725, 109]
VariableName "y"
Buffer "1000"
Decimation "1"
SampleTime "0"
}
Block {
BlockType SubSystem
Name "i1"
Position [700, 153, 735, 197]
ShowPortLabels on
MaskType "XY scope."
MaskDescription "XY scope using MATLAB graph window. First "
"input is used as time base. Enter plotting "
"ranges. "
MaskHelp "This block can be used to explore limit cycles. "
"Look at the m-file sfunxy.m to see how it works."
MaskPromptString "x-min|x-max|y-min|y-max|Sample Time"
MaskStyleString "edit,edit,edit,edit,edit"
MaskVariables "ax(1)=@1;ax(2)=@2;ax(3)=@3;ax(4)=@4;st=@5;"
MaskDisplay "plot([.05 .95 .95 .05 .05],[.45 .45 .95 .95 "
".45], 0.5+cos(0:0.1:2*pi)*0.3,0.7+sin(0:0.1:2*pi"
")*0.2)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits normalized
MaskValueString "-20|20|-20|20|-1"
System {
Name "i1"
Location [59, 56, 365, 239]
Open off
ScreenColor white
Block {
BlockType Inport
Name "x"
Position [10, 30, 30, 50]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "y"
Position [10, 100, 30, 120]
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Mux
Name "Mux"
Position [100, 61, 130, 94]
ShowName off
Inputs "2"
}
Block {
BlockType S-Function
Name "S-function\nM-file which plots\nlines\n"
Position [185, 70, 235, 90]
CopyFcn "sfunxy([],[],[],'CopyBlock')"
DeleteFcn "sfunxy([],[],[],'DeleteBlock')"
LoadFcn "sfunxy([],[],[],'LoadBlock')"
FunctionName "sfunxy"
Parameters "ax, st"
}
Block {
BlockType Terminator
Name "Terminator"
Position [265, 71, 285, 89]
ShowName off
}
Line {
SrcBlock "S-function\nM-file which plots\nlines\n"
SrcPort 1
DstBlock "Terminator"
DstPort 1
}
Line {
SrcBlock "y"
SrcPort 1
Points [35, 0; 0, -25]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "x"
SrcPort 1
Points [35, 0; 0, 30]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "S-function\nM-file which plots\nlines\n"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "i2"
Position [700, 233, 735, 277]
ShowPortLabels on
MaskType "XY scope."
MaskDescription "XY scope using MATLAB graph window. First "
"input is used as time base. Enter plotting "
"ranges. "
MaskHelp "This block can be used to explore limit cycles. "
"Look at the m-file sfunxy.m to see how it works."
MaskPromptString "x-min|x-max|y-min|y-max|Sample Time"
MaskStyleString "edit,edit,edit,edit,edit"
MaskVariables "ax(1)=@1;ax(2)=@2;ax(3)=@3;ax(4)=@4;st=@5;"
MaskDisplay "plot([.05 .95 .95 .05 .05],[.45 .45 .95 .95 "
".45], 0.5+cos(0:0.1:2*pi)*0.3,0.7+sin(0:0.1:2*pi"
")*0.2)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits normalized
MaskValueString "-20|20|-20|20|-1"
System {
Name "i2"
Location [59, 56, 365, 239]
Open off
ScreenColor white
Block {
BlockType Inport
Name "x"
Position [10, 30, 30, 50]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "y"
Position [10, 100, 30, 120]
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Mux
Name "Mux"
Position [100, 61, 130, 94]
ShowName off
Inputs "2"
}
Block {
BlockType S-Function
Name "S-function\nM-file which plots\nlines\n"
Position [185, 70, 235, 90]
CopyFcn "sfunxy([],[],[],'CopyBlock')"
DeleteFcn "sfunxy([],[],[],'DeleteBlock')"
LoadFcn "sfunxy([],[],[],'LoadBlock')"
FunctionName "sfunxy"
Parameters "ax, st"
}
Block {
BlockType Terminator
Name "Terminator"
Position [265, 71, 285, 89]
ShowName off
}
Line {
SrcBlock "S-function\nM-file which plots\nlines\n"
SrcPort 1
DstBlock "Terminator"
DstPort 1
}
Line {
SrcBlock "y"
SrcPort 1
Points [35, 0; 0, -25]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "x"
SrcPort 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -