📄 power_brushlessdcmotor.mdl
字号:
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
MaskType "PI Controller"
MaskPromptString "Integral|Proportional:|Minimum and maximum outp"
"uts:"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskInitialization "I=@1;P=@2;sat=@3;min=sat(1);max=sat(2);"
MaskDisplay "disp('PI')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "16.61|.013| [-500, 500]"
MaskTabNameString ",,"
System {
Name "iqref1"
Location [136, 84, 490, 300]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In_1"
Position [25, 75, 45, 95]
IconDisplay "Port number"
}
Block {
BlockType TransferFcn
Name "Integral"
Position [110, 67, 145, 103]
Numerator "[I]"
Denominator "[1 0]"
}
Block {
BlockType Gain
Name "Proportional"
Position [120, 28, 140, 52]
NamePlacement "alternate"
Gain "P"
}
Block {
BlockType Saturate
Name "Saturation"
Position [225, 53, 255, 77]
UpperLimit "max"
LowerLimit "min"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [180, 15, 200, 110]
}
Block {
BlockType Outport
Name "Out_1"
Position [285, 55, 305, 75]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "Saturation"
SrcPort 1
DstBlock "Out_1"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "Proportional"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "In_1"
SrcPort 1
Points [15, 0; 15, 0]
Branch {
Points [0, -45]
DstBlock "Proportional"
DstPort 1
}
Branch {
DstBlock "Integral"
DstPort 1
}
}
Line {
SrcBlock "Integral"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
}
}
Block {
BlockType Scope
Name "is_a e_a"
Ports [2]
Position [875, 104, 920, 171]
BackgroundColor "green"
NamePlacement "alternate"
Floating off
Location [223, 224, 931, 691]
Open off
NumInputPorts "2"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "Stator current ia"
axes2 "Electromotive force ea"
}
TimeRange "0.2"
YMin "-15~-250"
YMax "20~250"
SaveToWorkspace on
SaveName "IE"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType SubSystem
Name "powergui"
Ports []
Position [40, 330, 136, 371]
DropShadow on
ShowName off
Priority "2"
AncestorBlock "powerlib/powergui"
CopyFcn "powergui('Copy_Callback',gcb,0,[]);"
DeleteFcn "powergui('Copy_Callback',gcb,1,[]);powergui('Cl"
"ose_Callback',gcb,[],[]);\n "
" "
ModelCloseFcn "powergui('Close_Callback',gcb,[],[]);"
PreSaveFcn "try \nclose(get_pa"
"ram(gcbh,'userdata'))\nend "
OpenFcn "if (power_openblockproxy ('secondary'))\npowerg"
"ui(gcb,'PM')\nend;"
FontSize 11
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
MaskType "PSB option menu block"
MaskHelp "web(psbhelp)"
MaskPromptString "General parameter: Simulation Mode |General par"
"ameter: Sample Time|General parameter: Echo Messages|Initial electrical stat"
"es status|Impedance tool: Frequency Range|Impedance tool: Log impedance|Imped"
"ance tool: log Frequency|Impedance tool: grid|Impedance tool: Save Data To Wo"
"rkspace|Impedance tool: Variable Name|Structure Name (PSBFFTSCOPE)|ZoomFFT (P"
"SBFFTSCOPE)|Start Time (PSBFFTSCOPE)|Cycles (PSBFFTSCOPE)|Display style (PSBF"
"FTSCOPE)|Fundamental (PSBFFTSCOPE)|Frequency Axis (PSBFFTSCOPE)|Max Frequency"
" (PSBFFTSCOPE)|Frequency indice (PSBLOADFLOW)|Frequency indice (STEADYSTATE)"
"|RMS display (STEADYSTATE)|Display Results|Sample time (s): |General paramet"
"er: phasor frequency|Phasor simulation"
MaskStyleString "popup(Continuous|Discrete|Phasor),edit,checkbox"
",popup(blocks|steady|zero),edit,checkbox,checkbox,checkbox,checkbox,edit,edit"
",checkbox,edit,edit,edit,edit,checkbox,edit,edit,edit,edit,checkbox,edit,edit"
",checkbox"
MaskTunableValueString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on"
MaskCallbackString "||||||||||||||||||||||||"
MaskEnableString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,off,off,off,off,off,off,off,off,off"
",off,off,off,off,off,off,off,off,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,,,,,,,,,,,,,,,,,,"
MaskVariables "SimulationMode=@1;SampleTime=@2;echomessages=@3"
";x0status=@4;Frange=@5;Ylog=@6;Xlog=@7;ShowGrid=@8;save=@9;variable=&10;struc"
"ture=&11;ZoomFFT=@12;StartTime=@13;cycles=@14;DisplayStyle=&15;fundamental=@1"
"6;FreqAxis=@17;MaxFrequency=@18;frequencyindice=@19;frequencyindicesteady=@20"
";RmsSteady=@21;display=@22;Ts=@23;frequency=@24;methode=@25;"
MaskInitialization "powerlibroot = which('powersysdomain');\nPSBroo"
"t = powerlibroot(1:end-16);\n%\nswitch SimulationMode\n case 1\n"
" message=sprintf('Continuous');\n case 2\n messa"
"ge=sprintf('Discrete,\\nTs = %.4g s.',SampleTime);\n case 3\n "
" message=sprintf('Phasors');\nend\nif strcmp(bdroot,'powerlib')\n mes"
"sage='powergui';\nend\npower_initmask();"
MaskDisplay "disp(message)"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Discrete|Ts|off|blocks|[0:2:500]|off|on|off|off"
"|ZData||on|0.0|1|1|60|off|1000|1|1|1|off|0|60|off"
MaskTabNameString ",,,,,,,,,,,,,,,,,,,,,,,,"
System {
Name "powergui"
Location [137, 405, 682, 583]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType SubSystem
Name "EquivalentModel1"
Ports []
Position [15, 70, 143, 105]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
MaskInitialization "SPS = get_param(gcbh,'UserData');\nif isemp"
"ty(SPS)\n Ts=1;\n A=0;\n B=0;\n C=0;\n D=0;\n x0=0;\n "
" SwitchResistance=1;\n SwitchType=1;\n SwitchGateInitialValue=1;\n "
"OutputsToResetToZero=1;\nelse\n Ts=SPS.fixedstep;\n A=SPS.Adisc"
"rete;\n B=SPS.Bdiscrete;\n C=SPS.Cdiscrete;\n D=SPS.Ddiscrete;\n "
"x0=SPS.x0discrete;\n SwitchResistance=SPS.SwitchResistance;\n SwitchTyp"
"e=SPS.SwitchType;\n SwitchGateInitialValue=SPS.SwitchGateInitialValue;\n "
" OutputsToResetToZero=SPS.YSwitchCurrent;\nend"
MaskDisplay "color('orange')\ndisp('EQUIVALENT CIRCUIT')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "EquivalentModel1"
Location [279, 434, 958, 675]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType SubSystem
Name "Gates"
Ports [0, 1]
Position [15, 112, 80, 138]
FontName "Arial"
FontSize 14
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Gates"
Location [20, 127, 741, 886]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType From
Name "From1"
Position [15, 21, 85, 49]
GotoTag "tp513175"
}
Block {
BlockType Mux
Name "Mux"
Ports [1, 1]
Position [325, 270, 330, 610]
ShowName off
Inputs "1"
DisplayOption "bar"
}
Block {
BlockType Outport
Name "gates"
Position [390, 433, 420, 447]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "gates"
DstPort 1
}
Line {
SrcBlock "From1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Sources"
Ports [0, 1]
Position [15, 51, 80, 79]
FontName "Arial"
FontSize 14
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Sources"
Location [20, 127, 741, 789]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType From
Name "From1"
Position [15, 21, 85, 49]
GotoTag "tp513178"
}
Block {
BlockType From
Name "From2"
Position [15, 66, 85, 94]
GotoTag "tp513186"
}
Block {
BlockType From
Name "From3"
Position [15, 111, 85, 139]
GotoTag "tp513189"
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1]
Position [325, 270, 330, 610]
ShowName off
Inputs "[6 2 1]"
DisplayOption "bar"
}
Block {
BlockType Outport
Name "u"
Position [505, 433, 535, 447]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "u"
DstPort 1
}
Line {
SrcBlock "From1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "From2"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "From3"
SrcPort 1
DstBlock "Mux"
DstPort 3
}
}
}
Block {
BlockType "S-Function"
Name "State-Space"
Ports [2, 2]
Position [115, 35, 245, 155]
FontName "Arial"
FontSize 14
FunctionName "sfun_spssw_discc"
Parameters "Ts,A, B, C, D, x0, SwitchResistance ,Sw"
"itchType, SwitchGateInitialValue, OutputsToResetToZero "
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType SubSystem
Name "Status"
Ports [1]
Position [280, 113, 345, 137]
FontName "Arial"
FontSize 14
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Status"
Location [124, 85, 631, 971]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "status"
Position [15, 373, 45, 387]
IconDisplay "Port number"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 1]
Position [100, 191, 105, 569]
BackgroundColor "black"
ShowName off
Outputs "1"
DisplayOption "bar"
}
Block {
BlockType Goto
Name "Goto1"
Position [325, 21, 395, 49]
GotoTag "tp513176"
TagVisibility "global"
}
Line {
SrcBlock "status"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -