📄 ofdm_test.mdl
字号:
SrcPort 1
DstBlock "Unbuffer"
DstPort 1
}
Line {
SrcBlock "Unbuffer"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "BPSK\nDemodulator\nBaseband"
SrcPort 1
DstBlock "Selector2"
DstPort 1
}
Line {
SrcBlock "Reshape"
SrcPort 1
Points [35, 0; 0, -195]
DstBlock "Product"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Rx_BPSK_IDEAL"
Ports [2, 1]
Position [485, 135, 595, 195]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Rx_BPSK_IDEAL"
Location [2, 82, 1014, 700]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "data"
Position [25, 48, 55, 62]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "h"
Position [20, 158, 50, 172]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Reference
Name "BPSK\nDemodulator\nBaseband"
Ports [1, 1]
Position [1000, 41, 1075, 89]
FontSize 10
SourceBlock "commdigbbndpm2/BPSK\nDemodulator\nBaseband"
SourceType "BPSK Demodulator Baseband"
ShowPortLabels on
Ph "0"
numSamp "1"
}
Block {
BlockType Reference
Name "FFT"
Ports [1, 1]
Position [200, 38, 240, 72]
DialogController "dspDDGCreate"
DialogControllerArgs "DataTag1"
SourceBlock "dspxfrm3/FFT"
SourceType "FFT"
CompMethod "Table lookup"
TableOpt "Speed"
BitRevOrder off
additionalParams off
SkipNorm on
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 FrameConversion
Name "Frame Conversion"
Position [340, 35, 395, 75]
OutFrame "Frame based"
}
Block {
BlockType Gain
Name "Gain1"
Position [140, 40, 165, 70]
Gain "1/sqrt(64)"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [1, 1]
Position [345, 150, 375, 180]
Operator "conj"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [915, 47, 945, 78]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Selector
Name "Selector"
Ports [1, 1]
Position [80, 36, 120, 74]
Elements "[17:80]"
InputPortWidth "80"
}
Block {
BlockType Selector
Name "Selector2"
Ports [1, 1]
Position [1130, 46, 1170, 84]
Elements "[1:7 9:15 17:23 25:31 33:39 41:47 49:55 57:"
"63]"
Rows "[1:7]"
Columns "[1:8]"
InputPortWidth "64"
}
Block {
BlockType Selector
Name "Selector4"
Ports [1, 1]
Position [90, 146, 130, 184]
Elements "[17:80]"
InputPortWidth "80"
}
Block {
BlockType Reference
Name "Unbuffer"
Ports [1, 1]
Position [1265, 41, 1315, 89]
SourceBlock "dspbuff3/Unbuffer"
SourceType "Unbuffer"
ic "0"
}
Block {
BlockType Outport
Name "Out1"
Position [1360, 58, 1390, 72]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Selector4"
SrcPort 1
DstBlock "Math\nFunction"
DstPort 1
}
Line {
SrcBlock "Math\nFunction"
SrcPort 1
Points [520, 0]
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "h"
SrcPort 1
DstBlock "Selector4"
DstPort 1
}
Line {
SrcBlock "BPSK\nDemodulator\nBaseband"
SrcPort 1
DstBlock "Selector2"
DstPort 1
}
Line {
SrcBlock "Unbuffer"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Selector2"
SrcPort 1
DstBlock "Unbuffer"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "BPSK\nDemodulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "Frame Conversion"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "FFT"
DstPort 1
}
Line {
SrcBlock "data"
SrcPort 1
DstBlock "Selector"
DstPort 1
}
Line {
SrcBlock "FFT"
SrcPort 1
DstBlock "Frame Conversion"
DstPort 1
}
Line {
SrcBlock "Selector"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Rx_DBPSK"
Ports [1, 1]
Position [490, 40, 600, 100]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Rx_DBPSK"
Location [2, 82, 1014, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 48, 55, 62]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Reference
Name "DBPSK\nDemodulator\nBaseband1"
Ports [1, 1]
Position [535, 30, 600, 80]
SourceBlock "commdigbbndpm2/DBPSK\nDemodulator\nBaseband"
SourceType "DBPSK Demodulator Baseband"
ShowPortLabels on
Ph "0"
numSamp "1"
}
Block {
BlockType Reference
Name "FFT"
Ports [1, 1]
Position [200, 38, 240, 72]
DialogController "dspDDGCreate"
DialogControllerArgs "DataTag2"
SourceBlock "dspxfrm3/FFT"
SourceType "FFT"
CompMethod "Table lookup"
TableOpt "Speed"
BitRevOrder off
additionalParams off
SkipNorm on
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 FrameConversion
Name "Frame Conversion"
Position [340, 35, 395, 75]
OutFrame "Frame based"
}
Block {
BlockType Gain
Name "Gain1"
Position [140, 40, 165, 70]
Gain "1/sqrt(64)"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Selector
Name "Selector"
Ports [1, 1]
Position [80, 36, 120, 74]
Elements "[17:80]"
InputPortWidth "80"
}
Block {
BlockType Selector
Name "Selector3"
Ports [1, 1]
Position [675, 36, 715, 74]
Elements "[1:7 9:15 17:23 25:31 33:39 41:47 49:55 57:"
"63]"
Rows "[1:7]"
Columns "[1:8]"
InputPortWidth "64"
}
Block {
BlockType Reference
Name "Unbuffer1"
Ports [1, 1]
Position [820, 31, 870, 79]
SourceBlock "dspbuff3/Unbuffer"
SourceType "Unbuffer"
ic "0"
}
Block {
BlockType Outport
Name "Out2"
Position [890, 48, 920, 62]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Selector"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "FFT"
SrcPort 1
DstBlock "Frame Conversion"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Selector"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "FFT"
DstPort 1
}
Line {
SrcBlock "Selector3"
SrcPort 1
DstBlock "Unbuffer1"
DstPort 1
}
Line {
SrcBlock "Unbuffer1"
SrcPort 1
DstBlock "Out2"
DstPort 1
}
Line {
SrcBlock "DBPSK\nDemodulator\nBaseband1"
SrcPort 1
DstBlock "Selector3"
DstPort 1
}
Line {
SrcBlock "Frame Conversion"
SrcPort 1
DstBlock "DBPSK\nDemodulator\nBaseband1"
DstPort 1
}
}
}
Block {
BlockType Selector
Name "Selector1"
Ports [1, 1]
Position [840, 66, 865, 104]
Elements "[1]"
InputPortWidth "3"
}
Block {
BlockType Selector
Name "Selector2"
Ports [1, 1]
Position [840, 161, 865, 199]
Elements "[1]"
InputPortWidth "3"
}
Block {
BlockType Selector
Name "Selector3"
Ports [1, 1]
Position [855, 406, 880, 444]
Elements "[1]"
InputPortWidth "3"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [905, 70, 995, 100]
VariableName "ber_dbpsk"
MaxDataPoints "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [905, 167, 1000, 193]
VariableName "ber_bpsk_ideal"
MaxDataPoints "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [905, 409, 995, 441]
VariableName "ber_bpsk"
MaxDataPoints "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType SubSystem
Name "Tx"
Ports [0, 3]
Position [45, 46, 125, 514]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Tx"
Location [2, 82, 1014, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Reference
Name "BPSK\nModulator\nBaseband"
Ports [1, 1]
Position [400, 121, 475, 169]
FontSize 10
SourceBlock "commdigbbndpm2/BPSK\nModulator\nBaseband"
SourceType "BPSK Modulator Baseband"
ShowPortLabels on
Ph "0"
numSamp "1"
}
Block {
BlockType Reference
Name "Bernoulli Binary\nGenerator"
Ports [0, 1]
Position [25, 23, 105, 67]
FontName "Arial"
SourceBlock "commrandsrc2/Bernoulli Binary\nGenerator"
SourceType "Bernoulli Binary Generator"
ShowPortLabels on
P "0.5"
seed "6111"
Ts "1/1000"
frameBased on
sampPerFrame "7"
orient off
}
Block {
BlockType Reference
Name "Buffer"
Ports [1, 1]
Position [520, 30, 570, 80]
SourceBlock "dspbuff3/Buffer"
SourceType "Buffer"
N "64"
V "0"
ic "0"
}
Block {
BlockType Reference
Name "Buffer1"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -