📄 ofdm.mdl
字号:
BlockType Reference
Name "DSP\nConstant"
Ports [0, 1]
Position [570, 313, 605, 337]
ShowName off
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
Value "0+0i"
SampleMode "Discrete"
discreteOutput "Frame-based"
continuousOutput "Sample-based"
sampTime "4e-6"
framePeriod "4e-6"
additionalParams off
allowOverrides on
dataType "Inherit from 'Constant value'"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "off"
Ts "4e-6"
FramebasedOutput "on"
}
Block {
BlockType Reference
Name "Frame Status\nConversion"
Ports [1, 1]
Position [185, 72, 225, 108]
NamePlacement "alternate"
SourceBlock "dspsigattribs/Frame Status\nConversion"
SourceType "Frame Status Conversion"
growRefPort off
outframe "Sample-based"
}
Block {
BlockType Reference
Name "IFFT"
Ports [1, 1]
Position [880, 309, 920, 341]
SourceBlock "dspxfrm3/IFFT"
SourceType "IFFT"
CompMethod "Table lookup"
TableOpt "Speed"
BitRevOrder off
cs_in off
SkipNorm off
mode "Complex"
additionalParams off
allowOverrides on
firstCoeffMode "User-defined"
firstCoeffWordLength "16"
firstCoeffFracLength "15"
outputMode "Same as input"
outputWordLength "16"
outputFracLength "15"
accumMode "Same as output"
accumWordLength "32"
accumFracLength "30"
prodOutputMode "Same as accumulator"
prodOutputWordLength "32"
prodOutputFracLength "30"
roundingMode "Floor"
overflowMode off
}
Block {
BlockType Reference
Name "Kasami\nSequence\nGenerator"
Ports [0, 1]
Position [55, 67, 135, 113]
NamePlacement "alternate"
SourceBlock "commseqgen2/Kasami\nSequence\nGenerator"
SourceType "Kasami Sequence Generator"
genPoly "[1 0 0 0 0 0 0 1 1]"
iniState "[0 0 0 0 0 0 0 1]"
codeIdx "1"
shift "0"
ts "4e-6/8"
frameBased on
sampPerFrame "2"
reset off
}
Block {
BlockType Reference
Name "Matrix\nConcatenation1"
Ports [11, 1]
Position [655, 176, 710, 474]
SourceBlock "simulink/Math\nOperations/Matrix\nConcatena"
"tion"
SourceType "Matrix Concatenation"
numInports "11"
catMethod "Vertical"
}
Block {
BlockType Reference
Name "Multiport\nSelector1"
Ports [1, 6]
Position [405, 179, 470, 471]
SourceBlock "dspindex/Multiport\nSelector"
SourceType "Multiport Selector"
rowsOrCols "Rows"
idxCellArray "{1:5,6:18,19:24,25:30,31:43,44:48}"
idxErrMode "Clip Index"
}
Block {
BlockType Reference
Name "Multiport\nSelector2"
Ports [1, 4]
Position [475, 52, 520, 128]
SourceBlock "dspindex/Multiport\nSelector"
SourceType "Multiport Selector"
rowsOrCols "Rows"
idxCellArray "{1 2 3 4}"
idxErrMode "Clip Index"
}
Block {
BlockType Probe
Name "Probe"
Ports [1, 1]
Position [695, 20, 815, 40]
FontSize 10
ProbeWidth off
ProbeComplexSignal off
}
Block {
BlockType Reference
Name "QPSK\nModulator\nBaseband"
Ports [1, 1]
Position [290, 65, 330, 115]
NamePlacement "alternate"
SourceBlock "commdigbbndpm2/QPSK\nModulator\nBaseband"
SourceType "QPSK Modulator Baseband"
InType "Bit"
Enc "Gray"
Ph "pi/4"
numSamp "1"
}
Block {
BlockType SubSystem
Name "Zero pad for OFDM"
Ports [1, 1]
Position [770, 300, 825, 350]
TreatAsAtomicUnit off
MaskDisplay "disp('Zero pad\\nfor OFDM');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Zero pad for OFDM"
Location [191, 421, 703, 556]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [30, 53, 60, 67]
}
Block {
BlockType Selector
Name "Selector"
Ports [1, 1]
Position [230, 38, 280, 82]
Elements "[27:64 1:26]"
InputPortWidth "64"
}
Block {
BlockType Reference
Name "Zero Pad"
Ports [1, 1]
Position [120, 42, 165, 78]
SourceBlock "dspsigops/Zero Pad"
SourceType "Zero Pad"
padSigAt "End"
zpadAlong "Columns"
padNumOutRowsSpecMethod "User-specified"
numOutRows "64"
padNumOutColsSpecMethod "User-specified"
numOutCols "1"
trunc_flag "None"
}
Block {
BlockType Outport
Name "Out1"
Position [360, 53, 390, 67]
}
Line {
SrcBlock "Selector"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Zero Pad"
SrcPort 1
DstBlock "Selector"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Zero Pad"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "Out"
Position [1070, 318, 1100, 332]
}
Line {
SrcBlock "Zero pad for OFDM"
SrcPort 1
DstBlock "IFFT"
DstPort 1
}
Line {
SrcBlock "IFFT"
SrcPort 1
DstBlock "Add Cyclic\nPrefix"
DstPort 1
}
Line {
SrcBlock "Add Cyclic\nPrefix"
SrcPort 1
DstBlock "Out"
DstPort 1
}
Line {
SrcBlock "Matrix\nConcatenation1"
SrcPort 1
DstBlock "Zero pad for OFDM"
DstPort 1
}
Line {
SrcBlock "In"
SrcPort 1
DstBlock "Multiport\nSelector1"
DstPort 1
}
Line {
SrcBlock "Kasami\nSequence\nGenerator"
SrcPort 1
DstBlock "Frame Status\nConversion"
DstPort 1
}
Line {
SrcBlock "Frame Status\nConversion"
SrcPort 1
DstBlock "QPSK\nModulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "QPSK\nModulator\nBaseband"
SrcPort 1
DstBlock "Buffer"
DstPort 1
}
Line {
SrcBlock "Buffer"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "Multiport\nSelector2"
DstPort 1
}
Branch {
Points [0, -60]
DstBlock "Probe"
DstPort 1
}
}
Line {
SrcBlock "DSP\nConstant"
SrcPort 1
DstBlock "Matrix\nConcatenation1"
DstPort 6
}
Line {
SrcBlock "Multiport\nSelector2"
SrcPort 1
Points [55, 0; 0, 165]
DstBlock "Matrix\nConcatenation1"
DstPort 2
}
Line {
SrcBlock "Multiport\nSelector2"
SrcPort 2
Points [45, 0; 0, 195]
DstBlock "Matrix\nConcatenation1"
DstPort 4
}
Line {
SrcBlock "Multiport\nSelector2"
SrcPort 3
Points [35, 0; 0, 275]
DstBlock "Matrix\nConcatenation1"
DstPort 8
}
Line {
SrcBlock "Multiport\nSelector2"
SrcPort 4
Points [25, 0; 0, 305]
DstBlock "Matrix\nConcatenation1"
DstPort 10
}
Line {
SrcBlock "Multiport\nSelector1"
SrcPort 1
DstBlock "Matrix\nConcatenation1"
DstPort 1
}
Line {
SrcBlock "Multiport\nSelector1"
SrcPort 2
DstBlock "Matrix\nConcatenation1"
DstPort 3
}
Line {
SrcBlock "Multiport\nSelector1"
SrcPort 3
DstBlock "Matrix\nConcatenation1"
DstPort 5
}
Line {
SrcBlock "Multiport\nSelector1"
SrcPort 4
DstBlock "Matrix\nConcatenation1"
DstPort 7
}
Line {
SrcBlock "Multiport\nSelector1"
SrcPort 5
DstBlock "Matrix\nConcatenation1"
DstPort 9
}
Line {
SrcBlock "Multiport\nSelector1"
SrcPort 6
DstBlock "Matrix\nConcatenation1"
DstPort 11
}
Annotation {
Name "Based on HIPERLAN 2 Simulink\nCommunication"
"s Blockset Demo"
Position [951, 146]
}
}
}
Block {
BlockType Probe
Name "Probe"
Ports [1, 1]
Position [440, 365, 560, 385]
FontSize 10
ProbeWidth off
ProbeComplexSignal off
}
Block {
BlockType Probe
Name "Probe1"
Ports [1, 1]
Position [170, 15, 290, 35]
FontSize 10
ProbeWidth off
ProbeComplexSignal off
}
Block {
BlockType Probe
Name "Probe2"
Ports [1, 1]
Position [515, 15, 635, 35]
FontSize 10
ProbeWidth off
ProbeComplexSignal off
}
Block {
BlockType Reference
Name "QPSK\nDemodulator\nBaseband"
Ports [1, 1]
Position [80, 395, 155, 445]
Orientation "left"
SourceBlock "commdigbbndpm2/QPSK\nDemodulator\nBaseband"
SourceType "QPSK Demodulator Baseband"
OutType "Bit"
Dec "Gray"
Ph "pi/4"
numSamp "1"
}
Block {
BlockType Reference
Name "QPSK\nModulator\nBaseband"
Ports [1, 1]
Position [260, 41, 330, 89]
SourceBlock "commdigbbndpm2/QPSK\nModulator\nBaseband"
SourceType "QPSK Modulator Baseband"
InType "Bit"
Enc "Gray"
Ph "pi/4"
numSamp "1"
}
Block {
BlockType Scope
Name "Scope"
Ports [2]
Position [340, 311, 370, 344]
Location [1, 56, 1025, 733]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
}
YMin "-5~-5"
YMax "5~5"
DataFormat "StructureWithTime"
}
Block {
BlockType Reference
Name "Unbuffer"
Ports [1, 1]
Position [190, 301, 240, 349]
FontSize 10
SourceBlock "dspbuff3/Unbuffer"
SourceType "Unbuffer"
ic "0"
}
Block {
BlockType Reference
Name "Unbuffer1"
Ports [1, 1]
Position [180, 151, 230, 199]
FontSize 10
SourceBlock "dspbuff3/Unbuffer"
SourceType "Unbuffer"
ic "0"
}
Line {
SrcBlock "QPSK\nModulator\nBaseband"
SrcPort 1
DstBlock "OFDM Transmitter"
DstPort 1
}
Line {
SrcBlock "Bernoulli Binary\nGenerator"
SrcPort 1
Points [40, 0]
Branch {
Points [85, 0]
Branch {
DstBlock "QPSK\nModulator\nBaseband"
DstPort 1
}
Branch {
Points [0, 70; -180, 0; 0, 30]
Branch {
Points [0, 60]
DstBlock "Error Rate\nCalculation"
DstPort 1
}
Branch {
Points [120, 0]
DstBlock "Unbuffer1"
DstPort 1
}
}
}
Branch {
Points [0, -40]
DstBlock "Probe1"
DstPort 1
}
}
Line {
SrcBlock "OFDM Receiver"
SrcPort 1
DstBlock "QPSK\nDemodulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "QPSK\nDemodulator\nBaseband"
SrcPort 1
Points [-55, 0; 0, -170; 65, 0]
Branch {
DstBlock "Error Rate\nCalculation"
DstPort 2
}
Branch {
Points [0, 75]
DstBlock "Unbuffer"
DstPort 1
}
}
Line {
SrcBlock "Error Rate\nCalculation"
SrcPort 1
DstBlock "Display"
DstPort 1
}
Line {
SrcBlock "OFDM Transmitter"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "Probe2"
DstPort 1
}
Branch {
Points [100, 0]
DstBlock "AWGN\nChannel"
DstPort 1
}
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
Points [0, 60; -190, 0]
Branch {
DstBlock "OFDM Receiver"
DstPort 1
}
Branch {
Points [0, -45]
DstBlock "Probe"
DstPort 1
}
}
Line {
SrcBlock "Unbuffer1"
SrcPort 1
Points [65, 0; 0, 145]
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Unbuffer"
SrcPort 1
Points [40, 0; 0, 10]
DstBlock "Scope"
DstPort 2
}
Annotation {
Name " "
Position [239, 110]
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -