📄 bpsnrzmf.mdl
字号:
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
Interpolate on
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
UseBusObject off
BusObject "BusObject"
NonVirtualBus off
}
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 RandomNumber
Mean "0"
Variance "1"
Seed "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross on
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 StateSpace
A "1"
B "1"
C "1"
D "1"
X0 "0"
AbsoluteTolerance "auto"
Realization "auto"
}
Block {
BlockType Step
Time "1"
Before "0"
After "1"
SampleTime "-1"
VectorParams1D on
ZeroCross on
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
TreatAsAtomicUnit off
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
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"
}
Block {
BlockType Switch
Criteria "u2 >= Threshold"
Threshold "0"
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross 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 "bpsnrzmf"
Location [6, 253, 1034, 530]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.196850, 0.196850, 0.196850, 0.196850]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "Channel"
Ports [1, 1]
Position [500, 108, 580, 152]
ShowPortLabels off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "AWGN channel, fixed parameter"
MaskDescription "Additive white Gaussian noise channel\nwith fix"
"ed mean and variance."
MaskHelp "This block adds white Gaussian noise to the inp"
"ut signal. The mean and the variance can be a scalar or vector with the same "
"length as the input signal."
MaskPromptString "Mean value:|Variance (std^2):|Initial Seed:"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskVariables "m=@1;variance=@2;s=@3;"
MaskInitialization "[m,variance,s]=gwnoise(m,variance,s);\n"
MaskDisplay "plot(0,0,100,100);\ndisp('AWGN')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0|0.00010|12345"
MaskTabNameString ",,"
System {
Name "Channel"
Location [43, 129, 305, 275]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [45, 10, 65, 30]
IconDisplay "Port number"
}
Block {
BlockType SubSystem
Name "Gaussian noise\ngenerator"
Ports [0, 1]
Position [25, 48, 105, 92]
ShowPortLabels off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "Gaussian noise generator"
MaskDescription "Generate Gaussian distributed noise with\ng"
"iven mean and variance value."
MaskHelp "When the mean value and seed are vectors, t"
"he output of this block is a vector. The length of the vector is the same as "
"the length of the mean value vector or the length of the seed. When the varia"
"nce entry is a vector, the variance is a diagonal matrix."
MaskPromptString "Mean value:|Variance (vector or matrix):|In"
"itial seed:"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskVariables "m=@1;variance=@2;s=@3;"
MaskInitialization "[m,variance,s]=gwnoise(m,variance,s);[x,y]="
"srcsicon(3);"
MaskDisplay "plot(0,0,100,100,x,y);disp('Gaussian')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "m|variance|s"
MaskTabNameString ",,"
System {
Name "Gaussian noise\ngenerator"
Location [22, 119, 370, 243]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Constant
Name "Constant"
Position [140, 20, 160, 40]
Value "m"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType StateSpace
Name "Matrix\nGain"
Position [140, 61, 165, 89]
A "[]"
B "[]"
C "[]"
D "K"
MaskType "Matrix Gain"
MaskDescription "Matrix Gain."
MaskHelp "Multiplies input vector by entered matr"
"ix to produce output vector (y=Au)."
MaskPromptString "Gain matrix:"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskInitialization "K = @1;"
MaskDisplay "disp('K')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "variance"
}
Block {
BlockType RandomNumber
Name "Random\nNumber"
Position [35, 57, 80, 93]
Seed "s"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [220, 60, 240, 80]
}
Block {
BlockType Outport
Name "out_1"
Position [285, 60, 305, 80]
IconDisplay "Port number"
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [25, 0; 0, 35]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "Matrix\nGain"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Random\nNumber"
SrcPort 1
DstBlock "Matrix\nGain"
DstPort 1
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [150, 55, 170, 75]
}
Block {
BlockType Outport
Name "out_1"
Position [200, 55, 220, 75]
IconDisplay "Port number"
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
Points [45, 0; 0, 40]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Gaussian noise\ngenerator"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
}
}
Block {
BlockType Clock
Name "Clock"
Position [235, 150, 255, 170]
ShowName off
Decimation "10"
}
Block {
BlockType Clock
Name "Clock1"
Position [485, 25, 505, 45]
ShowName off
Decimation "10"
}
Block {
BlockType SubSystem
Name "Error rate"
Ports [2]
Position [890, 230, 970, 270]
Orientation "down"
CopyFcn "sbiterr([],[],[],'CopyBlock')"
DeleteFcn "sbiterr([],[],[],'DeleteBlock')"
LoadFcn "sbiterr([],[],[],'LoadBlock')"
StartFcn "sbiterr([],[],[],'Start')"
StopFcn "sbiterr([],[],[],'Stop')"
NameChangeFcn "sbiterr([],[],[],'NameChange')"
ShowPortLabels off
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -