📄 mybldc_mdl2.mdl
字号:
SrcBlock "IV"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
SrcBlock "IVSTAR"
SrcPort 1
DstBlock " SFunction "
DstPort 2
}
Line {
Name "Q3"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "Q3"
DstPort 1
}
Line {
Name "Q6"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 3
DstBlock "Q6"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "SET3"
Ports [2, 2]
Position [160, 320, 285, 415]
TreatAsAtomicUnit off
MaskType "Stateflow"
MaskDescription "Stateflow diagram"
MaskDisplay "plot(sf('Private','sfblk','xIcon'),sf('Priv"
"ate','sfblk','yIcon'));text(0.5,0,sf('Private', 'sfblk', 'tIcon'),'Horizontal"
"Al','Center','VerticalAl','Bottom');"
MaskSelfModifiable on
MaskIconFrame off
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "SET3"
Location [257, 457, 812, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "IW"
Position [20, 101, 40, 119]
PortDimensions "1"
}
Block {
BlockType Inport
Name "IWSTAR"
Position [20, 136, 40, 154]
Port "2"
PortDimensions "1"
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 180, 320, 220]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function mybldc_mdl2 3"
Ports [2, 3]
Position [180, 100, 230, 180]
FunctionName "sf_sfun"
PortCounts "[2 3]"
Port {
PortNumber 2
Name "Q5"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
Port {
PortNumber 3
Name "Q2"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 191, 480, 209]
}
Block {
BlockType Outport
Name "Q5"
Position [460, 101, 480, 119]
}
Block {
BlockType Outport
Name "Q2"
Position [460, 136, 480, 154]
Port "2"
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [20, 0]
DstBlock " Demux "
DstPort 1
}
Line {
SrcBlock "IW"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
SrcBlock "IWSTAR"
SrcPort 1
DstBlock " SFunction "
DstPort 2
}
Line {
Name "Q5"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "Q5"
DstPort 1
}
Line {
Name "Q2"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 3
DstBlock "Q2"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "Tr1"
Position [360, 43, 390, 57]
}
Block {
BlockType Outport
Name "Tr2"
Position [355, 383, 385, 397]
Port "2"
}
Block {
BlockType Outport
Name "Tr3"
Position [360, 188, 390, 202]
Port "3"
}
Block {
BlockType Outport
Name "Tr4"
Position [360, 88, 390, 102]
Port "4"
}
Block {
BlockType Outport
Name "Tr5"
Position [355, 338, 385, 352]
Port "5"
}
Block {
BlockType Outport
Name "Tr6"
Position [360, 233, 390, 247]
Port "6"
}
Line {
SrcBlock "IU_in"
SrcPort 1
DstBlock "SET1"
DstPort 1
}
Line {
SrcBlock "IUSTAR_in"
SrcPort 1
DstBlock "SET1"
DstPort 2
}
Line {
SrcBlock "IV_in"
SrcPort 1
DstBlock "SET2"
DstPort 1
}
Line {
SrcBlock "IVSTAR_in"
SrcPort 1
DstBlock "SET2"
DstPort 2
}
Line {
SrcBlock "IW"
SrcPort 1
DstBlock "SET3"
DstPort 1
}
Line {
SrcBlock "IWSTAR_in"
SrcPort 1
DstBlock "SET3"
DstPort 2
}
Line {
SrcBlock "SET1"
SrcPort 1
DstBlock "Tr1"
DstPort 1
}
Line {
SrcBlock "SET3"
SrcPort 2
DstBlock "Tr2"
DstPort 1
}
Line {
SrcBlock "SET2"
SrcPort 1
DstBlock "Tr3"
DstPort 1
}
Line {
SrcBlock "SET1"
SrcPort 2
DstBlock "Tr4"
DstPort 1
}
Line {
SrcBlock "SET3"
SrcPort 1
DstBlock "Tr5"
DstPort 1
}
Line {
SrcBlock "SET2"
SrcPort 2
DstBlock "Tr6"
DstPort 1
}
}
}
Block {
BlockType Clock
Name "Clock"
Position [5, 747, 140, 783]
DisplayTime on
Decimation "1"
}
Block {
BlockType SubSystem
Name "ESTIMATE"
Ports [4, 5]
Position [1095, 603, 1205, 697]
Orientation "left"
ForegroundColor "lightBlue"
DropShadow on
TreatAsAtomicUnit off
MaskDescription "This block calculates the required calue of cur"
"rent in all the three phases depending upon the speed requirement\n\nFor good"
" results, phase difference should be kept at 0"
MaskHelp "The estimation block calculates the currents th"
"at should be flowing in the individual\nphases as per the speed command and/o"
"r the load torque requirements. For this a \nPID controller is used. A series"
" of transformations is applied in the m file s fuction \n'calc_core.m' and th"
"en commands are calculated. A modified version of the Park's \nTransform is u"
"sed. The signals are then fed to the controller block to decide the \nappropr"
"iate switching strategy. For more details, refer to the accompanykng manual"
MaskPromptString "Number of turns per phase|Maximum value of magn"
"etic field intensity|moment of inertia|viscous friction|Rotor radius|Rotor le"
"ngth|phase difference between current and torque|Proportionality constant|Int"
"egral constant|differential constant|rated base current"
MaskStyleString "edit,edit,edit,edit,edit,edit,edit,edit,edit,ed"
"it,edit"
MaskTunableValueString "on,on,on,on,on,on,on,on,on,on,on"
MaskCallbackString "||||||||||"
MaskEnableString "on,on,on,on,on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on,on,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,,,,"
MaskVariables "N=@1;BM=@2;J=@3;DF=@4;Rr=@5;Rl=@6;delta=@7;KP=@"
"8;KI=@9;KD=@10;basecurr=@11;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "100|49/60|0.0002|0.002|0.02|0.03|0|50000|500000"
"|5|34"
System {
Name "ESTIMATE"
Location [18, 82, 1030, 744]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "wn"
Position [250, 188, 280, 202]
}
Block {
BlockType Inport
Name "theta"
Position [250, 238, 280, 252]
Port "2"
}
Block {
BlockType Inport
Name "wreq"
Position [250, 288, 280, 302]
Port "3"
}
Block {
BlockType Inport
Name "err-1"
Position [245, 338, 275, 352]
Port "4"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 5]
Position [595, 233, 600, 417]
BackgroundColor "black"
ShowName off
Outputs "5"
}
Block {
BlockType Mux
Name "Mux"
Ports [4, 1]
Position [375, 173, 380, 472]
ShowName off
DisplayOption "bar"
}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [1, 1]
Position [475, 305, 535, 335]
FunctionName "calc_core"
Parameters "J,DF,N,BM,Rr,Rl,delta,KP,KI,KD,basecurr"
}
Block {
BlockType Outport
Name "IUstar"
Position [685, 243, 715, 257]
}
Block {
BlockType Outport
Name "IVstar"
Position [685, 278, 715, 292]
Port "2"
}
Block {
BlockType Outport
Name "IWstar"
Position [685, 313, 715, 327]
Port "3"
}
Block {
BlockType Outport
Name "err"
Position [685, 348, 715, 362]
Port "4"
}
Block {
BlockType Outport
Name "Treq"
Position [685, 383, 715, 397]
Port "5"
}
Line {
SrcBlock "S-Function"
SrcPort 1
Points [40, 0]
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, -5]
DstBlock "S-Function"
DstPort 1
}
Line {
SrcBlock "err-1"
SrcPort 1
Points [0, 100; 80, 0]
DstBlock "Mux"
DstPort 4
}
Line {
SrcBlock "wreq"
SrcPort 1
Points [75, 0]
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "theta"
SrcPort 1
Points [75, 0]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "wn"
SrcPort 1
Points [75, 0]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 4
Points [0, -5]
DstBlock "err"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [0, -5]
DstBlock "IWstar"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [0, -5]
DstBlock "IVstar"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [0, -5]
DstBlock "IUstar"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 5
Points [30, 0; 0, -5]
DstBlock "Treq"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "IC"
Ports [10, 9]
Position [640, 542, 750, 813]
Orientation "left"
ForegroundColor "[0.145098, 0.352941, 0.207843]"
TreatAsAtomicUnit off
MaskDescription "The block is just used to hold the FSM in CONTR"
"OLLER_MOD block to its\ninital states. The value in the field 'Threshold' det"
"ermines how long the block \nwill keep the CONTROLLER_MOD block locked to its"
" initial position."
MaskHelp "Intially, when the motor is being ramped to bui"
"ld up the required Back emf voltages,\nit is important that the FSMs in the C"
"ONTROLLER_MOD block do not leave their \ninitial states. Therefore, this bloc"
"k is used to keep the FSMs in the CONTROLLER_MOD \nblock locked into their in"
"itial states. The time for which this control is exercised is\ndetermined by "
"the time value entered in 'Threshold' field.\nAlso, it is important that the "
"same threshold value be entered in 'CHANGER', 'SUNSYSTEM'\nand the 'IC' block"
"s."
MaskPromptString "Threshold"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "T=@1;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "400e-6"
System {
Name "IC"
Location [2, 82, 1014, 744]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "IU"
Position [75, 28, 105, 42]
}
Block {
BlockType Inport
Name "IUstar"
Position [70, 83, 100, 97]
Port "2"
}
Block {
BlockType Inport
Name "IV"
Position [75, 133, 105, 147]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -