📄 cp4fsk.mdl
字号:
OutScaling "2^0"
SampleTime "inf"
}
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 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 Reference
}
Block {
BlockType Rounding
Operator "floor"
SampleTime "-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 ToWorkspace
VariableName "simulink_output"
MaxDataPoints "1000"
Decimation "1"
SampleTime "0"
FixptAsFi off
}
}
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 "cp4fsk"
Location [161, 187, 795, 490]
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 [255, 114, 335, 156]
SourceBlock "commchan2/AWGN\nChannel"
SourceType "AWGN Channel"
ShowPortLabels on
seed "67"
noiseMode "Signal to noise ratio (Eb/No)"
EbNodB "10"
EsNodB "10"
SNRdB "10"
bitsPerSym "2"
Ps "1"
Tsym "1/(8*4800)"
variance "1"
}
Block {
BlockType Reference
Name "CPFSK Demodulator\nBaseband"
Ports [1, 1]
Position [365, 109, 440, 161]
SourceBlock "commdigbbndcpm2/CPFSK Demodulator\nBaseband"
SourceType "CPFSK Demodulator Baseband"
ShowPortLabels on
Mnum "4"
outputType "Integer"
mappingType "Binary"
modIdx "0.27"
phaseOffset "0"
samplesPerSymbol "8"
traceBack "0"
}
Block {
BlockType Reference
Name "CPFSK Modulator\nBaseband"
Ports [1, 1]
Position [145, 109, 220, 161]
SourceBlock "commdigbbndcpm2/CPFSK Modulator\nBaseband"
SourceType "CPFSK Modulator Baseband"
ShowPortLabels on
Mnum "4"
inputType "Integer"
mappingType "Binary"
modIdx ".27"
phaseOffset "0"
samplesPerSymbol "8"
}
Block {
BlockType Reference
Name "Error Rate\nCalculation"
Ports [2]
Position [485, 52, 560, 103]
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 SubSystem
Name "Subsystem"
Ports [0, 1]
Position [45, 105, 85, 165]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Subsystem"
Location [282, 205, 752, 485]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Sum
Name "Add"
Ports [2, 1]
Position [135, 97, 165, 128]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Constant
Name "Constant"
Position [80, 165, 110, 195]
}
Block {
BlockType Constant
Name "Constant1"
Position [130, 25, 160, 55]
Value "2"
}
Block {
BlockType Constant
Name "Constant2"
Position [210, 155, 240, 185]
Value "5"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [200, 92, 230, 123]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "Random Integer\nGenerator"
Ports [0, 1]
Position [25, 83, 105, 127]
FontName "Arial"
SourceBlock "commrandsrc2/Random Integer\nGenerator"
SourceType "Random Integer Generator"
ShowPortLabels on
mul "4"
seed "37"
Ts "1/4800"
frameBased on
sampPerFrame "100"
orient off
}
Block {
BlockType Sum
Name "Subtract"
Ports [2, 1]
Position [270, 102, 300, 133]
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Out1"
Position [325, 113, 355, 127]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Random Integer\nGenerator"
SrcPort 1
DstBlock "Add"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [0, -60]
DstBlock "Add"
DstPort 2
}
Line {
SrcBlock "Add"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [10, 0; 0, 60]
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Subtract"
DstPort 1
}
Line {
SrcBlock "Constant2"
SrcPort 1
Points [5, 0; 0, -45]
DstBlock "Subtract"
DstPort 2
}
Line {
SrcBlock "Subtract"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [275, 215, 335, 245]
VariableName "TxIQ"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [395, 215, 455, 245]
VariableName "RxIQ"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [140, 215, 200, 245]
VariableName "Source"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace3"
Position [505, 165, 565, 195]
VariableName "RxSig"
MaxDataPoints "inf"
SampleTime "-1"
SaveFormat "Array"
}
Line {
SrcBlock "Subsystem"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [10, 0]
Branch {
Points [0, 95]
DstBlock "To Workspace2"
DstPort 1
}
Branch {
DstBlock "CPFSK Modulator\nBaseband"
DstPort 1
}
}
Branch {
Points [0, -70]
DstBlock "Error Rate\nCalculation"
DstPort 1
}
}
Line {
SrcBlock "CPFSK Demodulator\nBaseband"
SrcPort 1
Points [20, 0]
Branch {
Points [20, 0; 0, 45]
DstBlock "To Workspace3"
DstPort 1
}
Branch {
Points [0, -45]
DstBlock "Error Rate\nCalculation"
DstPort 2
}
}
Line {
SrcBlock "CPFSK Modulator\nBaseband"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "AWGN\nChannel"
DstPort 1
}
Branch {
Points [0, 95]
DstBlock "To Workspace"
DstPort 1
}
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "CPFSK Demodulator\nBaseband"
DstPort 1
}
Branch {
Points [0, 95]
DstBlock "To Workspace1"
DstPort 1
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -