📄 huyuthreephaserelay1.mdl
字号:
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 Memory
X0 "0"
InheritSampleTime off
LinearizeMemory off
StateMustResolveToSignalObject off
RTWStateStorageClass "Auto"
}
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 RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
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 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 ToWorkspace
VariableName "simulink_output"
MaxDataPoints "1000"
Decimation "1"
SampleTime "0"
FixptAsFi off
}
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 "threephaserelay1"
Location [2, 70, 1022, 718]
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 "3-phase \nProgrammable Source"
Ports [0, 1]
Position [155, 446, 200, 494]
FontSize 10
SourceBlock "powerlib_extras/Control \nBlocks/3-phase \nProg"
"rammable Source"
SourceType "3-phase Programmable Source"
ShowPortLabels on
Par_Vps "[10 0 50]"
VariationEntity "Amplitude"
VariationType "Step"
VariationStep "-0.5 "
VariationRate "10"
VariationMag "0.3"
VariationFreq "2"
Par_Timing_Variation "[0 1.2]"
SinglePhase off
Yampli "[1 0.8 1.2 1.0]"
Xtime "[0 0.1 0.15 0.2]"
HarmonicGeneration off
Par_HarmoA "[3 0.2 -25 0]"
Par_HarmoB "[2 0.15 35 2]"
Par_Timing_Harmo "[0.05 3]"
}
Block {
BlockType SubSystem
Name "3-phase relay"
Ports [2, 3]
Position [390, 455, 430, 515]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "3-phase relay"
Location [67, 220, 747, 557]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 68, 55, 82]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "In2"
Position [30, 183, 60, 197]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 3]
Position [120, 56, 125, 94]
BackgroundColor "black"
ShowName off
Outputs "3"
DisplayOption "bar"
}
Block {
BlockType Demux
Name "Demux1"
Ports [1, 3]
Position [115, 171, 120, 209]
BackgroundColor "black"
ShowName off
Outputs "3"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux"
Ports [6, 1]
Position [485, 39, 490, 281]
ShowName off
Inputs "6"
DisplayOption "bar"
}
Block {
BlockType Relay
Name "Relay"
Position [355, 25, 385, 55]
OnSwitchValue "0.5"
OffSwitchValue "-0.45"
}
Block {
BlockType Relay
Name "Relay1"
Position [355, 75, 385, 105]
OnSwitchValue "0.45"
OffSwitchValue "-0.5"
OnOutputValue "0"
OffOutputValue "1"
}
Block {
BlockType Relay
Name "Relay2"
Position [355, 120, 385, 150]
OnSwitchValue "0.5"
OffSwitchValue "-0.45"
}
Block {
BlockType Relay
Name "Relay3"
Position [355, 170, 385, 200]
OnSwitchValue "0.45"
OffSwitchValue "-0.5"
OnOutputValue "0"
OffOutputValue "1"
}
Block {
BlockType Relay
Name "Relay4"
Position [355, 220, 385, 250]
OnSwitchValue "0.5"
OffSwitchValue "-0.45"
}
Block {
BlockType Relay
Name "Relay5"
Position [355, 280, 385, 310]
OnSwitchValue "0.45"
OffSwitchValue "-0.5"
OnOutputValue "0"
OffOutputValue "1"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [265, 30, 285, 50]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [265, 125, 285, 145]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [265, 225, 285, 245]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Out1"
Position [625, 148, 655, 162]
NamePlacement "alternate"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "m1"
Position [565, 13, 595, 27]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "m2"
Position [565, 43, 595, 57]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, -5]
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Relay1"
SrcPort 1
Points [35, 0; 0, 10; 10, 0]
Branch {
DstBlock "Mux"
DstPort 2
}
Branch {
Points [0, -85; 90, 0; 0, 35]
DstBlock "m2"
DstPort 1
}
}
Line {
SrcBlock "Relay"
SrcPort 1
Points [25, 0]
Branch {
Points [55, 0]
DstBlock "Mux"
DstPort 1
}
Branch {
Points [0, -20]
DstBlock "m1"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [0, 0; 30, 0]
Branch {
DstBlock "Relay"
DstPort 1
}
Branch {
Points [0, 50]
DstBlock "Relay1"
DstPort 1
}
}
Line {
SrcBlock "Relay3"
SrcPort 1
Points [35, 0; 0, -5]
DstBlock "Mux"
DstPort 4
}
Line {
SrcBlock "Relay2"
SrcPort 1
Points [0, 5]
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [0, 0; 30, 0]
Branch {
DstBlock "Relay2"
DstPort 1
}
Branch {
Points [0, 50]
DstBlock "Relay3"
DstPort 1
}
}
Line {
SrcBlock "Relay5"
SrcPort 1
Points [35, 0; 0, -35]
DstBlock "Mux"
DstPort 6
}
Line {
SrcBlock "Relay4"
SrcPort 1
Points [80, 0]
DstBlock "Mux"
DstPort 5
}
Line {
SrcBlock "Sum2"
SrcPort 1
Points [0, 0; 30, 0]
Branch {
DstBlock "Relay4"
DstPort 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -