📄 bluetooth.mdl
字号:
Block {
BlockType Ground
}
Block {
BlockType Inport
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
Interpolate on
}
Block {
BlockType Math
Operator "exp"
OutputSignalType "auto"
SampleTime "-1"
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType "M-S-Function"
MFile "mlfile"
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
BusObject "BusObject"
NonVirtualBus off
}
Block {
BlockType Outport
Port "1"
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 Selector
InputType "Vector"
IndexMode "One-based"
ElementSrc "Internal"
Elements "1"
RowSrc "Internal"
Rows "1"
ColumnSrc "Internal"
Columns "1"
InputPortWidth "-1"
IndexIsStartValue off
OutputPortSize "1"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
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"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "bluetooth"
Location [51, 96, 882, 634]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 150
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "Assemble\nPackets\nof 625 bits\nat 1Mbps"
Ports [1, 1]
Position [290, 134, 320, 186]
SourceBlock "dspbuff3/Buffer"
SourceType "Buffer"
N "625"
V "0"
ic "0"
}
Block {
BlockType Display
Name "BER"
Ports [1]
Position [590, 410, 675, 470]
Decimation "1"
}
Block {
BlockType Reference
Name "Binary\nData Source"
Ports [0, 1]
Position [25, 135, 95, 185]
SourceBlock "commrandsrc2/Bernoulli Binary\nGenerator"
SourceType "Bernoulli Binary Generator"
ShowPortLabels on
P "[.5]"
seed "[12345]"
Ts "1.5e-6"
frameBased on
sampPerFrame "10"
orient off
}
Block {
BlockType Reference
Name "Channel"
Ports [1, 1]
Position [565, 151, 615, 199]
SourceBlock "commchan2/AWGN\nChannel"
SourceType "AWGN Channel"
ShowPortLabels on
seed "1"
noiseMode "Signal to noise ratio (Es/No)"
EbNodB "10"
EsNodB "20"
SNRdB "10"
bitsPerSym "1"
Ps "1"
Tsym "1e-6"
variance ".1"
}
Block {
BlockType SubSystem
Name "Dis-assemble\nPacket"
Ports [1, 1]
Position [340, 307, 380, 353]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Dis-assemble\nPacket"
Location [338, 454, 810, 616]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name " "
Position [25, 43, 55, 57]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Reference
Name "Buffer"
Ports [1, 1]
Position [125, 25, 175, 75]
SourceBlock "dspbuff3/Buffer"
SourceType "Buffer"
N "15"
V "0"
ic "0"
}
Block {
BlockType Reference
Name "Delay"
Ports [1, 1]
Position [220, 30, 275, 70]
SourceBlock "dspsigops/Delay"
SourceType "Delay"
dly_unit "Samples"
delay "5 % Was 10 in orignal version"
ic_detail off
dif_ic_for_ch off
dif_ic_for_dly off
ic "0"
reset_popup "None"
}
Block {
BlockType Outport
Name " "
Position [355, 43, 385, 57]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Buffer"
SrcPort 1
DstBlock "Delay"
DstPort 1
}
Line {
SrcBlock "Delay"
SrcPort 1
DstBlock " "
DstPort 1
}
Line {
SrcBlock " "
SrcPort 1
DstBlock "Buffer"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Error Rate Calculation"
Ports [2, 1]
Position [490, 408, 550, 472]
ShowName off
SourceBlock "commsink2/Error Rate\nCalculation"
SourceType "Error Rate Calculation"
N "430 % Was 850 in original version"
st_delay "0"
cp_mode "Entire frame"
subframe "[]"
PMode "Port"
WsName "ErrorVec"
RsMode2 off
stop off
numErr "100"
maxBits "1e6"
}
Block {
BlockType Fcn
Name "Fcn"
Position [150, 440, 180, 470]
ShowName off
Expr "u-39"
}
Block {
BlockType SubSystem
Name "Frequency hopping\nFM Demodulator"
Ports [2, 1]
Position [210, 302, 285, 353]
AncestorBlock "commdigpbndpm2/M-PSK\nDemodulator\nPassband"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskType "FH-CPM demod"
MaskDisplay "plot(0,0,100,100,[5+1.5*[[0:.8:10] [10:1.6:20] "
"[20:.8:30]] 50 50 50 50+15*[0 1 1 2 2 3]],[85+10*[sin([0:.8:10]*pi*2/5) sin(["
"10:1.6:20]*pi/5) sin([20:.8:30]*pi*2/5)] 85 99 75 85+8*[1 1 -1 -1 1 1]]);\ndi"
"sp('FH-FM\\n Demodulator')"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Frequency hopping\nFM Demodulator"
Location [73, 197, 693, 472]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 204
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [35, 65, 55, 85]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "In2"
Position [35, 145, 55, 165]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType FrameConversion
Name "Frame Conversion"
Position [90, 139, 125, 171]
ShowName off
OutFrame "Frame based"
}
Block {
BlockType Reference
Name "Generate\n79 possible carriers\n-39MHz to 3"
"9MHz\n"
Ports [1, 1]
Position [150, 130, 225, 180]
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 Reference
Name "M-FSK\nDemodulator\nBaseband"
Ports [1, 1]
Position [395, 60, 475, 110]
SourceBlock "commdigbbndfm2/M-FSK\nDemodulator\nBaseband"
SourceType "M-FSK Demodulator Baseband"
M "2"
OutType "Bit"
Dec "Binary"
freqSep "10"
numSamp "100"
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [1, 1]
Position [245, 140, 275, 170]
ShowName off
Operator "conj"
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [315, 68, 345, 97]
ShowName off
}
Block {
BlockType Outport
Name "Out"
Position [550, 75, 570, 95]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "M-FSK\nDemodulator\nBaseband"
SrcPort 1
DstBlock "Out"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [210, 0]
DstBlock "Product1"
DstPort 1
}
Line {
SrcBlock "Product1"
SrcPort 1
DstBlock "M-FSK\nDemodulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
DstBlock "Frame Conversion"
DstPort 1
}
Line {
SrcBlock "Math\nFunction"
SrcPort 1
Points [20, 0]
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "Generate\n79 possible carriers\n-39MHz to 3"
"9MHz\n"
SrcPort 1
DstBlock "Math\nFunction"
DstPort 1
}
Line {
SrcBlock "Frame Conversion"
SrcPort 1
DstBlock "Generate\n79 possible carriers\n-39MHz to 3"
"9MHz\n"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Frequency hopping\nGFSK Modulator\n1600 hops pe"
"r sec"
Ports [2, 1]
Position [435, 147, 510, 198]
AncestorBlock "commdigpbndpm2/M-PSK\nModulator\nPassband"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskType "FH-CPM"
MaskDisplay "plot(0,0,100,100,[5+15*[0 1 1 2 2 3] 50 50 50 5"
"0+1.5*[[0:.8:10] [10:1.6:20] [20:.8:30]]],[85+8*[1 1 -1 -1 1 1] 85 99 75 85+1"
"0*[sin([0:.8:10]*pi*2/5) sin([10:1.6:20]*pi/5) sin([20:.8:30]*pi*2/5)]]);\ndi"
"sp('FH-CPM\\nModulator')"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Frequency hopping\nGFSK Modulator\n1600 hops "
"per sec"
Location [124, 188, 659, 475]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 253
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [75, 65, 95, 85]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -