📄 svpwm3old.mdl
字号:
Name "Product3"
Ports [2, 1]
Position [490, 399, 565, 461]
ShowName off
Multiplication "Matrix(*)"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [895, 532, 925, 563]
ShowName off
Operator ">"
InputSameDT off
}
Block {
BlockType Reference
Name "Repeating\nSequence"
Ports [0, 1]
Position [830, 563, 865, 597]
ShowName off
SourceBlock "simulink/Sources/Repeating\nSequence"
SourceType "Repeating table"
rep_seq_t "[0 0.5/fsw 1/fsw]"
rep_seq_y "[1 -1 1]"
}
Block {
BlockType SubSystem
Name "SECTOR"
Ports [1, 1]
Position [300, 188, 380, 252]
BackgroundColor "yellow"
TreatAsAtomicUnit off
System {
Name "SECTOR"
Location [581, 560, 1120, 762]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "lightBlue"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "vab"
Position [15, 63, 45, 77]
}
Block {
BlockType Constant
Name "Constant"
Position [305, 60, 335, 90]
ShowName off
Value "0"
}
Block {
BlockType Constant
Name "Constant1"
Position [275, 160, 305, 190]
ShowName off
}
Block {
BlockType Reference
Name "Direct Look-Up\nTable (n-D)"
Ports [2, 1]
Position [415, 70, 470, 125]
ShowName off
SourceBlock "simulink/Look-Up\nTables/Direct Look-Up\nTa"
"ble (n-D)"
SourceType "LookupNDDirect"
maskTabDims "2"
explicitNumDims "1"
outDims "Element"
tabIsInput off
mxTable "[2 1 3;5 6 4]"
clipFlag "Warning"
}
Block {
BlockType Fcn
Name "Fcn1"
Position [75, 53, 165, 87]
Expr "sqrt(u(1)^2+u(2)^2)"
}
Block {
BlockType Mux
Name "Mux2"
Ports [2, 1]
Position [195, 25, 200, 85]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [315, 130, 335, 150]
ShowName off
IconShape "round"
Inputs "|++"
}
Block {
BlockType Switch
Name "Switch"
Position [370, 95, 400, 125]
Threshold "0.5"
}
Block {
BlockType Fcn
Name "d1"
Position [250, 27, 290, 53]
ShowName off
Expr "u(2)<=0"
}
Block {
BlockType Fcn
Name "d2"
Position [245, 98, 320, 122]
ShowName off
Expr "abs(u(1))<u(3)/2"
}
Block {
BlockType Fcn
Name "d3"
Position [250, 127, 290, 153]
ShowName off
Expr "u(1)<=0"
}
Block {
BlockType Outport
Name "sector"
Position [495, 93, 525, 107]
}
Line {
SrcBlock "Fcn1"
SrcPort 1
DstBlock "Mux2"
DstPort 2
}
Line {
SrcBlock "d2"
SrcPort 1
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "Direct Look-Up\nTable (n-D)"
DstPort 2
}
Line {
SrcBlock "d1"
SrcPort 1
Points [105, 0]
DstBlock "Direct Look-Up\nTable (n-D)"
DstPort 1
}
Line {
SrcBlock "d3"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [15, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [15, 0]
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [15, 0]
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "vab"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Fcn1"
DstPort 1
}
Branch {
Points [0, -30]
DstBlock "Mux2"
DstPort 1
}
}
Line {
SrcBlock "Direct Look-Up\nTable (n-D)"
SrcPort 1
DstBlock "sector"
DstPort 1
}
Line {
SrcBlock "Mux2"
SrcPort 1
Points [20, 0]
Branch {
Points [0, -15]
DstBlock "d1"
DstPort 1
}
Branch {
Points [0, 55]
Branch {
DstBlock "d2"
DstPort 1
}
Branch {
Points [0, 30]
DstBlock "d3"
DstPort 1
}
}
}
}
}
Block {
BlockType Sin
Name "Sine Wave"
Position [25, 295, 55, 325]
SineType "Time based"
Frequency "2*pi*fout"
Phase "pi/2"
SampleTime "0"
}
Block {
BlockType Sin
Name "Sine Wave1"
Position [25, 355, 55, 385]
SineType "Time based"
Frequency "2*pi*fout"
Phase "pi/2 -2*pi/3"
SampleTime "0"
}
Block {
BlockType Sin
Name "Sine Wave2"
Position [25, 415, 55, 445]
SineType "Time based"
Frequency "2*pi*fout"
Phase "pi/2+2*pi/3"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [830, 90, 850, 110]
ShowName off
IconShape "round"
Inputs "|-+"
Port {
PortNumber 1
Name "y1"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [655, 260, 675, 280]
ShowName off
IconShape "round"
Inputs "-+|"
}
Block {
BlockType Sum
Name "Sum3"
Ports [3, 1]
Position [850, 184, 870, 256]
ShowName off
Inputs "-+-|"
}
Block {
BlockType Sum
Name "Sum4"
Ports [2, 1]
Position [645, 420, 665, 440]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType Sum
Name "Sum5"
Ports [2, 1]
Position [1120, 663, 1130, 712]
ShowName off
Inputs "+-"
}
Block {
BlockType Switch
Name "Switch"
Position [1040, 235, 1070, 265]
ShowName off
Threshold "0.5"
}
Block {
BlockType TransportDelay
Name "T1"
Position [1060, 685, 1100, 715]
DelayTime "1/fsw"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [1280, 533, 1320, 567]
ShowName off
VariableName "abpwm"
MaxDataPoints "inf"
Decimation "2"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [1220, 738, 1250, 772]
ShowName off
VariableName "ab"
MaxDataPoints "inf"
Decimation "2"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction"
Ports [1, 1]
Position [700, 150, 730, 180]
ShowName off
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction2"
Ports [1, 1]
Position [725, 255, 755, 285]
ShowName off
}
Block {
BlockType Gain
Name "Vdc"
Position [1090, 525, 1145, 575]
BackgroundColor "red"
ShowName off
}
Block {
BlockType Scope
Name "control signals"
Ports [1]
Position [865, 451, 900, 499]
Location [671, 193, 1115, 488]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "Control signals"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "0.02"
YMin "-1"
YMax "1"
SaveToWorkspace on
SaveName "cs"
DataFormat "Array"
MaxDataPoints "25000"
SampleInput on
}
Block {
BlockType Fcn
Name "d1"
Position [960, 238, 995, 262]
ShowName off
Expr "u<0"
}
Block {
BlockType Integrator
Name "int2"
Ports [1, 1]
Position [1015, 656, 1035, 694]
ShowName off
}
Block {
BlockType Gain
Name "modulation\nindex1"
Position [450, 102, 500, 148]
BackgroundColor "red"
NamePlacement "alternate"
ShowName off
}
Block {
BlockType Gain
Name "modulation\nindex2"
Position [525, 632, 575, 678]
BackgroundColor "red"
NamePlacement "alternate"
ShowName off
}
Block {
BlockType Constant
Name "one"
Position [780, 195, 810, 225]
ShowName off
}
Block {
BlockType Constant
Name "pi/1"
Position [595, 255, 625, 285]
ShowName off
Value "pi/3"
}
Block {
BlockType Constant
Name "pi/3"
Position [535, 180, 565, 210]
ShowName off
Value "pi/3"
}
Block {
BlockType SubSystem
Name "plots2"
Ports []
Position [471, 743, 694, 796]
ForegroundColor "red"
DropShadow on
ShowName off
OpenFcn "svpwm3b\n \n \n "
FontName "Arial"
FontSize 20
FontWeight "bold"
TreatAsAtomicUnit off
MaskDisplay "disp('To a simpler model')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "plots2"
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 Display
Name "pole duty ratios"
Ports [1]
Position [605, 326, 685, 394]
Decimation "1"
}
Block {
BlockType MultiPortSwitch
Name "sector\nselector"
Ports [7, 1]
Position [415, 293, 445, 537]
Inputs "6"
}
Block {
BlockType Display
Name "sector #"
Ports [1]
Position [420, 203, 505, 237]
Decimation "1"
}
Block {
BlockType Constant
Name "sector1"
Position [235, 330, 365, 360]
ShowName off
Value "[1 1 0.5 ;0 1 0.5;0 0 0.5]"
}
Block {
BlockType Constant
Name "sector2"
Position [235, 365, 365, 395]
ShowName off
Value "[1 0 0.5 ;1 1 0.5; 0 0 0.5] "
VectorParams1D off
}
Block {
BlockType Constant
Name "sector3"
Position [235, 400, 365, 430]
ShowName off
Value "[0 0 0.5 ;1 1 0.5; 0 1 0.5] "
VectorParams1D off
}
Block {
BlockType Constant
Name "sector4"
Position [235, 435, 365, 465]
ShowName off
Value "[0 0 0.5 ;1 0 0.5; 1 1 0.5] "
}
Block {
BlockType Constant
Name "sector5"
Position [235, 470, 365, 500]
ShowName off
Value "[0 1 0.5 ; 0 0 0.5; 1 1 0.5] "
VectorParams1D off
}
Block {
BlockType Constant
Name "sector6"
Position [235, 505, 365, 535]
ShowName off
Value "[1 1 0.5; 0 0 0.5; 1 0 0.5] "
VectorParams1D off
}
Block {
BlockType SubSystem
Name "space vector1"
Ports []
Position [803, 694, 927, 812]
ForegroundColor "orange"
DropShadow on
ShowName off
OpenFcn "close all,figure(1),plot(cs(:,1),cs(:,2),cs(:,1"
"),cs(:,3),cs(:,1),cs(:,4)),grid,title('Control signals'),figure(2),plot(abpwm"
"(:,1),abpwm(:,2),'-b',ab(:,1),ab(:,2),'-r'),axis equal,grid,title('OUTPUT SPA"
"CE VECTOR TRAJECTORY')"
FontName "Arial"
FontSize 16
FontWeight "bold"
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 "space vector1"
Location [81, 508, 528, 696]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
}
}
Block {
BlockType Display
Name "state duty ratios"
Ports [1]
Position [1005, 319, 1085, 391]
Decimation "1"
}
Block {
BlockType Fcn
Name "x1"
Position [710, 68, 770, 102]
Expr "(sqrt(3)*cos(u)-sin(u))/(sqrt(3)*cos(u)+sin(u))"
}
Line {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -