📄 foc_pmsm_02.mdl
字号:
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 Math
Operator "exp"
OutputSignalType "auto"
SampleTime "-1"
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType MultiPortSwitch
Inputs "4"
zeroidx off
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
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 PMComponent
SubClassName "unknown"
}
Block {
BlockType PMIOPort
}
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 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"
PortCounts "[]"
SFunctionModules "''"
}
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 Terminator
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "FOC_PMSM_02"
Location [2, 82, 1014, 721]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "Machines\nMeasurement\nDemux"
Ports [1, 6]
Position [655, 28, 715, 102]
SourceBlock "powerlib/Machines/Machines\nMeasurement\nDemux"
SourceType "Machine measurements"
ShowPortLabels on
machType "Permanent magnet synchronous"
ssm1 on
ssm2 on
ssm3 on
ssm4 on
ssm5 on
ssm6 on
sm1 off
sm2 on
sm3 off
sm4 off
sm5 off
sm6 on
sm7 off
sm8 on
sm9 off
sm10 off
sm11 off
sm115 off
sm12 off
sm13 off
sm14 off
asm1 on
asm2 on
asm3 on
asm4 on
asm5 on
asm6 on
asm7 on
asm8 on
asm9 on
asm10 on
asm11 on
pmsm1 on
pmsm2 on
pmsm3 on
pmsm4 on
pmsm5 on
pmsm6 on
lastType "1"
}
Block {
BlockType SubSystem
Name "PI"
Ports [1, 1]
Position [305, 69, 405, 111]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "PI"
Location [492, 82, 990, 382]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [75, 103, 105, 117]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Gain
Name "Gain"
Position [160, 95, 190, 125]
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain1"
Position [165, 180, 195, 210]
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [255, 180, 285, 210]
}
Block {
BlockType Saturate
Name "Saturation"
Position [355, 125, 385, 155]
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [315, 108, 335, 182]
ShowName off
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Out1"
Position [430, 133, 460, 147]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, 85]
DstBlock "Gain1"
DstPort 1
}
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [50, 0; 0, 30]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [5, 0; 0, -30]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "Saturation"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Permanent Magnet\nSynchronous Machine"
Ports [1, 1, 0, 0, 0, 3]
Position [655, 183, 740, 257]
FontSize 11
SourceBlock "powerlib/Machines/Permanent Magnet\nSynchronous"
" Machine"
SourceType "Permanent Magnet Synchronous Machine"
ShowPortLabels on
PresetModel "No"
ShowDetailedParameters on
Resistance "2.8750 "
Inductances "[8.5e-3, 8.5e-3]"
Flux "0.175"
Mechanical "[ 0.8e-3, 0, 4 ] "
}
Block {
BlockType Reference
Name "Universal Bridge"
Ports [1, 0, 0, 0, 0, 3, 2]
Position [775, 212, 830, 288]
Orientation "left"
NamePlacement "alternate"
SourceBlock "powerlib/Power\nElectronics/Universal Bridge"
SourceType "Universal Bridge"
ShowPortLabels on
Arms "3"
SnubberResistance "1e5"
SnubberCapacitance "inf"
Device "IGBT / Diodes"
Ron "1e-3"
Lon "0"
ForwardVoltages "[ 0 0 ]"
ForwardVoltage "0"
GTOparameters "[ 10e-6 , 20e-6 ]"
IGBTparameters "[ 1e-6 , 2e-6 ]"
Measurements "None"
}
Block {
BlockType SubSystem
Name "abctoalfabeta"
Ports [3, 2]
Position [300, 354, 400, 396]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "abctoalfabeta"
Location [2, 82, 1014, 721]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "a"
Position [25, 43, 55, 57]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "b"
Position [30, 133, 60, 147]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "c"
Position [30, 213, 60, 227]
Port "3"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType ComplexToRealImag
Name "Complex to\nReal-Imag"
Ports [1, 2]
Position [495, 178, 525, 207]
Output "Real and imag"
}
Block {
BlockType Constant
Name "Constant"
Position [30, 310, 60, 340]
Value "2/3*pi"
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [1, 1]
Position [160, 305, 190, 335]
}
Block {
BlockType Math
Name "Math\nFunction1"
Ports [1, 1]
Position [255, 305, 285, 335]
Operator "square"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [345, 117, 375, 148]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [345, 237, 375, 268]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -