📄 cofdm.mdl
字号:
Name "PN Sequence\nGenerator"
Ports [0, 1]
Position [320, 68, 400, 112]
Orientation "left"
SourceBlock "commseqgen2/PN Sequence\nGenerator"
SourceType "PN Sequence Generator"
poly "[1 0 0 0 0 1 1]"
ini_sta "[0 0 0 0 0 1]"
shift "0"
Ts "16e-5/31/2"
frameBased on
sampPerFrame "31"
reset off
}
Block {
BlockType Reference
Name "Unipolar to\nBipolar\nConverter"
Ports [1, 1]
Position [235, 66, 300, 114]
Orientation "left"
SourceBlock "commutil2/Unipolar to\nBipolar\nConvert"
"er"
SourceType "Unipolar to Bipolar Converter"
M "2"
polarity "Positive"
}
Block {
BlockType Outport
Name "Out1"
Position [25, 83, 55, 97]
Orientation "left"
}
Line {
SrcBlock "PN Sequence\nGenerator"
SrcPort 1
DstBlock "Unipolar to\nBipolar\nConverter"
DstPort 1
}
Line {
SrcBlock "Frame Status\nConversion2"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Math\nFunction"
SrcPort 1
DstBlock "Frame Status\nConversion2"
DstPort 1
}
Line {
SrcBlock "Unipolar to\nBipolar\nConverter"
SrcPort 1
DstBlock "Math\nFunction"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "Out1"
Position [25, 128, 55, 142]
Orientation "left"
}
Line {
Labels [0, 0]
SrcBlock "Step2"
SrcPort 1
Points [0, 0; -40, 0]
Branch {
DstBlock "Subsystem8"
DstPort enable
}
Branch {
Points [-235, 0]
DstBlock "Subsystem6"
DstPort enable
}
}
Line {
SrcBlock "Subsystem8"
SrcPort 1
Points [-20, 0; 0, 30]
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Frame Status\nConversion2"
DstPort 1
}
Line {
SrcBlock "Frame Status\nConversion2"
SrcPort 1
DstBlock "Subsystem6"
DstPort 1
}
Line {
SrcBlock "Subsystem6"
SrcPort 1
DstBlock "Frame Status\nConversion4"
DstPort 1
}
Line {
SrcBlock "Frame Status\nConversion4"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Product"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Constellation"
Ports [2]
Position [420, 498, 495, 587]
ShowName off
OpenFcn "temp=get_param(gcb,'On');set_param(gcb,'On', ge"
"t_param(gcb,'Off'));set_param(gcb,'Off', temp);"
TreatAsAtomicUnit on
MaskType "Instrumentation: Power Spectrum"
MaskPromptString "On|Off"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "On=&1;Off=&2;"
MaskInitialization "if strcmp(On,'on')\n [picture, map]=imread('sw"
"itch_on.jpg');\n sdspfscope2([],[],[],'ScopeUpdate',[bdroot '/Constellation/"
"Before Channel Estimation'],'OpenFig');\n sdspfscope2([],[],[],'ScopeUpdate'"
",[bdroot '/Constellation/After Channel Estimation'],'OpenFig');\n set_param("
"[bdroot '/Constellation/Before Channel Estimation'],'OpenScopeAtSimStart','on"
"');\n set_param([bdroot '/Constellation/After Channel Estimation'],'OpenScop"
"eAtSimStart','on');\n \nelse\n [picture, map]=imread('switch_off.jpg');\n "
"set_param([bdroot '/Constellation/Before Channel Estimation'],'OpenScopeAtSim"
"Start','off');\n set_param([bdroot '/Constellation/After Channel Estimation'"
"],'OpenScopeAtSimStart','off');\n sdspfscope2([],[],[],'ScopeUpdate',[bdroot"
" '/Constellation/Before Channel Estimation'],'CloseFig');\n sdspfscope2([],["
"],[],'ScopeUpdate',[bdroot '/Constellation/After Channel Estimation'],'CloseF"
"ig');\n \nend"
MaskDisplay "image(picture,'center')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "off|on"
System {
Name "Constellation"
Location [148, 199, 402, 385]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [45, 33, 75, 47]
}
Block {
BlockType Inport
Name "In2"
Position [45, 123, 75, 137]
Port "2"
}
Block {
BlockType Reference
Name "After Channel Estimation"
Tag "ScatterPlot"
Ports [1]
Position [135, 105, 180, 155]
SourceBlock "commsink2/Discrete-Time\nScatter Plot\nScop"
"e"
SourceType "Discrete-Time Scatter Plot Scope"
showPlotting on
sampPerSymb "2"
offsetEye "0"
numTraces "100"
numNewFrames "50"
showRendering off
LineMarkers "."
LineColors "b"
fading on
render off
AxisGrid on
showAxes on
xMin "-5"
xMax "5"
yMin "-5"
yMax "5"
inphaseLabel "In-phase Amplitude"
quadratureLabel "Quadrature Amplitude"
showFigure off
openScopeAtSimStart off
FrameNumber off
FigPos "[443 257 328 328]"
figTitle "Scatter Plot"
numLinesMax "50"
block_type_ "scatter"
}
Block {
BlockType Reference
Name "Before Channel Estimation"
Tag "ScatterPlot"
Ports [1]
Position [135, 15, 180, 65]
SourceBlock "commsink2/Discrete-Time\nScatter Plot\nScop"
"e"
SourceType "Discrete-Time Scatter Plot Scope"
showPlotting on
sampPerSymb "4"
offsetEye "0"
numTraces "100"
numNewFrames "50"
showRendering off
LineMarkers "."
LineColors "[1 0 0]"
fading on
render off
AxisGrid on
showAxes on
xMin "-5"
xMax "5"
yMin "-5"
yMax "5"
inphaseLabel "In-phase Amplitude"
quadratureLabel "Quadrature Amplitude"
showFigure off
openScopeAtSimStart off
FrameNumber off
FigPos "[114 264 320 320]"
figTitle "Scatter Plot"
numLinesMax "50"
block_type_ "scatter"
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Before Channel Estimation"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
DstBlock "After Channel Estimation"
DstPort 1
}
}
}
Block {
BlockType DigitalClock
Name "Digital Clock"
Position [750, 523, 815, 547]
SampleTime "8e-5"
}
Block {
BlockType Display
Name "Display"
Ports [1]
Position [855, 520, 945, 550]
Decimation "1"
}
Block {
BlockType From
Name "From"
Position [525, 505, 600, 535]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "spectrum_tx"
}
Block {
BlockType From
Name "From1"
Position [525, 548, 605, 572]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "spectrum_rx"
}
Block {
BlockType From
Name "From2"
Position [250, 508, 365, 532]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "constellation_before"
}
Block {
BlockType From
Name "From3"
Position [250, 555, 360, 575]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "constellation_after"
}
Block {
BlockType From
Name "From4"
Position [15, 494, 65, 516]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "real_tx"
}
Block {
BlockType From
Name "From5"
Position [15, 519, 65, 541]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "imag_tx"
}
Block {
BlockType From
Name "From6"
Position [15, 544, 65, 566]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "real_rx"
}
Block {
BlockType From
Name "From7"
Position [15, 569, 65, 591]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "imag_rx"
}
Block {
BlockType Reference
Name "General Block\nDeinterleaver"
Ports [1, 1]
Position [120, 348, 200, 402]
Orientation "left"
BackgroundColor "lightBlue"
ShowName off
SourceBlock "commblkintrlv2/General Block\nDeinterleaver"
SourceType "General Block Deinterleaver"
elements "[ 2*floor( [0:119]/2 ) + mod( ([0:119] + 120 - "
"floor( 10*[0:119]/120 ) ) ,2 ) + 1]'"
}
Block {
BlockType Reference
Name "General Block\nInterleaver"
Ports [1, 1]
Position [335, 128, 415, 182]
BackgroundColor "lightBlue"
ShowName off
SourceBlock "commblkintrlv2/General Block\nInterleaver"
SourceType "General Block Interleaver"
elements "[ 2*floor( [0:119]/2 ) + mod( ([0:119] + 120 - "
"floor( 10*[0:119]/120 ) ) ,2 ) + 1]'"
}
Block {
BlockType Reference
Name "Matrix\nDeinterleaver"
Ports [1, 1]
Position [20, 348, 100, 402]
Orientation "left"
BackgroundColor "lightBlue"
ShowName off
SourceBlock "commblkintrlv2/Matrix\nDeinterleaver"
SourceType "Matrix Deinterleaver"
Nrows "10"
Ncols "12"
}
Block {
BlockType Reference
Name "Matrix\nInterleaver"
Ports [1, 1]
Position [235, 128, 315, 182]
BackgroundColor "lightBlue"
ShowName off
SourceBlock "commblkintrlv2/Matrix\nInterleaver"
SourceType "Matrix Interleaver"
Nrows "10"
Ncols "12"
}
Block {
BlockType Reference
Name "Multipath Rayleigh\nFading Channel"
Ports [1, 1]
Position [888, 215, 972, 265]
Orientation "down"
BackgroundColor "green"
NamePlacement "alternate"
ShowName off
SourceBlock "commchan2/Multipath Rayleigh\nFading Channel"
SourceType "Multipath Rayleigh Fading Channel"
Fd "200"
simTs "8e-5/180"
delayVec "[0 3e-6]"
gainVecdB "[0 -8]"
normGain on
Seed "936497248"
}
Block {
BlockType SubSystem
Name "OFDM Baseband\nDemodulator\nand\nRemove Cyclic "
"Prefix"
Ports [1, 2]
Position [610, 355, 720, 415]
Orientation "left"
BackgroundColor "lightBlue"
ShowName off
TreatAsAtomicUnit off
MaskDisplay "disp('OFDM Baseband\\nDemodulator\\nand \\nRemo"
"ve Cyclic prefix')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "OFDM Baseband\nDemodulator\nand\nRemove Cycli"
"c Prefix"
Location [185, 288, 814, 398]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [590, 38, 620, 52]
Orientation "left"
}
Block {
BlockType Reference
Name "FFT"
Ports [1, 1]
Position [420, 28, 460, 62]
Orientation "left"
SourceBlock "dspxfrm3/FFT"
SourceType "FFT"
CompMethod "Table lookup"
TableOpt "Speed"
BitRevOrder off
}
Block {
BlockType Reference
Name "Frame Status\nConversion"
Ports [1, 1]
Position [205, 29, 255, 61]
Orientation "left"
SourceBlock "dspsigattribs/Frame Status\nConversion"
SourceType "Frame Status Conversion"
growRefPort off
outframe "Frame-based"
}
Block {
BlockType Reference
Name "Multiport\nSelector"
Ports [1, 2]
Position [105, 15, 180, 70]
Orientation "left"
SourceBlock "dspindex/Multiport\nSelector"
SourceType "Multiport Selector"
rowsOrCols "Columns"
idxCellArray "{1,2}"
idxErrMode "Clip Index"
}
Block {
BlockType Selector
Name "Selector1"
Ports [1, 1]
Position [315, 26, 355, 64]
Orientation "left"
InputType "Matrix"
Elements "[50:64,1:16]"
Rows "[50:64,1:16]"
Columns "-1"
InputPortWidth "64"
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [1, 1]
Position [485, 14, 555, 76]
Orientation "left"
TreatAsAtomicUnit off
MaskDisplay "disp('Remove\\nCyclic Prefix')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Subsystem"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -