📄 cofdm.mdl
字号:
Location [474, 387, 674, 477]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [145, 38, 175, 52]
Orientation "left"
}
Block {
BlockType Selector
Name "Selector4"
Ports [1, 1]
Position [80, 26, 120, 64]
Orientation "left"
InputType "Matrix"
Elements "[15:78]"
Rows "[27:90]"
Columns "-1"
InputPortWidth "78"
}
Block {
BlockType Outport
Name "Out1"
Position [25, 38, 55, 52]
Orientation "left"
}
Line {
SrcBlock "Selector4"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Selector4"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "Out1"
Position [15, 23, 45, 37]
Orientation "left"
}
Block {
BlockType Outport
Name "Out2"
Position [15, 48, 45, 62]
Orientation "left"
Port "2"
}
Line {
SrcBlock "FFT"
SrcPort 1
DstBlock "Selector1"
DstPort 1
}
Line {
SrcBlock "Selector1"
SrcPort 1
DstBlock "Frame Status\nConversion"
DstPort 1
}
Line {
SrcBlock "Subsystem"
SrcPort 1
DstBlock "FFT"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Subsystem"
DstPort 1
}
Line {
SrcBlock "Frame Status\nConversion"
SrcPort 1
DstBlock "Multiport\nSelector"
DstPort 1
}
Line {
SrcBlock "Multiport\nSelector"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Multiport\nSelector"
SrcPort 2
DstBlock "Out2"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "OFDM Baseband Modulator\nand\nAdd Cyclic Prefix"
Ports [2, 1]
Position [560, 139, 695, 206]
BackgroundColor "lightBlue"
ShowName off
TreatAsAtomicUnit off
MaskDisplay "disp('OFDM Baseband\\nModulator\\nand\\nAdd Cyc"
"lic Prefix');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "OFDM Baseband Modulator\nand\nAdd Cyclic Pref"
"ix"
Location [2, 82, 989, 722]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In2"
Position [15, 78, 45, 92]
}
Block {
BlockType Inport
Name "In1"
Position [235, 13, 265, 27]
Port "2"
}
Block {
BlockType Constant
Name "Constant"
Position [145, 110, 175, 140]
Value "0"
}
Block {
BlockType Reference
Name "IFFT"
Ports [1, 1]
Position [515, 39, 555, 71]
SourceBlock "dspxfrm3/IFFT"
SourceType "IFFT"
CompMethod "Table lookup"
TableOpt "Speed"
BitRevOrder off
cs_in off
SkipNorm off
mode "Real"
}
Block {
BlockType Reference
Name "Matrix\nConcatenation"
Ports [3, 1]
Position [215, 64, 270, 106]
SourceBlock "simulink/Math\nOperations/Matrix\nConcatena"
"tion"
SourceType "Matrix Concatenation"
numInports "3"
catMethod "Vertical"
}
Block {
BlockType Reference
Name "Matrix\nConcatenation1"
Ports [2, 1]
Position [315, 34, 370, 76]
SourceBlock "simulink/Math\nOperations/Matrix\nConcatena"
"tion"
SourceType "Matrix Concatenation"
numInports "2"
catMethod "Horizontal"
}
Block {
BlockType Reference
Name "Multiport\nSelector"
Ports [1, 2]
Position [80, 28, 160, 72]
SourceBlock "dspindex/Multiport\nSelector"
SourceType "Multiport Selector"
rowsOrCols "Rows"
idxCellArray "{1:15,16:30}"
idxErrMode "Clip Index"
}
Block {
BlockType Selector
Name "Selector"
Ports [1, 1]
Position [640, 36, 690, 74]
InputType "Matrix"
Elements "[1 3]"
Rows "[39:64,1:64]"
Columns "-1"
InputPortWidth "3"
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [1, 1]
Position [425, 33, 480, 77]
TreatAsAtomicUnit off
MaskDisplay "disp('Zero Pad');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Subsystem"
Location [2, 82, 989, 722]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 58, 55, 72]
}
Block {
BlockType Selector
Name "Selector1"
Ports [1, 1]
Position [200, 46, 250, 84]
InputType "Matrix"
Elements "[16:64,1:15]"
Rows "[16:64,1:15]"
Columns "-1"
InputPortWidth "64"
}
Block {
BlockType Reference
Name "Zero Pad"
Ports [1, 1]
Position [80, 47, 125, 83]
SourceBlock "dspsigops/Zero Pad"
SourceType "Zero Pad"
padSigAt "End"
zpadAlong "Columns and rows"
padNumOutRowsSpecMethod "User-specified"
numOutRows "64"
padNumOutColsSpecMethod "User-specified"
numOutCols "2"
trunc_flag "None"
}
Block {
BlockType Outport
Name "Out1"
Position [335, 58, 365, 72]
}
Line {
SrcBlock "Zero Pad"
SrcPort 1
DstBlock "Selector1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Zero Pad"
DstPort 1
}
Line {
SrcBlock "Selector1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "Out1"
Position [820, 48, 850, 62]
}
Line {
SrcBlock "Multiport\nSelector"
SrcPort 1
Points [35, 0]
DstBlock "Matrix\nConcatenation"
DstPort 1
}
Line {
SrcBlock "Multiport\nSelector"
SrcPort 2
Points [15, 0; 0, 40]
DstBlock "Matrix\nConcatenation"
DstPort 3
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [10, 0; 0, -40]
DstBlock "Matrix\nConcatenation"
DstPort 2
}
Line {
SrcBlock "IFFT"
SrcPort 1
DstBlock "Selector"
DstPort 1
}
Line {
SrcBlock "Matrix\nConcatenation"
SrcPort 1
Points [0, -20]
DstBlock "Matrix\nConcatenation1"
DstPort 2
}
Line {
SrcBlock "Matrix\nConcatenation1"
SrcPort 1
DstBlock "Subsystem"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 25]
DstBlock "Matrix\nConcatenation1"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
Points [0, -35]
DstBlock "Multiport\nSelector"
DstPort 1
}
Line {
SrcBlock "Selector"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Subsystem"
SrcPort 1
DstBlock "IFFT"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "P/S"
Ports [1, 1]
Position [830, 145, 870, 205]
BackgroundColor "lightBlue"
ShowName off
TreatAsAtomicUnit off
MaskDisplay "disp('P/S');\n"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "P/S"
Location [577, 204, 922, 363]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 43, 55, 57]
}
Block {
BlockType ComplexToRealImag
Name "Complex to\nReal-Imag"
Ports [1, 2]
Position [165, 93, 195, 122]
Output "Real and imag"
}
Block {
BlockType Goto
Name "Goto"
Position [225, 82, 280, 98]
ShowName off
GotoTag "real_tx"
TagVisibility "global"
}
Block {
BlockType Goto
Name "Goto1"
Position [225, 117, 280, 133]
ShowName off
GotoTag "imag_tx"
TagVisibility "global"
}
Block {
BlockType Goto
Name "Goto2"
Position [215, 40, 320, 60]
ShowName off
GotoTag "spectrum_tx"
TagVisibility "global"
}
Block {
BlockType Reference
Name "Unbuffer"
Ports [1, 1]
Position [80, 26, 130, 74]
SourceBlock "dspbuff3/Unbuffer"
SourceType "Unbuffer"
ic "0"
}
Block {
BlockType Outport
Name "Out1"
Position [150, 70, 180, 85]
Orientation "down"
}
Line {
SrcBlock "Unbuffer"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
Points [0, 60]
DstBlock "Complex to\nReal-Imag"
DstPort 1
}
Branch {
DstBlock "Goto2"
DstPort 1
}
Branch {
Points [0, 5]
DstBlock "Out1"
DstPort 1
}
}
Line {
SrcBlock "Complex to\nReal-Imag"
SrcPort 1
Points [10, 0]
DstBlock "Goto"
DstPort 1
}
Line {
SrcBlock "Complex to\nReal-Imag"
SrcPort 2
Points [0, 10]
DstBlock "Goto1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Unbuffer"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Power Spectrum"
Ports [2]
Position [625, 498, 710, 582]
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 set_param([gcs '/Power Spectrum/OFDM Transmitted Spectrum']"
",'OpenScopeAtSimStart','on');\n set_param([gcs '/Power Spectrum/OFDM Receive"
"d Spectrum'],'OpenScopeAtSimStart','on');\n sdspfscope2([],[],[],'ScopeUpdat"
"e',[gcs '/Power Spectrum/OFDM Transmitted Spectrum'],'OpenFig');\n sdspfscop"
"e2([],[],[],'ScopeUpdate',[gcs '/Power Spectrum/OFDM Received Spectrum'],'Ope"
"nFig');\n \nelse\n [picture, map]=imread('switch_off.jpg');\n set_param("
"[gcs '/Power Spectrum/OFDM Transmitted Spectrum'],'OpenScopeAtSimStart','off'"
");\n set_param([gcs '/Power Spectrum/OFDM Received Spectrum'],'OpenScopeAtSi"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -