📄 bluetooth.mdl
字号:
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "In2"
Position [75, 170, 95, 190]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType FrameConversion
Name "Frame Conversion"
Position [155, 164, 190, 196]
ShowName off
OutFrame "Frame based"
}
Block {
BlockType Reference
Name "GFSK\nModulation"
Ports [1, 1]
Position [215, 49, 290, 101]
SourceBlock "commdigbbndcpm2/CPM\nModulator\nBaseband"
SourceType "CPM Modulator Baseband"
ShowPortLabels on
Mnum "2"
inputType "Bit"
mappingType "Binary"
modIdx "0.3"
pulseShape "Gaussian"
BT "0.5"
mainLobePulseLength "1"
rollOff "0.2"
pulseLength "1"
preHistory "1"
phaseOffset "0"
samplesPerSymbol "100"
}
Block {
BlockType Reference
Name "Generate\n79 possible carriers\n-39MHz to 3"
"9MHz\n"
Ports [1, 1]
Position [220, 155, 295, 205]
SourceBlock "commdigbbndfm2/M-FSK\nModulator\nBaseband"
SourceType "M-FSK Modulator Baseband"
M "79"
InType "Integer"
Enc "Binary"
freqSep "1e6"
phaseType "Continuous"
numSamp "6.25e4"
}
Block {
BlockType Product
Name "Product3"
Ports [2, 1]
Position [375, 68, 405, 97]
ShowName off
}
Block {
BlockType Outport
Name "Out"
Position [480, 75, 500, 95]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "GFSK\nModulation"
SrcPort 1
DstBlock "Product3"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "GFSK\nModulation"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
DstBlock "Frame Conversion"
DstPort 1
}
Line {
SrcBlock "Product3"
SrcPort 1
DstBlock "Out"
DstPort 1
}
Line {
SrcBlock "Generate\n79 possible carriers\n-39MHz to 3"
"9MHz\n"
SrcPort 1
Points [60, 0]
DstBlock "Product3"
DstPort 2
}
Line {
SrcBlock "Frame Conversion"
SrcPort 1
DstBlock "Generate\n79 possible carriers\n-39MHz to 3"
"9MHz\n"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Frequency hopping\ncode, 1/1600 sec"
Ports [0, 1]
Position [15, 405, 100, 435]
SourceBlock "dspsrcs4/Signal From\nWorkspace"
SourceType "Signal From Workspace"
ShowPortLabels on
X "randint(1,100,78)"
Ts "1/1600"
nsamps "1"
OutputAfterFinalValue "Cyclic repetition"
}
Block {
BlockType From
Name "From1"
Position [345, 176, 410, 194]
ShowName off
DialogController "Simulink.DDGSource"
CloseFcn "tagdialog Close"
GotoTag "Hop_Index"
}
Block {
BlockType From
Name "From2"
Position [25, 331, 90, 349]
ShowName off
DialogController "Simulink.DDGSource"
CloseFcn "tagdialog Close"
GotoTag "Hop_Index"
}
Block {
BlockType From
Name "From4"
Position [330, 415, 400, 435]
ShowName off
DialogController "Simulink.DDGSource"
CloseFcn "tagdialog Close"
GotoTag "Tx_Symbols"
}
Block {
BlockType From
Name "From5"
Position [330, 445, 400, 465]
ShowName off
DialogController "Simulink.DDGSource"
CloseFcn "tagdialog Close"
GotoTag "Rx_Symbols"
}
Block {
BlockType From
Name "From6"
Position [25, 305, 80, 325]
ShowName off
DialogController "Simulink.DDGSource"
CloseFcn "tagdialog Close"
GotoTag "Channel"
}
Block {
BlockType Goto
Name "Goto1"
Position [170, 96, 245, 114]
ShowName off
DialogController "Simulink.DDGSource"
GotoTag "Tx_Symbols"
TagVisibility "global"
}
Block {
BlockType Goto
Name "Goto2"
Position [590, 321, 655, 339]
ShowName off
DialogController "Simulink.DDGSource"
GotoTag "Rx_Symbols"
TagVisibility "global"
}
Block {
BlockType Goto
Name "Goto3"
Position [175, 412, 245, 428]
ShowName off
DialogController "Simulink.DDGSource"
GotoTag "Hop_Index"
TagVisibility "global"
}
Block {
BlockType Goto
Name "Goto4"
Position [705, 165, 765, 185]
ShowName off
DialogController "Simulink.DDGSource"
GotoTag "Channel"
TagVisibility "global"
}
Block {
BlockType Display
Name "Hop Frequency in MHz"
Ports [1]
Position [195, 442, 290, 468]
Decimation "1"
}
Block {
BlockType Selector
Name "Select first\n512 points"
Ports [1, 1]
Position [655, 225, 695, 265]
ShowName off
InputType "Matrix"
Elements "[1 3]"
Rows "1:512"
InputPortWidth "3"
}
Block {
BlockType Reference
Name "Shortened\nHamming (15,10)\nDecoder"
Ports [1, 1]
Position [445, 310, 505, 350]
SourceBlock "commblkcod2/Binary\nCyclic Decoder"
SourceType "Binary Cyclic Decoder"
ShowPortLabels on
n "15"
p "[1 1 0 1 0 1]"
}
Block {
BlockType Reference
Name "Shortened\nHamming (15,10)\nEncoder"
Ports [1, 1]
Position [170, 138, 250, 182]
SourceBlock "commblkcod2/Binary\nCyclic Encoder"
SourceType "Binary Cyclic Encoder"
ShowPortLabels on
n "15"
p "[1 1 0 1 0 1]"
}
Block {
BlockType Reference
Name "Spectrum Scope\n(Remove to speed up\nsimulation"
")"
Ports [1]
Position [730, 220, 765, 270]
SourceBlock "dspsnks4/Spectrum\nScope"
SourceType "Spectrum Scope"
ShowPortLabels off
ScopeProperties on
Domain "Frequency"
HorizSpan "1"
UseBuffer off
BufferSize "128"
Overlap "64"
inpFftLenInherit off
FFTlength "128"
numAvg "1"
DisplayProperties off
AxisGrid on
Memory off
FrameNumber on
AxisLegend off
AxisZoom off
OpenScopeAtSimStart on
OpenScopeImmediately off
FigPos "[43 594 769 120]"
AxisProperties off
XUnits "Hertz"
XRange "[-Fs/2...Fs/2]"
InheritXIncr off
XIncr "1e-8"
XLabel "Samples"
YUnits "dB"
YMin "-10"
YMax "27.0164360613043"
YLabel "Magnitude, dB"
LineProperties off
wintypeSpecScope "Hann"
RsSpecScope "50"
betaSpecScope "5"
winsampSpecScope "Periodic"
}
Block {
BlockType SubSystem
Name "background1"
Ports []
Position [126, 125, 558, 242]
BackgroundColor "lightBlue"
ShowName off
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskDisplay "disp('')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "background1"
Location [209, 325, 575, 532]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
}
}
Block {
BlockType SubSystem
Name "background2"
Ports []
Position [129, 282, 557, 394]
BackgroundColor "lightBlue"
ShowName off
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskDisplay "disp('')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "background2"
Location [209, 325, 575, 532]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
}
}
Line {
SrcBlock "Error Rate Calculation"
SrcPort 1
DstBlock "BER"
DstPort 1
}
Line {
SrcBlock "Binary\nData Source"
SrcPort 1
Points [25, 0; 30, 0]
Branch {
Points [0, -5]
DstBlock "Shortened\nHamming (15,10)\nEncoder"
DstPort 1
}
Branch {
DstBlock "Goto1"
DstPort 1
}
}
Line {
SrcBlock "From2"
SrcPort 1
DstBlock "Frequency hopping\nFM Demodulator"
DstPort 2
}
Line {
SrcBlock "From1"
SrcPort 1
DstBlock "Frequency hopping\nGFSK Modulator\n1600 hops pe"
"r sec"
DstPort 2
}
Line {
SrcBlock "Fcn"
SrcPort 1
DstBlock "Hop Frequency in MHz"
DstPort 1
}
Line {
SrcBlock "Select first\n512 points"
SrcPort 1
DstBlock "Spectrum Scope\n(Remove to speed up\nsimulation"
")"
DstPort 1
}
Line {
SrcBlock "Frequency hopping\nGFSK Modulator\n1600 hops pe"
"r sec"
SrcPort 1
DstBlock "Channel"
DstPort 1
}
Line {
SrcBlock "Frequency hopping\ncode, 1/1600 sec"
SrcPort 1
Points [10, 0; 20, 0]
Branch {
DstBlock "Goto3"
DstPort 1
}
Branch {
DstBlock "Fcn"
DstPort 1
}
}
Line {
SrcBlock "From4"
SrcPort 1
DstBlock "Error Rate Calculation"
DstPort 1
}
Line {
SrcBlock "From5"
SrcPort 1
DstBlock "Error Rate Calculation"
DstPort 2
}
Line {
SrcBlock "Shortened\nHamming (15,10)\nDecoder"
SrcPort 1
DstBlock "Goto2"
DstPort 1
}
Line {
SrcBlock "Shortened\nHamming (15,10)\nEncoder"
SrcPort 1
DstBlock "Assemble\nPackets\nof 625 bits\nat 1Mbps"
DstPort 1
}
Line {
SrcBlock "Dis-assemble\nPacket"
SrcPort 1
DstBlock "Shortened\nHamming (15,10)\nDecoder"
DstPort 1
}
Line {
Labels [0, 0]
SrcBlock "Frequency hopping\nFM Demodulator"
SrcPort 1
DstBlock "Dis-assemble\nPacket"
DstPort 1
}
Line {
SrcBlock "Assemble\nPackets\nof 625 bits\nat 1Mbps"
SrcPort 1
DstBlock "Frequency hopping\nGFSK Modulator\n1600 hops pe"
"r sec"
DstPort 1
}
Line {
SrcBlock "Channel"
SrcPort 1
Points [0, 0; 20, 0]
Branch {
DstBlock "Goto4"
DstPort 1
}
Branch {
DstBlock "Select first\n512 points"
DstPort 1
}
}
Line {
SrcBlock "From6"
SrcPort 1
Points [105, 0]
DstBlock "Frequency hopping\nFM Demodulator"
DstPort 1
}
Annotation {
Name "Transmitter"
Position [338, 106]
FontSize 14
FontWeight "bold"
}
Annotation {
Name "Receiver"
Position [344, 268]
FontSize 14
FontWeight "bold"
}
Annotation {
Name "\n Bluetooth Frequency Hopping \n1Mbps, 1600 ho"
"ps per sec\n"
Position [383, 47]
BackgroundColor "lightBlue"
FontName "Arial"
FontSize 14
FontWeight "bold"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -