📄 qpsk.mdl
字号:
Block {
BlockType Assignment
InputType "Vector"
IndexMode "One-based"
IndexIsStartValue off
ElementSrc "Internal"
Elements "1"
RowSrc "Internal"
Rows "1"
ColumnSrc "Internal"
Columns "1"
OutputDimensions "[1 1]"
DiagnosticForDimensions "None"
SampleTime "-1"
}
Block {
BlockType Constant
Value "1"
VectorParams1D on
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
}
Block {
BlockType DataTypeConversion
OutDataTypeMode "Inherit via back propagation"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
ConvertRealWorld "Real World Value (RWV)"
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType ForIterator
ResetStates "held"
IterationSource "internal"
IterationLimit "5"
ExternalIncrement off
ShowIterationPort on
IndexMode "One-based"
IterationVariableDataType "int32"
}
Block {
BlockType FromWorkspace
VariableName "simulink_input"
SampleTime "-1"
Interpolate on
OutputAfterFinalValue "Extrapolation"
}
Block {
BlockType Ground
}
Block {
BlockType Inport
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
Interpolate on
}
Block {
BlockType Logic
Operator "AND"
Inputs "2"
AllPortsSameDT on
OutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
SampleTime "-1"
}
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 MultiPortSwitch
Inputs "4"
zeroidx off
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Outport
Port "1"
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 Scope
Floating off
ModelBased off
TickLabels "OneTimeTick"
ZoomMode "on"
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType Signum
ZeroCross on
SampleTime "-1"
}
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 UnitDelay
X0 "0"
SampleTime "1"
StateMustResolveToSignalObject off
RTWStateStorageClass "Auto"
}
Block {
BlockType Width
OutputDataTypeScalingMode "Choose intrinsic data type"
DataType "double"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "qpsk"
Location [2, 70, 1022, 718]
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 [470, 114, 550, 156]
SourceBlock "commchan2/AWGN\nChannel"
SourceType "AWGN Channel"
ShowPortLabels on
seed "80"
noiseMode "Signal to noise ratio (Eb/No)"
EbNodB "10"
EsNodB "10"
SNRdB "10"
bitsPerSym "1"
Ps "1"
Tsym "1"
variance "1"
}
Block {
BlockType Reference
Name "Differential\nDecoder"
Ports [1, 1]
Position [660, 112, 750, 158]
SourceBlock "commsrccod2/Differential\nDecoder"
SourceType "Differential Decoder"
ShowPortLabels on
InitCond "0"
}
Block {
BlockType Reference
Name "Differential\nEncoder"
Ports [1, 1]
Position [265, 112, 355, 158]
SourceBlock "commsrccod2/Differential\nEncoder"
SourceType "Differential Encoder"
ShowPortLabels on
InitCond "0"
}
Block {
BlockType FromWorkspace
Name "From\nWorkspace"
Position [30, 123, 95, 147]
VariableName "simin"
SampleTime "1"
}
Block {
BlockType Reference
Name "Mu-Law\nCompressor"
Ports [1, 1]
Position [125, 112, 215, 158]
SourceBlock "commsrccod2/Mu-Law\nCompressor"
SourceType "Mu-Law Compressor"
ShowPortLabels on
mu "500"
V "5"
}
Block {
BlockType Reference
Name "Mu-Law\nExpander"
Ports [1, 1]
Position [780, 112, 870, 158]
SourceBlock "commsrccod2/Mu-Law\nExpander"
SourceType "Mu-Law Expander"
ShowPortLabels on
mu "500"
V "5"
}
Block {
BlockType Reference
Name "QPSK\nDemodulator\nBaseband"
Ports [1, 1]
Position [565, 110, 640, 160]
SourceBlock "commdigbbndpm2/QPSK\nDemodulator\nBaseband"
SourceType "QPSK Demodulator Baseband"
ShowPortLabels on
OutType "Integer"
Dec "Binary"
Ph "0"
numSamp "1"
}
Block {
BlockType Reference
Name "QPSK\nModulator\nBaseband"
Ports [1, 1]
Position [375, 111, 450, 159]
SourceBlock "commdigbbndpm2/QPSK\nModulator\nBaseband"
SourceType "QPSK Modulator Baseband"
ShowPortLabels on
InType "Integer"
Enc "Binary"
Ph "pi/4"
numSamp "1"
}
Block {
BlockType Scope
Name "Scope"
Ports [6]
Position [910, 321, 940, 354]
Location [43, 257, 367, 496]
Open off
NumInputPorts "6"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
axes5 "%<SignalLabel>"
axes6 "%<SignalLabel>"
}
YMin "-5~-5~-5~-5~-5~-5"
YMax "5~5~5~5~5~5"
DataFormat "StructureWithTime"
}
Line {
SrcBlock "QPSK\nModulator\nBaseband"
SrcPort 1
DstBlock "AWGN\nChannel"
DstPort 1
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
DstBlock "QPSK\nDemodulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "From\nWorkspace"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Mu-Law\nCompressor"
DstPort 1
}
Branch {
Points [0, 190]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "Mu-Law\nCompressor"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "Differential\nEncoder"
DstPort 1
}
Branch {
Points [0, 195]
DstBlock "Scope"
DstPort 2
}
}
Line {
SrcBlock "Differential\nEncoder"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "QPSK\nModulator\nBaseband"
DstPort 1
}
Branch {
Points [0, 200]
DstBlock "Scope"
DstPort 3
}
}
Line {
SrcBlock "QPSK\nDemodulator\nBaseband"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "Differential\nDecoder"
DstPort 1
}
Branch {
Points [0, 205]
DstBlock "Scope"
DstPort 4
}
}
Line {
SrcBlock "Differential\nDecoder"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Mu-Law\nExpander"
DstPort 1
}
Branch {
Points [0, 210]
DstBlock "Scope"
DstPort 5
}
}
Line {
SrcBlock "Mu-Law\nExpander"
SrcPort 1
Points [15, 0; 0, 215]
DstBlock "Scope"
DstPort 6
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -