📄 bluetooth_voice_article.mdl
字号:
additionalParams off
dataType "Inherit from 'Constant value'"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "off"
Ts "1/1600"
FramebasedOutput "off"
}
Block {
BlockType Reference
Name "6 x slot rate"
Ports [0, 1]
Position [770, 430, 805, 440]
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
Value "1"
SampleMode "Discrete"
discreteOutput "Sample-based"
continuousOutput "Sample-based"
sampTime "6/1600"
framePeriod "6/1600"
additionalParams off
dataType "Inherit from 'Constant value'"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "off"
Ts "6/1600"
FramebasedOutput "off"
}
Block {
BlockType Reference
Name "64 kbps voice bit rate"
Ports [0, 1]
Position [770, 495, 805, 505]
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
Value "1"
SampleMode "Discrete"
discreteOutput "Sample-based"
continuousOutput "Sample-based"
sampTime "1/64000"
framePeriod "1/64000"
additionalParams off
dataType "Inherit from 'Constant value'"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "off"
Ts "1/64000"
FramebasedOutput "off"
}
Block {
BlockType Reference
Name "8 ksps voice sample rate"
Ports [0, 1]
Position [770, 460, 805, 470]
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
Value "1"
SampleMode "Discrete"
discreteOutput "Sample-based"
continuousOutput "Sample-based"
sampTime "1/8000"
framePeriod "1/8000"
additionalParams off
dataType "Inherit from 'Constant value'"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "off"
Ts "1/8000"
FramebasedOutput "off"
}
Block {
BlockType Reference
Name "802 Path Loss"
Ports [1, 1]
Position [415, 248, 455, 292]
SourceBlock "dspmathops/dB Gain"
SourceType "dB Gain"
dB "-40"
intype "Amplitude"
}
Block {
BlockType Reference
Name "802.11b\nTransmitter"
Ports [0, 1]
Position [275, 242, 350, 298]
SourceBlock "bluetooth_lib/802.11b\nTransmitter"
SourceType ""
On on
rate "200"
m "1e-3"
v "0"
power "1"
Freq_Number "39"
rate_seed "rate_802_seed"
awgn_seed "awgn_802_seed"
}
Block {
BlockType SubSystem
Name "AWGN"
Ports [1, 1]
Position [280, 150, 350, 210]
TreatAsAtomicUnit on
MaskType "Optional channel"
MaskPromptString "Turn on AWGN|Es/No|Input Power|Symbol Period|Se"
"ed"
MaskStyleString "checkbox,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on"
MaskCallbackString "||||"
MaskEnableString "on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on"
MaskToolTipString "on,on,on,on,on"
MaskVarAliasString ",,,,"
MaskVariables "AWGN_On=@1;EsNo=@2;Power=@3;Symbol_Period=@4;se"
"ed=@5;"
MaskInitialization "if AWGN_On==1\n Name='On';\nelse\n Name='Off"
"';\nend;\n"
MaskDisplay "disp(['AWGN is ' Name])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "on|0|.001|1e-6|awgn_channel_seed"
System {
Name "AWGN"
Location [246, 236, 845, 593]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [120, 238, 150, 252]
}
Block {
BlockType Reference
Name "Generate noise\nonly for slot 1"
Ports [2, 1]
Position [270, 112, 300, 148]
NamePlacement "alternate"
SourceBlock "simulink3/Nonlinear/Manual Switch"
SourceType "Manual Switch"
sw "0"
action "0"
}
Block {
BlockType Constant
Name "Mode"
Position [90, 189, 160, 211]
ShowName off
Value "AWGN_On"
}
Block {
BlockType Reference
Name "Slot 1 enable2"
Ports [0, 1]
Position [160, 113, 235, 127]
NamePlacement "alternate"
SourceBlock "dspsrcs3/Signal From\nWorkspace"
SourceType "Signal From Workspace"
X "[1 0 0 0 0 0]"
Ts "625e-6"
nsamps "1"
OutputAfterFinalValue "Cyclic Repetition"
}
Block {
BlockType Reference
Name "Slot 1 enable3"
Ports [0, 1]
Position [160, 132, 235, 148]
NamePlacement "alternate"
ShowName off
SourceBlock "dspsrcs3/Signal From\nWorkspace"
SourceType "Signal From Workspace"
X "[1 1 1 1 1 1 ]"
Ts "625e-6"
nsamps "1"
OutputAfterFinalValue "Cyclic Repetition"
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [2, 1, 1]
Position [270, 175, 355, 270]
TreatAsAtomicUnit on
System {
Name "Subsystem"
Location [130, 380, 635, 667]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 38, 55, 52]
}
Block {
BlockType Inport
Name "In2"
Position [80, 233, 110, 247]
Port "2"
}
Block {
BlockType EnablePort
Name "Enable"
Ports []
Position [375, 40, 395, 60]
}
Block {
BlockType SubSystem
Name "Add noise"
Ports [1, 1, 0, 0, 0, 0, 0, 1]
Position [230, 220, 310, 260]
TreatAsAtomicUnit on
System {
Name "Add noise"
Location [363, 285, 861, 585]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [20, 173, 50, 187]
}
Block {
BlockType ActionPort
Name "Action Port"
Position [170, 15, 229, 43]
ActionType "else"
}
Block {
BlockType Reference
Name "AWGN\nChannel1"
Ports [1, 1]
Position [120, 159, 200, 201]
ShowName off
SourceBlock "commchan2/AWGN\nChannel"
SourceType "AWGN Channel"
seed "seed"
noiseMode "Signal to noise ratio (Es/No)"
EsNodB "EsNo"
SNRdB "10"
Ps "Power"
Tsym "Symbol_Period"
variance "1"
}
Block {
BlockType Reference
Name "Contiguous\nCopy"
Ports [1, 1]
Position [260, 159, 330, 201]
SourceBlock "dspsigattribs/Contiguous\nCopy"
SourceType "Contiguous Copy"
}
Block {
BlockType Outport
Name "Out1"
Position [375, 173, 405, 187]
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "AWGN\nChannel1"
DstPort 1
}
Line {
SrcBlock "Contiguous\nCopy"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "AWGN\nChannel1"
SrcPort 1
DstBlock "Contiguous\nCopy"
DstPort 1
}
}
}
Block {
BlockType If
Name "If"
Ports [1, 2]
Position [80, 25, 160, 65]
IfExpression "u1 == 0"
}
Block {
BlockType Merge
Name "Merge"
Ports [2, 1]
Position [385, 210, 425, 250]
ShowName off
}
Block {
BlockType SubSystem
Name "Pass Through"
Ports [1, 1, 0, 0, 0, 0, 0, 1]
Position [230, 90, 310, 130]
TreatAsAtomicUnit on
System {
Name "Pass Through"
Location [346, 414, 844, 638]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [75, 78, 105, 92]
}
Block {
BlockType ActionPort
Name "Action Port"
Position [170, 15, 229, 43]
ActionType "then"
}
Block {
BlockType Outport
Name "Out1"
Position [325, 78, 355, 92]
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "Out1"
Position [450, 223, 480, 237]
}
Line {
SrcBlock "Add noise"
SrcPort 1
DstBlock "Merge"
DstPort 2
}
Line {
SrcBlock "Pass Through"
SrcPort 1
Points [55, 0]
DstBlock "Merge"
DstPort 1
}
Line {
SrcBlock "If"
SrcPort 1
Points [105, 0]
DstBlock "Pass Through"
DstPort ifaction
}
Line {
SrcBlock "In2"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [0, -130]
DstBlock "Pass Through"
DstPort 1
}
Branch {
DstBlock "Add noise"
DstPort 1
}
}
Line {
SrcBlock "If"
SrcPort 2
Points [45, 0; 0, 150]
DstBlock "Add noise"
DstPort ifaction
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "If"
DstPort 1
}
Line {
SrcBlock "Merge"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "Out1"
Position [470, 218, 500, 232]
InitialOutput "0"
}
Line {
SrcBlock "Mode"
SrcPort 1
DstBlock "Subsystem"
DstPort 1
}
Line {
SrcBlock "Subsystem"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Slot 1 enable3"
SrcPort 1
DstBlock "Generate noise\nonly for slot 1"
DstPort 2
}
Line {
SrcBlock "Generate noise\nonly for slot 1"
SrcPort 1
Points [5, 0]
DstBlock "Subsystem"
DstPort enable
}
Line {
SrcBlock "Slot 1 enable2"
SrcPort 1
DstBlock "Generate noise\nonly for slot 1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Subsystem"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "BER and FER meters"
Ports [3]
Position [340, 388, 405, 492]
TreatAsAtomicUnit off
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "BER and FER meters"
Location [35, 187, 1001, 611]
Open off
ModelBrowserVisibility off
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -