📄 boost_switching.mdl
字号:
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "saw-tooth"
Ports [0, 1]
Position [115, 69, 160, 101]
SourceBlock "simulink/Sources/Repeating\nSequence"
SourceType "Repeating table"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
rep_seq_t "[0 1/Fs]"
rep_seq_y "[0 1]"
}
Block {
BlockType Outport
Name "pwm signal"
Position [400, 143, 430, 157]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "d"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "saw-tooth"
SrcPort 1
Points [45, 0]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Relay"
DstPort 1
}
Line {
SrcBlock "Relay"
SrcPort 1
DstBlock "pwm signal"
DstPort 1
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [225, 150, 245, 170]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [525, 130, 545, 150]
ShowName off
IconShape "round"
Inputs "++|"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Switch
Name "Switch (C)"
Position [615, 91, 645, 149]
Threshold "0.5"
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType Switch
Name "Switch (L)"
Position [270, 111, 300, 169]
Threshold "0.5"
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Vout"
Position [885, 113, 915, 127]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "IL"
Position [885, 48, 915, 62]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "switch control"
Position [885, 233, 915, 247]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Vg"
SrcPort 1
Points [150, 0; 0, 35]
Branch {
DstBlock "Switch (L)"
DstPort 1
}
Branch {
Points [0, 40]
DstBlock "Sum"
DstPort 1
}
}
Line {
SrcBlock "Pulse-width modulator"
SrcPort 1
Points [10, 0]
Branch {
Points [0, -100]
DstBlock "Switch (L)"
DstPort 2
}
Branch {
Points [395, 0]
Branch {
Points [0, -120]
DstBlock "Switch (C)"
DstPort 2
}
Branch {
DstBlock "switch control"
DstPort 1
}
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Switch (L)"
DstPort 3
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Switch (C)"
DstPort 3
}
Line {
SrcBlock "Switch (C)"
SrcPort 1
DstBlock "1/C"
DstPort 1
}
Line {
SrcBlock "1/C"
SrcPort 1
DstBlock "Integrator (C)"
DstPort 1
}
Line {
Name "vc"
Labels [0, 0]
SrcBlock "Integrator (C)"
SrcPort 1
Points [30, 0]
Branch {
Points [0, 90; -610, 0]
DstBlock "Sum"
DstPort 2
}
Branch {
DstBlock "Vout"
DstPort 1
}
}
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 {
DstBlock "Sum1"
DstPort 2
}
Branch {
Points [0, -85]
DstBlock "IL"
DstPort 1
}
}
Line {
SrcBlock "D"
SrcPort 1
DstBlock "Pulse-width modulator"
DstPort 1
}
Line {
SrcBlock "Iout"
SrcPort 1
DstBlock "-1"
DstPort 1
}
Line {
SrcBlock "-1"
SrcPort 1
Points [280, 0; 0, 65]
Branch {
DstBlock "Sum1"
DstPort 1
}
Branch {
DstBlock "Switch (C)"
DstPort 1
}
}
Annotation {
Name "ECEN2060 Switched-mode Boost (step-up) DC-D"
"C converter"
Position [449, 9]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "output voltage"
Position [881, 99]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "inductor current"
Position [877, 32]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "output current"
Position [59, 15]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "input voltage"
Position [55, 65]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "duty cycle"
Position [38, 202]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "Inductor"
Position [391, 108]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "Capacitor"
Position [749, 168]
UseDisplayTextAsClickCallback off
}
}
}
Block {
BlockType Constant
Name "Duty cycle"
Position [15, 165, 45, 195]
Value "0.5"
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 "D"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Scope
Name "Scope"
Ports [3]
Position [365, 165, 395, 225]
Floating off
Location [261, 461, 840, 905]
Open off
NumInputPorts "3"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
}
TimeRange "0.01"
YMin "180~0~-0.5"
YMax "220~8~1.5"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Constant
Name "Vin"
Position [15, 115, 45, 145]
Value "100"
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 "Vg"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Display
Name "Vout"
Ports [1]
Position [340, 115, 430, 145]
Decimation "1"
Lockdown off
}
Line {
Name "D"
Labels [0, 0]
SrcBlock "Duty cycle"
SrcPort 1
DstBlock "Boost DC-DC"
DstPort 3
}
Line {
Name "Vg"
Labels [0, 0]
SrcBlock "Vin"
SrcPort 1
DstBlock "Boost DC-DC"
DstPort 1
}
Line {
Name "Vout"
Labels [0, 0]
SrcBlock "Boost DC-DC"
SrcPort 1
Points [30, 0]
Branch {
Points [20, 0]
Branch {
DstBlock "Vout"
DstPort 1
}
Branch {
Labels [2, 0]
Points [0, 45]
DstBlock "Scope"
DstPort 1
}
}
Branch {
Points [0, -60]
DstBlock "1/Rload"
DstPort 1
}
}
Line {
Name "iL"
Labels [3, 0]
SrcBlock "Boost DC-DC"
SrcPort 2
Points [30, 0; 0, 40]
DstBlock "Scope"
DstPort 2
}
Line {
Name "switch control"
Labels [3, 0]
SrcBlock "Boost DC-DC"
SrcPort 3
Points [15, 0; 0, 35]
DstBlock "Scope"
DstPort 3
}
Line {
Name "iout"
Labels [2, 0]
SrcBlock "1/Rload"
SrcPort 1
Points [-45, 0; 0, 85]
DstBlock "Boost DC-DC"
DstPort 2
}
Annotation {
Name "ECEN2060\nSwitched-mode Boost\nDC-DC converter"
Position [65, 29]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "Resistive load"
Position [199, 44]
UseDisplayTextAsClickCallback off
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -