📄 mc_cdma.mdl
字号:
NamePlacement "alternate"
Gain "1/sqrt(64)"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "Hadamard\nCode Generator"
Ports [0, 1]
Position [25, 28, 110, 102]
FontSize 10
SourceBlock "commseqgen2/Hadamard\nCode Generator"
SourceType "Hadamard Code 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"
length "64"
index "60"
ts "4e-6/64"
frameBased on
sampPerFrame "64"
outDataType "double"
}
Block {
BlockType Outport
Name "Out1"
Position [200, 58, 230, 72]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Hadamard\nCode Generator"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [0, 0]
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "MC-CDMA"
Ports [2, 1]
Position [625, 168, 700, 272]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "MC-CDMA"
Location [170, 82, 748, 294]
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 [25, 63, 55, 77]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "In2"
Position [25, 113, 55, 127]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Reference
Name "IFFT"
Ports [1, 1]
Position [265, 79, 305, 111]
DialogController "dspDDGCreate"
DialogControllerArgs "DataTag3"
SourceBlock "dspxfrm3/IFFT"
SourceType "IFFT"
CompMethod "Table lookup"
TableOpt "Speed"
BitRevOrder off
cs_in off
SkipNorm off
InheritFFTLength on
FFTLength "64"
mode "Complex"
additionalParams off
allowOverrides on
firstCoeffMode "Same word length as input"
firstCoeffWordLength "16"
firstCoeffFracLength "15"
outputMode "Inherit via internal rule"
outputWordLength "16"
outputFracLength "15"
accumMode "Inherit via internal rule"
accumWordLength "32"
accumFracLength "30"
prodOutputMode "Inherit via internal rule"
prodOutputWordLength "32"
prodOutputFracLength "30"
roundingMode "Floor"
overflowMode off
LockScale off
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [135, 44, 190, 146]
CollapseMode "All dimensions"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Selector
Name "Selector1"
Ports [1, 1]
Position [390, 76, 440, 114]
IndexOptions "Index vector (dialog)"
Indices "[49:64 1:64]"
OutputSizes "1"
InputPortWidth "64"
}
Block {
BlockType Outport
Name "Out1"
Position [495, 88, 525, 102]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "IFFT"
SrcPort 1
DstBlock "Selector1"
DstPort 1
}
Line {
SrcBlock "Selector1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "IFFT"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Received Signal"
Tag "ScatterPlot"
Ports [1]
Position [595, 361, 640, 409]
SourceBlock "commsink2/Discrete-Time\nScatter Plot\nScope"
SourceType "Discrete-Time Scatter Plot Scope"
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"
sampPerSymb "1"
offsetEye "0"
numTraces "160"
numNewFrames "80"
LineMarkers "."
LineColors "b"
fading on
render off
AxisGrid on
xMin "-1.5"
xMax "1.5"
yMin "-1.5"
yMax "1.5"
inphaseLabel "In-phase Amplitude"
quadratureLabel "Quadrature Amplitude"
openScopeAtSimStart on
FrameNumber off
FigPos "[691 484 448 448]"
figTitle "Scatter Plot"
numLinesMax "8"
block_type_ "scatter"
}
Block {
BlockType Reference
Name "Spectrum\nScope"
Ports [1]
Position [670, 363, 710, 417]
Orientation "left"
NamePlacement "alternate"
DialogController "dspdialog.SpectrumScope"
DialogControllerArgs "DataTag4"
SourceBlock "dspsnks4/Spectrum\nScope"
SourceType "Spectrum Scope"
ShowPortLabels "none"
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
ScopeProperties off
Domain "Frequency"
HorizSpan "1"
UseBuffer on
BufferSize "80"
Overlap "0"
inpFftLenInherit on
FFTlength "1024"
numAvg "10"
DisplayProperties off
AxisGrid on
Memory off
FrameNumber on
AxisLegend off
AxisZoom off
OpenScopeAtSimStart on
OpenScopeImmediately off
FigPos "figposition([25 15 42 27])"
AxisProperties off
XUnits "Hertz"
XRange "[-Fs/2...Fs/2]"
InheritXIncr off
XIncr "1.0"
XLabel "Samples"
XLimit "Auto"
YUnits "dB"
XMax "1"
XMin "0"
YMin "-60"
YMax "0"
YLabel "Magnitude, dB"
LineProperties off
wintypeSpecScope "Hann"
RsSpecScope "50"
betaSpecScope "5"
winsampSpecScope "Periodic"
}
Block {
BlockType Reference
Name "Transmitted Signal"
Tag "ScatterPlot"
Ports [1]
Position [405, 246, 450, 294]
Orientation "left"
SourceBlock "commsink2/Discrete-Time\nScatter Plot\nScope"
SourceType "Discrete-Time Scatter Plot Scope"
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"
sampPerSymb "1"
offsetEye "0"
numTraces "60"
numNewFrames "60"
LineMarkers "."
LineColors "r"
fading off
render on
AxisGrid on
xMin "-1.5"
xMax "1.5"
yMin "-1.5"
yMax "1.5"
inphaseLabel "In-phase Amplitude"
quadratureLabel "Quadrature Amplitude"
openScopeAtSimStart on
FrameNumber off
FigPos "[90 484 448 448]"
figTitle "Scatter Plot"
numLinesMax "8"
block_type_ "scatter"
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
Points [0, 35]
Branch {
Points [-90, 0]
DstBlock "Spectrum\nScope"
DstPort 1
}
Branch {
Points [0, 60]
DstBlock " De-MC-CDMA"
DstPort 1
}
}
Line {
SrcBlock "16-QAM"
SrcPort 1
Points [75, 0]
Branch {
DstBlock "MC-CDMA"
DstPort 1
}
Branch {
Points [0, 75]
DstBlock "Transmitted Signal"
DstPort 1
}
}
Line {
SrcBlock "From"
SrcPort 1
Points [0, -45]
DstBlock "MC-CDMA"
DstPort 2
}
Line {
SrcBlock "From1"
SrcPort 1
DstBlock " De-MC-CDMA"
DstPort 2
}
Line {
SrcBlock " De-MC-CDMA"
SrcPort 1
Points [-50, 0]
Branch {
DstBlock " Demod16-QAM"
DstPort 1
}
Branch {
Points [0, -115]
DstBlock "Received Signal"
DstPort 1
}
}
Line {
SrcBlock "MC-CDMA"
SrcPort 1
Points [110, 0]
DstBlock "AWGN\nChannel"
DstPort 1
}
Line {
SrcBlock "Hadamard Code\nGenerator"
SrcPort 1
DstBlock "Goto"
DstPort 1
}
Line {
SrcBlock "Bernoulli Binary\nGenerator"
SrcPort 1
Points [55, 0]
Branch {
DstBlock "16-QAM"
DstPort 1
}
Branch {
Points [0, 150]
DstBlock "Error Rate Calculation"
DstPort 1
}
}
Line {
SrcBlock "Error Rate Calculation"
SrcPort 1
DstBlock "Display1"
DstPort 1
}
Line {
SrcBlock " Demod16-QAM"
SrcPort 1
Points [-85, 0; 0, -125]
DstBlock "Error Rate Calculation"
DstPort 2
}
}
}
MatData {
NumRecords 5
DataRecord {
Tag DataTag4
Data " %)30 . , 8 ( ! % "
"\" 0 0 "
}
DataRecord {
Tag DataTag3
Data " %)30 . 8 8 ( 0 % "
"\" $ ! 0 . , 8 ( ! % \" $ "
"$ 0 0 0 249&5 "
}
DataRecord {
Tag DataTag2
Data " %)30 . > 8 ( 0 % "
"\" $ ! 0 . 2 8 ( ! % \" $ "
"2 0 0 $@ $)E<FYO=6QL:4)I;F%R>4=E;@ "
}
DataRecord {
Tag DataTag1
Data " %)30 . < 8 ( 0 % "
"\" $ ! 0 . 0 8 ( ! % \" $ "
"/ 0 0 #P %)104U$96UO9'5L871O<@ "
}
DataRecord {
Tag DataTag0
Data " %)30 . 8 8 ( 0 % "
"\" $ ! 0 . , 8 ( ! % \" $ "
"# 0 0 , 1D94 "
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -