📄 mc_cdma_rayleigh_kuirs.mdl
字号:
BlockType Inport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
Interpolate on
}
Block {
BlockType Math
Operator "exp"
OutputSignalType "auto"
SampleTime "-1"
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType "M-S-Function"
FunctionName "mlfile"
}
Block {
BlockType Outport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Reference
}
Block {
BlockType RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Selector
InputType "Vector"
IndexMode "One-based"
ElementSrc "Internal"
Elements "1"
RowSrc "Internal"
Rows "1"
ColumnSrc "Internal"
Columns "1"
InputPortWidth "-1"
IndexIsStartValue off
OutputPortSize "1"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Terminator
}
Block {
BlockType ToWorkspace
VariableName "simulink_output"
MaxDataPoints "1000"
Decimation "1"
SampleTime "0"
FixptAsFi off
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Agency FB"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "mc_cdma_rayleigh_kuirs"
Location [2, 77, 1270, 984]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "AWGN\nChannel"
Ports [1, 1]
Position [873, 205, 967, 240]
Orientation "down"
BackgroundColor "gray"
NamePlacement "alternate"
FontSize 10
SourceBlock "commchan3/AWGN\nChannel"
SourceType "AWGN Channel"
ShowPortLabels on
seed "seed(2)"
noiseMode "Signal to noise ratio (Es/No)"
EbNodB "snrr"
EsNodB "snrr"
SNRdB "snrr"
bitsPerSym "1"
Ps "0.001"
Tsym "sampletime/1600"
variance "1"
}
Block {
BlockType Reference
Name "Bernoulli Binary\nGenerator"
Ports [0, 1]
Position [15, 63, 95, 107]
FontSize 10
SourceBlock "commrandsrc2/Bernoulli Binary\nGenerator"
SourceType "Bernoulli Binary Generator"
ShowPortLabels on
P "0.5"
seed "seed(1)"
Ts "sampletime/8"
frameBased on
sampPerFrame "8"
orient off
outDataType "double"
}
Block {
BlockType SubSystem
Name "Cal ERROR"
Ports [2, 1]
Position [145, 190, 195, 250]
BackgroundColor "lightBlue"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Cal ERROR"
Location [267, 855, 687, 963]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [35, 33, 65, 47]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "In2"
Position [25, 63, 55, 77]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Reference
Name "Error Rate Calculation"
Ports [2, 1]
Position [90, 27, 175, 83]
BackgroundColor "cyan"
ShowName off
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "8"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Port"
WsName "ErrorVec"
RsMode2 off
stop off
numErr "inf"
maxBits "2e4"
}
Block {
BlockType Selector
Name "Selector"
Ports [1, 1]
Position [230, 36, 270, 74]
BackgroundColor "cyan"
InputPortWidth "3"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [315, 40, 395, 70]
BackgroundColor "cyan"
VariableName "coded_error"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType Outport
Name "Out1"
Position [225, 48, 255, 62]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Error Rate Calculation"
SrcPort 1
Points [0, 0; 25, 0]
Branch {
DstBlock "Selector"
DstPort 1
}
Branch {
DstBlock "Out1"
DstPort 1
}
}
Line {
SrcBlock "Selector"
SrcPort 1
DstBlock "To Workspace"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
Points [0, 0]
DstBlock "Error Rate Calculation"
DstPort 2
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0]
DstBlock "Error Rate Calculation"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Cal ERROR1"
Ports [2, 1]
Position [375, 197, 425, 268]
BackgroundColor "lightBlue"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Cal ERROR1"
Location [267, 855, 687, 963]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [35, 33, 65, 47]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "In2"
Position [25, 63, 55, 77]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Reference
Name "Error Rate Calculation"
Ports [2, 1]
Position [90, 27, 175, 83]
BackgroundColor "cyan"
ShowName off
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "0"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Port"
WsName "ErrorVec"
RsMode2 off
stop off
numErr "inf"
maxBits "2e4"
}
Block {
BlockType Selector
Name "Selector"
Ports [1, 1]
Position [230, 36, 270, 74]
BackgroundColor "cyan"
InputPortWidth "3"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [300, 40, 395, 70]
BackgroundColor "cyan"
VariableName "no_coded_error"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType Outport
Name "Out1"
Position [225, 48, 255, 62]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Error Rate Calculation"
SrcPort 1
Points [0, 0; 25, 0]
Branch {
DstBlock "Selector"
DstPort 1
}
Branch {
DstBlock "Out1"
DstPort 1
}
}
Line {
SrcBlock "Selector"
SrcPort 1
DstBlock "To Workspace"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
Points [0, 0]
DstBlock "Error Rate Calculation"
DstPort 2
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0]
DstBlock "Error Rate Calculation"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Code & Interleave"
Ports [1, 1]
Position [145, 55, 245, 115]
BackgroundColor "yellow"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
MaskDisplay "disp('Code \\n Interleave')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Code & Interleave"
Location [103, 406, 642, 663]
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]
IconDisplay "Port number"
}
Block {
BlockType Reference
Name "Convolutional\nEncoder"
Ports [1, 1]
Position [125, 27, 215, 83]
FontSize 10
SourceBlock "commcnvcod2/Convolutional\nEncoder"
SourceType "Convolutional Encoder"
trellis "poly2trellis(7, [171 133])"
reset "None"
}
Block {
BlockType Reference
Name "Matrix\nInterleaver"
Ports [1, 1]
Position [270, 28, 350, 82]
FontSize 10
SourceBlock "commblkintrlv2/Matrix\nInterleaver"
SourceType "Matrix Interleaver"
ShowPortLabels on
Nrows "4"
Ncols "4"
}
Block {
BlockType Outport
Name "Out1"
Position [420, 43, 450, 57]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Convolutional\nEncoder"
SrcPort 1
Points [0, 0]
DstBlock "Matrix\nInterleaver"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Convolutional\nEncoder"
DstPort 1
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -