📄 tstgraycod.mdl
字号:
Block {
BlockType Reference
Name "Error Rate Calculation2"
Ports [2, 1]
Position [155, 364, 250, 411]
Orientation "left"
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "0"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Port"
WsName "BitErrorVec"
RsMode2 off
stop off
numErr "100"
maxBits "1e6"
}
Block {
BlockType Reference
Name "Integer to Bit\nConverter2"
Ports [1, 1]
Position [290, 70, 360, 110]
NamePlacement "alternate"
ShowName off
SourceBlock "commutil2/Integer to Bit\nConverter"
SourceType "Integer to Bit Converter"
nbits "log2(M)"
}
Block {
BlockType Reference
Name "M-PSK\nDemodulator\nBaseband"
Ports [1, 1]
Position [460, 181, 540, 239]
Orientation "left"
ShowName off
SourceBlock "commdigbbndpm2/M-PSK\nDemodulator\nBaseband"
SourceType "M-PSK Demodulator Baseband"
M "M"
OutType "Bit"
Dec "Gray"
Ph "0"
numSamp "1"
}
Block {
BlockType Reference
Name "M-PSK\nModulator\nBaseband"
Ports [1, 1]
Position [455, 61, 535, 119]
ShowName off
SourceBlock "commdigbbndpm2/M-PSK\nModulator\nBaseband"
SourceType "M-PSK Modulator Baseband"
M "M"
InType "Bit"
Enc "Gray"
Ph "0"
numSamp "1"
}
Block {
BlockType SubSystem
Name "Model Info"
Ports []
Position [540, 379, 591, 419]
BackgroundColor "lightBlue"
ShowName off
CopyFcn "slcm CopyBlock;"
DeleteFcn "slcm Cancel;"
LoadFcn "slcm LoadBlock;"
PostSaveFcn "slcm('UpdateAllCMBlocksInThisModel')"
InitFcn "slcm('UpdateAllCMBlocksInThisModelInit')"
NameChangeFcn "slcm Rename;"
OpenFcn "commdemohelp;"
FontName "Arial"
FontSize 12
TreatAsAtomicUnit off
MaskType "CMBlock"
MaskDescription "This block allows revision control information "
"to be displayed within the model."
MaskPromptString "InitialSaveTempField|InitialBlockCM|BlockCM|Fra"
"me|SaveTempField|DisplayStringWithTags|MaskDisplayString|HorizontalTextAlignm"
"ent|LeftAlignmentValue|SourceBlockDiagram|TagMaxNumber|CMTag1|CMTag2|CMTag3|C"
"MTag4|CMTag5|CMTag6|CMTag7|CMTag8|CMTag9|CMTag10|CMTag11|CMTag12|CMTag13|CMTa"
"g14|CMTag15|CMTag16|CMTag17|CMTag18|CMTag19|CMTag20"
MaskStyleString "edit,edit,edit,edit,edit,edit,edit,edit,edit,ed"
"it,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit"
",edit,edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
MaskCallbackString "||||||||||||||||||||||||||||||"
MaskEnableString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
MaskVisibilityString "off,off,off,off,off,off,off,off,off,off,off,off"
",off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off"
MaskToolTipString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
MaskVariables "InitialSaveTempField=&1;InitialBlockCM=&2;Block"
"CM=&3;Frame=&4;SaveTempField=&5;DisplayStringWithTags=&6;MaskDisplayString=&7"
";HorizontalTextAlignment=&8;LeftAlignmentValue=&9;SourceBlockDiagram=&10;TagM"
"axNumber=@11;CMTag1=&12;CMTag2=&13;CMTag3=&14;CMTag4=&15;CMTag5=&16;CMTag6=&1"
"7;CMTag7=&18;CMTag8=&19;CMTag9=&20;CMTag10=&21;CMTag11=&22;CMTag12=&23;CMTag1"
"3=&24;CMTag14=&25;CMTag15=&26;CMTag16=&27;CMTag17=&28;CMTag18=&29;CMTag19=&30"
";CMTag20=&31;"
MaskDisplay "text(str2num(LeftAlignmentValue), 0.5, MaskDisp"
"layString, 'HorizontalAlignment', HorizontalTextAlignment)\n"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
MaskValueString "|none|none|on||Info|Info|Center|0.5|tstgraycod|"
"20||||||||||||||||||||"
System {
Name "Model Info"
Location [154, 467, 416, 618]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType SubSystem
Name "EmptySubsystem"
Ports []
Position [115, 50, 145, 80]
TreatAsAtomicUnit off
System {
Name "EmptySubsystem"
Location [146, 180, 902, 673]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
}
}
}
}
Block {
BlockType Reference
Name "Random-Integer\nGenerator"
Ports [0, 1]
Position [25, 68, 105, 112]
SourceBlock "commrandsrc2/Random Integer\nGenerator"
SourceType "Random Integer Generator"
mul "M"
seed "529558"
Ts "Tsym"
frameBased on
sampPerFrame "100"
orient off
}
Block {
BlockType Display
Name "Symbol Error Details"
Ports [1]
Position [20, 166, 115, 234]
Orientation "left"
Decimation "1"
}
Block {
BlockType ToWorkspace
Name "To Workspace 1"
Position [45, 255, 105, 285]
Orientation "left"
VariableName "SER"
MaxDataPoints "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace 2"
Position [45, 305, 105, 335]
Orientation "left"
VariableName "BER"
MaxDataPoints "1"
SampleTime "-1"
SaveFormat "Array"
}
Line {
SrcBlock "Error Rate Calculation2"
SrcPort 1
Points [-20, 0]
Branch {
DstBlock "Bit Error Details"
DstPort 1
}
Branch {
Points [0, -70]
DstBlock "To Workspace 2"
DstPort 1
}
}
Line {
SrcBlock "Error Rate Calculation1"
SrcPort 1
Points [-15, 0]
Branch {
DstBlock "Symbol Error Details"
DstPort 1
}
Branch {
Points [0, 70]
DstBlock "To Workspace 1"
DstPort 1
}
}
Line {
SrcBlock "M-PSK\nDemodulator\nBaseband"
SrcPort 1
Points [-20, 0]
Branch {
DstBlock "Bit to Integer\nConverter"
DstPort 1
}
Branch {
Points [0, 190]
DstBlock "Error Rate Calculation2"
DstPort 2
}
}
Line {
SrcBlock "Random-Integer\nGenerator"
SrcPort 1
Points [160, 0]
Branch {
DstBlock "Integer to Bit\nConverter2"
DstPort 1
}
Branch {
Points [0, 95]
DstBlock "Error Rate Calculation1"
DstPort 1
}
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
Points [0, 40]
DstBlock "M-PSK\nDemodulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "M-PSK\nModulator\nBaseband"
SrcPort 1
Points [90, 0]
DstBlock "AWGN\nChannel"
DstPort 1
}
Line {
SrcBlock "Integer to Bit\nConverter2"
SrcPort 1
Points [40, 0]
Branch {
DstBlock "M-PSK\nModulator\nBaseband"
DstPort 1
}
Branch {
Points [0, 285]
DstBlock "Error Rate Calculation2"
DstPort 1
}
}
Line {
SrcBlock "Bit to Integer\nConverter"
SrcPort 1
DstBlock "Error Rate Calculation1"
DstPort 2
}
Annotation {
Name "Gray Coded 8-PSK "
Position [349, 26]
FontName "Arial"
FontSize 20
FontWeight "bold"
}
Annotation {
Name "Symbol set size = M"
Position [554, 270]
}
Annotation {
Name "Symbol period = Tsym"
Position [560, 291]
}
Annotation {
Name "System sample period = Tsample "
Position [588, 313]
}
Annotation {
Name "Eb/No (dB) = EbNodB "
Position [562, 354]
}
Annotation {
Name "Simulation stop time = Tmax "
Position [577, 334]
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -