📄 work003.mdl
字号:
}
}
Line {
SrcBlock "i_αβ"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "ω"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "Cartesian to\nPolar"
SrcPort 1
DstBlock "phi"
DstPort 1
}
Line {
SrcBlock "Cartesian to\nPolar"
SrcPort 2
DstBlock "Theta"
DstPort 1
}
}
}
Block {
BlockType Scope
Name "Scope"
Ports [4]
Position [995, 58, 1030, 142]
BackgroundColor "green"
NamePlacement "alternate"
Floating off
Location [1, 49, 1025, 767]
Open off
NumInputPorts "4"
TickLabels "OneTimeTick"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
axes3 ""
axes4 ""
}
Grid "on"
TimeRange "0.03"
YMin "-1000~-300~80~119.575"
YMax "1000~350~130~119.62"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "StructureWithTime"
LimitDataPoints off
MaxDataPoints "5000"
Decimation "100"
SampleInput on
SampleTime "2e-5"
}
Block {
BlockType SubSystem
Name "Speed_controller"
Ports [2, 1]
Position [130, 140, 190, 195]
NamePlacement "alternate"
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskType "PI controller"
MaskDescription "Proportional-Integral Speed Controller"
MaskPromptString "Proportional gain (Kp)|Integral gain (Ki)|Torqu"
"e limit (N.m)|Sampling time (s)"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVariables "Kp=@1;Ki=@2;Tlim=@3;Ts=@4;"
MaskDisplay "plot(0,0,100,100,[35,35,65],[70,30,30],[35,65],"
"[45,60])"
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "100|5|300|2e-5"
MaskVariableAliases ",,,"
System {
Name "Speed_controller"
Location [119, 275, 497, 416]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "w*"
Position [25, 53, 55, 67]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "w"
Position [25, 83, 55, 97]
Port "2"
LatchInput off
Interpolate on
}
Block {
BlockType DiscreteIntegrator
Name "Discrete-Time\nIntegrator"
Ports [1, 1]
Position [180, 72, 245, 118]
ShowName off
IntegratorMethod "Trapezoidal"
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "0"
LimitOutput on
UpperSaturationLimit "Tlim"
LowerSaturationLimit "-Tlim"
ShowSaturationPort off
ShowStatePort off
SampleTime "Ts"
RTWStateStorageClass "Auto"
}
Block {
BlockType Gain
Name "Gain"
Position [140, 81, 165, 109]
ShowName off
Gain "Ki"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Gain
Name "Gain1"
Position [140, 26, 170, 54]
ShowName off
Gain "Kp"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Saturate
Name "Saturation"
Position [280, 60, 300, 80]
ShowName off
UpperLimit "Tlim"
LowerLimit "-Tlim"
LinearizeAsGain on
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [95, 43, 105, 107]
ShowName off
IconShape "rectangular"
Inputs "+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [260, 14, 265, 121]
ShowName off
IconShape "rectangular"
Inputs "++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Name "Te*"
Position [325, 63, 355, 77]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Discrete-Time\nIntegrator"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Gain"
DstPort 1
}
Branch {
DstBlock "Gain1"
DstPort 1
}
}
Line {
SrcBlock "Discrete-Time\nIntegrator"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "Saturation"
SrcPort 1
DstBlock "Te*"
DstPort 1
}
Line {
SrcBlock "w"
SrcPort 1
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "w*"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Subsytem"
Ports [1, 1]
Position [130, 233, 200, 277]
ShowName off
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskType "abc to αβ"
MaskPromptString "K1|K2"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVariables "k1=@1;k2=@2;"
MaskInitialization "k1=sqrt(2/3);\nk2=sqrt(2)/3;\n"
MaskDisplay "text(0.1,0.7,'Transformer');\n"
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "port"
MaskIconUnits "normalized"
MaskValueString "sqrt(2/3)|1/sqrt(2)"
MaskVariableAliases ","
System {
Name "Subsytem"
Location [2, 70, 1022, 720]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "i_abc"
Position [15, 98, 45, 112]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 3]
Position [80, 28, 85, 182]
BackgroundColor "black"
ShowName off
Outputs "3"
BusSelectionMode off
}
Block {
BlockType Gain
Name "Gain1"
Position [280, 40, 310, 70]
Gain "k1"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Gain
Name "Gain2"
Position [280, 120, 310, 150]
Gain "k2"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Gain
Name "Gain4"
Position [160, 65, 195, 95]
ShowName off
Gain "0.5"
Multiplication "Element-wise(K.*u)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [340, 13, 345, 177]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [220, 103, 240, 167]
ShowName off
IconShape "rectangular"
Inputs "|+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [125, 70, 145, 90]
ShowName off
IconShape "round"
Inputs "|++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [205, 45, 225, 65]
ShowName off
IconShape "round"
Inputs "|+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Name "i_αβ"
Position [395, 88, 425, 102]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [45, 0]
Branch {
Labels [1, 0]
Points [65, 0; 0, 30]
DstBlock "Sum"
DstPort 1
}
Branch {
DstBlock "Sum1"
DstPort 2
}
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [20, 0]
Branch {
DstBlock "Sum"
DstPort 2
}
Branch {
Points [0, -70]
DstBlock "Sum1"
DstPort 1
}
}
Line {
SrcBlock "i_abc"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "i_αβ"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Gain4"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Gain4"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
}
}
Block {
BlockType UnitDelay
Name "Unit Delay3"
Position [400, 299, 420, 331]
Orientation "left"
ShowName off
X0 "0"
SampleTime "2e-5"
RTWStateStorageClass "Auto"
}
Block {
BlockType UnitDelay
Name "Unit Delay4"
Position [530, 274, 550, 306]
Orientation "left"
ShowName off
X0 "0"
SampleTime "2e-5"
RTWStateStorageClass "Auto"
}
Block {
BlockType Reference
Name "Vab"
Tag "PoWeRsYsTeMmEaSuReMeNt"
Ports [2, 1]
Position [770, 38, 795, 62]
SourceBlock "powerlib2/Measurements/Voltage Measurement"
SourceType "Voltage Measurement"
PSBOutputType "0"
PSBequivalent "1"
}
Block {
BlockType Reference
Name "Vdc"
Tag "PoWeRsYsTeMbLoCk"
Description "source block"
Ports [1, 1]
Position [580, 95, 600, 130]
Orientation "up"
NamePlacement "alternate"
SourceBlock "powerlib2/Electrical\nSources/DC Voltage Source"
SourceType "DC Voltage Source"
V "780"
mesure "None"
PSBOutputType "1"
}
Block {
BlockType SubSystem
Name "i_T* Calculation"
Ports [2, 1]
Position [270, 157, 315, 208]
NamePlacement "alternate"
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
System {
Name "i_T* Calculation"
Location [370, 499, 849, 646]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "Te*"
Position [25, 13, 55, 27]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Inport
Name "Phir"
Position [25, 53, 55, 67]
Port "2"
LatchInput off
Interpolate on
}
Block {
BlockType Fcn
Name "Fcn"
Position [125, 35, 245, 55]
ShowName off
Expr "u[1]*0.418/(u[2]+1e-3)"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [80, 25, 100, 60]
ShowName off
Inputs "2"
DisplayOption "none"
}
Block {
BlockType Outport
Name "I_T*"
Position [275, 38, 305, 52]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "Phir"
SrcPort 1
Points [0, -10]
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "Fcn"
SrcPort 1
DstBlock "I_T*"
DstPort 1
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -