📄 ds_spread spectrum.mdl
字号:
}
Block {
BlockType Inport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
Interpolate on
}
Block {
BlockType Outport
Port "1"
UseBusObject off
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 Rounding
Operator "floor"
SampleTime "-1"
}
Block {
BlockType Scope
ModelBased off
TickLabels "OneTimeTick"
ZoomMode "on"
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "-1"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType Signum
ZeroCross on
SampleTime "-1"
}
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 "arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "arial"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "zhikuoxitong"
Location [120, 214, 837, 609]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "AWGN\nChannel"
Ports [1, 1]
Position [636, 150, 694, 245]
Orientation "down"
NamePlacement "alternate"
FontSize 10
SourceBlock "commchan3/AWGN\nChannel"
SourceType "AWGN Channel"
ShowPortLabels on
seed "67"
noiseMode "Signal to noise ratio (SNR)"
EbNodB "10"
EsNodB "10"
SNRdB "10"
bitsPerSym "1"
Ps "1"
Tsym "1"
variance "1"
}
Block {
BlockType Reference
Name "BPSK\nDemodulator\nBaseband1"
Ports [1, 1]
Position [550, 266, 625, 314]
Orientation "left"
FontSize 10
SourceBlock "commdigbbndpm3/BPSK\nDemodulator\nBaseband"
SourceType "BPSK Demodulator Baseband"
ShowPortLabels on
Ph "0"
outDtype "double"
}
Block {
BlockType Reference
Name "BPSK\nModulator\nBaseband1"
Ports [1, 1]
Position [545, 61, 620, 109]
FontSize 10
SourceBlock "commdigbbndpm3/BPSK\nModulator\nBaseband"
SourceType "BPSK Modulator Baseband"
ShowPortLabels on
Ph "0"
outDtype "double"
}
Block {
BlockType Reference
Name "Bipolar to\nUnipolar\nConverter"
Ports [1, 1]
Position [430, 63, 510, 107]
SourceBlock "commutil2/Bipolar to\nUnipolar\nConverter"
SourceType "Bipolar to Unipolar Converter"
ShowPortLabels on
M "2"
polarity "Positive"
}
Block {
BlockType Reference
Name "Bipolar to\nUnipolar\nConverter1"
Ports [1, 1]
Position [120, 263, 200, 307]
Orientation "left"
NamePlacement "alternate"
SourceBlock "commutil2/Bipolar to\nUnipolar\nConverter"
SourceType "Bipolar to Unipolar Converter"
ShowPortLabels on
M "2"
polarity "Positive"
}
Block {
BlockType Reference
Name "Integrate\nand Dump"
Ports [1, 1]
Position [275, 263, 355, 307]
Orientation "left"
NamePlacement "alternate"
SourceBlock "commfilt2/Integrate\nand Dump"
SourceType "Integrate and dump"
obssamples "2"
offsetsamples "0"
nodump on
}
Block {
BlockType Reference
Name "PN Sequence\nGenerator"
Ports [0, 1]
Position [140, 148, 220, 192]
SourceBlock "commseqgen2/PN Sequence\nGenerator"
SourceType "PN Sequence Generator"
poly "[1 0 0 0 0 1 1]"
ini_sta "[0 0 0 0 0 1]"
shift "0"
Ts "1/80"
frameBased off
sampPerFrame "1"
reset off
outDataType "double"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [370, 67, 400, 98]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [370, 267, 400, 298]
Orientation "left"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "Random Integer\nGenerator"
Ports [0, 1]
Position [20, 53, 100, 97]
SourceBlock "commrandsrc2/Random Integer\nGenerator"
SourceType "Random Integer Generator"
ShowPortLabels on
mul "2"
seed "67"
Ts "1"
frameBased off
sampPerFrame "1"
orient off
outDataType "double"
}
Block {
BlockType Scope
Name "Scope"
Ports [2]
Position [25, 211, 55, 244]
Orientation "left"
Floating off
Location [61, 276, 851, 536]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
YMin "-5~-5"
YMax "5~5"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [2]
Position [485, 16, 515, 49]
Floating off
Location [-10, 338, 923, 656]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
YMin "-5~-5"
YMax "5~5"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Signum
Name "Sign"
Position [225, 270, 255, 300]
Orientation "left"
}
Block {
BlockType Reference
Name "Unipolar to\nBipolar\nConverter"
Ports [1, 1]
Position [190, 53, 270, 97]
SourceBlock "commutil2/Unipolar to\nBipolar\nConverter"
SourceType "Unipolar to Bipolar Converter"
ShowPortLabels on
M "2"
polarity "Positive"
}
Block {
BlockType Reference
Name "Unipolar to\nBipolar\nConverter1"
Ports [1, 1]
Position [435, 268, 515, 312]
Orientation "left"
SourceBlock "commutil2/Unipolar to\nBipolar\nConverter"
SourceType "Unipolar to Bipolar Converter"
ShowPortLabels on
M "2"
polarity "Positive"
}
Block {
BlockType Reference
Name "Unipolar to\nBipolar\nConverter2"
Ports [1, 1]
Position [245, 148, 325, 192]
SourceBlock "commutil2/Unipolar to\nBipolar\nConverter"
SourceType "Unipolar to Bipolar Converter"
ShowPortLabels on
M "2"
polarity "Positive"
}
Line {
SrcBlock "Random Integer\nGenerator"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Unipolar to\nBipolar\nConverter"
DstPort 1
}
Branch {
Points [0, 145]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "Unipolar to\nBipolar\nConverter"
SrcPort 1
Points [55, 0]
Branch {
DstBlock "Product"
DstPort 1
}
Branch {
Points [0, -50]
DstBlock "Scope1"
DstPort 1
}
}
Line {
SrcBlock "Product"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Bipolar to\nUnipolar\nConverter"
DstPort 1
}
Branch {
Points [0, -45]
DstBlock "Scope1"
DstPort 2
}
}
Line {
SrcBlock "Bipolar to\nUnipolar\nConverter"
SrcPort 1
DstBlock "BPSK\nModulator\nBaseband1"
DstPort 1
}
Line {
SrcBlock "BPSK\nModulator\nBaseband1"
SrcPort 1
Points [40, 0]
DstBlock "AWGN\nChannel"
DstPort 1
}
Line {
SrcBlock "BPSK\nDemodulator\nBaseband1"
SrcPort 1
DstBlock "Unipolar to\nBipolar\nConverter1"
DstPort 1
}
Line {
SrcBlock "Unipolar to\nBipolar\nConverter1"
SrcPort 1
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "Integrate\nand Dump"
SrcPort 1
DstBlock "Sign"
DstPort 1
}
Line {
SrcBlock "Bipolar to\nUnipolar\nConverter1"
SrcPort 1
Points [-15, 0; 0, -50]
DstBlock "Scope"
DstPort 2
}
Line {
SrcBlock "PN Sequence\nGenerator"
SrcPort 1
DstBlock "Unipolar to\nBipolar\nConverter2"
DstPort 1
}
Line {
SrcBlock "Unipolar to\nBipolar\nConverter2"
SrcPort 1
Points [20, 0]
Branch {
Points [0, -80]
DstBlock "Product"
DstPort 2
}
Branch {
Points [75, 0; 0, 105]
DstBlock "Product1"
DstPort 1
}
}
Line {
SrcBlock "Product1"
SrcPort 1
DstBlock "Integrate\nand Dump"
DstPort 1
}
Line {
SrcBlock "Sign"
SrcPort 1
DstBlock "Bipolar to\nUnipolar\nConverter1"
DstPort 1
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
Points [0, 40]
DstBlock "BPSK\nDemodulator\nBaseband1"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -