📄 untitled3.mdl
字号:
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "N"
Position [15, 168, 45, 182]
FontSize 12
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "N*"
Position [15, 98, 45, 112]
NamePlacement "alternate"
FontSize 12
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Abs
Name "Abs"
Position [440, 25, 470, 55]
ShowName off
FontSize 12
}
Block {
BlockType BusCreator
Name "Bus\nCreator3"
Ports [4, 1]
Position [815, 187, 820, 328]
ShowName off
DisplayOption "bar"
}
Block {
BlockType Constant
Name "Constant"
Position [575, 122, 595, 138]
ShowName off
Value "SwK"
}
Block {
BlockType Constant
Name "Constant1"
Position [275, 287, 295, 303]
ShowName off
Value "SwK"
}
Block {
BlockType Constant
Name "Constant2"
Position [615, 252, 635, 268]
ShowName off
Value "SwK"
}
Block {
BlockType Constant
Name "Constant3"
Position [610, 281, 635, 299]
ShowName off
Value "0"
}
Block {
BlockType Saturate
Name "Ctrl sat."
Position [660, 130, 690, 160]
FontSize 12
UpperLimit "ctrl_sat(2)"
LowerLimit "ctrl_sat(1)"
Port {
PortNumber 1
Name "Torque reference (Nm)"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType DiscreteIntegrator
Name "Discrete-Time\nIntegrator2"
Ports [1, 1]
Position [470, 93, 540, 137]
ShowName off
FontSize 12
IntegratorMethod "Integration: Trapezoidal"
ExternalReset "none"
InitialConditionSource "internal"
SampleTime "Tsc"
LimitOutput on
UpperSaturationLimit "ctrl_sat(2)"
LowerSaturationLimit "ctrl_sat(1)"
IgnoreLimit off
ICPrevOutput "DiscIntNeverNeededParam"
ICPrevScaledInput "DiscIntNeverNeededParam"
}
Block {
BlockType Lookup
Name "Flux table"
Position [485, 14, 535, 66]
FontSize 12
InputValues "[0;500;1000;1500;1800;2000;2500;3000;3500]"
OutputValues "[nf;nf;nf;nf;nf;nf;0.90*nf;0.72*nf;0.51*nf]"
Port {
PortNumber 1
Name "Flux reference (Wb)"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType InitialCondition
Name "IC"
Position [125, 95, 150, 135]
ShowName off
FontSize 12
Value "0"
}
Block {
BlockType Gain
Name "Integral gain"
Position [405, 97, 445, 133]
FontSize 12
Gain "ki"
}
Block {
BlockType DiscreteTransferFcn
Name "Low pass filter"
Position [270, 158, 335, 192]
FontSize 12
Numerator "[1-exp(-2*pi*fc*Tsc)]"
Denominator "[1 -exp(-2*pi*fc*Tsc)]"
SampleTime "Tsc"
}
Block {
BlockType MultiPortSwitch
Name "Multiport\nSwitch"
Ports [3, 1]
Position [615, 122, 645, 168]
ShowName off
Inputs "2"
InputSameDT off
}
Block {
BlockType MultiPortSwitch
Name "Multiport\nSwitch1"
Ports [3, 1]
Position [310, 287, 340, 333]
ShowName off
Inputs "2"
InputSameDT off
Port {
PortNumber 1
Name "Reference"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType MultiPortSwitch
Name "Multiport\nSwitch2"
Ports [3, 1]
Position [655, 252, 685, 298]
ShowName off
Inputs "2"
InputSameDT off
Port {
PortNumber 1
Name "Error"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Gain
Name "Proportional gain"
Position [405, 159, 445, 191]
FontSize 12
Gain "kp"
}
Block {
BlockType RateLimiter
Name "Rate Limiter"
Position [175, 100, 205, 130]
ShowName off
FontSize 12
RisingSlewLimit "ramp(2)"
FallingSlewLimit "ramp(1)"
LinearizeAsGain off
}
Block {
BlockType RateTransition
Name "Rate Transition1"
Position [830, 19, 885, 61]
ShowName off
FontSize 12
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [345, 105, 365, 125]
ShowName off
FontSize 12
IconShape "round"
Inputs "|+-"
CollapseMode "All dimensions"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [555, 87, 565, 203]
ShowName off
FontSize 12
CollapseMode "All dimensions"
}
Block {
BlockType Terminator
Name "Terminator_1"
Position [940, 255, 985, 265]
ShowName off
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold1"
Position [220, 164, 235, 186]
ShowName off
FontSize 12
SampleTime "Tsc"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold3"
Position [220, 269, 235, 291]
ShowName off
FontSize 12
SampleTime "Tsc"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold5"
Position [220, 104, 235, 126]
ShowName off
FontSize 12
SampleTime "Tsc"
}
Block {
BlockType Outport
Name "Flux*"
Position [940, 33, 970, 47]
FontSize 12
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Torque*"
Position [940, 138, 970, 152]
FontSize 12
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Constant3"
SrcPort 1
DstBlock "Multiport\nSwitch2"
DstPort 3
}
Line {
SrcBlock "Constant2"
SrcPort 1
DstBlock "Multiport\nSwitch2"
DstPort 1
}
Line {
Name "Error"
Labels [1, 1]
SrcBlock "Multiport\nSwitch2"
SrcPort 1
DstBlock "Bus\nCreator3"
DstPort 3
}
Line {
Name "Reference"
Labels [-1, 1]
SrcBlock "Multiport\nSwitch1"
SrcPort 1
DstBlock "Bus\nCreator3"
DstPort 4
}
Line {
SrcBlock "Zero-Order\nHold3"
SrcPort 1
Points [0, 0]
Branch {
Points [0, 45]
DstBlock "Multiport\nSwitch1"
DstPort 3
}
Branch {
Points [350, 0; 0, -120]
DstBlock "Multiport\nSwitch"
DstPort 3
}
}
Line {
SrcBlock "Constant1"
SrcPort 1
DstBlock "Multiport\nSwitch1"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Multiport\nSwitch"
DstPort 2
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Multiport\nSwitch"
DstPort 1
}
Line {
SrcBlock "Multiport\nSwitch"
SrcPort 1
DstBlock "Ctrl sat."
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold5"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
Points [0, 195]
DstBlock "Multiport\nSwitch1"
DstPort 2
}
Branch {
Points [15, 0]
Branch {
Points [0, -75]
DstBlock "Abs"
DstPort 1
}
Branch {
DstBlock "Sum1"
DstPort 1
}
}
}
Line {
SrcBlock "Rate Limiter"
SrcPort 1
DstBlock "Zero-Order\nHold5"
DstPort 1
}
Line {
SrcBlock "N*"
SrcPort 1
Points [65, 0; 0, 10]
DstBlock "IC"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold1"
SrcPort 1
DstBlock "Low pass filter"
DstPort 1
}
Line {
SrcBlock "IC"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
Points [0, 165]
DstBlock "Zero-Order\nHold3"
DstPort 1
}
Branch {
DstBlock "Rate Limiter"
DstPort 1
}
}
Line {
SrcBlock "Rate Transition1"
SrcPort 1
DstBlock "Flux*"
DstPort 1
}
Line {
Name "Flux reference (Wb)"
SrcBlock "Flux table"
SrcPort 1
Points [155, 0]
Branch {
DstBlock "Rate Transition1"
DstPort 1
}
Branch {
Labels [-1, 1]
Points [0, 200]
DstBlock "Bus\nCreator3"
DstPort 2
}
}
Line {
SrcBlock "Abs"
SrcPort 1
DstBlock "Flux table"
DstPort 1
}
Line {
SrcBlock "Proportional gain"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Discrete-Time\nIntegrator2"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "N"
SrcPort 1
DstBlock "Zero-Order\nHold1"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [0, 0]
Branch {
Points [0, 60]
Branch {
Points [0, 100]
DstBlock "Multiport\nSwitch2"
DstPort 2
}
Branch {
DstBlock "Proportional gain"
DstPort 1
}
}
Branch {
DstBlock "Integral gain"
DstPort 1
}
}
Line {
SrcBlock "Integral gain"
SrcPort 1
DstBlock "Discrete-Time\nIntegrator2"
DstPort 1
}
Line {
Name "Torque reference (Nm)"
SrcBlock "Ctrl sat."
SrcPort 1
Points [5, 0]
Branch {
Labels [2, 0]
Points [0, 60]
DstBlock "Bus\nCreator3"
DstPort 1
}
Branch {
DstBlock "Torque*"
DstPort 1
}
}
Line {
SrcBlock "Low pass filter"
SrcPort 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -