📄 dsp_test2.mdl
字号:
Name "MATLAB Fcn"
Position [460, 50, 520, 80]
MATLABFcn "SVPWM_sim(u(1),u(2),u(3),u(4),u(5))"
OutputDimensions "-1"
OutputSignalType "auto"
Output1D off
}
Block {
BlockType Mux
Name "Mux"
Ports [5, 1]
Position [395, 31, 400, 99]
ShowName off
Inputs "5"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [120, 61, 125, 119]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux2"
Ports [6, 1]
Position [780, 15, 785, 170]
ShowName off
Inputs "6"
DisplayOption "none"
}
Block {
BlockType DiscretePulseGenerator
Name "Pulse\nGenerator"
Position [150, 46, 175, 64]
ShowName off
PulseType "Time-based"
Amplitude "1"
Period "1/2000"
PulseWidth "50"
PhaseDelay "0"
SampleTime "1"
VectorParams1D on
}
Block {
BlockType Reference
Name "Sample\nand Hold"
Ports [1, 1, 0, 1]
Position [185, 75, 220, 105]
ShowName off
SourceBlock "dspsigops/Sample\nand Hold"
SourceType "Sample and Hold"
trig "Rising edge"
initCond "0"
}
Block {
BlockType Outport
Name "Pulses"
Position [805, 88, 835, 102]
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "Demux2"
SrcPort 3
Points [110, 0; 0, -20]
DstBlock "Mux"
DstPort 4
}
Line {
SrcBlock "Demux2"
SrcPort 2
Points [80, 0; 0, -25]
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "Demux2"
SrcPort 1
Points [60, 0; 0, -30]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Sample\nand Hold"
SrcPort 1
DstBlock "Demux2"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "Sample\nand Hold"
DstPort 1
}
Line {
SrcBlock "Discrete\nVirtual PLL"
SrcPort 3
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "Pulse\nGenerator"
SrcPort 1
Points [20, 0]
DstBlock "Sample\nand Hold"
DstPort trigger
}
Line {
SrcBlock "MATLAB Fcn"
SrcPort 1
DstBlock "Demux1"
DstPort 1
}
Line {
SrcBlock "Clock"
SrcPort 1
Points [35, 0]
DstBlock "Mux"
DstPort 5
}
Line {
SrcBlock "Discrete\nVirtual PLL"
SrcPort 2
DstBlock "Mux1"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "MATLAB Fcn"
DstPort 1
}
Line {
SrcBlock "Discrete\nVirtual PLL"
SrcPort 1
Points [0, -10]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 1
Points [5, 0; 0, -25; 70, 0]
Branch {
DstBlock "Mux2"
DstPort 1
}
Branch {
DstBlock "Data Type \nConversion"
DstPort 1
}
}
Line {
SrcBlock "Demux1"
SrcPort 2
Points [55, 0; 0, 15; 10, 0]
Branch {
DstBlock "Mux2"
DstPort 3
}
Branch {
DstBlock "Data Type \nConversion4"
DstPort 1
}
}
Line {
SrcBlock "Demux1"
SrcPort 3
Points [5, 0; 0, 40; 50, 0; 0, 15; 5, 0]
Branch {
DstBlock "Mux2"
DstPort 5
}
Branch {
Points [0, 25]
DstBlock "Data Type \nConversion5"
DstPort 1
}
}
Line {
SrcBlock "Mux2"
SrcPort 1
DstBlock "Pulses"
DstPort 1
}
Line {
SrcBlock "Data Type \nConversion"
SrcPort 1
DstBlock "Logical\nOperator"
DstPort 1
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
DstBlock "Data Type \nConversion1"
DstPort 1
}
Line {
SrcBlock "Data Type \nConversion1"
SrcPort 1
DstBlock "Mux2"
DstPort 2
}
Line {
SrcBlock "Logical\nOperator1"
SrcPort 1
DstBlock "Data Type \nConversion2"
DstPort 1
}
Line {
SrcBlock "Data Type \nConversion2"
SrcPort 1
DstBlock "Mux2"
DstPort 4
}
Line {
SrcBlock "Logical\nOperator2"
SrcPort 1
DstBlock "Data Type \nConversion3"
DstPort 1
}
Line {
SrcBlock "Data Type \nConversion3"
SrcPort 1
DstBlock "Mux2"
DstPort 6
}
Line {
SrcBlock "Data Type \nConversion4"
SrcPort 1
DstBlock "Logical\nOperator1"
DstPort 1
}
Line {
SrcBlock "Data Type \nConversion5"
SrcPort 1
DstBlock "Logical\nOperator2"
DstPort 1
}
}
}
Block {
BlockType Scope
Name "Scope"
Ports [6]
Position [505, 268, 540, 307]
BackgroundColor "green"
NamePlacement "alternate"
Floating off
Location [1, 49, 1025, 714]
Open off
NumInputPorts "6"
TickLabels "OneTimeTick"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
axes5 "%<SignalLabel>"
axes6 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
axes3 ""
axes4 ""
axes5 ""
axes6 ""
}
Grid "on"
TimeRange "0.03"
YMin "-1~-1~0~0~0~0"
YMax "2~2~1~1~1~1"
SaveToWorkspace off
SaveName "ScopeData2"
DataFormat "StructureWithTime"
LimitDataPoints off
MaxDataPoints "5000"
Decimation "20"
SampleInput off
SampleTime "5e-6"
}
Line {
SrcBlock "SVPWM Generator"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
DstBlock "Scope"
DstPort 2
}
Line {
SrcBlock "Demux"
SrcPort 3
DstBlock "Scope"
DstPort 3
}
Line {
SrcBlock "Demux"
SrcPort 4
DstBlock "Scope"
DstPort 4
}
Line {
SrcBlock "Demux"
SrcPort 5
DstBlock "Scope"
DstPort 5
}
Line {
SrcBlock "Demux"
SrcPort 6
DstBlock "Scope"
DstPort 6
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -