📄 generalqam.mdl
字号:
}
Block {
BlockType Display
Name "Display"
Ports [1]
Position [845, 173, 1010, 297]
FontSize 10
Decimation "1"
}
Block {
BlockType Reference
Name "Error Rate\nCalculation"
Ports [2, 1]
Position [690, 207, 765, 258]
FontSize 10
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "1"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Port"
WsName "ErrorVec"
RsMode2 off
stop off
numErr "100"
maxBits "1e6"
}
Block {
BlockType SubSystem
Name "General QAM\nDemodulator\nPassband"
Ports [1, 1]
Position [545, 217, 620, 273]
AncestorBlock "commdigpbndam2/General QAM\nDemodulator\nPassba"
"nd"
FontSize 10
TreatAsAtomicUnit off
MaskType "General QAM Demodulator Passband"
MaskDescription "Demodulate the input signal using the quadratur"
"e amplitude modulation method.\n\nThe input signal must be a sample-based sca"
"lar."
MaskHelp "helpview(commbhelp)"
MaskPromptString "Signal constellation:|Symbol period (s):|Baseba"
"nd samples per symbol:|Carrier frequency (Hz):|Carrier initial phase (rad):|I"
"nput sample time (s):"
MaskStyleString "edit,edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on,on"
MaskCallbackString "|||||"
MaskEnableString "on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on"
MaskVarAliasString ",,,,,"
MaskVariables "SigCon=@1;td=@2;numSamp=@3;Fc=@4;Ph=@5;InSamp=@"
"6;"
MaskDisplay "plot(0,0,100,100,[5+1.5*[[0:.8:10] [10:1.6:20] "
"[20:.8:30]] 50 50 50 50+15*[0 1 1 2 2 3]],[85+10*[sin([0:.8:10]*pi*2/5) sin(["
"10:1.6:20]*pi/5) sin([20:.8:30]*pi*2/5)] 85 99 75 85+8*[1 1 -1 -1 1 1]]);\ndi"
"sp('\\nGeneral\\nQAM')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "[exp(2*pi*i*[0:7]/8)]|1/100|1|3000|0|1/8000"
System {
Name "General QAM\nDemodulator\nPassband"
Location [2, 82, 1142, 817]
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 [10, 50, 30, 70]
ShowName off
}
Block {
BlockType Reference
Name "Check Signal\nAttributes"
Ports [1, 1]
Position [65, 39, 130, 81]
ShowName off
SourceBlock "dspsigattribs/Check Signal\nAttributes"
SourceType "Check Signal Attributes"
SigAttribCheckMethod "Matches attributes exactly"
Complexity "Ignore"
Frame "Frame-based"
DimsCheckMethod "Ignore"
Dimensions "1-D"
DatatypeCheckMethod "Ignore"
DatatypeGeneral "Boolean"
DtypeFloatSpecific "Any floating-point"
DtypeFixedSpecific "Any fixed-point"
DtypeIntSpecific "Any integer"
SampleMode "Ignore"
}
Block {
BlockType Reference
Name "Discrete-Time\nScatter Plot\nScope"
Tag "ScatterPlot"
Ports [1]
Position [660, 35, 705, 85]
FontSize 10
SourceBlock "commsink2/Discrete-Time\nScatter Plot\nScop"
"e"
SourceType "Discrete-Time Scatter Plot Scope"
showPlotting on
sampPerSymb "1"
offsetEye "0"
numTraces "40"
numNewFrames "10"
showRendering off
LineMarkers "."
LineColors "b"
fading on
render on
AxisGrid on
showAxes off
xMin "-1.5"
xMax "1.5"
yMin "-1.5"
yMax "1.5"
inphaseLabel "In-phase Amplitude"
quadratureLabel "Quadrature Amplitude"
showFigure off
openScopeAtSimStart on
FrameNumber off
FigPos "[296 214 560 560]"
figTitle "Scatter Plot"
numLinesMax "8"
block_type_ "scatter"
}
Block {
BlockType Reference
Name "Frequency\nDown-Converter"
Ports [1, 1]
Position [160, 35, 255, 85]
ShowName off
SourceBlock "commblksprivate/PAM//QAM//PSK\nFrequency\nD"
"own-Converter"
SourceType "PAM/QAM/PSK Frequency Down-Converter"
Fc "Fc"
Ph "Ph"
Tin "InSamp"
Tout "td/numSamp"
}
Block {
BlockType Reference
Name "General QAM\nDemodulator\nBaseband"
Ports [1, 1]
Position [340, 34, 415, 86]
ShowName off
SourceBlock "commdigbbndam2/General QAM\nDemodulator\nBa"
"seband"
SourceType "General QAM Demodulator Baseband"
SigCon "SigCon"
numSamp "numSamp"
}
Block {
BlockType Reference
Name "Inherit Shape"
Ports [2, 1]
Position [450, 48, 540, 97]
ShowName off
SourceBlock "commblksprivate/Inherit Shape"
SourceType "Inherit Shape"
}
Block {
BlockType Reference
Name "Integer Delay1"
Ports [1, 1]
Position [285, 42, 310, 78]
ShowName off
SourceBlock "dspsigops/Integer Delay"
SourceType "Integer Delay"
delay "numSamp-1"
ic "0"
reset_popup "None"
}
Block {
BlockType Outport
Name "out_1"
Position [560, 65, 580, 85]
ShowName off
InitialOutput "0"
}
Line {
SrcBlock "Inherit Shape"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "General QAM\nDemodulator\nBaseband"
SrcPort 1
DstBlock "Inherit Shape"
DstPort 1
}
Line {
SrcBlock "Integer Delay1"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "General QAM\nDemodulator\nBaseband"
DstPort 1
}
Branch {
Points [0, -45; 290, 0; 0, 45]
DstBlock "Discrete-Time\nScatter Plot\nScope"
DstPort 1
}
}
Line {
SrcBlock "Frequency\nDown-Converter"
SrcPort 1
DstBlock "Integer Delay1"
DstPort 1
}
Line {
SrcBlock "Check Signal\nAttributes"
SrcPort 1
DstBlock "Frequency\nDown-Converter"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
Points [0, 0]
Branch {
Points [0, 45; 400, 0]
DstBlock "Inherit Shape"
DstPort 2
}
Branch {
DstBlock "Check Signal\nAttributes"
DstPort 1
}
}
}
}
Block {
BlockType Reference
Name "General QAM\nModulator\nPassband"
Ports [1, 1]
Position [220, 217, 295, 273]
FontSize 10
SourceBlock "commdigpbndam2/General QAM\nModulator\nPassband"
SourceType "General QAM Modulator Passband"
SigCon "[exp(2*pi*i*[0:6]/7)]"
td "1/100"
numSamp "1"
Fc "3000"
Ph "0"
OutSamp "1/8000"
}
Block {
BlockType Reference
Name "Random Integer\nGenerator"
Ports [0, 1]
Position [65, 223, 145, 267]
FontName "Arial"
FontSize 10
SourceBlock "commrandsrc2/Random Integer\nGenerator"
SourceType "Random Integer Generator"
mul "40"
seed "12345"
Ts "0.01"
frameBased off
sampPerFrame "1"
orient off
}
Line {
SrcBlock "Random Integer\nGenerator"
SrcPort 1
Points [45, 0]
Branch {
Points [0, -80; 455, 0; 0, 55]
DstBlock "Error Rate\nCalculation"
DstPort 1
}
Branch {
DstBlock "General QAM\nModulator\nPassband"
DstPort 1
}
}
Line {
SrcBlock "General QAM\nModulator\nPassband"
SrcPort 1
DstBlock "AWGN\nChannel"
DstPort 1
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
DstBlock "General QAM\nDemodulator\nPassband"
DstPort 1
}
Line {
SrcBlock "General QAM\nDemodulator\nPassband"
SrcPort 1
DstBlock "Error Rate\nCalculation"
DstPort 2
}
Line {
SrcBlock "Error Rate\nCalculation"
SrcPort 1
DstBlock "Display"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -