📄 s3.mdl
字号:
Model {
Name "s3"
Version 2.00
SimParamPage Solver
SampleTimeColors off
WideVectorLines off
PaperOrientation landscape
StartTime "0.0"
StopTime "0.95"
Solver ode45
RelTol "1e-6"
AbsTol "1e-6"
Refine "1"
MaxStep "1e-3"
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 "s3"
Location [50, 66, 712, 409]
Open on
ScreenColor white
Block {
BlockType Clock
Name "Clock"
Position [145, 45, 165, 65]
Orientation down
DeleteFcn "simclock BlockIsBeingDestroyed"
PostSaveFcn "simclock Save"
Location [30, 40, 140, 75]
}
Block {
BlockType Fcn
Name "Fcn"
Position [75, 153, 310, 177]
Expr "10*exp(-alpha*u[1])*cos(m*u[2])"
}
Block {
BlockType Fcn
Name "Fcn1"
Position [75, 187, 310, 213]
Expr "10*exp(-alpha*u[1])*cos(m*(u[2]-2*pi/3))"
}
Block {
BlockType Fcn
Name "Fcn2"
Position [75, 223, 315, 247]
Expr "10*exp(-alpha*u[1])*cos(m*(u[2]+2*pi/3))"
}
Block {
BlockType Gain
Name "Gain"
Position [85, 91, 125, 119]
Orientation left
Gain "2*pi"
}
Block {
BlockType SubSystem
Name "m3"
Position [230, 38, 289, 74]
DropShadow on
OpenFcn "m3"
ShowPortLabels off
MaskType "Masked block of m3.m"
MaskHelp "Uses m3.m to initialize and plot"
MaskDisplay "disp('Initialize\\nand plot')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate off
MaskIconUnits autoscale
System {
Name "m3"
Location [10, 55, 1133, 881]
Open off
ScreenColor white
Annotation {
Position [82, 42]
VerticalAlignment top
Text "Masked block of m3.m"
}
}
}
Block {
BlockType Mux
Name "Mux"
Position [326, 60, 604, 80]
Orientation up
Inputs "7"
}
Block {
BlockType Mux
Name "Mux1"
Position [21, 130, 54, 150]
Orientation down
Inputs "2"
}
Block {
BlockType Scope
Name "Scope"
Position [360, 25, 380, 45]
Orientation left
Floating off
Location [22, 306, 717, 528]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "1"
YMin "-25"
YMax "25"
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows on
MaxRows "5000"
Decimation "2"
SampleInput off
SampleTime "0"
}
Block {
BlockType Selector
Name "Selector"
Position [405, 22, 430, 48]
Orientation left
Elements "[1 2 3 4 5 6]"
InputPortWidth "7"
}
Block {
BlockType Sum
Name "Sum"
Position [440, 263, 460, 312]
Inputs "++"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [510, 26, 545, 44]
VariableName "y"
Buffer "10000"
Decimation "1"
SampleTime "0"
}
Block {
BlockType SubSystem
Name "abc2qd0s"
Position [360, 147, 415, 253]
ShowPortLabels off
System {
Name "abc2qd0s"
Location [483, 441, 1051, 758]
Open off
ScreenColor white
Block {
BlockType Inport
Name "in_a"
Position [40, 105, 60, 125]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_b"
Position [40, 150, 60, 170]
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_c"
Position [40, 195, 60, 215]
Port "3"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Mux
Name "Mux"
Position [100, 90, 130, 230]
ShowName off
Inputs "3"
}
Block {
BlockType Fcn
Name "abc2qd_row3"
Position [175, 195, 400, 225]
Expr "(u[1] + u[2] + u[3])/3"
}
Block {
BlockType Fcn
Name "abc2qds_row1"
Position [175, 96, 400, 124]
Expr "(2*u[1] - u[2]- u[3])/3"
}
Block {
BlockType Fcn
Name "abc2qds_row2"
Position [175, 146, 400, 174]
Expr "(-u[2] + u[3])/sqrt(3)"
}
Block {
BlockType Outport
Name "out_qs"
Position [495, 100, 515, 120]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_ds"
Position [495, 150, 515, 170]
Port "2"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_0s"
Position [495, 200, 515, 220]
Port "3"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, 0]
Branch {
Points [10, 0; 0, 50]
DstBlock "abc2qd_row3"
DstPort 1
}
Branch {
DstBlock "abc2qds_row2"
DstPort 1
}
Branch {
Points [9, 0; 0, -50]
DstBlock "abc2qds_row1"
DstPort 1
}
}
Line {
SrcBlock "abc2qd_row3"
SrcPort 1
DstBlock "out_0s"
DstPort 1
}
Line {
SrcBlock "abc2qds_row2"
SrcPort 1
DstBlock "out_ds"
DstPort 1
}
Line {
SrcBlock "abc2qds_row1"
SrcPort 1
DstBlock "out_qs"
DstPort 1
}
Line {
SrcBlock "in_c"
SrcPort 1
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "in_b"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "in_a"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
}
}
Block {
BlockType Gain
Name "nframe"
Position [270, 258, 345, 292]
Gain "nframe"
}
Block {
BlockType SubSystem
Name "qds2qd"
Position [530, 150, 580, 250]
ShowPortLabels off
System {
Name "qds2qd"
Location [189, 191, 737, 401]
Open off
ScreenColor white
Block {
BlockType Inport
Name "in_qs"
Position [20, 60, 40, 80]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "in_ds"
Position [20, 100, 40, 120]
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "theta "
Position [20, 139, 40, 161]
Port "3"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Mux
Name "Mux"
Position [65, 47, 95, 173]
ShowName off
Inputs "3"
}
Block {
BlockType Fcn
Name "qds2qd_row1"
Position [155, 64, 390, 96]
Expr "u[1]*cos(u[3]) - u[2]*sin(u[3])"
}
Block {
BlockType Fcn
Name "qds2qd_row2"
Position [155, 118, 385, 152]
Expr "u[1]*sin(u[3]) + u[2]*cos(u[3])"
}
Block {
BlockType Outport
Name "out_q"
Position [455, 70, 475, 90]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_d"
Position [455, 125, 475, 145]
Port "2"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, 0]
Branch {
Points [20, 0; 0, -30]
DstBlock "qds2qd_row1"
DstPort 1
}
Branch {
Points [20, 0; 0, 25]
DstBlock "qds2qd_row2"
DstPort 1
}
}
Line {
SrcBlock "theta "
SrcPort 1
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "in_ds"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "in_qs"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "qds2qd_row1"
SrcPort 1
DstBlock "out_q"
DstPort 1
}
Line {
SrcBlock "qds2qd_row2"
SrcPort 1
DstBlock "out_d"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "theta(0)"
Position [360, 290, 415, 310]
Value "theta0"
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, 0]
Branch {
Points [0, -20]
DstBlock "Selector"
DstPort 1
}
Branch {
Points [0, -20]
DstBlock "To Workspace"
DstPort 1
}
}
Line {
SrcBlock "Selector"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [0, 0]
Branch {
Points [-20, 0; 0, 170]
DstBlock "nframe"
DstPort 1
}
Branch {
Points [-35, 0]
DstBlock "Mux1"
DstPort 2
}
}
Line {
SrcBlock "Mux1"
SrcPort 1
Points [0, 0]
Branch {
Points [0, 80]
DstBlock "Fcn2"
DstPort 1
}
Branch {
Points [0, 45]
DstBlock "Fcn1"
DstPort 1
}
Branch {
Points [0, 10]
DstBlock "Fcn"
DstPort 1
}
}
Line {
SrcBlock "Clock"
SrcPort 1
Points [0, 0]
Branch {
Points [-125, 0]
DstBlock "Mux1"
DstPort 1
}
Branch {
Points [0, 35]
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, 35; 190, 0]
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "abc2qd0s"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "qds2qd"
DstPort 1
}
Branch {
Points [5, 0]
DstBlock "Mux"
DstPort 3
}
}
Line {
SrcBlock "theta(0)"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [50, 0]
DstBlock "qds2qd"
DstPort 3
}
Line {
SrcBlock "nframe"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "qds2qd"
SrcPort 2
Points [40, 0; 0, -120; -40, 0]
DstBlock "Mux"
DstPort 7
}
Line {
SrcBlock "qds2qd"
SrcPort 1
Points [25, 0; 0, -50; -65, 0]
DstBlock "Mux"
DstPort 6
}
Line {
SrcBlock "abc2qd0s"
SrcPort 3
Points [85, 0]
DstBlock "Mux"
DstPort 5
}
Line {
SrcBlock "abc2qd0s"
SrcPort 2
Points [0, 0]
Branch {
DstBlock "qds2qd"
DstPort 2
}
Branch {
Points [45, 0]
DstBlock "Mux"
DstPort 4
}
}
Line {
SrcBlock "Fcn"
SrcPort 1
Points [0, 0]
Branch {
Points [5, 0; 0, -45; 65, 0]
DstBlock "Mux"
DstPort 2
}
Branch {
DstBlock "abc2qd0s"
DstPort 1
}
}
Line {
SrcBlock "Fcn2"
SrcPort 1
DstBlock "abc2qd0s"
DstPort 3
}
Line {
SrcBlock "Fcn1"
SrcPort 1
DstBlock "abc2qd0s"
DstPort 2
}
Annotation {
Position [592, 157]
VerticalAlignment top
Text "iq"
}
Annotation {
Position [592, 207]
VerticalAlignment top
Text "id"
}
Annotation {
Position [482, 277]
VerticalAlignment top
Text "theta"
}
Annotation {
Position [337, 222]
VerticalAlignment top
Text "ic"
}
Annotation {
Position [337, 142]
VerticalAlignment top
Text "ia"
}
Annotation {
Position [337, 177]
VerticalAlignment top
Text "ib"
}
Annotation {
Position [447, 152]
VerticalAlignment top
Text "iqs"
}
Annotation {
Position [447, 182]
VerticalAlignment top
Text "ids"
}
Annotation {
Position [447, 220]
VerticalAlignment top
Text "i0s"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -