📄 power_acdrive.mdl
字号:
Line {
SrcBlock "Demux1"
SrcPort 2
Points [25, 0; 0, 35]
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Pulses"
DstPort 1
}
Line {
SrcBlock "Iabc"
SrcPort 1
DstBlock "Demux1"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Relay2"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 3
Points [15, 0; 0, 70]
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Demux2"
SrcPort 3
Points [50, 0]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Demux2"
SrcPort 2
Points [45, 0; 0, -50]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Demux2"
SrcPort 1
Points [35, 0; 0, -85]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Iabc*"
SrcPort 1
DstBlock "Demux2"
DstPort 1
}
Line {
SrcBlock "Relay"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Mux"
DstPort 1
}
Branch {
DstBlock "Data Type \nConversion"
DstPort 1
}
}
Line {
SrcBlock "Relay1"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Mux"
DstPort 3
}
Branch {
DstBlock "Data Type \nConversion4"
DstPort 1
}
}
Line {
SrcBlock "Relay2"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Mux"
DstPort 5
}
Branch {
Points [0, 25]
DstBlock "Data Type \nConversion5"
DstPort 1
}
}
Line {
SrcBlock "Data Type \nConversion"
SrcPort 1
DstBlock "Logical\nOperator"
DstPort 1
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
DstBlock "Data Type \nConversion1"
DstPort 1
}
Line {
SrcBlock "Data Type \nConversion1"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Logical\nOperator1"
SrcPort 1
DstBlock "Data Type \nConversion2"
DstPort 1
}
Line {
SrcBlock "Data Type \nConversion2"
SrcPort 1
DstBlock "Mux"
DstPort 4
}
Line {
SrcBlock "Logical\nOperator2"
SrcPort 1
DstBlock "Data Type \nConversion3"
DstPort 1
}
Line {
SrcBlock "Data Type \nConversion3"
SrcPort 1
DstBlock "Mux"
DstPort 6
}
Line {
SrcBlock "Data Type \nConversion4"
SrcPort 1
DstBlock "Logical\nOperator1"
DstPort 1
}
Line {
SrcBlock "Data Type \nConversion5"
SrcPort 1
DstBlock "Logical\nOperator2"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Flux\nCalculation"
Ports [1, 1]
Position [395, 30, 450, 60]
Orientation "left"
NamePlacement "alternate"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "Flux Calcultation"
MaskInitialization "NF=0.44572610323020e-6;\nDF=[1 -0.999987154"
"86734];"
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Flux\nCalculation"
Location [228, 420, 612, 628]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Id"
Position [320, 38, 350, 52]
Orientation "left"
IconDisplay "Port number"
}
Block {
BlockType SubSystem
Name "Discrete Tranfer Function"
Ports [1, 1]
Position [95, 20, 165, 70]
Orientation "left"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "First Order Low Pass Filter (Discrete)"
MaskDescription "H(s)=1/(1+T.s)"
MaskPromptString "Time constant T (s) :|Time step (s)"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "T=@1;Ts=@2;"
MaskInitialization " X=[0 1 2 3 4];\n Y=[-2 -2 -3 -4 -4];\n"
" str=sprintf('\\nH=1/(1+T.s)\\n T= %g s\\n\\n\\n',T);\nnum=1;\nden=[T 1];\n\n"
"% discrete transfer function\n% descending powers of z\nnumd= Ts/T;\ndend=[ 1"
" (Ts-T)/T];\n\n"
MaskDisplay "plot(X,Y);\ndisp(str);\n"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0.1557|Ts"
MaskTabNameString ","
System {
Name "Discrete Tranfer Function"
Location [565, 312, 994, 482]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000"
"00]"
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In"
Position [25, 38, 55, 52]
IconDisplay "Port number"
}
Block {
BlockType DiscreteTransferFcn
Name "Discrete\nTransfer Fcn"
Position [75, 27, 135, 63]
Numerator "numd"
Denominator "dend"
SampleTime "Ts"
}
Block {
BlockType Outport
Name "Out"
Position [165, 38, 195, 52]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "Discrete\nTransfer Fcn"
SrcPort 1
DstBlock "Out"
DstPort 1
}
Line {
SrcBlock "In"
SrcPort 1
DstBlock "Discrete\nTransfer Fcn"
DstPort 1
}
}
}
Block {
BlockType Gain
Name "Lm"
Position [220, 27, 280, 63]
Orientation "left"
Gain "34.7e-3"
}
Block {
BlockType Outport
Name "Phir"
Position [25, 38, 55, 52]
Orientation "left"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Discrete Tranfer Function"
SrcPort 1
DstBlock "Phir"
DstPort 1
}
Line {
SrcBlock "Id"
SrcPort 1
DstBlock "Lm"
DstPort 1
}
Line {
SrcBlock "Lm"
SrcPort 1
DstBlock "Discrete Tranfer Function"
DstPort 1
}
Annotation {
Name "Phir = Lm *Id / (1 +Tr .s) "
Position [95, 118]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "Lm = 34.7 mH"
Position [74, 139]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "Lr = Ll'r +Lm = 0.8 +34.7= 35.5 mH"
Position [124, 179]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "Tr = Lr / Rr = 0.1557 s"
Position [89, 159]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "Rr = 0.228 ohms"
Position [284, 179]
UseDisplayTextAsClickCallback off
}
}
}
Block {
BlockType From
Name "From"
Position [35, 285, 80, 305]
BackgroundColor "[0.501961, 1.000000, 1.000000]"
ShowName off
CloseFcn "tagdialog Close"
GotoTag "Speed"
TagVisibility "global"
}
Block {
BlockType From
Name "From1"
Position [185, 100, 230, 120]
BackgroundColor "[0.000000, 1.000000, 1.000000]"
ShowName off
CloseFcn "tagdialog Close"
GotoTag "Speed"
TagVisibility "global"
}
Block {
BlockType From
Name "From2"
Position [400, 235, 445, 255]
BackgroundColor "[0.501961, 1.000000, 1.000000]"
ShowName off
CloseFcn "tagdialog Close"
GotoTag "Iabc"
TagVisibility "global"
}
Block {
BlockType From
Name "From3"
Position [325, 75, 370, 95]
BackgroundColor "[0.501961, 1.000000, 1.000000]"
ShowName off
CloseFcn "tagdialog Close"
GotoTag "Iabc"
TagVisibility "global"
}
Block {
BlockType Constant
Name "Phir*"
Position [190, 203, 220, 227]
Value "0.96"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType SubSystem
Name "Speed\ncontroller"
Ports [2, 1]
Position [110, 280, 165, 340]
BackgroundColor "lightBlue"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "PI controller"
MaskDescription "Proportional-Integral Speed Controller"
MaskPromptString "Proportional gain (Kp)|Integral gain (Ki)|T"
"orque limit (N.m)|Sampling time (s)"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskVariables "Kp=@1;Ki=@2;Tlim=@3;Ts=@4;"
MaskDisplay "plot(0,0,100,100,[35,35,65],[70,30,30],[35,"
"65],[45,60])"
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "13|26|300|Ts"
MaskTabNameString ",,,"
System {
Name "Speed\ncontroller"
Location [119, 275, 497, 416]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "w"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -