📄 zhikuo.mdl
字号:
SampleTime "-1"
}
Block {
BlockType Scope
Floating off
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 "0"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType Sin
SineType "Time based"
TimeSource "Use simulation time"
Amplitude "1"
Bias "0"
Frequency "1"
Phase "0"
Samples "10"
Offset "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType ZeroOrderHold
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 "zhikuo"
Location [2, 70, 1022, 719]
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 [650, 29, 730, 71]
FontSize 10
SourceBlock "commchan2/AWGN\nChannel"
SourceType "AWGN Channel"
ShowPortLabels on
seed "67"
noiseMode "Signal to noise ratio (SNR)"
EbNodB "1"
EsNodB "10"
SNRdB "0"
bitsPerSym "1"
Ps "0.1"
Tsym "1"
variance "1"
}
Block {
BlockType Reference
Name "BPSK\nDemodulator\nBaseband"
Ports [1, 1]
Position [750, 26, 825, 74]
FontSize 10
SourceBlock "commdigbbndpm2/BPSK\nDemodulator\nBaseband"
SourceType "BPSK Demodulator Baseband"
ShowPortLabels on
Ph "0"
numSamp "1"
}
Block {
BlockType Reference
Name "BPSK\nModulator\nBaseband"
Ports [1, 1]
Position [555, 26, 630, 74]
FontSize 10
SourceBlock "commdigbbndpm2/BPSK\nModulator\nBaseband"
SourceType "BPSK Modulator Baseband"
ShowPortLabels on
Ph "0"
numSamp "1"
}
Block {
BlockType Reference
Name "PN Sequence\nGenerator"
Ports [0, 1]
Position [15, 138, 95, 182]
FontSize 10
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 "0.0001"
frameBased off
sampPerFrame "1"
reset off
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [405, 32, 435, 63]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [665, 207, 695, 238]
Orientation "left"
NamePlacement "alternate"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Relay
Name "Relay"
Position [125, 145, 155, 175]
}
Block {
BlockType Relay
Name "Relay1"
Position [220, 30, 250, 60]
}
Block {
BlockType Relay
Name "Relay2"
Position [475, 35, 505, 65]
}
Block {
BlockType Relay
Name "Relay3"
Position [815, 195, 845, 225]
Orientation "left"
NamePlacement "alternate"
}
Block {
BlockType Relay
Name "Relay4"
Position [535, 205, 565, 235]
Orientation "left"
NamePlacement "alternate"
}
Block {
BlockType Relay
Name "Relay5"
Position [180, 85, 210, 115]
Orientation "down"
}
Block {
BlockType Sin
Name "Sine Wave"
Ports [0, 1]
Position [15, 25, 45, 55]
SineType "Time based"
Frequency "2*pi*1000"
SampleTime "0"
}
Block {
BlockType Reference
Name "Spectrum\nScope"
Ports [1]
Position [550, 305, 585, 355]
FontSize 10
SourceBlock "dspsnks4/Spectrum\nScope"
SourceType "Spectrum Scope"
ShowPortLabels off
ScopeProperties on
Domain "Frequency"
HorizSpan "1"
UseBuffer on
BufferSize "1024"
Overlap "512"
inpFftLenInherit on
FFTlength "1024"
numAvg "2"
DisplayProperties off
AxisGrid on
Memory off
FrameNumber on
AxisLegend off
AxisZoom off
OpenScopeAtSimStart on
OpenScopeImmediately off
FigPos "get(0,'defaultfigureposition')"
AxisProperties off
XUnits "Hertz"
XRange "[-Fs/2...Fs/2]"
InheritXIncr off
XIncr "0.00005"
XLabel "Samples"
YUnits "dB"
YMin "-50"
YMax "20"
YLabel "Magnitude-squared, dB"
LineProperties off
wintypeSpecScope "Boxcar"
RsSpecScope "50"
betaSpecScope "5"
winsampSpecScope "Periodic"
}
Block {
BlockType Reference
Name "Spectrum\nScope1"
Ports [1]
Position [185, 285, 220, 335]
FontSize 10
SourceBlock "dspsnks4/Spectrum\nScope"
SourceType "Spectrum Scope"
ShowPortLabels off
ScopeProperties on
Domain "Frequency"
HorizSpan "1"
UseBuffer on
BufferSize "1024"
Overlap "512"
inpFftLenInherit on
FFTlength "1024"
numAvg "2"
DisplayProperties off
AxisGrid on
Memory off
FrameNumber on
AxisLegend off
AxisZoom off
OpenScopeAtSimStart on
OpenScopeImmediately off
FigPos "get(0,'defaultfigureposition')"
AxisProperties off
XUnits "Hertz"
XRange "[0...Fs/2]"
InheritXIncr off
XIncr "0.00025"
XLabel "Samples"
YUnits "dB"
YMin "-50"
YMax "20"
YLabel "Magnitude-squared, dB"
LineProperties off
wintypeSpecScope "Boxcar"
RsSpecScope "50"
betaSpecScope "5"
winsampSpecScope "Periodic"
}
Block {
BlockType Scope
Name "Time\nScope"
Ports [1]
Position [275, 241, 310, 289]
FontSize 10
Location [188, 365, 512, 604]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
DataFormat "Structure"
}
Block {
BlockType Scope
Name "Time\nScope1"
Ports [2]
Position [435, 213, 470, 262]
Orientation "left"
NamePlacement "alternate"
FontSize 10
Location [1, 45, 1025, 739]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
YMin "-2~-2"
YMax "2~2"
SaveName "ScopeData1"
DataFormat "Structure"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [205, 145, 240, 175]
SampleTime "0.000025"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold1"
Position [120, 25, 155, 55]
SampleTime "0.000125"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold2"
Position [480, 310, 515, 340]
SampleTime "0.000025"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold3"
Position [85, 90, 120, 120]
SampleTime "0.00025"
}
Line {
SrcBlock "PN Sequence\nGenerator"
SrcPort 1
DstBlock "Relay"
DstPort 1
}
Line {
SrcBlock "Relay"
SrcPort 1
DstBlock "Zero-Order\nHold"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold"
SrcPort 1
Points [10, 0]
Branch {
Points [0, 105]
DstBlock "Time\nScope"
DstPort 1
}
Branch {
Points [135, 0]
Branch {
DstBlock "Product"
DstPort 2
}
Branch {
Points [320, 0]
DstBlock "Product1"
DstPort 1
}
}
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "Zero-Order\nHold1"
DstPort 1
}
Branch {
Points [0, 65]
DstBlock "Zero-Order\nHold3"
DstPort 1
}
}
Line {
SrcBlock "Zero-Order\nHold1"
SrcPort 1
Points [20, 0; 0, 5; 15, 0]
Branch {
DstBlock "Relay1"
DstPort 1
}
Branch {
DstBlock "Relay5"
DstPort 1
}
}
Line {
SrcBlock "Relay1"
SrcPort 1
Points [65, 0; 0, -5]
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Relay2"
DstPort 1
}
Branch {
Points [0, 275]
DstBlock "Zero-Order\nHold2"
DstPort 1
}
}
Line {
SrcBlock "Relay2"
SrcPort 1
DstBlock "BPSK\nModulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "BPSK\nModulator\nBaseband"
SrcPort 1
DstBlock "AWGN\nChannel"
DstPort 1
}
Line {
SrcBlock "AWGN\nChannel"
SrcPort 1
DstBlock "BPSK\nDemodulator\nBaseband"
DstPort 1
}
Line {
SrcBlock "BPSK\nDemodulator\nBaseband"
SrcPort 1
Points [0, 125; 30, 0]
DstBlock "Relay3"
DstPort 1
}
Line {
SrcBlock "Relay3"
SrcPort 1
Points [-50, 0; 0, 20]
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "Product1"
SrcPort 1
Points [-40, 0; 0, -5]
DstBlock "Relay4"
DstPort 1
}
Line {
SrcBlock "Relay4"
SrcPort 1
Points [-20, 0; 0, 30]
DstBlock "Time\nScope1"
DstPort 2
}
Line {
SrcBlock "Zero-Order\nHold2"
SrcPort 1
Points [5, 0; 0, 5]
DstBlock "Spectrum\nScope"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold3"
SrcPort 1
Points [45, 0]
DstBlock "Spectrum\nScope1"
DstPort 1
}
Line {
SrcBlock "Relay5"
SrcPort 1
Points [0, 105]
DstBlock "Time\nScope1"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -