📄 mc_cdma.mdl
字号:
Name "In1"
Position [335, 63, 365, 77]
Orientation "left"
IconDisplay "Port number"
}
Block {
BlockType SubSystem
Name "Denormalize"
Ports [1, 1]
Position [215, 52, 285, 88]
Orientation "left"
ShowName off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskDisplay "disp('Denormalize');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Denormalize"
Location [573, 126, 951, 219]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name " "
Position [25, 38, 55, 52]
IconDisplay "Port number"
}
Block {
BlockType Gain
Name "Gain1"
Position [150, 30, 180, 60]
ShowName off
Gain "sqrt(10)"
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [1, 1]
Position [80, 30, 110, 60]
ShowName off
Operator "conj"
}
Block {
BlockType Outport
Name " "
Position [225, 38, 255, 52]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock " "
SrcPort 1
DstBlock "Math\nFunction"
DstPort 1
}
Line {
SrcBlock "Math\nFunction"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock " "
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Rectangular QAM\nDemodulator\nBaseband"
Ports [1, 1]
Position [85, 44, 160, 96]
Orientation "left"
DialogController "commDDGCreate"
DialogControllerArgs "DataTag1"
FontSize 10
SourceBlock "commdigbbndam3/Rectangular QAM\nDemodulator"
"\nBaseband"
SourceType "Rectangular QAM Demodulator Baseband"
M "16"
PowType "Min. distance between symbols"
MinDist "2"
AvgPow "1"
PeakPow "1"
Ph "0"
Dec "Gray"
Mapping "[0:15]"
OutType "Bit"
DecType "Hard decision"
VarSource "Dialog"
Variance "1"
outDtype1 "boolean"
outDtype2 "double"
derotateFactorDTMode "Same word length as input"
derotateFactorWordLen "16"
denormFactorDTMode "Same word length as input"
denormFactorWordLen "16"
prodOutDTMode "Inherit via internal rule"
prodOutWordLen "32"
prodOutRoundingMode "Floor"
prodOutOverflowMode "Wrap"
sumDTMode "Inherit via internal rule"
sumWordLen "32"
}
Block {
BlockType Outport
Name "Out1"
Position [25, 63, 55, 77]
Orientation "left"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Rectangular QAM\nDemodulator\nBaseband"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Denormalize"
DstPort 1
}
Line {
SrcBlock "Denormalize"
SrcPort 1
DstBlock "Rectangular QAM\nDemodulator\nBaseband"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "16-QAM"
Ports [1, 1]
Position [330, 165, 440, 225]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskDisplay "disp('modulation')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "16-QAM"
Location [199, 180, 776, 401]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [35, 98, 65, 112]
IconDisplay "Port number"
}
Block {
BlockType SubSystem
Name "Normalize"
Ports [1, 1]
Position [255, 87, 325, 123]
ShowName off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskDisplay "disp('Normalize')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Normalize"
Location [521, 370, 903, 463]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name " "
Position [25, 38, 55, 52]
IconDisplay "Port number"
}
Block {
BlockType Gain
Name "Gain1"
Position [180, 30, 210, 60]
ShowName off
Gain "1/sqrt(10)"
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [1, 1]
Position [105, 30, 135, 60]
ShowName off
Operator "conj"
}
Block {
BlockType Outport
Name " "
Position [265, 38, 295, 52]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Math\nFunction"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock " "
SrcPort 1
DstBlock "Math\nFunction"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock " "
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Rectangular QAM\nModulator\nBaseband"
Ports [1, 1]
Position [115, 79, 190, 131]
FontSize 10
SourceBlock "commdigbbndam3/Rectangular QAM\nModulator\n"
"Baseband"
SourceType "Rectangular QAM Modulator Baseband"
M "16"
InType "Bit"
Enc "Gray"
Mapping "[0:15]"
PowType "Min. distance between symbols"
MinDist "2"
AvgPow "1"
PeakPow "1"
Ph "0"
outDtype "double"
outWordLen "16"
outUDDataType "sfix(16)"
outFracLenMode "Best precision"
outFracLen "15"
}
Block {
BlockType Outport
Name "Out1"
Position [385, 98, 415, 112]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Rectangular QAM\nModulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "Rectangular QAM\nModulator\nBaseband"
SrcPort 1
DstBlock "Normalize"
DstPort 1
}
Line {
SrcBlock "Normalize"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "AWGN\nChannel"
Ports [1, 1]
Position [768, 335, 862, 370]
Orientation "down"
NamePlacement "alternate"
FontSize 10
SourceBlock "commchan3/AWGN\nChannel"
SourceType "AWGN Channel"
ShowPortLabels "FromPortIcon"
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
seed "205"
noiseMode "Signal to noise ratio (SNR)"
EbNodB "10"
EsNodB "20"
SNRdB "15"
bitsPerSym "1"
Ps "0.01"
Tsym "1/1000"
variance "1"
}
Block {
BlockType Reference
Name "Bernoulli Binary\nGenerator"
Ports [0, 1]
Position [100, 173, 180, 217]
DialogController "commDDGCreate"
DialogControllerArgs "DataTag2"
FontSize 10
SourceBlock "commrandsrc2/Bernoulli Binary\nGenerator"
SourceType "Bernoulli Binary Generator"
ShowPortLabels "FromPortIcon"
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
P "0.5"
seed "205"
Ts "1e-6/4"
frameBased on
sampPerFrame "4"
orient off
outDataType "boolean"
}
Block {
BlockType Display
Name "Display1"
Ports [1]
Position [390, 331, 475, 389]
FontSize 10
Decimation "1"
Lockdown off
}
Block {
BlockType Reference
Name "Error Rate Calculation"
Ports [2, 1]
Position [265, 332, 350, 388]
BackgroundColor "cyan"
ShowName off
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "0"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Port"
WsName "ErrorVec"
RsMode2 off
stop off
numErr "inf"
maxBits "2e4"
}
Block {
BlockType From
Name "From"
Position [500, 279, 570, 301]
CloseFcn "tagdialog Close"
GotoTag "Hadamard"
}
Block {
BlockType From
Name "From1"
Position [755, 514, 825, 536]
Orientation "left"
CloseFcn "tagdialog Close"
GotoTag "Hadamard"
}
Block {
BlockType Goto
Name "Goto"
Position [315, 49, 385, 71]
GotoTag "Hadamard"
TagVisibility "local"
}
Block {
BlockType SubSystem
Name "Hadamard Code\nGenerator"
Ports [0, 1]
Position [180, 35, 285, 85]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskDisplay "disp('Hadamard Code')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Hadamard Code\nGenerator"
Location [457, 336, 776, 509]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Gain
Name "Gain"
Position [145, 50, 175, 80]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -