📄 pwm41.mdl
字号:
Name "Enable"
Ports []
Position [20, 15, 40, 35]
}
Block {
BlockType Gain
Name "180/pi"
Position [225, 105, 245, 125]
Gain "180/pi"
}
Block {
BlockType ComplexToMagnitudeAngle
Name "Complex to\nMagnitude-Angle"
Ports [1, 2]
Position [140, 85, 195, 125]
ShowName off
Output "Magnitude and angle"
}
Block {
BlockType ComplexToRealImag
Name "Complex to\nReal-Imag"
Ports [1, 2]
Position [140, 45, 195, 85]
ShowName off
Output "Real and imag"
}
Block {
BlockType Mux
Name "Mux2"
Ports [5, 1]
Position [275, 23, 280, 127]
ShowName off
Inputs "5"
DisplayOption "bar"
}
Block {
BlockType Selector
Name "Selector"
Ports [1, 1]
Position [315, 51, 350, 99]
Elements "OutputSelection"
InputPortWidth "5"
}
Block {
BlockType Outport
Name "options"
Position [380, 68, 410, 82]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "Mux2"
SrcPort 1
DstBlock "Selector"
DstPort 1
}
Line {
SrcBlock "measure"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
Points [0, 30]
Branch {
Points [0, 40]
DstBlock "Complex to\nMagnitude-Angle"
DstPort 1
}
Branch {
DstBlock "Complex to\nReal-Imag"
DstPort 1
}
}
Branch {
DstBlock "Mux2"
DstPort 1
}
}
Line {
SrcBlock "Complex to\nReal-Imag"
SrcPort 1
DstBlock "Mux2"
DstPort 2
}
Line {
SrcBlock "Complex to\nReal-Imag"
SrcPort 2
DstBlock "Mux2"
DstPort 3
}
Line {
SrcBlock "Complex to\nMagnitude-Angle"
SrcPort 1
DstBlock "Mux2"
DstPort 4
}
Line {
SrcBlock "Complex to\nMagnitude-Angle"
SrcPort 2
DstBlock "180/pi"
DstPort 1
}
Line {
SrcBlock "180/pi"
SrcPort 1
DstBlock "Mux2"
DstPort 5
}
Line {
SrcBlock "Selector"
SrcPort 1
DstBlock "options"
DstPort 1
}
}
}
Block {
BlockType Selector
Name "Selector"
Ports [1, 1]
Position [295, 128, 360, 172]
Elements "SelectionMode"
InputPortWidth "length(OutputSelection)+1"
}
Block {
BlockType Constant
Name "Simulation method"
Position [130, 85, 240, 105]
Orientation "down"
BackgroundColor "magenta"
NamePlacement "alternate"
ShowName off
Value "PhasorSimulation"
}
Block {
BlockType From
Name "source"
Position [20, 124, 90, 146]
GotoTag "tp071310"
}
Block {
BlockType PMIOPort
Name "+"
Position [15, 28, 45, 42]
Port "1"
Side "Left"
}
Block {
BlockType PMIOPort
Name "-"
Position [165, 22, 185, 48]
Orientation "left"
Port "2"
Side "Right"
}
Block {
BlockType Outport
Name "i"
Position [400, 139, 420, 161]
FontSize 16
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
LineType "Connection"
SrcBlock "+"
SrcPort RConn1
Points [0, 0]
DstBlock "CurrentMeasurement"
DstPort LConn1
}
Line {
LineType "Connection"
SrcBlock "-"
SrcPort RConn1
DstBlock "CurrentMeasurement"
DstPort RConn1
}
Line {
SrcBlock "Simulation method"
SrcPort 1
DstBlock "Phasor Measurements"
DstPort enable
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Selector"
DstPort 1
}
Line {
SrcBlock "Phasor Measurements"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "source"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
Points [0, 30]
DstBlock "Mux"
DstPort 2
}
Branch {
DstBlock "Phasor Measurements"
DstPort 1
}
}
Line {
SrcBlock "Selector"
SrcPort 1
DstBlock "i"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "PID Controller2"
Ports [1, 1]
Position [295, 305, 325, 335]
ShowName off
AncestorBlock "simulink_extras/Additional\nLinear/PID Controll"
"er"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
MaskType "PID Controller"
MaskDescription "Enter expressions for proportional, integral, a"
"nd derivative terms.\nP+I/s+Ds"
MaskHelp "This block implements a PID controller where pa"
"rameters are entered for the Proportional, Integral and Derivative terms. Unm"
"ask this block to see how it works. The derivative term is implemented using "
"a true derivative block."
MaskPromptString "Proportional:|Integral:|Derivative:"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskVariables "P=@1;I=@2;D=@3;"
MaskDisplay "disp('PID')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "12|1e-3|0"
MaskTabNameString ",,"
System {
Name "PID Controller2"
Location [290, 337, 652, 557]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In_1"
Position [25, 65, 45, 85]
IconDisplay "Port number"
}
Block {
BlockType Gain
Name "D"
Position [95, 129, 115, 151]
Gain "D"
}
Block {
BlockType Derivative
Name "Derivative"
Position [150, 128, 190, 152]
}
Block {
BlockType TransferFcn
Name "Integral"
Position [110, 57, 145, 93]
Numerator "[I]"
Denominator "[1 0]"
}
Block {
BlockType Gain
Name "Proportional"
Position [120, 13, 140, 37]
Gain "P"
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1]
Position [245, 57, 265, 93]
Inputs "+++"
}
Block {
BlockType Outport
Name "Out_1"
Position [290, 65, 310, 85]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "Proportional"
SrcPort 1
Points [65, 0; 0, 40]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Integral"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "In_1"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Integral"
DstPort 1
}
Branch {
Points [0, -50]
DstBlock "Proportional"
DstPort 1
}
Branch {
Points [0, 65]
DstBlock "D"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Out_1"
DstPort 1
}
Line {
SrcBlock "D"
SrcPort 1
DstBlock "Derivative"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [15, 0; 0, -55]
DstBlock "Sum"
DstPort 3
}
}
}
Block {
BlockType Reference
Name "PID Controller3"
Ports [1, 1]
Position [525, 315, 555, 345]
ShowName off
SourceBlock "simulink_extras/Additional\nLinear/PID Controll"
"er"
SourceType "PID Controller"
ShowPortLabels on
P "267"
I "1333"
D "0"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [410, 311, 455, 344]
InputSameDT off
RndMeth "Floor"
}
Block {
BlockType Saturate
Name "Saturation"
Position [585, 315, 615, 345]
NamePlacement "alternate"
UpperLimit "0.99"
LowerLimit "-0.99"
}
Block {
BlockType Saturate
Name "Saturation1"
Position [345, 305, 375, 335]
NamePlacement "alternate"
UpperLimit "100"
LowerLimit "-100"
}
Block {
BlockType Scope
Name "Scope"
Ports [3]
Position [915, 178, 945, 212]
Floating off
Location [5, 55, 1021, 762]
Open on
NumInputPorts "3"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
}
YMin "168.5~-9~0.3"
YMax "172.5~4~1"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [2]
Position [650, 385, 680, 420]
Floating off
Location [-3, 216, 1013, 923]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
YMin "-700~-110"
YMax "1300~110"
SaveName "ScopeData3"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope2"
Ports [2]
Position [255, 415, 285, 450]
Floating off
Location [6, 52, 1022, 759]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
YMin "25~125"
YMax "275~375"
SaveName "ScopeData4"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Reference
Name "Series RLC Branch"
Ports [0, 0, 0, 0, 0, 1, 1]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -