📄 dsss_bpsk.mdl
字号:
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Scrambler"
DstPort 2
}
}
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [265, 117, 295, 148]
BackgroundColor "magenta"
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [505, 127, 535, 158]
BackgroundColor "magenta"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [795, 152, 825, 183]
ShowName off
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [265, 173, 295, 217]
Location [367, 53, 685, 415]
Open off
NumInputPorts "1"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "5"
YMin "-1"
YMax "1"
DataFormat "StructureWithTime"
SampleTime "0.1"
}
Block {
BlockType Scope
Name "Scope1"
Ports [5]
Position [890, 18, 920, 62]
Location [441, 132, 759, 546]
Open on
NumInputPorts "5"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "Source signal"
axes2 "BPSK mod output"
axes3 "Spread spectrum output"
axes4 "Spread spectrum demod output"
axes5 "Sink signal"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
axes3 ""
axes4 ""
axes5 ""
}
TimeRange "20"
YMin "0~-1.5~-1.5~-3~0"
YMax "1~1.5~1.5~4~1"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0.1"
}
Block {
BlockType SubSystem
Name "Signal source and\nsynchronization pulse"
Ports [0, 3]
Position [20, 106, 120, 214]
ForegroundColor "blue"
TreatAsAtomicUnit off
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Signal source and\nsynchronization pulse"
Location [58, 309, 800, 517]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 282
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Demux
Name "Demux"
Ports [1, 2]
Position [115, 77, 150, 113]
ForegroundColor "blue"
ShowName off
Outputs "2"
}
Block {
BlockType SubSystem
Name "Pulses divide\nsample time1"
Ports [0, 1]
Position [15, 73, 95, 117]
TreatAsAtomicUnit off
MaskType "Pulse generator"
MaskDescription "Vector pulses with sample rate of each puls"
"e as \nSample_time / Divider."
MaskHelp "This block generates a vector pulse. The ou"
"tput length is the same as the divider vector length. The ith element of the "
"output has the sample time Sample_time/Divider(i). All elements in divider mu"
"st be integers."
MaskPromptString "Sample time (scalar, sec):|Divider (integer"
" vector):|Offset (same length as Divider):"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskVariables "samp_time=@1;out_divid=@2;offset=@3;"
MaskInitialization "[x,y]=srcsicon(2);\n"
MaskDisplay "plot(0,0,100,100,x,y);disp('Pulse')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "1|[1 10]|[0 0]"
System {
Name "Pulses divide\nsample time1"
Location [364, 107, 592, 201]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType "S-Function"
Name "S-function1"
Ports [0, 1]
Position [60, 31, 125, 59]
ShowName off
FunctionName "homopuls"
Parameters "samp_time, out_divid, offset"
}
Block {
BlockType Outport
Name "Outport"
Position [160, 35, 180, 55]
ShowName off
InitialOutput "0"
}
Line {
SrcBlock "S-function1"
SrcPort 1
DstBlock "Outport"
DstPort 1
}
}
}
Block {
BlockType Scope
Name "Scope"
Ports [3]
Position [450, 43, 480, 87]
Location [6, 66, 324, 428]
Open off
NumInputPorts "3"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
axes3 ""
}
TimeRange "10"
YMin "0~0~0"
YMax "1~1~1"
DataFormat "StructureWithTime"
}
Block {
BlockType Reference
Name "Triggered Signal\nFrom Workspace"
Ports [1, 1]
Position [195, 11, 295, 49]
SourceBlock "dspsrcs2/Triggered Signal\nFrom Workspace"
SourceType "Triggered Signal From Workspace"
X "randint(100,1)"
trigtype "Rising edge"
cyclic on
ic "0 "
nsamps "1"
}
Block {
BlockType Outport
Name "Source signal"
Position [350, 23, 380, 37]
InitialOutput "0"
}
Block {
BlockType Outport
Name "Spread spectrum\npulse"
Position [345, 148, 375, 162]
Port "2"
InitialOutput "0"
}
Block {
BlockType Outport
Name "Symbol interval\npulse"
Position [345, 90, 375, 110]
Port "3"
InitialOutput "0"
}
Line {
SrcBlock "Pulses divide\nsample time1"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [20, 0]
Branch {
Points [0, -55]
DstBlock "Triggered Signal\nFrom Workspace"
DstPort 1
}
Branch {
Points [150, 0]
Branch {
Points [0, 15]
DstBlock "Symbol interval\npulse"
DstPort 1
}
Branch {
Points [0, -5]
DstBlock "Scope"
DstPort 3
}
}
}
Line {
SrcBlock "Triggered Signal\nFrom Workspace"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Source signal"
DstPort 1
}
Branch {
Points [0, 20]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [20, 0; 0, 50; 120, 0]
Branch {
DstBlock "Spread spectrum\npulse"
DstPort 1
}
Branch {
Points [0, -90]
DstBlock "Scope"
DstPort 2
}
}
}
}
Block {
BlockType SubSystem
Name "filter in receiver"
Ports []
Position [692, 120, 834, 236]
Orientation "left"
ForegroundColor "gray"
BackgroundColor "gray"
TreatAsAtomicUnit off
MaskDisplay "disp(' ')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "filter in receiver"
Location [360, 145, 485, 217]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
}
}
Line {
SrcBlock "Signal source and\nsynchronization pulse"
SrcPort 2
Points [15, 0; 0, 35]
Branch {
Points [0, 115; 225, 0]
Branch {
Points [0, -60]
DstBlock "PN signal1"
DstPort 1
}
Branch {
Points [300, 0; 0, -150]
DstBlock "Counter1"
DstPort 2
}
}
Branch {
DstBlock "PN signal"
DstPort 1
}
}
Line {
SrcBlock "Counter1"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [40, 0]
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "Signal source and\nsynchronization pulse"
SrcPort 3
Points [0, 130; 555, 0]
DstBlock "Counter1"
DstPort 3
}
Line {
SrcBlock "AWGN\nchannel"
SrcPort 1
DstBlock "Product1"
DstPort 1
}
Line {
SrcBlock "Signal source and\nsynchronization pulse"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "BPSK mod"
DstPort 1
}
Branch {
Points [0, -40]
Branch {
Points [725, 0]
DstBlock "Error rate"
DstPort 1
}
Branch {
Points [0, -65]
DstBlock "Scope1"
DstPort 1
}
}
}
Line {
SrcBlock "BPSK mod"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "Product"
DstPort 1
}
Branch {
Points [-20, 0; 0, -95]
DstBlock "Scope1"
DstPort 2
}
}
Line {
SrcBlock "Product1"
SrcPort 1
Points [15, 0]
Branch {
Points [0, -95]
DstBlock "Scope1"
DstPort 4
}
Branch {
DstBlock "BPSK demod"
DstPort 1
}
}
Line {
SrcBlock "BPSK demod"
SrcPort 1
DstBlock "Counter1"
DstPort 1
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
DstBlock "Error rate"
DstPort 2
}
Branch {
Points [0, -110]
DstBlock "Scope1"
DstPort 5
}
}
Line {
SrcBlock "PN signal1"
SrcPort 1
Points [15, 0]
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "PN signal"
SrcPort 1
Points [10, 0]
Branch {
Points [-5, 0]
DstBlock "Product"
DstPort 2
}
Branch {
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "Product"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "AWGN\nchannel"
DstPort 1
}
Branch {
Points [0, -95]
DstBlock "Scope1"
DstPort 3
}
}
Annotation {
Position [697, 159]
}
Annotation {
Position [172, 389]
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -