📄 pwm.mdl
字号:
SrcBlock "Sign"
SrcPort 1
Points [15, 0; 0, 5]
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [5, 0; 0, -5; 5, 0]
Branch {
DstBlock "Out1"
DstPort 1
}
Branch {
Points [0, 55]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "In1"
SrcPort 1
Points [5, 0; 0, 40]
DstBlock "Subtract"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
Points [10, 0; 0, -70]
DstBlock "Subtract"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Subsystem2"
Ports [2, 1]
Position [195, 200, 235, 260]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Subsystem2"
Location [94, 200, 494, 391]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [35, 28, 65, 42]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "In2"
Position [25, 153, 55, 167]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Gain
Name "Gain"
Position [270, 60, 300, 90]
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [345, 109, 375, 141]
Floating off
Location [5, 51, 1033, 737]
Open off
NumInputPorts "1"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "100"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Signum
Name "Sign"
Position [190, 55, 220, 85]
}
Block {
BlockType Sum
Name "Subtract"
Ports [2, 1]
Position [100, 67, 130, 98]
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Out1"
Position [335, 63, 365, 77]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Sign"
SrcPort 1
Points [15, 0; 0, 5]
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [5, 0; 0, -5; 5, 0]
Branch {
DstBlock "Out1"
DstPort 1
}
Branch {
Points [0, 55]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "In1"
SrcPort 1
Points [5, 0; 0, 40]
DstBlock "Subtract"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
Points [10, 0; 0, -70]
DstBlock "Subtract"
DstPort 2
}
Line {
SrcBlock "Subtract"
SrcPort 1
Points [10, 0; 0, -15]
DstBlock "Sign"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Subsystem3"
Ports [2, 1]
Position [200, 310, 240, 370]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Subsystem3"
Location [563, 165, 963, 356]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [35, 28, 65, 42]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "In2"
Position [25, 153, 55, 167]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Gain
Name "Gain"
Position [270, 60, 300, 90]
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [345, 109, 375, 141]
Floating off
Location [5, 51, 1033, 737]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "100"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Signum
Name "Sign"
Position [190, 55, 220, 85]
}
Block {
BlockType Sum
Name "Subtract"
Ports [2, 1]
Position [100, 67, 130, 98]
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Out1"
Position [335, 63, 365, 77]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Subtract"
SrcPort 1
Points [10, 0; 0, -15]
DstBlock "Sign"
DstPort 1
}
Line {
SrcBlock "Sign"
SrcPort 1
Points [15, 0; 0, 5]
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [5, 0; 0, -5; 5, 0]
Branch {
DstBlock "Out1"
DstPort 1
}
Branch {
Points [0, 55]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "In1"
SrcPort 1
Points [5, 0; 0, 40]
DstBlock "Subtract"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
Points [10, 0; 0, -70]
DstBlock "Subtract"
DstPort 2
}
}
}
Block {
BlockType Switch
Name "Switch"
Position [470, 110, 500, 140]
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType Switch
Name "Switch1"
Position [470, 215, 500, 245]
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType Switch
Name "Switch2"
Position [475, 325, 505, 355]
InputSameDT off
SaturateOnIntegerOverflow off
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
DstBlock "Subsystem1"
DstPort 1
}
Line {
SrcBlock "Sine Wave1"
SrcPort 1
DstBlock "Subsystem2"
DstPort 1
}
Line {
SrcBlock "Sine Wave2"
SrcPort 1
DstBlock "Subsystem3"
DstPort 1
}
Line {
SrcBlock "Subsystem"
SrcPort 1
Points [60, 0; 0, -50]
Branch {
Points [0, -110]
Branch {
Points [0, -105]
DstBlock "Subsystem1"
DstPort 2
}
Branch {
DstBlock "Subsystem2"
DstPort 2
}
}
Branch {
DstBlock "Subsystem3"
DstPort 2
}
}
Line {
SrcBlock "Subsystem3"
SrcPort 1
DstBlock "Switch2"
DstPort 2
}
Line {
SrcBlock "Subsystem2"
SrcPort 1
DstBlock "Switch1"
DstPort 2
}
Line {
SrcBlock "Subsystem1"
SrcPort 1
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [0, 0; 25, 0]
Branch {
Points [85, 0]
DstBlock "Switch"
DstPort 3
}
Branch {
Points [0, 30]
Branch {
Points [0, 15]
DstBlock "Switch1"
DstPort 3
}
Branch {
Points [0, 125]
DstBlock "Switch2"
DstPort 3
}
}
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [10, 0; 0, 35; 55, 0]
Branch {
DstBlock "Switch"
DstPort 1
}
Branch {
Points [0, 105]
Branch {
DstBlock "Switch1"
DstPort 1
}
Branch {
Points [0, 110]
DstBlock "Switch2"
DstPort 1
}
}
}
Line {
SrcBlock "Switch"
SrcPort 1
Points [0, 0; 20, 0]
Branch {
Points [0, -20]
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, 35]
DstBlock "Gain1"
DstPort 1
}
}
Line {
SrcBlock "Switch1"
SrcPort 1
Points [15, 0; 0, -5]
Branch {
Points [0, -10]
DstBlock "Gain2"
DstPort 1
}
Branch {
Points [0, 35]
DstBlock "Gain3"
DstPort 1
}
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [35, 0; 0, -10]
DstBlock "Add"
DstPort 1
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Add1"
DstPort 1
}
Line {
SrcBlock "Gain5"
SrcPort 1
Points [45, 0; 0, 5]
DstBlock "Add2"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [20, 0; 0, 75]
Branch {
Points [0, 130; 85, 0]
DstBlock "Add2"
DstPort 3
}
Branch {
DstBlock "Add1"
DstPort 3
}
}
Line {
SrcBlock "Gain3"
SrcPort 1
Points [0, 0; 40, 0]
Branch {
Points [10, 0; 0, -155]
DstBlock "Add"
DstPort 2
}
Branch {
Points [0, 80]
DstBlock "Add2"
DstPort 2
}
}
Line {
SrcBlock "Gain4"
SrcPort 1
Points [65, 0; 0, -150]
Branch {
DstBlock "Add1"
DstPort 2
}
Branch {
Points [0, -110]
DstBlock "Add"
DstPort 3
}
}
Line {
SrcBlock "Add1"
SrcPort 1
Points [0, 0]
DstBlock "Scope"
DstPort 2
}
Line {
SrcBlock "Add2"
SrcPort 1
Points [10, 0; 0, -75]
DstBlock "Scope"
DstPort 3
}
Line {
SrcBlock "Add"
SrcPort 1
Points [25, 0; 0, 80]
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Switch2"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
Points [5, 0; 0, -15]
DstBlock "Gain5"
DstPort 1
}
Branch {
Points [0, 35]
DstBlock "Gain4"
DstPort 1
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -