📄 smrun1.mdl
字号:
Position [194, 329, 378, 386]
BackgroundColor "yellow"
DropShadow on
ShowName off
OpenFcn "edit(which('smdef1.m'))"
FontSize 12
FontWeight "bold"
TreatAsAtomicUnit off
MaskDisplay "disp('Double click this block\\n to modify the "
"parameters');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "SubSystem1"
Location [152, 182, 650, 482]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
}
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [1, 1]
Position [225, 106, 335, 214]
ForegroundColor "blue"
DropShadow on
ShowName off
FontSize 12
FontWeight "bold"
TreatAsAtomicUnit off
MaskPromptString "Resistance{pu]|Inductance matrix [pu]|Base freq"
"uency [rad/s]|Inertia Constant [s]|Initial Conditions"
MaskStyleString "edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on"
MaskCallbackString "||||"
MaskEnableString "on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on"
MaskToolTipString "on,on,on,on,on"
MaskVarAliasString ",,,,"
MaskVariables "R=@1;L=@2;wo=@3;Hi=@4;ic=@5;"
MaskDisplay "plot(-1.5,-1.5,1.5,1.5,cos(0:.01:7),sin(0:.01:7"
"),[-.5 -1 1 .5],[-.866 -1.2 -1.2 -.866] )\ndisp('SYNCHRONOUS\\nMACHINE')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "R|L|2*pi*60|4|[ic]"
System {
Name "Subsystem"
Location [416, 305, 683, 478]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 68, 55, 82]
}
Block {
BlockType "S-Function"
Name "SM"
Ports [1, 1]
Position [80, 25, 205, 125]
BackgroundColor "lightBlue"
DropShadow on
FontAngle "italic"
FunctionName "smmod"
Parameters "R,L,Hi,wo,ic"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Outport
Name "Out1"
Position [230, 68, 260, 82]
}
Line {
SrcBlock "SM"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "SM"
DstPort 1
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [100, 70, 130, 105]
Port {
PortNumber 1
Name "vs"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Step
Name "Tl"
Position [65, 212, 100, 248]
Time "0"
After "Te0"
SampleTime "0"
Port {
PortNumber 1
Name "Tl"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Scope
Name "armature\ncurrents"
Ports [2]
Position [695, 51, 750, 124]
Location [742, 403, 1126, 780]
Open on
NumInputPorts "2"
TickLabels "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
}
TimeRange "2"
YMin "-10~-5"
YMax "5~5"
DataFormat "Array"
}
Block {
BlockType Scope
Name "field\ncurrent"
Ports [1]
Position [695, 158, 750, 222]
Location [744, 132, 1129, 349]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "2"
YMin "1"
YMax "5.5"
DataFormat "Array"
}
Block {
BlockType Step
Name "off"
Position [20, 97, 55, 133]
Time ".2"
Before "0.0"
After "V"
SampleTime "0"
}
Block {
BlockType Step
Name "on"
Position [20, 37, 55, 73]
Time "0.1"
Before "V"
After "0"
SampleTime "0"
}
Block {
BlockType SubSystem
Name "plots"
Ports []
Position [607, 285, 675, 351]
ForegroundColor "green"
DropShadow on
ShowName off
OpenFcn "smeq1plt"
TreatAsAtomicUnit off
MaskDisplay "plot(-1.5,-1.5,1.5,1.5,cos(0:.01:7),sin(0:.01:7"
") )\ndisp('PLOTS')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "plots"
Location [83, 506, 530, 694]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
}
}
Block {
BlockType Scope
Name "speed\nangle"
Ports [2]
Position [485, 191, 540, 264]
Location [14, 129, 344, 432]
Open on
NumInputPorts "2"
TickLabels "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
}
TimeRange "2"
YMin "0.9925~17.5"
YMax "1.01~40"
DataFormat "Array"
}
Block {
BlockType Scope
Name "torque"
Ports [1]
Position [565, 148, 620, 222]
Location [13, 494, 344, 781]
Open on
NumInputPorts "1"
TickLabels "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "2"
YMax "5.5"
DataFormat "Array"
}
Block {
BlockType Step
Name "vf"
Position [75, 142, 100, 178]
Time "0"
After "vf0"
SampleTime "0"
Port {
PortNumber 1
Name "vf"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Outport
Name "y"
Position [400, 278, 430, 292]
}
Line {
Name "if"
Labels [1, 0]
SrcBlock "Demux1"
SrcPort 3
Points [200, 0; 0, 50]
DstBlock "field\ncurrent"
DstPort 1
}
Line {
Name "Te"
Labels [1, 0]
SrcBlock "Demux1"
SrcPort 4
Points [110, 0]
DstBlock "torque"
DstPort 1
}
Line {
Name "iq"
Labels [1, 0]
SrcBlock "Demux1"
SrcPort 2
DstBlock "armature\ncurrents"
DstPort 2
}
Line {
Name "id"
Labels [1, 0]
SrcBlock "Demux1"
SrcPort 1
DstBlock "armature\ncurrents"
DstPort 1
}
Line {
Name "vf"
Labels [1, 0]
SrcBlock "vf"
SrcPort 1
DstBlock "Mux2"
DstPort 2
}
Line {
Name "Tl"
Labels [1, 0]
SrcBlock "Tl"
SrcPort 1
DstBlock "Mux2"
DstPort 3
}
Line {
Name "vs"
Labels [1, 0]
SrcBlock "Sum"
SrcPort 1
DstBlock "Mux2"
DstPort 1
}
Line {
SrcBlock "on"
SrcPort 1
Points [0, 25]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "off"
SrcPort 1
Points [0, -20]
DstBlock "Sum"
DstPort 2
}
Line {
Name "delta"
Labels [1, 1]
SrcBlock "Demux1"
SrcPort 6
DstBlock "speed\nangle"
DstPort 2
}
Line {
Name "wm"
Labels [1, 0]
SrcBlock "Demux1"
SrcPort 5
DstBlock "speed\nangle"
DstPort 1
}
Line {
SrcBlock "Mux2"
SrcPort 1
DstBlock "Subsystem"
DstPort 1
}
Line {
Labels [0, 0]
SrcBlock "Subsystem"
SrcPort 1
Points [30, 0]
Branch {
DstBlock "Demux1"
DstPort 1
}
Branch {
Points [0, 125]
DstBlock "y"
DstPort 1
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -