📄 basic_ofdm.mdl
字号:
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 43, 55, 57]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Gain
Name "Gain"
Position [240, 35, 270, 65]
Gain "1/0.75"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Reference
Name "QPSK\nModulator\nBaseband"
Ports [1, 1]
Position [115, 26, 190, 74]
SourceBlock "commdigbbndpm3/QPSK\nModulator\nBaseband"
SourceType "QPSK Modulator Baseband"
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"
InType "Bit"
Enc "Gray"
Ph "pi/4"
outDtype "double"
outWordLen "16"
outUDDataType "sfix(16)"
outFracLenMode "Best precision"
outFracLen "15"
}
Block {
BlockType Outport
Name "Out1"
Position [315, 43, 345, 57]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [0, 0]
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "QPSK\nModulator\nBaseband"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0]
DstBlock "QPSK\nModulator\nBaseband"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Series-to-Parallel"
Ports [1, 1]
Position [640, 438, 725, 492]
Orientation "left"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
System {
Name "Series-to-Parallel"
Location [122, 344, 332, 444]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 43, 55, 57]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Reference
Name "Buffer"
Ports [1, 1]
Position [75, 25, 125, 75]
SourceBlock "dspbuff3/Buffer"
SourceType "Buffer"
N "16"
V "0"
ic "0"
}
Block {
BlockType Outport
Name "Out1"
Position [155, 43, 185, 57]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Buffer"
DstPort 1
}
Line {
SrcBlock "Buffer"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Spectrum of\nReceived Signal"
Ports [1]
Position [855, 440, 890, 490]
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 "-34.4731775270948"
YMax "-5.3259181648247"
YLabel "Magnitude, dB"
LineProperties off
LineColors "[1 0 0]"
wintypeSpecScope "Hann"
RsSpecScope "50"
betaSpecScope "5"
winsampSpecScope "Periodic"
}
Block {
BlockType Reference
Name "Spectrum of\nTx - Rx"
Ports [1]
Position [925, 325, 960, 375]
DialogController "dspdialog.SpectrumScope"
DialogControllerArgs "DataTag5"
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 "-34.4731775270948"
YMax "-5.3259181648247"
YLabel "Magnitude, dB"
LineProperties off
LineColors "[0 0 0]"
wintypeSpecScope "Hann"
RsSpecScope "50"
betaSpecScope "5"
winsampSpecScope "Periodic"
}
Block {
BlockType Reference
Name "Spectrum of \nTransmitted Signal"
Ports [1]
Position [865, 215, 900, 265]
DialogController "dspdialog.SpectrumScope"
DialogControllerArgs "DataTag6"
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 "-34.4731775270948"
YMax "-5.3259181648247"
YLabel "Magnitude, dB"
LineProperties off
LineColors "[0 0 1]"
wintypeSpecScope "Hann"
RsSpecScope "50"
betaSpecScope "5"
winsampSpecScope "Periodic"
}
Block {
BlockType Sum
Name "Subtract"
Ports [2, 1]
Position [860, 332, 890, 363]
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Line {
SrcBlock "Bernoulli Binary\nGenerator"
SrcPort 1
Points [0, 0; 25, 0]
Branch {
DstBlock "QPSK Mapping"
DstPort 1
}
Branch {
Points [0, 135]
DstBlock "Error Rate\nCalculation"
DstPort 1
}
}
Line {
SrcBlock "QPSK Mapping"
SrcPort 1
Points [30, 0]
Branch {
DstBlock "OFDM Modulator"
DstPort 1
}
Branch {
Points [0, -90]
DstBlock "Discrete-Time Scatter Plot \nScope - After QPSK Mapping"
DstPort 1
}
}
Line {
SrcBlock "OFDM Modulator"
SrcPort 1
DstBlock "Parallel-to-Series"
DstPort 1
}
Line {
SrcBlock "Series-to-Parallel"
SrcPort 1
DstBlock "OFDM Demodulator"
DstPort 1
}
Line {
SrcBlock "QPSK Demapping"
SrcPort 1
Points [-65, 0; 0, -145]
DstBlock "Error Rate\nCalculation"
DstPort 2
}
Line {
SrcBlock "Error Rate\nCalculation"
SrcPort 1
DstBlock "Display"
DstPort 1
}
Line {
SrcBlock "Parallel-to-Series"
SrcPort 1
DstBlock "Frame Conversion"
DstPort 1
}
Line {
SrcBlock "OFDM Demodulator"
SrcPort 1
Points [-35, 0]
Branch {
DstBlock "QPSK Demapping"
DstPort 1
}
Branch {
Points [0, 90]
DstBlock "Discrete-Time Scatter Plot\nScope - Before QPSK Demapping"
DstPort 1
}
}
Line {
SrcBlock "Subtract"
SrcPort 1
DstBlock "Spectrum of\nTx - Rx"
DstPort 1
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
DstBlock "Mixer"
DstPort 1
}
Line {
SrcBlock "Frame Conversion"
SrcPort 1
Points [0, 5]
Branch {
DstBlock "AWGN\nChannel"
DstPort 1
}
Branch {
Points [65, 0]
Branch {
DstBlock "Spectrum of \nTransmitted Signal"
DstPort 1
}
Branch {
Points [0, 100]
DstBlock "Subtract"
DstPort 1
}
}
}
Line {
SrcBlock "Mixer"
SrcPort 1
Points [0, 40]
Branch {
DstBlock "Series-to-Parallel"
DstPort 1
}
Branch {
Points [65, 0]
Branch {
DstBlock "Spectrum of\nReceived Signal"
DstPort 1
}
Branch {
Points [0, -110]
DstBlock "Subtract"
DstPort 2
}
}
}
Annotation {
Name "Num Bits"
Position [492, 327]
}
Annotation {
Name "Num Errors"
Position [497, 308]
}
Annotation {
Name "Error Rate"
Position [497, 287]
}
}
}
MatData {
NumRecords 7
DataRecord {
Tag DataTag6
Data " %)30 . , 8 ( ! % \" 0 0 "
}
DataRecord {
Tag DataTag5
Data " %)30 . , 8 ( ! % \" 0 0 "
}
DataRecord {
Tag DataTag4
Data " %)30 . , 8 ( ! % \" 0 0 "
}
DataRecord {
Tag DataTag3
Data " %)30 . < 8 ( 0 % \" $ ! 0 . 0 8 ( ! % \" $ / 0 0 #P %%04TM$96UO9'5L871O<@ "
}
DataRecord {
Tag DataTag2
Data " %)30 . 8 8 ( 0 % \" $ ! 0 . , 8 ( ! % \" $ $ 0 0 0 249&5 "
}
DataRecord {
Tag DataTag1
Data " %)30 . 8 8 ( 0 % \" $ ! 0 . , 8 ( ! % \" $ # 0 0 , 1D94 "
}
DataRecord {
Tag DataTag0
Data " %)30 . > 8 ( 0 % \" $ ! 0 . 2 8 ( ! % \" $ 2 0 0 $@ $)E<FYO=6QL:4)I;F%R>4=E;@ "
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -