📄 s5.mdl
字号:
Position [75, 110, 100, 130]
Orientation left
RisingSlewLimit "1000"
FallingSlewLimit "-1000"
}
Block {
BlockType Sum
Name "Sa"
Position [475, 155, 495, 175]
Inputs "-+"
}
Block {
BlockType Sum
Name "Sa1"
Position [470, 190, 490, 210]
Inputs "-+"
}
Block {
BlockType Sum
Name "Sa2"
Position [470, 235, 490, 255]
Inputs "-+"
}
Block {
BlockType Saturate
Name "Satd"
Position [315, 254, 335, 276]
UpperLimit "1.2"
LowerLimit "-1.2"
}
Block {
BlockType Saturate
Name "Satq"
Position [295, 168, 315, 192]
UpperLimit "1.2"
LowerLimit "-1.2"
}
Block {
BlockType Scope
Name "Scope"
Position [650, 23, 670, 47]
Floating off
Location [20, 354, 761, 539]
Open on
Grid on
TickLabels on
ZoomMode yonly
TimeRange "3"
YMin "-1"
YMax "1"
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows off
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Selector
Name "Selector"
Position [560, 25, 610, 45]
Elements "[2 5 6 7 8 9]"
InputPortWidth "9"
}
Block {
BlockType Sum
Name "Sum1"
Position [60, 153, 75, 182]
Inputs "+-"
}
Block {
BlockType Sum
Name "Sum2"
Position [195, 163, 210, 192]
Inputs "+-"
}
Block {
BlockType Sum
Name "Sum3"
Position [225, 247, 240, 283]
Inputs "++-"
}
Block {
BlockType Sum
Name "Sum4"
Position [130, 368, 145, 397]
Inputs "+-"
}
Block {
BlockType Terminator
Name "T"
Position [585, 280, 595, 290]
Orientation left
}
Block {
BlockType SubSystem
Name "Tmech"
Position [625, 260, 650, 280]
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 "tmech_time|tmech_value"
System {
Name "Tmech"
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 ToWorkspace
Name "To Workspace"
Position [410, 27, 460, 43]
Orientation left
VariableName "y"
Buffer "40000"
Decimation "1"
SampleTime "0"
}
Block {
BlockType TransferFcn
Name "Torque\ncontroller"
Position [95, 153, 150, 187]
Numerator "[7 50]"
Denominator "[1 0]"
}
Block {
BlockType SubSystem
Name "Torque \nCommand"
Position [145, 111, 185, 129]
Orientation left
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 "tref_time|tref_value"
System {
Name "Torque \nCommand"
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 Fcn
Name "Vs-Tem"
Position [60, 365, 100, 385]
Expr "VsTem(1)*u[1]*u[1] + VsTem(3)"
}
Block {
BlockType SubSystem
Name "abc2qd0"
Position [575, 156, 610, 254]
ShowPortLabels off
System {
Name "abc2qd0"
Location [454, 254, 1125, 632]
Open off
ScreenColor white
Block {
BlockType Inport
Name "va"
Position [40, 140, 60, 160]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "vb"
Position [40, 175, 60, 195]
Port "2"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "vc"
Position [40, 210, 60, 230]
Port "3"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "cos_thetar"
Position [40, 60, 60, 80]
Port "4"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Inport
Name "sin_thetar"
Position [40, 95, 60, 115]
Port "5"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Mux
Name "Mux"
Position [90, 129, 115, 241]
Inputs "3"
}
Block {
BlockType Mux
Name "Mux1"
Position [375, 56, 400, 189]
Inputs "4"
}
Block {
BlockType Fcn
Name "abc20"
Position [150, 224, 290, 246]
Expr "(u[1] + u[2] + u[3])/3"
}
Block {
BlockType Fcn
Name "abc2d"
Position [150, 174, 290, 196]
Expr "(u[3] -u[2])/sqrt(3)"
}
Block {
BlockType Fcn
Name "abc2q"
Position [150, 129, 290, 151]
Expr "(2*u[1]- u[2] - u[3])/3"
}
Block {
BlockType Fcn
Name "qds2dr"
Position [425, 143, 560, 167]
Expr "u[2]*u[3] + u[1]*u[4] "
}
Block {
BlockType Fcn
Name "qds2qr"
Position [425, 68, 560, 92]
Expr "u[1]*u[3] - u[2]*u[4]"
}
Block {
BlockType Outport
Name "vq"
Position [595, 70, 615, 90]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "vd"
Position [590, 145, 610, 165]
Port "2"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "vd0"
Position [590, 225, 610, 245]
Port "3"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "abc20"
SrcPort 1
DstBlock "vd0"
DstPort 1
}
Line {
SrcBlock "abc2d"
SrcPort 1
Points [30, 0; 0, -10]
DstBlock "Mux1"
DstPort 4
}
Line {
SrcBlock "abc2q"
SrcPort 1
DstBlock "Mux1"
DstPort 3
}
Line {
SrcBlock "sin_thetar"
SrcPort 1
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "cos_thetar"
SrcPort 1
DstBlock "Mux1"
DstPort 1
}
Line {
SrcBlock "qds2dr"
SrcPort 1
DstBlock "vd"
DstPort 1
}
Line {
SrcBlock "qds2qr"
SrcPort 1
DstBlock "vq"
DstPort 1
}
Line {
SrcBlock "vc"
SrcPort 1
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "vb"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "va"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
Points [0, 0]
Branch {
Points [0, 30]
DstBlock "qds2dr"
DstPort 1
}
Branch {
Points [0, -45]
DstBlock "qds2qr"
DstPort 1
}
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, 0]
Branch {
Points [5, 0; 0, 50]
DstBlock "abc20"
DstPort 1
}
Branch {
DstBlock "abc2d"
DstPort 1
}
Branch {
Points [5, 0; 0, -45]
DstBlock "abc2q"
DstPort 1
}
}
Annotation {
Position [327, 125]
VerticalAlignment top
Text "vqs"
}
Annotation {
Position [472, 282]
VerticalAlignment top
Text "qds2qdr"
}
Annotation {
Position [207, 282]
VerticalAlignment top
Text "abc2qd0"
}
Annotation {
Position [327, 157]
VerticalAlignment top
Text "vds"
}
}
}
Block {
BlockType SubSystem
Name "osc"
Position [775, 245, 800, 285]
ShowPortLabels off
System {
Name "osc"
Location [173, 85, 763, 329]
Open off
ScreenColor white
Block {
BlockType Inport
Name "wr/wb"
Position [30, 45, 50, 65]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Gain
Name "Gain"
Position [135, 63, 180, 97]
Gain "-wb"
}
Block {
BlockType Gain
Name "Gain1"
Position [340, 120, 385, 160]
Orientation left
Gain "wb"
}
Block {
BlockType Product
Name "Product"
Position [370, 43, 390, 92]
Inputs "2"
}
Block {
BlockType Product
Name "Product1"
Position [140, 128, 160, 172]
Orientation left
Inputs "2"
}
Block {
BlockType Integrator
Name "cos"
Position [215, 63, 245, 97]
ExternalReset none
InitialConditionSource internal
InitialCondition "1"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Integrator
Name "sin"
Position [265, 123, 295, 157]
Orientation left
ExternalReset none
InitialConditionSource internal
InitialCondition "0"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Outport
Name "cos_thetar"
Position [470, 105, 490, 125]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "sin_thetar"
Position [470, 160, 490, 180]
Port "2"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "sin"
SrcPort 1
Points [0, 0]
Branch {
Points [-30, 0; 0, 30]
DstBlock "sin_thetar"
DstPort 1
}
Branch {
DstBlock "Product1"
DstPort 1
}
}
Line {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -