📄 dcac_switching.mdl
字号:
Name "-Vdc-vac"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [310, 75, 330, 95]
ShowName off
IconShape "round"
Inputs "-+|"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "Vdc-vac"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [255, 240, 275, 260]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Switch
Name "Switch (Iin)"
Position [745, 221, 775, 279]
Threshold "0.5"
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType Switch
Name "Switch (L)"
Position [435, 111, 465, 169]
Threshold "0.5"
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Vrms"
Position [190, 13, 255, 47]
Gain "Vrms"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
Port {
PortNumber 1
Name "vac"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Outport
Name "vac"
Position [820, 13, 850, 27]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "iac"
Position [820, 133, 850, 147]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "iin"
Position [820, 243, 850, 257]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "switch control"
Position [820, 63, 850, 77]
Port "4"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Vdc"
SrcPort 1
Points [120, 0]
Branch {
Points [0, 75]
DstBlock "-Vdc"
DstPort 1
}
Branch {
DstBlock "Sum1"
DstPort 2
}
}
Line {
SrcBlock "Switch (L)"
SrcPort 1
DstBlock "1/L"
DstPort 1
}
Line {
SrcBlock "1/L"
SrcPort 1
DstBlock "Integrator (L)"
DstPort 1
}
Line {
Name "iL"
Labels [0, 0]
SrcBlock "Integrator (L)"
SrcPort 1
Points [30, 0]
Branch {
Points [0, 90]
Branch {
DstBlock "Switch (Iin)"
DstPort 1
}
Branch {
Points [0, 40]
Branch {
DstBlock "-iL"
DstPort 1
}
Branch {
Points [0, 35; -400, 0]
DstBlock "Sum2"
DstPort 2
}
}
}
Branch {
DstBlock "iac"
DstPort 1
}
}
Line {
SrcBlock "-Vdc"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
Name "-Vdc-vac"
Labels [0, 0]
SrcBlock "Sum"
SrcPort 1
DstBlock "Switch (L)"
DstPort 3
}
Line {
Name "Vdc-vac"
Labels [3, 0]
SrcBlock "Sum1"
SrcPort 1
Points [20, 0; 0, 35]
DstBlock "Switch (L)"
DstPort 1
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "Vrms"
DstPort 1
}
Branch {
Points [0, 210]
DstBlock "Product"
DstPort 1
}
}
Line {
Name "vac"
Labels [0, 0]
SrcBlock "Vrms"
SrcPort 1
Points [30, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Labels [1, 0]
Points [30, 0]
Branch {
DstBlock "Sum1"
DstPort 1
}
Branch {
Points [0, -10]
DstBlock "vac"
DstPort 1
}
}
}
Line {
SrcBlock "-iL"
SrcPort 1
DstBlock "Switch (Iin)"
DstPort 3
}
Line {
Name "iref"
Labels [0, 0]
SrcBlock "Product"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Iref"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Relay"
DstPort 1
}
Line {
Name "switch control"
Labels [0, 0]
SrcBlock "Relay"
SrcPort 1
Points [45, 0]
Branch {
Labels [1, 0]
DstBlock "Switch (Iin)"
DstPort 2
}
Branch {
Points [0, -110]
Branch {
DstBlock "Switch (L)"
DstPort 2
}
Branch {
Points [0, -70]
DstBlock "switch control"
DstPort 1
}
}
}
Line {
SrcBlock "Switch (Iin)"
SrcPort 1
DstBlock "iin"
DstPort 1
}
Annotation {
Name "output AC current"
Position [810, 119]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "Input current"
Position [824, 230]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "Input DC voltage"
Position [58, 122]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "RMS current reference"
Position [75, 291]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "inductor"
Position [553, 108]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "comparator\nwith hysteresis"
Position [325, 212]
UseDisplayTextAsClickCallback off
}
}
}
Block {
BlockType Constant
Name "IRMSref"
Position [15, 115, 45, 145]
Value "3"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
Port {
PortNumber 1
Name "Irmsref"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Scope
Name "Scope"
Ports [4]
Position [275, 51, 315, 154]
Floating off
Location [492, 298, 1263, 815]
Open on
NumInputPorts "4"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
}
TimeRange "0.018"
YMin "-200~-5~-5~-0.5"
YMax "200~5~5~1.5"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Constant
Name "Vdc"
Position [15, 65, 45, 95]
Value "200"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
Port {
PortNumber 1
Name "Vdc"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Line {
Name "Vdc"
Labels [0, 0]
SrcBlock "Vdc"
SrcPort 1
DstBlock "DC-AC"
DstPort 1
}
Line {
Name "Irmsref"
Labels [0, 0]
SrcBlock "IRMSref"
SrcPort 1
DstBlock "DC-AC"
DstPort 2
}
Line {
Name "vac"
Labels [0, 0]
SrcBlock "DC-AC"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
Name "iac"
Labels [0, 0]
SrcBlock "DC-AC"
SrcPort 2
DstBlock "Scope"
DstPort 2
}
Line {
Name "iin"
Labels [0, 0]
SrcBlock "DC-AC"
SrcPort 3
DstBlock "Scope"
DstPort 3
}
Line {
Name "switch\ncontrol"
Labels [0, 0]
SrcBlock "DC-AC"
SrcPort 4
DstBlock "Scope"
DstPort 4
}
Annotation {
Name "ECEN2060\nSwitched-Mode DC-AC Inverter"
Position [162, 25]
UseDisplayTextAsClickCallback off
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -