📄 vectorcontrol3.mdl
字号:
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "0"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
IgnoreLimit off
ZeroCross on
}
Block {
BlockType Logic
Operator "AND"
Inputs "2"
AllPortsSameDT on
OutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
SampleTime "-1"
}
Block {
BlockType Lookup
InputValues "[-4:5]"
OutputValues " rand(1,10)-0.5"
LookUpMeth "Interpolation-Extrapolation"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
LUTDesignTableMode "Redesign Table"
LUTDesignDataSource "Block Dialog"
LUTDesignFunctionName "sqrt(x)"
LUTDesignUseExistingBP on
LUTDesignRelError "0.01"
LUTDesignAbsError "1e-6"
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
BusObject "BusObject"
NonVirtualBus off
}
Block {
BlockType Outport
Port "1"
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Relay
OnSwitchValue "eps"
OffSwitchValue "eps"
OnOutputValue "1"
OffOutputValue "0"
OutputDataTypeScalingMode "All ports same datatype"
OutDataType "sfix(16)"
OutScaling "2^0"
ConRadixGroup "Use specified scaling"
ZeroCross on
SampleTime "-1"
}
Block {
BlockType RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Saturate
UpperLimit "0.5"
LowerLimit "-0.5"
LinearizeAsGain on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Scope
Floating off
ModelBased off
TickLabels "OneTimeTick"
ZoomMode "on"
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Selector
InputType "Vector"
IndexMode "One-based"
ElementSrc "Internal"
Elements "1"
RowSrc "Internal"
Rows "1"
ColumnSrc "Internal"
Columns "1"
InputPortWidth "-1"
IndexIsStartValue off
OutputPortSize "1"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType Step
Time "1"
Before "0"
After "1"
SampleTime "-1"
VectorParams1D on
ZeroCross on
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Switch
Criteria "u2 >= Threshold"
Threshold "0"
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType TransferFcn
Numerator "[1]"
Denominator "[1 2 1]"
AbsoluteTolerance "auto"
Realization "auto"
}
Block {
BlockType Trigonometry
Operator "sin"
OutputSignalType "auto"
SampleTime "-1"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "arial"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "vectorcontrol3"
Location [2, 82, 1253, 960]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "Asynchronous Motor1"
Ports [2, 3]
Position [1155, 377, 1215, 513]
ShowName off
FontSize 12
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskType "Asynchronous Motor(Under dq)"
MaskDescription "Asynchronous Motor(Under dq)(By:ZhuShiwu)"
MaskPromptString "Stator resistance Rs(ohm)|Stator inductance Ls("
"H)|Rotor resistance Rr(ohm)|Rotor inductance Lr(H)|Mutual inductance Lm(H)|Pa"
"irs of poles Np()|Inertia J(kg.m^2)"
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 "R1=@1;L1=@2;R2=@3;L2=@4;Lm=@5;Np=@6;J=@7;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "4.1|0.545|2.5|0.553|0.510|2|0.02"
MaskTabNameString ",,,,,,"
System {
Name "Asynchronous Motor1"
Location [-2, 82, 1249, 982]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "Uabc"
Position [75, 388, 105, 402]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "TL"
Position [95, 648, 125, 662]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Constant
Name "Constant"
Position [670, 250, 695, 270]
Value "0.0001"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 2]
Position [260, 401, 265, 439]
BackgroundColor "black"
ShowName off
Outputs "2"
DisplayOption "bar"
}
Block {
BlockType Gain
Name "Gain1"
Position [512, 250, 538, 280]
Orientation "down"
NamePlacement "alternate"
ShowName off
Gain "L1-Lm^2/L2"
}
Block {
BlockType Gain
Name "Gain2"
Position [555, 184, 630, 226]
ShowName off
Gain "Lm*R2/L2"
}
Block {
BlockType Gain
Name "Gain3"
Position [527, 520, 553, 555]
Orientation "up"
ShowName off
Gain "L1-Lm^2/L2"
}
Block {
BlockType Gain
Name "Gain4"
Position [685, 487, 710, 513]
Orientation "left"
NamePlacement "alternate"
ShowName off
Gain "Lm/L2"
}
Block {
BlockType Gain
Name "Gain5"
Position [570, 137, 630, 163]
Orientation "left"
NamePlacement "alternate"
ShowName off
Gain "Lm*R2/L2/L2"
}
Block {
BlockType Gain
Name "Gain6"
Position [720, 587, 750, 613]
ShowName off
Gain "Np*Lm/L2"
}
Block {
BlockType Gain
Name "Gain7"
Position [1025, 597, 1060, 623]
ShowName off
Gain "Np/J"
}
Block {
BlockType Gain
Name "Gain8"
Position [1185, 597, 1220, 623]
ShowName off
Gain "60/(2*pi*Np)"
}
Block {
BlockType Gain
Name "Gain9"
Position [622, 520, 648, 555]
Orientation "up"
ShowName off
Gain "Lm*R2/L2"
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [1100, 595, 1130, 625]
ShowName off
IgnoreLimit off
}
Block {
BlockType Integrator
Name "Integrator1"
Ports [1, 1]
Position [405, 440, 435, 470]
Orientation "left"
NamePlacement "alternate"
ShowName off
IgnoreLimit off
}
Block {
BlockType Integrator
Name "Integrator3"
Ports [1, 1]
Position [935, 280, 965, 310]
ShowName off
IgnoreLimit off
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [1005, 49, 1020, 116]
ShowName off
Inputs "2"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [400, 372, 430, 403]
Orientation "left"
NamePlacement "alternate"
ShowName off
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [400, 492, 430, 523]
Orientation "left"
NamePlacement "alternate"
ShowName off
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product2"
Ports [2, 1]
Position [400, 287, 430, 318]
Orientation "left"
NamePlacement "alternate"
ShowName off
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product3"
Ports [2, 1]
Position [850, 577, 880, 608]
ShowName off
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product4"
Ports [2, 1]
Position [627, 425, 658, 455]
Orientation "up"
ShowName off
Inputs "*/"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Scope
Name "Scope1"
Ports [4]
Position [1195, 719, 1230, 906]
Location [5, 56, 1285, 997]
Open off
NumInputPorts "4"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
}
YMin "2.13689~2.24466~-334.853~4.75"
YMax "2.36183~2.48094~-302.963~5.25"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
LimitDataPoints off
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1]
Position [375, 181, 395, 229]
ShowName off
Inputs "+++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [950, 583, 970, 632]
ShowName off
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum2"
Ports [3, 1]
Position [380, 576, 400, 624]
ShowName off
Inputs "--+"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum3"
Ports [2, 1]
Position [615, 378, 630, 407]
Orientation "left"
NamePlacement "alternate"
ShowName off
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -