📄 m_psk_model.mdl
字号:
Position [605, 206, 675, 224]
BackgroundColor "[1.000000, 0.501961, 0.250980]"
ShowName off
GotoTag "rcv_bits"
TagVisibility "local"
}
Block {
BlockType Reference
Name "M-PSK\nDemodulator\nBaseband"
Ports [1, 1]
Position [485, 190, 560, 240]
DialogController "commDDGCreate"
DialogControllerArgs "DataTag2"
SourceBlock "commdigbbndpm3/M-PSK\nDemodulator\nBaseband"
SourceType "M-PSK Demodulator Baseband"
M "M"
Ph "pi/8"
Dec "Gray"
Mapping "[0:7]"
OutType "Bit"
DecType "Hard decision"
VarSource "Dialog"
Variance "1"
outDtype1 "Inherit via internal rule"
outDtype2 "Inherit via internal rule"
derotateFactorDTMode "Same word length as input"
derotateFactorWordLen "16"
}
Block {
BlockType Reference
Name "M-PSK\nModulator\nBaseband"
Ports [1, 1]
Position [150, 189, 225, 241]
NamePlacement "alternate"
SourceBlock "commdigbbndpm3/M-PSK\nModulator\nBaseband"
SourceType "M-PSK Modulator Baseband"
M "M"
InType "Bit"
Enc "Gray"
Mapping "[0:7]"
Ph "pi/8"
outDtype "double"
outWordLen "16"
outUDDataType "sfix(16)"
outFracLenMode "Best precision"
outFracLen "15"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [605, 330, 665, 360]
NamePlacement "alternate"
VariableName "BER"
MaxDataPoints "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [610, 570, 670, 600]
VariableName "SER"
MaxDataPoints "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType SubSystem
Name "zzzzz"
Ports []
Position [63, 339, 587, 440]
BackgroundColor "lightBlue"
DropShadow on
ShowName off
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
MaskDisplay "disp('')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "zzzzz"
Location [433, 403, 931, 703]
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 SubSystem
Name "zzzzz1"
Ports []
Position [63, 483, 590, 595]
BackgroundColor "[0.501961, 1.000000, 0.501961]"
DropShadow on
ShowName off
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
MaskDisplay "disp('')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "zzzzz1"
Location [433, 403, 931, 703]
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 SubSystem
Name "zzzzz2"
Ports []
Position [15, 139, 246, 280]
BackgroundColor "[0.925490, 0.670588, 0.827451]"
DropShadow on
ShowName off
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
MaskDisplay "disp('')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "zzzzz2"
Location [433, 403, 931, 703]
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 SubSystem
Name "zzzzz3"
Ports []
Position [460, 159, 586, 292]
BackgroundColor "[0.643137, 0.670588, 0.827451]"
DropShadow on
ShowName off
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
MaskDisplay "disp('')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "zzzzz3"
Location [433, 403, 931, 703]
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 SubSystem
Name "zzzzz4"
Ports []
Position [170, 16, 255, 57]
BackgroundColor "[0.454902, 0.682353, 0.827451]"
DropShadow on
ShowName off
FontName "Arial"
FontSize 12
FontWeight "bold"
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
MaskType "Specify Simulation Parameters Here"
MaskDescription "M is modulation order (2, 4, 8, 16, etc.).\n\nEb/No is the desired SNR for the simulation."
MaskPromptString "Modulation Order (M)|Eb/No"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "M=@1;EbNo=@2;"
MaskInitialization "assignin('base','M',M);\nassignin('base','EbNo',EbNo);"
MaskDisplay "disp('Set System\\nParameters')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "4|10"
MaskTabNameString ","
System {
Name "zzzzz4"
Location [433, 403, 931, 703]
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"
}
}
Line {
SrcBlock "Bernoulli Binary\nGenerator"
SrcPort 1
Points [15, 0]
Branch {
Points [0, 50]
DstBlock "Goto"
DstPort 1
}
Branch {
DstBlock "M-PSK\nModulator\nBaseband"
DstPort 1
}
}
Line {
SrcBlock "M-PSK\nModulator\nBaseband"
SrcPort 1
Points [30, 0]
Branch {
DstBlock "AWGN\nChannel"
DstPort 1
}
Branch {
Points [0, -85]
DstBlock "Avg Power"
DstPort 1
}
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
Points [40, 0]
Branch {
Points [0, -105]
DstBlock "Double-click\nto Open"
DstPort 1
}
Branch {
DstBlock "M-PSK\nDemodulator\nBaseband"
DstPort 1
}
}
Line {
SrcBlock "M-PSK\nDemodulator\nBaseband"
SrcPort 1
DstBlock "Goto1"
DstPort 1
}
Line {
SrcBlock "Error Rate\nCalculation"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Display"
DstPort 1
}
Branch {
Points [0, -50]
DstBlock "To Workspace"
DstPort 1
}
}
Line {
SrcBlock "From"
SrcPort 1
DstBlock "Error Rate\nCalculation"
DstPort 1
}
Line {
SrcBlock "From1"
SrcPort 1
DstBlock "Error Rate\nCalculation"
DstPort 2
}
Line {
SrcBlock "From2"
SrcPort 1
DstBlock "Bit to Integer\nConverter1"
DstPort 1
}
Line {
SrcBlock "From3"
SrcPort 1
DstBlock "Bit to Integer\nConverter"
DstPort 1
}
Line {
SrcBlock "Error Rate\nCalculation1"
SrcPort 1
Points [10, 0]
Branch {
Points [0, 50]
DstBlock "To Workspace1"
DstPort 1
}
Branch {
DstBlock "Display1"
DstPort 1
}
}
Line {
SrcBlock "Bit to Integer\nConverter"
SrcPort 1
Points [20, 0; 0, 10]
DstBlock "Error Rate\nCalculation1"
DstPort 1
}
Line {
SrcBlock "Bit to Integer\nConverter1"
SrcPort 1
Points [20, 0; 0, -10]
DstBlock "Error Rate\nCalculation1"
DstPort 2
}
Line {
SrcBlock "Avg Power"
SrcPort 1
DstBlock "Display2"
DstPort 1
}
Annotation {
Name "Estimated\nAvg Power"
Position [398, 103]
}
Annotation {
Name "Bit Error Rate"
Position [600, 373]
HorizontalAlignment "left"
}
Annotation {
Name "Num Bit Errors"
Position [597, 395]
HorizontalAlignment "left"
}
Annotation {
Name "Num Bits xmitted"
Position [599, 415]
HorizontalAlignment "left"
}
Annotation {
Name "Compute Symbol Error Rate"
Position [188, 463]
BackgroundColor "[0.501961, 1.000000, 0.501961]"
DropShadow on
FontName "Arial"
FontSize 18
FontWeight "bold"
}
Annotation {
Name "Compute Bit Error Rate"
Position [168, 318]
BackgroundColor "lightBlue"
DropShadow on
FontName "Arial"
FontSize 18
FontWeight "bold"
}
Annotation {
Name "Sym Error Rate"
Position [596, 513]
HorizontalAlignment "left"
}
Annotation {
Name "Num Sym Errors"
Position [598, 535]
HorizontalAlignment "left"
}
Annotation {
Name "Num Syms xmitted"
Position [595, 555]
HorizontalAlignment "left"
}
Annotation {
Name "Receiver"
Position [503, 138]
BackgroundColor "[0.643137, 0.670588, 0.823529]"
DropShadow on
FontName "Arial"
FontSize 18
FontWeight "bold"
}
Annotation {
Name "Transmitter"
Position [73, 118]
BackgroundColor "[0.925490, 0.674510, 0.835294]"
DropShadow on
FontName "Arial"
FontSize 18
FontWeight "bold"
}
Annotation {
Name "M-PSK System"
Position [12, 24]
HorizontalAlignment "left"
BackgroundColor "darkGreen"
DropShadow on
FontName "Arial"
FontSize 18
FontWeight "bold"
}
Annotation {
Position [202, 60]
}
}
}
MatData {
NumRecords 3
DataRecord {
Tag DataTag2
Data " %)30 . < 8 ( 0 % \" $ ! 0 . 0 8 ( ! % \" $ / 0 0 #P $U04TM$96UO9'5L871O<@ "
}
DataRecord {
Tag DataTag1
Data " %)30 . > 8 ( 0 % \" $ ! 0 . 2 8 ( ! % \" $ 2 0 0 $@ $)E<FYO=6QL:4)I;F%R>4=E;@ "
}
DataRecord {
Tag DataTag0
Data " %)30 . : 8 ( 0 % \" $ ! 0 . . 8 ( ! % \" $ ( 0 0 \" %9A<FEA;F-E"
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -