📄 basic_ofdm.mdl
字号:
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Display
Format "short"
Decimation "10"
Floating off
SampleTime "-1"
}
Block {
BlockType Gain
Gain "1"
Multiplication "Element-wise(K.*u)"
ParamMin "[]"
ParamMax "[]"
ParameterDataTypeMode "Same as input"
ParameterDataType "fixdt(1,16,0)"
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "[]"
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Ground
}
Block {
BlockType Inport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
OutMin "[]"
OutMax "[]"
DataType "auto"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
SignalType "auto"
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
Interpolate on
}
Block {
BlockType MagnitudeAngleToComplex
Input "Magnitude and angle"
ConstantPart "0"
SampleTime "-1"
}
Block {
BlockType Math
Operator "exp"
OutputSignalType "auto"
SampleTime "-1"
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as first input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType "M-S-Function"
FunctionName "mlfile"
DisplayMFileStacktrace on
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
UseBusObject off
BusObject "BusObject"
NonVirtualBus off
}
Block {
BlockType Outport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
OutMin "[]"
OutMax "[]"
DataType "auto"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as first input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType RealImagToComplex
Input "Real and imag"
ConstantPart "0"
SampleTime "-1"
}
Block {
BlockType Rounding
Operator "floor"
SampleTime "-1"
}
Block {
BlockType Selector
NumberOfDimensions "1"
IndexMode "One-based"
InputPortWidth "-1"
SampleTime "-1"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType SubSystem
ShowPortLabels "FromPortIcon"
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
TreatAsAtomicUnit off
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Same as first input"
OutDataType "fixdt(1,16,0)"
OutScaling "[]"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Concatenate
NumInputs "2"
ConcatenateDimension "1"
}
Block {
BlockType FrameConversion
OutFrame "Frame based"
}
Block {
BlockType Reshape
OutputDimensionality "1-D array"
OutputDimensions "[1,1]"
}
Block {
BlockType Constant
Value "1"
VectorParams1D on
SamplingMode "Sample based"
OutMin "[]"
OutMax "[]"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "fixdt(1,16,0)"
ConRadixGroup "Use specified scaling"
OutScaling "[]"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimization)"
LogicDataType "uint(8)"
ZeroCross on
SampleTime "-1"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
UseDisplayTextAsClickCallback off
}
LineDefaults {
FontName "Arial"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "Basic_OFDM"
Location [2, 82, 1014, 744]
Open on
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"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "AWGN\nChannel"
Ports [1, 1]
Position [712, 270, 818, 305]
Orientation "down"
NamePlacement "alternate"
SourceBlock "commchan3/AWGN\nChannel"
SourceType "AWGN Channel"
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"
seed "1"
noiseMode "Signal to noise ratio (SNR)"
EbNodB "10"
EsNodB "10"
SNRdB "15"
bitsPerSym "1"
Ps "0.01"
Tsym "1"
variance "1"
}
Block {
BlockType Reference
Name "Bernoulli Binary\nGenerator"
Ports [0, 1]
Position [65, 138, 145, 182]
DialogController "commDDGCreate"
DialogControllerArgs "DataTag0"
SourceBlock "commrandsrc2/Bernoulli Binary\nGenerator"
SourceType "Bernoulli Binary Generator"
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"
P "0.5"
seed "61"
Ts "1/(16*3.375e6)"
frameBased on
sampPerFrame "16"
orient off
outDataType "double"
}
Block {
BlockType Reference
Name "Discrete-Time Scatter Plot\nScope - Before QPSK Demapping"
Tag "ScatterPlot"
Ports [1]
Position [485, 529, 560, 581]
SourceBlock "commsink2/Discrete-Time\nScatter Plot\nScope"
SourceType "Discrete-Time Scatter Plot Scope"
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"
sampPerSymb "1"
offsetEye "0"
numTraces "400"
numNewFrames "10"
LineMarkers "."
LineColors "[1 0 0]"
fading on
render on
AxisGrid on
xMin "-3.15953460963373"
xMax "2.51738828476927"
yMin "-2.77110595630396"
yMax "2.90581693809905"
inphaseLabel "In-phase Amplitude"
quadratureLabel "Quadrature Amplitude"
openScopeAtSimStart on
FrameNumber off
FigPos "[440 238 560 560]"
figTitle "Scatter Plot"
numLinesMax "8"
block_type_ "scatter"
}
Block {
BlockType Reference
Name "Discrete-Time Scatter Plot \nScope - After QPSK Mapping"
Tag "ScatterPlot"
Ports [1]
Position [470, 44, 545, 96]
SourceBlock "commsink2/Discrete-Time\nScatter Plot\nScope"
SourceType "Discrete-Time Scatter Plot Scope"
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"
sampPerSymb "1"
offsetEye "0"
numTraces "40"
numNewFrames "10"
LineMarkers "."
LineColors "b"
fading on
render on
AxisGrid on
xMin "-3.3"
xMax "3.315"
yMin "-3.3"
yMax "3.315"
inphaseLabel "In-phase Amplitude"
quadratureLabel "Quadrature Amplitude"
openScopeAtSimStart on
FrameNumber off
FigPos "[440 238 560 560]"
figTitle "Scatter Plot"
numLinesMax "8"
block_type_ "scatter"
}
Block {
BlockType Display
Name "Display"
Ports [1]
Position [375, 278, 465, 342]
Decimation "1"
Lockdown off
}
Block {
BlockType Reference
Name "Error Rate\nCalculation"
Ports [2, 1]
Position [220, 282, 295, 333]
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "22"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Port"
WsName "ErrorVec"
RsMode2 off
stop off
numErr "100"
maxBits "1e6"
}
Block {
BlockType FrameConversion
Name "Frame Conversion"
Position [745, 175, 785, 230]
Orientation "down"
OutFrame "Frame based"
}
Block {
BlockType Reference
Name "Mixer"
Ports [1, 1]
Position [737, 355, 793, 420]
Orientation "down"
NamePlacement "alternate"
SourceBlock "rfmathmodels1/Mixer"
SourceType "Mixer"
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"
gain "0"
PhNs "-120"
Fo "10000"
seed "2137"
loss "0"
}
Block {
BlockType SubSystem
Name "OFDM Demodulator"
Ports [1, 1]
Position [465, 438, 580, 492]
Orientation "left"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
System {
Name "OFDM Demodulator"
Location [2, 82, 1014, 722]
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 "156"
Block {
BlockType Inport
Name "In1"
Position [470, 38, 500, 52]
Orientation "left"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Reference
Name "FFT"
Ports [1, 1]
Position [330, 28, 370, 62]
Orientation "left"
DialogController "dspDDGCreate"
DialogControllerArgs "DataTag1"
SourceBlock "dspxfrm3/FFT"
SourceType "FFT"
CompMethod "Table lookup"
TableOpt "Speed"
BitRevOrder off
InheritFFTLength on
FFTLength "64"
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"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -