📄 dcmotpos.mdl
字号:
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Sum
Name "Sum4"
Ports [2, 1]
Position [475, 120, 495, 140]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType Sum
Name "Sum5"
Ports [2, 1]
Position [165, 120, 185, 140]
ShowName off
IconShape "round"
Inputs "|+-"
Port {
PortNumber 1
Name "ae"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Step
Name "Tl"
Position [620, 170, 650, 200]
Time "0.04"
After "0.38"
SampleTime "0"
Port {
PortNumber 1
Name "Tl"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType SubSystem
Name "Torque controller"
Ports [1, 1]
Position [510, 104, 570, 156]
BackgroundColor "yellow"
TreatAsAtomicUnit off
MaskDescription "Proportional-Integral Speed Controller"
MaskPromptString "Proportional gain (Kp)|Integral gain (Ki)|Satur"
"ation limit [pu]"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskVariables "Kp=@1;Ki=@2;sat=@3;"
MaskDisplay "plot(0,0,100,100,[35,35,65],[70,30,30],[35,65],"
"[45,60])\n"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "1.38|5880|3"
System {
Name "Torque controller"
Location [576, 612, 919, 784]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "lightBlue"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "er"
Position [20, 73, 50, 87]
}
Block {
BlockType Gain
Name "Gain"
Position [100, 116, 125, 144]
ShowName off
Gain "Ki"
}
Block {
BlockType Gain
Name "Gain1"
Position [90, 16, 120, 44]
ShowName off
Gain "Kp"
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [155, 115, 180, 145]
ShowName off
LimitOutput on
UpperSaturationLimit "sat"
LowerSaturationLimit "-sat"
}
Block {
BlockType Saturate
Name "Saturation"
Position [240, 70, 260, 90]
ShowName off
UpperLimit "sat"
LowerLimit "-sat"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [190, 70, 210, 90]
ShowName off
IconShape "round"
}
Block {
BlockType Outport
Name "c"
Position [275, 73, 305, 87]
InitialOutput "0"
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [15, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [75, 0]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "er"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
Points [0, 50]
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, -50]
DstBlock "Gain1"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "Saturation"
SrcPort 1
DstBlock "c"
DstPort 1
}
}
}
Block {
BlockType Scope
Name "current"
Ports [1]
Position [500, 39, 530, 71]
Location [576, 325, 1123, 494]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "0.06"
YMin "-20"
YMax "20"
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "position"
Ports [1]
Position [195, 44, 225, 76]
Location [14, 144, 567, 434]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "0.06"
YMin "0"
YMax "1.4"
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "speed"
Ports [1]
Position [340, 44, 370, 76]
Location [579, 107, 1119, 274]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "0.06"
YMin "-100"
YMax "300"
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "va"
Ports [1]
Position [675, 39, 705, 71]
ShowName off
Location [570, 558, 1117, 775]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "0.06"
YMin "-100"
YMax "100"
DataFormat "StructureWithTime"
}
Line {
Name "Tl"
Labels [0, 0]
SrcBlock "Tl"
SrcPort 1
DstBlock "DC \nMOTOR"
DstPort 2
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "speed"
DstPort 1
}
Line {
SrcBlock "Mux2"
SrcPort 1
DstBlock "current"
DstPort 1
}
Line {
Name "wc"
Labels [0, 1]
SrcBlock "Kpp"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "Sum3"
DstPort 1
}
Branch {
Points [0, -90]
DstBlock "Mux1"
DstPort 1
}
}
Line {
Name "ia"
Labels [1, 0]
SrcBlock "DC \nMOTOR"
SrcPort 1
Points [10, 0; 0, 110; -325, 0]
Branch {
DstBlock "Sum4"
DstPort 2
}
Branch {
Points [-25, 0]
DstBlock "Mux2"
DstPort 2
}
}
Line {
Name "ae"
Labels [1, 0]
SrcBlock "Sum5"
SrcPort 1
DstBlock "Kpp"
DstPort 1
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "Look-Up\nTable1"
DstPort 1
}
Line {
SrcBlock "Mux3"
SrcPort 1
DstBlock "position"
DstPort 1
}
Line {
Name "ac"
Labels [0, 1]
SrcBlock "Look-Up\nTable1"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Sum5"
DstPort 1
}
Branch {
Points [0, -90]
DstBlock "Mux3"
DstPort 1
}
}
Line {
Name "a"
Labels [1, 0]
SrcBlock "Integrator"
SrcPort 1
Points [20, 0; 0, 150; -735, 0]
Branch {
DstBlock "Sum5"
DstPort 2
}
Branch {
Points [-30, 0; 0, -260]
DstBlock "Mux3"
DstPort 2
}
}
Line {
SrcBlock "Speed controller"
SrcPort 1
Points [0, 0]
Branch {
Labels [1, 0]
DstBlock "Sum4"
DstPort 1
}
Branch {
Points [0, -95]
DstBlock "Mux2"
DstPort 1
}
}
Line {
Name "we"
Labels [1, 0]
SrcBlock "Sum3"
SrcPort 1
DstBlock "Speed controller"
DstPort 1
}
Line {
SrcBlock "Sum4"
SrcPort 1
DstBlock "Torque controller"
DstPort 1
}
Line {
SrcBlock "Torque controller"
SrcPort 1
DstBlock "KA"
DstPort 1
}
Line {
Name "va"
Labels [1, 0]
SrcBlock "KA"
SrcPort 1
Points [15, 0]
Branch {
Points [0, -75]
DstBlock "va"
DstPort 1
}
Branch {
DstBlock "DC \nMOTOR"
DstPort 1
}
}
Line {
Name "wm"
SrcBlock "DC \nMOTOR"
SrcPort 2
Points [30, 0]
Branch {
Labels [1, 0]
DstBlock "Integrator"
DstPort 1
}
Branch {
Points [0, 85; -500, 0]
Branch {
DstBlock "Sum3"
DstPort 2
}
Branch {
Points [-35, 0]
DstBlock "Mux1"
DstPort 2
}
}
}
Annotation {
Name "voltage"
Position [693, 78]
}
Annotation {
Name "speed loop"
Position [444, 260]
FontSize 12
}
Annotation {
Name "current loop"
Position [570, 226]
FontSize 12
}
Annotation {
Name "position loop"
Position [336, 319]
FontSize 12
}
Annotation {
Name "CASCADE POSITIONAL CONTROL OF A DC MOTOR"
Position [469, 373]
FontName "Arial"
FontSize 16
FontWeight "bold"
}
Annotation {
Position [708, 375]
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -