📄 dtc3a.mdl
字号:
MaskDisplay "disp('To the basics of DTC')"
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 SubSystem
Name "space vector"
Ports []
Position [1554, 665, 1669, 777]
ForegroundColor "orange"
DropShadow on
ShowName off
OpenFcn "close all,figure(1),plot(fs(:,1),fs(:,2),'-r',f"
"r(:,1),fr(:,2),'-b'),axis equal,grid,title('FLUX SPACE VECTOR TRAJECTORY'),te"
"xt(.8,-.85,'rotor flux','color','b'),text(-1,-.85,'stator flux','color','r')"
FontName "Arial"
FontSize 12
FontWeight "bold"
TreatAsAtomicUnit off
MaskDisplay "plot(-1.5,-1.5,1.5,1.5,cos(0:.01:7),sin(0:.01:7"
") )\ndisp('SPACE\\nVECTOR')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "space vector"
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 Scope
Name "speed"
Ports [1]
Position [1415, 181, 1450, 229]
NamePlacement "alternate"
Location [30, 524, 569, 843]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "speed"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "2"
YMin "0"
YMax "1"
SaveName "ScopeData2"
DataFormat "StructureWithTime"
LimitDataPoints off
MaxDataPoints "20000"
Decimation "20"
}
Block {
BlockType SubSystem
Name "speed calc"
Ports [2, 2]
Position [1380, 400, 1490, 495]
BackgroundColor "yellow"
ShowName off
FontName "Arial"
FontSize 14
FontWeight "bold"
TreatAsAtomicUnit off
MaskDisplay "disp('Speed\\nEstimator')"
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "speed calc"
Location [375, 260, 937, 536]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "fr"
Position [25, 73, 55, 87]
}
Block {
BlockType Inport
Name "Te"
Position [20, 152, 50, 168]
Port "2"
}
Block {
BlockType Gain
Name "1/wo"
Position [425, 75, 460, 105]
Gain "1/(2*pi*60)"
}
Block {
BlockType Constant
Name "Constant2"
Position [285, 115, 315, 145]
ShowName off
Value "nan"
}
Block {
BlockType Derivative
Name "Derivative"
Position [210, 65, 240, 95]
}
Block {
BlockType Fcn
Name "Fcn3"
Position [160, 200, 260, 230]
ShowName off
Expr "u(1)^2+u(2)^2"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [335, 191, 360, 224]
ShowName off
Inputs "*/"
}
Block {
BlockType Gain
Name "Rr"
Position [385, 195, 415, 225]
Gain ".02"
Port {
PortNumber 1
Name "wslip"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Switch
Name "Switch"
Position [350, 75, 380, 105]
InputSameDT off
}
Block {
BlockType Fcn
Name "x->theta"
Position [90, 68, 170, 92]
ShowName off
Expr "atan2(u(2),u(1))"
}
Block {
BlockType Outport
Name "wr"
Position [490, 83, 520, 97]
}
Block {
BlockType Outport
Name "wslip"
Position [490, 203, 520, 217]
Port "2"
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "1/wo"
DstPort 1
}
Line {
SrcBlock "Constant2"
SrcPort 1
Points [10, 0; 0, -30]
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [0, 0; 40, 0]
Branch {
DstBlock "Switch"
DstPort 1
}
Branch {
Points [0, 10]
DstBlock "Switch"
DstPort 2
}
}
Line {
SrcBlock "fr"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "x->theta"
DstPort 1
}
Branch {
Points [0, 135]
DstBlock "Fcn3"
DstPort 1
}
}
Line {
SrcBlock "1/wo"
SrcPort 1
DstBlock "wr"
DstPort 1
}
Line {
SrcBlock "x->theta"
SrcPort 1
DstBlock "Derivative"
DstPort 1
}
Line {
SrcBlock "Fcn3"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Rr"
DstPort 1
}
Line {
SrcBlock "Te"
SrcPort 1
Points [230, 0; 0, 40]
DstBlock "Product"
DstPort 1
}
Line {
Name "wslip"
Labels [0, 0]
SrcBlock "Rr"
SrcPort 1
DstBlock "wslip"
DstPort 1
}
}
}
Block {
BlockType Scope
Name "torque"
Ports [1]
Position [1245, 65, 1280, 115]
NamePlacement "alternate"
Location [608, 60, 1145, 374]
Open on
NumInputPorts "1"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "torque"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "2"
YMin "-0.5"
YMax "2.5"
SaveName "ScopeData3"
DataFormat "StructureWithTime"
LimitDataPoints off
MaxDataPoints "20000"
Decimation "20"
}
Block {
BlockType Scope
Name "w"
Ports [3]
Position [1670, 389, 1705, 461]
NamePlacement "alternate"
Location [614, 408, 1144, 835]
Open on
NumInputPorts "3"
List {
ListType AxesTitles
axes1 "wr"
axes2 "wslip"
axes3 "wm = wr - wslip"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
axes3 ""
}
TimeRange "2"
YMin "0~-0.005~-0.1"
YMax "0.9~0.065~0.9"
SaveName "ScopeData6"
DataFormat "StructureWithTime"
LimitDataPoints off
}
Block {
BlockType Step
Name "wm"
Position [45, 167, 80, 203]
ForegroundColor "red"
Time ".2"
Before "wmo"
After ".8"
SampleTime "0"
}
Block {
BlockType Constant
Name "xx"
Position [45, 530, 75, 560]
NamePlacement "alternate"
ShowName off
Value ".5"
}
Line {
SrcBlock "DTC"
SrcPort 1
DstBlock "3/2"
DstPort 1
}
Line {
SrcBlock "F_ref"
SrcPort 1
DstBlock "DTC"
DstPort 1
}
Line {
SrcBlock "3/2"
SrcPort 1
DstBlock "dc"
DstPort 1
}
Line {
SrcBlock "IM"
SrcPort 3
Points [25, 0]
Branch {
Points [0, 150]
Branch {
DstBlock "To Workspace2"
DstPort 1
}
Branch {
Points [-645, 0; 0, -175]
DstBlock "DTC"
DstPort 3
}
}
Branch {
DstBlock "frs"
DstPort 1
}
}
Line {
SrcBlock "one1"
SrcPort 1
DstBlock "IM"
DstPort 2
}
Line {
Name "Te"
Labels [0, 0]
SrcBlock "IM"
SrcPort 1
Points [-5, 0; 105, 0]
Branch {
Labels [-1, 0]
Points [0, 275; -780, 0]
DstBlock "Sum"
DstPort 2
}
Branch {
Points [0, -105]
DstBlock "Mux"
DstPort 1
}
Branch {
Points [50, 0]
Branch {
DstBlock "Mechanical \nsystem"
DstPort 1
}
Branch {
Points [0, 290]
DstBlock "speed calc"
DstPort 2
}
}
}
Line {
Name "wm"
Labels [0, 0]
SrcBlock "Mechanical \nsystem"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "speed"
DstPort 1
}
Branch {
Points [0, 155; -485, 0]
DstBlock "IM"
DstPort 3
}
}
Line {
SrcBlock "IM"
SrcPort 2
Points [25, 0; 0, -125]
DstBlock "currents"
DstPort 1
}
Line {
SrcBlock "wm"
SrcPort 1
DstBlock "Sum4"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "DTC"
DstPort 2
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "torque"
DstPort 1
}
Line {
SrcBlock "Sum4"
SrcPort 1
DstBlock "P_control"
DstPort 1
}
Line {
Name "Te*"
Labels [0, 1]
SrcBlock "P_control"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "IM"
SrcPort 4
Points [5, 0]
Branch {
DstBlock "To Workspace1"
DstPort 1
}
Branch {
Points [0, 40; 135, 0]
Branch {
DstBlock "fr"
DstPort 1
}
Branch {
Points [0, 85]
DstBlock "speed calc"
DstPort 1
}
}
}
Line {
SrcBlock "dc"
SrcPort 1
DstBlock "IM"
DstPort 1
}
Line {
SrcBlock "Signal\nGenerator"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "xx"
SrcPort 1
Points [40, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Transport\nDelay"
DstPort 1
}
Line {
SrcBlock "Transport\nDelay"
SrcPort 1
Points [920, 0; 0, -260]
Branch {
DstBlock "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -