📄 driveconfigurable.mdl
字号:
SourceType "AC"
ShowPortLabels "on"
Initialize "on"
Amplitude "0"
Phase "0"
Frequency "0"
Measurements "None"
}
Block {
BlockType Reference
Name "Current Measurement"
Ports [0, 1, 0, 0, 0, 1, 1]
Position [155, 198, 180, 222]
Orientation "left"
SourceBlock "powerlib/Measurements/Current Measureme"
"nt"
SourceType "Current Measurement"
ShowPortLabels "on"
PhasorSimulation "off"
OutputType "Complex"
PSBequivalent "0"
}
Block {
BlockType Reference
Name "Series RLC Branch"
Ports [0, 0, 0, 0, 0, 1, 1]
Position [140, 26, 210, 54]
SourceBlock "powerlib/Elements/Series RLC Branch"
SourceType "Series RLC Branch"
PhysicalDomain "powersysdomain"
SubClassName "unknown"
LeftPortType "p1"
RightPortType "p1"
LConnTagsString "__new0"
RConnTagsString "__new0"
BranchType "RL"
Resistance "resistance"
Inductance "inductance"
SetiL0 "off"
InitialCurrent "0"
Capacitance "[]"
Setx0 "off"
InitialVoltage "0"
Measurements "None"
}
Block {
BlockType Gain
Name "Torque Constant"
Position [220, 255, 250, 285]
Gain "kt"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Torque"
Position [355, 263, 385, 277]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
LineType "Connection"
SrcBlock "Current Measurement"
SrcPort RConn1
Points [-80, 0]
DstBlock "Controlled Voltage Source"
DstPort LConn1
}
Line {
LineType "Connection"
SrcBlock "Controlled Voltage Source"
SrcPort RConn1
Points [0, -55]
DstBlock "Series RLC Branch"
DstPort LConn1
}
Line {
LineType "Connection"
SrcBlock "Current Measurement"
SrcPort LConn1
Points [110, 0]
DstBlock "Controlled Voltage Source1"
DstPort LConn1
}
Line {
LineType "Connection"
SrcBlock "Series RLC Branch"
SrcPort RConn1
Points [70, 0]
DstBlock "Controlled Voltage Source1"
DstPort RConn1
}
Line {
SrcBlock "Shaft Speed"
SrcPort 1
Points [0, 0]
DstBlock "Back EMF Constant"
DstPort 1
}
Line {
SrcBlock "Back EMF Constant"
SrcPort 1
Points [-80, 0]
DstBlock "Controlled Voltage Source1"
DstPort 1
}
Line {
SrcBlock "Current Measurement"
SrcPort 1
Points [-40, 0; 0, 65]
DstBlock "Torque Constant"
DstPort 1
}
Line {
SrcBlock "Torque Constant"
SrcPort 1
Points [0, 0]
DstBlock "Torque"
DstPort 1
}
Line {
SrcBlock "Voltage"
SrcPort 1
DstBlock "Controlled Voltage Source"
DstPort 1
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [80, 165, 100, 185]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Torque"
Position [650, 188, 680, 202]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Subsystem1"
DstPort 1
}
Line {
SrcBlock "Shaft Speed"
SrcPort 1
Points [20, 0; 0, -25]
DstBlock "Subsystem1"
DstPort 2
}
Line {
SrcBlock "Torque CMD"
SrcPort 1
Points [5, 0]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Subsystem1"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
DstBlock "Torque"
DstPort 1
}
Branch {
Points [0, 80; -510, 0]
DstBlock "Sum"
DstPort 2
}
}
Line {
SrcBlock "Subsystem"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Subsystem"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Detailed PWM Voltage"
Ports [2, 1]
Position [90, 169, 240, 231]
AncestorBlock "DriveConfigurable/Detailed PWM Voltage"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
MaskType "Torque Controlled Motor"
MaskDescription "This is a model of a permanent magnet DC motor "
"with voltage regulation using a torque controlled pulse width modulation sche"
"me."
MaskPromptString "Pulse Width Modulation Frequency (Hz)|Voltage R"
"ating (V)|Resistance (Ohms)|Inductance (Henries)|Torque Constant (N-m/A)|Back"
" EMF Constant (V-s/degree)|Zero Voltage Threshold Torque (N-m)"
MaskStyleString "edit,edit,edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on,on,on"
MaskCallbackString "||||||"
MaskEnableString "on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,"
MaskVariables "f=@1;V_rating=@2;r=@3;j=@4;kt=@5;kemf=@6;T_Thre"
"shold=@7;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "500|100|1|0.001|50|0.25|1000"
MaskTabNameString ",,,,,,"
System {
Name "Detailed PWM Voltage"
Location [216, 407, 953, 733]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Torque CMD"
Position [25, 168, 55, 182]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Shaft Speed"
Position [390, 233, 420, 247]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType SubSystem
Name "Enabled\nSubsystem"
Ports [1, 1, 0, 1]
Position [145, 154, 245, 196]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Enabled\nSubsystem"
Location [323, 140, 907, 677]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Tcmd"
Position [45, 63, 75, 77]
IconDisplay "Port number"
LatchByDelayingOutsideSignal on
}
Block {
BlockType TriggerPort
Name "Trigger"
Ports []
Position [190, 15, 210, 35]
StatesWhenEnabling "held"
}
Block {
BlockType Reference
Name "Compare\nTo Zero"
Ports [1, 1]
Position [180, 55, 210, 85]
SourceBlock "simulink/Logic and Bit\nOperations/Comp"
"are\nTo Zero"
SourceType "Compare To Zero"
ShowPortLabels "on"
relop ">="
LogicOutDataTypeMode "uint8"
ZeroCross "off"
}
Block {
BlockType Reference
Name "Compare\nTo Zero1"
Ports [1, 1]
Position [160, 285, 190, 315]
SourceBlock "simulink/Logic and Bit\nOperations/Comp"
"are\nTo Zero"
SourceType "Compare To Zero"
ShowPortLabels "on"
relop "<"
LogicOutDataTypeMode "uint8"
ZeroCross "off"
}
Block {
BlockType Constant
Name "Constant"
Position [155, 175, 185, 205]
Value "T_Threshold"
}
Block {
BlockType Constant
Name "Constant1"
Position [160, 395, 190, 425]
Value "-T_Threshold"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [395, 324, 425, 356]
Floating off
Location [188, 390, 512, 629]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
SaveName "ScopeData1"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [305, 289, 335, 321]
Floating off
Location [188, 390, 512, 629]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
SaveName "ScopeData3"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [2, 1, 1]
Position [225, 146, 320, 204]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Subsystem"
Location [387, 348, 823, 620]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "V cmd"
Position [115, 88, 145, 102]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Threshold"
Position [115, 138, 145, 152]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType EnablePort
Name "Enable"
Ports []
Position [200, 15, 220, 35]
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [265, 98, 340, 132]
OutDataTypeMode "double"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [200, 97, 230, 128]
InputSameDT off
LogicOutDataTypeMode "Boolean"
}
Block {
BlockType Outport
Name "V Bang"
Position [375, 108, 405, 122]
IconDisplay "Port number"
BusOutputAsStruct off
DataType "double"
OutputWhenDisabled "reset"
InitialOutput "0"
}
Line {
SrcBlock "V cmd"
SrcPort 1
Points [15, 0; 0, 10]
DstBlock "Relational\nOperator"
DstPort 1
}
Line {
SrcBlock "Threshold"
SrcPort 1
Points [15, 0; 0, -25]
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
DstBlock "Data Type Conversion"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "V Bang"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Subsystem1"
Ports [2, 1, 1]
Position [225, 366, 320, 424]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Subsystem1"
Location [387, 348, 823, 620]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "T cmd"
Position [30, 113, 60, 127]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Threshold"
Position [30, 153, 60, 167]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType EnablePort
Name "Enable"
Ports []
Position [200, 15, 220, 35]
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [175, 123, 250, 157]
OutDataTypeMode "double"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -