📄 san_psk1.mdl
字号:
DisplayOption "none"
UseBusObject off
BusObject "BusObject"
NonVirtualBus off
}
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 RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Saturate
UpperLimit "0.5"
LowerLimit "-0.5"
LinearizeAsGain on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Scope
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 "-1"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType StateSpace
A "1"
B "1"
C "1"
D "1"
X0 "0"
AbsoluteTolerance "auto"
Realization "auto"
}
Block {
BlockType Step
Time "1"
Before "0"
After "1"
SampleTime "-1"
VectorParams1D on
ZeroCross on
}
Block {
BlockType SubSystem
ShowPortLabels on
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 "++"
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 TriggerPort
TriggerType "rising"
StatesWhenEnabling "inherit"
ShowOutputPort off
OutputDataType "auto"
SampleTimeType "triggered"
SampleTime "1"
ZeroCross on
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Monospaced"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Monospaced"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "san_psk1"
Location [164, 182, 972, 625]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "rotated"
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 SubSystem
Name "AWGN\nChannel"
Ports [1, 1]
Position [365, 26, 460, 84]
AncestorBlock "commchan3/AWGN\nChannel"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "AWGN Channel"
MaskDescription "Add white Gaussian noise to the input signal. T"
"he input and output signals can be real or complex. This block supports multi"
"channel input and output signals as well as frame-based processing.\n\nWhen u"
"sing either of the variance modes with complex inputs, the variance values ar"
"e equally divided among the real and imaginary components of the input signal"
"."
MaskHelp "helpview(commbhelp)"
MaskPromptString "Initial seed:|Mode:|Eb/No (dB):|Es/No (dB):|SNR"
" (dB):|Number of bits per symbol:|Input signal power (watts):|Symbol period ("
"s):|Variance:"
MaskStyleString "edit,popup(Signal to noise ratio (Eb/No)|Signa"
"l to noise ratio (Es/No)|Signal to noise ratio (SNR)|Variance from mask|Var"
"iance from port),edit,edit,edit,edit,edit,edit,edit"
MaskTunableValueString "on,off,on,on,on,on,on,on,on"
MaskCallbackString "|commblkawgnchan2(gcb,'Mode');|||||||"
MaskEnableString "on,on,off,off,off,off,off,off,on"
MaskVisibilityString "on,on,off,off,off,off,off,off,on"
MaskToolTipString "on,on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,,"
MaskVariables "seed=@1;noiseMode=@2;EbNodB=@3;EsNodB=@4;SNRdB="
"@5;bitsPerSym=@6;Ps=@7;Tsym=@8;variance=@9;"
MaskInitialization "[mode,s]=commblkawgnchan2(gcb,'init');\nif ~ise"
"mpty(s.status) error(s.status); end"
MaskDisplay "plot(-10,-10,110, 110,[05 15 10 10 05 10 18 14 "
"13 7.5 13 41 44 47 50 53 57\n59 100-[13 7.5 13 14 18 10 5 10 10 15 5]],[70 70"
" 70 85 92 85 79 82 90 88.5\n90 90 87 93 87 93 87 90 90 88.5 90 82 79 85 92 85"
" 70 70 70]);\ndisp('AWGN');\nport_label('input',s.i1,s.i1s);\nport_label('inp"
"ut',s.i2,s.i2s);\nport_label('output',s.o1,s.o1s);\n"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "67|Variance from mask|10|10|10|100|1|1/300|0.2"
MaskTabNameString ",,,,,,,,"
System {
Name "AWGN\nChannel"
Location [266, 210, 801, 468]
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 "100"
Block {
BlockType Inport
Name "In1"
Position [40, 53, 70, 67]
IconDisplay "Port number"
}
Block {
BlockType "S-Function"
Name "Dynamic AWGN"
Ports [3, 1]
Position [210, 26, 305, 214]
FunctionName "scomawgnchan2"
Parameters "noiseMode, EbNodB, EsNodB, SNRdB, bitsPerSy"
"m, Ps, Tsym, variance"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Reference
Name "Random\nSource"
Ports [0, 1]
Position [40, 101, 75, 139]
Diagnostics "AllowInheritedTsInSrc"
SourceBlock "dspsrcs4/Random\nSource"
SourceType "Random Source"
SrcType "Gaussian"
NormMethod "Ziggurat"
CltLength "12"
MinVal "0"
MaxVal "1"
MeanVal "0"
VarVal "1"
RepMode "Specify seed"
rawSeed "seed"
IsInherit on
SampMode "Discrete"
SampTime "1"
SampFrame "1"
DataType "Double"
OutComplex "Real"
}
Block {
BlockType Ground
Name "Variance"
Position [45, 173, 75, 187]
}
Block {
BlockType Outport
Name "Out1"
Position [490, 113, 520, 127]
IconDisplay "Port number"
BusOutputAsStruct off
SignalType "real"
}
Line {
SrcBlock "Variance"
SrcPort 1
DstBlock "Dynamic AWGN"
DstPort 3
}
Line {
SrcBlock "Dynamic AWGN"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Dynamic AWGN"
DstPort 1
}
Line {
SrcBlock "Random\nSource"
SrcPort 1
DstBlock "Dynamic AWGN"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Carrier recovery"
Ports [1, 3]
Position [505, 25, 545, 85]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Carrier recovery"
Location [178, 166, 813, 454]
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 "100"
Block {
BlockType Inport
Name "In1"
Position [15, 53, 45, 67]
IconDisplay "Port number"
}
Block {
BlockType Reference
Name "BPF at 8kHz"
Ports [1, 1]
Position [130, 32, 195, 88]
SourceBlock "dsparch4/Analog\nFilter Design"
SourceType "Analog Filter Design"
method "Butterworth"
filttype "Bandpass"
N "4"
Wlo "7900*2*pi"
Whi "8100*2*pi"
Rp "2"
Rs "40"
}
Block {
BlockType SubSystem
Name "Divide by 2"
Ports [1, 2]
Position [275, 29, 315, 91]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Divide by 2"
Location [178, 227, 910, 574]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "rotated"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Clock"
Position [15, 83, 45, 97]
IconDisplay "Port number"
}
Block {
BlockType Constant
Name "Constant"
Position [25, 25, 55, 55]
Value "1"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "boolean"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [230, 183, 305, 217]
OutDataTypeMode "double"
ConvertRealWorld "Stored Integer (SI)"
RndMeth "Nearest"
SaturateOnIntegerOverflow off
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion1"
Position [340, 28, 415, 62]
OutDataTypeMode "double"
ConvertRealWorld "Stored Integer (SI)"
RndMeth "Nearest"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "J-K\nFlip-Flop1"
Ports [3, 2]
Position [130, 52, 175, 128]
SourceBlock "simulink_extras/Flip Flops/J-K\nFlip-Fl"
"op"
SourceType "JKFlipFlop"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
initial_condition "0"
}
Block {
BlockType Saturate
Name "Saturation"
Position [60, 75, 90, 105]
UpperLimit "1"
LowerLimit "0"
}
Block {
BlockType Step
Name "Step"
Position [370, 85, 400, 115]
Time "1/300"
Before "-.5"
After "-.5"
SampleTime "0"
}
Block {
BlockType Step
Name "Step1"
Position [265, 250, 295, 280]
NamePlacement "alternate"
Time "1/300"
Before "-.5"
After "-.5"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [440, 35, 460, 55]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [330, 190, 350, 210]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Output"
Position [530, 38, 560, 52]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Output1"
Position [480, 193, 510, 207]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "J-K\nFlip-Flop1"
SrcPort 1
Points [25, 0; 0, -25]
DstBlock "Data Type Conversion1"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [55, 0; 0, 20]
Branch {
DstBlock "J-K\nFlip-Flop1"
DstPort 1
}
Branch {
DstBlock "J-K\nFlip-Flop1"
DstPort 3
}
}
Line {
SrcBlock "J-K\nFlip-Flop1"
SrcPort 2
Points [30, 0; 0, 90]
DstBlock "Data Type Conversion"
DstPort 1
}
Line {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -