📄 rqam.mdl
字号:
Name "Error Rate\nCalculation"
Ports [2]
Position [470, 107, 545, 158]
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "1"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Workspace"
WsName "ErrorVec"
RsMode2 off
stop off
numErr "100"
maxBits "1e6"
}
Block {
BlockType Reference
Name "Random Integer\nGenerator"
Ports [0, 1]
Position [15, 108, 95, 152]
FontName "Arial"
SourceBlock "commrandsrc2/Random Integer\nGenerator"
SourceType "Random Integer Generator"
mul "M"
seed "37"
Ts "0.01"
frameBased off
sampPerFrame "1"
orient off
}
Block {
BlockType SubSystem
Name "Rectangular QAM\nDemodulator\nPassband"
Ports [1, 1]
Position [365, 105, 440, 155]
AncestorBlock "commdigpbndam2/Rectangular QAM\nDemodulator\nPa"
"ssband"
TreatAsAtomicUnit off
MaskType "Rectangular QAM Demodulator Passband"
MaskDescription "Demodulate the input signal using the rectangul"
"ar quadrature amplitude modulation method.\nThe M-ary number value needs to b"
"e an integer power of two.\n\nThe input signal must be a sample-based scalar."
" In case of bit output, the width of the output is the number of bits per sym"
"bol. The symbols can be either binary-demapped or Gray-demapped into bits."
MaskHelp "helpview(commbhelp)"
MaskPromptString "M-ary number:|Output type:|Constellation orderi"
"ng:|Normalization method:|Minimum distance:|Average power (watts):|Peak power"
" (watts):|Symbol period (s):|Baseband samples per symbol:|Carrier frequency ("
"Hz):|Carrier initial phase (rad):|Input sample time (s):"
MaskStyleString "edit,popup(Bit|Integer),popup(Binary|Gray),popu"
"p(Min. distance between symbols|Average Power|Peak Power),edit,edit,edit,edit"
",edit,edit,edit,edit"
MaskTunableValueString "off,off,off,off,off,off,off,off,off,off,off,off"
MaskCallbackString "|commblkpbndqammod(gcb,'InType');||commblkpbndq"
"ammod(gcb,'PowType');||||||||"
MaskEnableString "on,on,off,on,on,on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,off,off,on,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,,,,,"
MaskVariables "M=@1;OutType=@2;Dec=@3;PowType=@4;MinDist=@5;Av"
"gPow=@6;PeakPow=@7;td=@8;numSamp=@9;Fc=@10;Ph=@11;InSamp=@12;"
MaskInitialization "commblkdyampmdemod('Rectangular QAM Demodulator"
" Baseband','update');\ncommblkpbndqammod(gcb,'init');\n"
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('\\nRectangular\\nQAM')"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "M|Integer|Binary|Min. distance between symbols|"
"0.24|1|1|1/100|1|3000|0|1/8000"
System {
Name "Rectangular QAM\nDemodulator\nPassband"
Location [205, 507, 810, 714]
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 [15, 40, 35, 60]
}
Block {
BlockType Reference
Name "Check Signal\nAttributes"
Ports [1, 1]
Position [75, 29, 140, 71]
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 "Frequency\nDown-Converter"
Ports [1, 1]
Position [155, 25, 250, 75]
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 "Inherit Shape"
Ports [2, 1]
Position [425, 38, 515, 87]
ShowName off
SourceBlock "commblksprivate/Inherit Shape"
SourceType "Inherit Shape"
}
Block {
BlockType Reference
Name "Integer Delay1"
Ports [1, 1]
Position [270, 32, 295, 68]
ShowName off
SourceBlock "dspobslib/Integer Delay"
SourceType "Integer Delay"
delay "numSamp-1"
ic "0"
reset_popup "None"
}
Block {
BlockType Reference
Name "Rectangular QAM\nDemodulator\nBaseband"
Ports [1, 1]
Position [315, 24, 390, 76]
ShowName off
SourceBlock "commdigbbndam2/Rectangular QAM\nDemodulator"
"\nBaseband"
SourceType "Rectangular QAM Demodulator Baseband"
M "M"
OutType "Integer"
Dec "Binary"
PowType "Min. distance between symbols"
MinDist "MinDist"
AvgPow "AvgPow"
PeakPow "PeakPow"
Ph "0"
numSamp "numSamp"
}
Block {
BlockType Outport
Name "out_1"
Position [540, 55, 560, 75]
InitialOutput "0"
}
Line {
SrcBlock "Inherit Shape"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "Integer Delay1"
SrcPort 1
DstBlock "Rectangular QAM\nDemodulator\nBaseband"
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 [15, 0]
Branch {
Points [0, 50; 355, 0]
DstBlock "Inherit Shape"
DstPort 2
}
Branch {
DstBlock "Check Signal\nAttributes"
DstPort 1
}
}
Line {
SrcBlock "Rectangular QAM\nDemodulator\nBaseband"
SrcPort 1
DstBlock "Inherit Shape"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Rectangular QAM\nModulator\nPassband"
Ports [1, 1]
Position [145, 104, 220, 156]
SourceBlock "commdigpbndam2/Rectangular QAM\nModulator\nPass"
"band"
SourceType "Rectangular QAM Modulator Passband"
M "M"
InType "Integer"
Enc "Binary"
PowType "Min. distance between symbols"
MinDist "0.24"
AvgPow "1"
PeakPow "1"
td "1/100"
numSamp "1"
Fc "3000"
Ph "0"
OutSamp "1/8000"
}
Line {
SrcBlock "Random Integer\nGenerator"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Rectangular QAM\nModulator\nPassband"
DstPort 1
}
Branch {
Points [0, -45; 345, 0]
DstBlock "Error Rate\nCalculation"
DstPort 1
}
}
Line {
SrcBlock "Rectangular QAM\nModulator\nPassband"
SrcPort 1
DstBlock "AWGN\nChannel"
DstPort 1
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
DstBlock "Rectangular QAM\nDemodulator\nPassband"
DstPort 1
}
Line {
SrcBlock "Rectangular QAM\nDemodulator\nPassband"
SrcPort 1
Points [5, 0; 0, 15]
DstBlock "Error Rate\nCalculation"
DstPort 2
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -