📄 pmsm_vector.mdl
字号:
BlockType Inport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
Interpolate on
}
Block {
BlockType Integrator
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "0"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
IgnoreLimit off
ZeroCross on
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
UseBusObject off
BusObject "BusObject"
NonVirtualBus off
}
Block {
BlockType Outport
Port "1"
UseBusObject off
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 Saturate
UpperLimit "0.5"
LowerLimit "-0.5"
LinearizeAsGain on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Scope
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 "-1"
}
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 StateSpace
A "1"
B "1"
C "1"
D "1"
X0 "0"
AbsoluteTolerance "auto"
Realization "auto"
}
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 Terminator
}
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 "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "pmsm_xiabing"
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 Gain
Name "Gain"
Position [725, 147, 750, 173]
ShowName off
Gain "4"
}
Block {
BlockType Gain
Name "Gain1"
Position [700, 167, 725, 193]
ShowName off
Gain "4"
}
Block {
BlockType Reference
Name "Machines\nMeasurement\nDemux"
Ports [1, 4]
Position [640, 134, 680, 206]
SourceBlock "powerlib2/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 on
sm2 on
sm3 on
sm4 on
sm5 on
sm6 on
sm7 on
sm8 on
sm9 on
sm10 on
sm11 on
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 off
pmsm3 off
pmsm4 on
pmsm5 on
pmsm6 on
lastType "4"
}
Block {
BlockType SubSystem
Name "PWM inv."
Ports [2, 3]
Position [390, 129, 435, 191]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "PWM inv."
Location [2, 78, 1014, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "125"
Block {
BlockType Inport
Name "iabc"
Position [25, 43, 55, 57]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "iref"
Position [25, 133, 55, 147]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Reference
Name "Bus Bar 2"
Tag "PoWeRsYsTeMbLoCk"
Ports [2, 1]
Position [330, 55, 335, 90]
BackgroundColor "black"
ShowName off
SourceBlock "powerlib2/Connectors/Bus Bar (vert)"
SourceType "Bus Bar"
ShowPortLabels on
entrees "2"
sorties "1"
PSBOutputType "1111111111111111111111111111111111111111111"
"1111111111111111111111111111111111111111111111"
}
Block {
BlockType Demux
Name "Demux2"
Ports [1, 3]
Position [80, 25, 85, 75]
BackgroundColor "black"
ShowName off
Outputs "3"
}
Block {
BlockType Demux
Name "Demux3"
Ports [1, 3]
Position [80, 115, 85, 165]
BackgroundColor "black"
ShowName off
Outputs "3"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [205, 40, 225, 60]
ShowName off
Inputs "+-"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [205, 90, 225, 110]
ShowName off
Inputs "+-"
}
Block {
BlockType SubSystem
Name "cmp"
Ports [2, 1]
Position [150, 27, 175, 58]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "cmp"
Location [176, 401, 630, 699]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "ia"
Position [5, 25, 25, 45]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "iar"
Position [5, 85, 25, 105]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Relay
Name "Relay1"
Position [190, 57, 215, 73]
OnSwitchValue "0.25"
OffSwitchValue "-0.25"
OnOutputValue "155"
OffOutputValue "-155"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [145, 55, 165, 75]
Inputs "-+"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn"
Position [65, 24, 95, 66]
Denominator "[50e-6 1]"
}
Block {
BlockType Outport
Name "va"
Position [245, 55, 265, 75]
IconDisplay "Port number"
InitialOutput "0"
}
Line {
SrcBlock "iar"
SrcPort 1
Points [85, 0; 0, -25]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Relay1"
DstPort 1
}
Line {
SrcBlock "Relay1"
SrcPort 1
DstBlock "va"
DstPort 1
}
Line {
SrcBlock "ia"
SrcPort 1
Points [20, 0]
DstBlock "Transfer Fcn"
DstPort 1
}
Line {
SrcBlock "Transfer Fcn"
SrcPort 1
Points [15, 0; 0, 15]
DstBlock "Sum2"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "cmp1"
Ports [2, 1]
Position [150, 76, 175, 109]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "cmp1"
Location [460, 112, 736, 229]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "ib"
Position [25, 10, 45, 30]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "ibr"
Position [30, 65, 50, 85]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Relay
Name "Relay1"
Position [185, 37, 210, 53]
OnSwitchValue "0.25"
OffSwitchValue "-0.25"
OnOutputValue "155"
OffOutputValue "-155"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [140, 35, 160, 55]
Inputs "-+"
}
Block {
BlockType TransferFcn
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -