yangming2.mdl
来自「这是一个用simulink编程」· MDL 代码 · 共 1,761 行 · 第 1/5 页
MDL
1,761 行
SourceBlock "commsink2/Discrete-Time\nScatter Plot\nScope"
SourceType "Discrete-Time Scatter Plot Scope"
ShowPortLabels on
sampPerSymb "1"
offsetEye "0"
numTraces "40"
numNewFrames "10"
LineMarkers "*"
LineColors "[1 0 0]"
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 on
FigPos "[360 362 560 560]"
figTitle "Scatter Plot"
numLinesMax "8"
block_type_ "scatter"
}
Block {
BlockType Reference
Name "Downsample"
Ports [1, 1]
Position [920, 208, 955, 242]
SourceBlock "dspsigops/Downsample"
SourceType "Downsample"
N "60"
phase "0"
ic "0"
smode "Allow multirate"
fmode "Maintain input frame size"
}
Block {
BlockType Reference
Name "Downsample1"
Ports [1, 1]
Position [925, 303, 960, 337]
SourceBlock "dspsigops/Downsample"
SourceType "Downsample"
N "60"
phase "0"
ic "0"
smode "Allow multirate"
fmode "Maintain input frame size"
}
Block {
BlockType Reference
Name "Error Rate\nCalculation"
Ports [2]
Position [1160, 377, 1235, 428]
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "0"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Workspace"
WsName "ErrorVec"
RsMode2 off
stop off
numErr "100"
maxBits "1e6"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [345, 387, 375, 418]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [350, 507, 380, 538]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product2"
Ports [2, 1]
Position [780, 207, 810, 238]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product3"
Ports [2, 1]
Position [770, 302, 800, 333]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "Raised Cosine\nTransmit Filter"
Ports [1, 1]
Position [145, 208, 225, 252]
DialogController "dspDDGCreate"
DialogControllerArgs "DataTag4"
SourceBlock "commfilt2/Raised Cosine\nTransmit Filter"
SourceType "Raised Cosine Transmit Filter"
ShowPortLabels on
filtType "Square root"
D "16"
R "0.2"
sampMode "Sample-based"
N "4"
checkGain "Normalized"
filterGain "1"
checkCoeff off
variableName "rcTxFilt"
launchFVT off
}
Block {
BlockType Reference
Name "Random Integer\nGenerator"
Ports [0, 1]
Position [15, 333, 95, 377]
SourceBlock "commrandsrc2/Random Integer\nGenerator"
SourceType "Random Integer Generator"
ShowPortLabels on
mul "16"
seed "8"
Ts "1/400"
frameBased off
sampPerFrame "1"
orient off
outDataType "double"
}
Block {
BlockType RealImagToComplex
Name "Real-Imag to\nComplex"
Ports [2, 1]
Position [1020, 108, 1050, 137]
}
Block {
BlockType Reference
Name "Rectangular QAM\nDemodulator\nBaseband"
Ports [1, 1]
Position [1065, 94, 1140, 146]
SourceBlock "commdigbbndam3/Rectangular QAM\nDemodulator\nBa"
"seband"
SourceType "Rectangular QAM Demodulator Baseband"
M "16"
OutType "Integer"
Dec "Binary"
PowType "Min. distance between symbols"
MinDist "2"
AvgPow "1"
PeakPow "1"
Ph "0"
outDtype1 "double"
outDtype2 "double"
}
Block {
BlockType Reference
Name "Rectangular QAM\nModulator\nBaseband"
Ports [1, 1]
Position [30, 89, 105, 141]
SourceBlock "commdigbbndam3/Rectangular QAM\nModulator\nBase"
"band"
SourceType "Rectangular QAM Modulator Baseband"
M "16"
InType "Integer"
Enc "Binary"
PowType "Min. distance between symbols"
MinDist "2"
AvgPow "1"
PeakPow "1"
Ph "0"
outDtype "double"
}
Block {
BlockType Scope
Name "Scope"
Ports [2]
Position [1135, 631, 1165, 664]
Floating off
Location [5, 48, 1285, 989]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
YMin "-20~-20"
YMax "20~20"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Reference
Name "Sine Wave"
Ports [0, 1]
Position [255, 413, 300, 457]
SourceBlock "dspsrcs4/Sine Wave"
SourceType "Sine Wave"
Amplitude "1"
Frequency "1600"
Phase "pi/2"
SampleMode "Discrete"
OutComplex "Real"
CompMethod "Trigonometric fcn"
TableSize "Speed"
SampleTime "1/24000"
SamplesPerFrame "1"
additionalParams off
allowOverrides on
dataType "double"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
ResetState "Restart at time zero"
}
Block {
BlockType Reference
Name "Sine Wave1"
Ports [0, 1]
Position [640, 308, 685, 352]
SourceBlock "dspsrcs4/Sine Wave"
SourceType "Sine Wave"
Amplitude "1"
Frequency "1600"
Phase "0"
SampleMode "Discrete"
OutComplex "Real"
CompMethod "Trigonometric fcn"
TableSize "Speed"
SampleTime "1/24000"
SamplesPerFrame "1"
additionalParams off
allowOverrides on
dataType "double"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
ResetState "Restart at time zero"
}
Block {
BlockType Reference
Name "Sine Wave2"
Ports [0, 1]
Position [635, 223, 680, 267]
SourceBlock "dspsrcs4/Sine Wave"
SourceType "Sine Wave"
Amplitude "1"
Frequency "1600"
Phase "pi/2"
SampleMode "Discrete"
OutComplex "Real"
CompMethod "Trigonometric fcn"
TableSize "Speed"
SampleTime "1/24000"
SamplesPerFrame "1"
additionalParams off
allowOverrides on
dataType "double"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
ResetState "Restart at time zero"
}
Block {
BlockType Reference
Name "Sine Wave4"
Ports [0, 1]
Position [235, 538, 280, 582]
SourceBlock "dspsrcs4/Sine Wave"
SourceType "Sine Wave"
Amplitude "1"
Frequency "1600"
Phase "0"
SampleMode "Discrete"
OutComplex "Real"
CompMethod "Trigonometric fcn"
TableSize "Speed"
SampleTime "1/24000"
SamplesPerFrame "1"
additionalParams off
allowOverrides on
dataType "double"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
ResetState "Restart at time zero"
}
Block {
BlockType Reference
Name "Spectrum\nScope"
Ports [1]
Position [265, 220, 300, 270]
DialogController "dspdialog.SpectrumScope"
DialogControllerArgs "DataTag5"
SourceBlock "dspsnks4/Spectrum\nScope"
SourceType "Spectrum Scope"
ShowPortLabels off
ScopeProperties on
Domain "Frequency"
HorizSpan "1"
UseBuffer on
BufferSize "1024"
Overlap "256"
inpFftLenInherit off
FFTlength "128"
numAvg "20"
DisplayProperties off
AxisGrid on
Memory off
FrameNumber on
AxisLegend off
AxisZoom off
OpenScopeAtSimStart on
OpenScopeImmediately off
FigPos "get(0,'defaultfigureposition')"
AxisProperties off
XUnits "Hertz"
XRange "[0...Fs/2]"
InheritXIncr on
XIncr "1.0"
XLabel "Samples"
YUnits "dB"
YMin "-93.6754242226722"
YMax "9.48608950763696"
YLabel "Magnitude-squared, dB"
LineProperties off
LineColors "[1 0 0]"
wintypeSpecScope "Hann"
RsSpecScope "50"
betaSpecScope "5"
winsampSpecScope "Periodic"
}
Block {
BlockType Reference
Name "Spectrum\nScope1"
Ports [1]
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?