📄 bluetooth_voice.mdl
字号:
Block {
BlockType SubSystem
Name "AWGN"
Ports [1, 1]
Position [280, 175, 350, 235]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
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|14|.001|1e-6|awgn_channel_seed"
MaskTabNameString ",,,,"
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]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Reference
Name "Generate noise\nonly for slot 1"
Ports [2, 1]
Position [270, 112, 300, 148]
NamePlacement "alternate"
SourceBlock "simulink/Signal\nRouting/Manual Switch"
SourceType "Manual Switch"
ShowPortLabels on
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 "dspsrcs4/Signal From\nWorkspace"
SourceType "Signal From Workspace"
ShowPortLabels on
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 "dspsrcs4/Signal From\nWorkspace"
SourceType "Signal From Workspace"
ShowPortLabels on
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
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
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]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "In2"
Position [80, 233, 110, 247]
Port "2"
IconDisplay "Port number"
LatchInput off
}
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
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
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]
Port "1"
IconDisplay "Port number"
LatchInput off
}
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"
ShowPortLabels on
seed "seed"
noiseMode "Signal to noise ratio (Es/No)"
EbNodB "10"
EsNodB "EsNo"
SNRdB "10"
bitsPerSym "1"
Ps "Power"
Tsym "Symbol_Period"
variance "1"
}
Block {
BlockType Reference
Name "Contiguous\nCopy"
Ports [1, 1]
Position [260, 159, 330, 201]
SourceBlock "dspobslib/Contiguous\nCopy"
SourceType "Contiguous Copy"
}
Block {
BlockType Outport
Name "Out1"
Position [375, 173, 405, 187]
IconDisplay "Port number"
BusOutputAsStruct off
}
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
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
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]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType ActionPort
Name "Action Port"
Position [170, 15, 229, 43]
ActionType "then"
}
Block {
BlockType Outport
Name "Out1"
Position [325, 78, 355, 92]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "Out1"
Position [450, 223, 480, 237]
IconDisplay "Port number"
BusOutputAsStruct off
}
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]
IconDisplay "Port number"
BusOutputAsStruct off
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 Reference
Name "BT CLK rate"
Ports [0, 1]
Position [780, 430, 815, 440]
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
ShowPortLabels on
Value "1"
SampleMode "Discrete"
discreteOutput "Sample-based"
continuousOutput "Sample-based"
sampTime ".5/1600"
framePeriod ".5/1600"
additionalParams off
allowOverrides on
dataType "Inherit from 'Constant value'"
isSigned on
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "off"
Ts ".5/1600"
FramebasedOutput "off"
}
Block {
BlockType Reference
Name "BT Path Loss"
Ports [1, 1]
Position [400, 183, 440, 227]
SourceBlock "dspmathops/dB Gain"
SourceType "dB Gain"
ShowPortLabels on
dB "-40"
intype "Amplitude"
}
Block {
BlockType SubSystem
Name "Double-click\nto play\nInput Signal"
Ports []
Position [44, 411, 100, 461]
OpenFcn "[Input_Wave,Input_Fs]=wavread('Input.wav');soun"
"d(Input_Wave,Input_Fs);"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskType "Plot histogram"
MaskInitialization "[x,y,x1,y1,x2,y2] = dspblkwao2('icon');"
MaskDisplay "patch(x1,y1,[1 1 1]*.5);\npatch(x2,y2);\nplot(x"
",y); plot(x1,y1)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -