www.pudn.com > wcdma_simulink.rar > koe_channel_awgn.mdl
Model {
Name "koe_channel_awgn"
Version 3.00
SimParamPage "Solver"
SampleTimeColors off
InvariantConstants off
WideVectorLines off
ShowLineWidths off
ShowPortDataTypes off
StartTime "0.0"
StopTime "1"
SolverMode "Auto"
Solver "ode45"
RelTol "1e-3"
AbsTol "auto"
Refine "1"
MaxStep "auto"
InitialStep "auto"
FixedStep "auto"
MaxOrder 5
OutputOption "RefineOutputTimes"
OutputTimes "[]"
LoadExternalInput off
ExternalInput "[t, u]"
SaveTime on
TimeSaveName "tout"
SaveState off
StateSaveName "xout"
SaveOutput on
OutputSaveName "yout"
LoadInitialState off
InitialState "xInitial"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Matrix"
LimitMaxRows off
MaxRows "1000"
Decimation "1"
AlgebraicLoopMsg "warning"
MinStepSizeMsg "warning"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
InheritedTsInSrcMsg "warning"
IntegerOverflowMsg "warning"
UnnecessaryDatatypeConvMsg "none"
Int32ToFloatConvMsg "warning"
SignalLabelMismatchMsg "none"
ConsistencyChecking "off"
ZeroCross on
SimulationMode "normal"
BlockDataTips on
BlockParametersDataTip on
BlockAttributesDataTip off
BlockPortWidthsDataTip off
BlockDescriptionStringDataTip off
BlockMaskParametersDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
OptimizeBlockIOStorage on
BufferReuse on
BooleanDataType off
RTWSystemTargetFile "grt.tlc"
RTWInlineParameters off
RTWRetainRTWFile off
RTWTemplateMakefile "grt_default_tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "oneshot"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
ExtModeTrigHoldOff 0
ExtModeTrigDelay 0
ExtModeTrigDirection "rising"
ExtModeTrigLevel 0
ExtModeArchiveMode "off"
ExtModeAutoIncOneShot off
ExtModeIncDirWhenArm off
ExtModeAddSuffixToVar off
ExtModeWriteAllDataToWs off
ExtModeArmWhenConnect off
PreLoadFcn "N=10;HR=[0.8 0.2];HD=[0 1];"
Created "Tue Jun 1 13:20:01 1999"
Creator "maarit"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%"
LastModifiedBy "maarit"
ModifiedDateFormat "%"
LastModifiedDate "Mon Jun 21 12:00:56 1999"
ModelVersionFormat "1.%"
ConfigurationManager "none"
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
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 "koe_channel_awgn"
Location [443, 92, 1254, 919]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "AWGN\nchannel"
Ports [1, 1, 0, 0, 0]
Position [420, 18, 500, 62]
ShowPortLabels on
MaskType "AWGN Channel"
MaskDescription "Add zero-mean white Gaussian noise to the input"
" signal. The input and output signals can be real or complex. \n\nWhen usin"
"g either of the variance modes with complex inputs, be sure to specify the va"
"riance of the complex noise signal, that is, the sum of the variances of its "
"real and imaginary components. "
MaskHelp "You can use the AWGN Channel block with eith"
"er real or complex\ninput signals. When the input signal is real, this block"
"\ngenerates real Gaussian noise and produces a real output signal.\nWhen the "
"input signal is complex, this block generates complex\nGaussian noise and pro"
"duces a complex output signal.
\n\nYou can specify the variance of the "
"noise generated by the\nAWGN Channel block using one of three modes:
\n\n<"
"blockquote>\n \n - Signal to noise ratio
\n "
" - Variance from mask
\n - Variance from port\n
\n\n\nIn the Signal to noise ratio mode, "
"the variance is\ncalculated from the following quantities you specify in the"
"\nparameter mask:
\n\n\n \n - E"
"s/N0, the\n ratio of energy per symbol"
" to noise power spectral\n density
\n - The input sig"
"nal power
\n - The symbol period
\n
\n
"
"\n\nIn the Variance from mask mode, you directly specify a\nvalue f"
"or the variance in the parameter mask.
\n\nIn the Variance from por"
"t mode, you provide the\nvariance as an input to the block.
\n\n"
"Note: When you apply complex input signals to the AWGN\nChannel block, it"
" adds complex zero-mean Gaussian noise with the\ncalculated or specified vari"
"ance. The variance assigned to each\nof the quadrature components of the comp"
"lex noise is one-half of\nthe calculated or specified value.
"
MaskPromptString "Seed:|Mode:|Es/No (dB):|Input signal power (Wat"
"ts):|Symbol period (sec):|Variance:"
MaskStyleString "edit,popup(Signal to noise ratio|Variance from "
"mask|Variance from port),edit,edit,edit,edit"
MaskTunableValueString "off,off,on,on,off,on"
MaskCallbackString "|commblkawgnchan(gcb,'Mode');||||"
MaskEnableString "on,on,on,on,on,off"
MaskVisibilityString "on,on,on,on,on,off"
MaskVariables "seed=@1;noiseMode=@2;EsNodB=@3;Ps=@4;Tsym=@5;va"
"riance=@6;"
MaskInitialization "[SeedVec, mode,s] = commblkawgnchan(gcb,'init',"
"{seed});\n"
MaskDisplay "plot(-10,-10,110,110,[05 15 10 10 05 10 18 14 1"
"3 7.5 13 41 44 47 50 53 57 59 100-[13 7.5 13 14 18 10 5 10 10 15 5]],[70 70 7"
"0 85 92 85 79 82 90 88.5 90 90 87 93 87 93 87 90 90 88.5 90 82 79 85 92 85 70"
" 70 70]);\ndisp('AWGN');\nport_label('input',s.i1,s.i1s);\nport_label('input'"
",s.i2,s.i2s);\nport_label('output',s.o1,s.o1s);"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "123456|Signal to noise ratio|10|1|1/16|1"
System {
Name "AWGN\nchannel"
Location [346, 208, 631, 428]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Inport
Name "In"
Position [40, 38, 70, 52]
Port "1"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType "S-Function"
Name "Dynamic AWGN"
Ports [3, 1, 0, 0, 0]
Position [105, 19, 185, 181]
FunctionName "scomawgnchan"
Parameters "mode,EsNodB,Ps,Tsym,variance"
PortCounts "[]"
SFunctionModules "''"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType RandomNumber
Name "Random\nNumber"
Position [40, 85, 70, 115]
Diagnostics "AllowInheritedTsInSrc"
Mean "0"
Variance "1"
Seed "SeedVec"
SampleTime "-1"
}
Block {
BlockType Ground
Name "Variance"
Position [40, 148, 70, 162]
}
Block {
BlockType Outport
Name "Out"
Position [210, 93, 240, 107]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Variance"
SrcPort 1
DstBlock "Dynamic AWGN"
DstPort 3
}
Line {
SrcBlock "Random\nNumber"
SrcPort 1
DstBlock "Dynamic AWGN"
DstPort 2
}
Line {
SrcBlock "In"
SrcPort 1
DstBlock "Dynamic AWGN"
DstPort 1
}
Line {
SrcBlock "Dynamic AWGN"
SrcPort 1
DstBlock "Out"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "AWGN\nchannel1"
Ports [1, 1, 0, 0, 0]
Position [500, 78, 580, 122]
ShowPortLabels on
MaskType "AWGN Channel"
MaskDescription "Add zero-mean white Gaussian noise to the input"
" signal. The input and output signals can be real or complex. \n\nWhen usin"
"g either of the variance modes with complex inputs, be sure to specify the va"
"riance of the complex noise signal, that is, the sum of the variances of its "
"real and imaginary components. "
MaskHelp "You can use the AWGN Channel block with eith"
"er real or complex\ninput signals. When the input signal is real, this block"
"\ngenerates real Gaussian noise and produces a real output signal.\nWhen the "
"input signal is complex, this block generates complex\nGaussian noise and pro"
"duces a complex output signal.
\n\nYou can specify the variance of the "
"noise generated by the\nAWGN Channel block using one of three modes:
\n\n<"
"blockquote>\n \n - Signal to noise ratio
\n "
" - Variance from mask
\n - Variance from port\n
\n\n\nIn the Signal to noise ratio mode, "
"the variance is\ncalculated from the following quantities you specify in the"
"\nparameter mask:
\n\n\n \n - E"
"s/N0, the\n ratio of energy per symbol"
" to noise power spectral\n density
\n - The input sig"
"nal power
\n - The symbol period
\n
\n
"
"\n\nIn the Variance from mask mode, you directly specify a\nvalue f"
"or the variance in the parameter mask.
\n\nIn the Variance from por"
"t mode, you provide the\nvariance as an input to the block.
\n\n"
"Note: When you apply complex input signals to the AWGN\nChannel block, it"
" adds complex zero-mean Gaussian noise with the\ncalculated or specified vari"
"ance. The variance assigned to each\nof the quadrature components of the comp"
"lex noise is one-half of\nthe calculated or specified value.
"
MaskPromptString "Seed:|Mode:|Es/No (dB):|Input signal power (Wat"
"ts):|Symbol period (sec):|Variance:"
MaskStyleString "edit,popup(Signal to noise ratio|Variance from "
"mask|Variance from port),edit,edit,edit,edit"
MaskTunableValueString "off,off,on,on,off,on"
MaskCallbackString "|commblkawgnchan(gcb,'Mode');||||"
MaskEnableString "on,on,on,on,on,off"
MaskVisibilityString "on,on,on,on,on,off"
MaskVariables "seed=@1;noiseMode=@2;EsNodB=@3;Ps=@4;Tsym=@5;va"
"riance=@6;"
MaskInitialization "[SeedVec, mode,s] = commblkawgnchan(gcb,'init',"
"{seed});\n"
MaskDisplay "plot(-10,-10,110,110,[05 15 10 10 05 10 18 14 1"
"3 7.5 13 41 44 47 50 53 57 59 100-[13 7.5 13 14 18 10 5 10 10 15 5]],[70 70 7"
"0 85 92 85 79 82 90 88.5 90 90 87 93 87 93 87 90 90 88.5 90 82 79 85 92 85 70"
" 70 70]);\ndisp('AWGN');\nport_label('input',s.i1,s.i1s);\nport_label('input'"
",s.i2,s.i2s);\nport_label('output',s.o1,s.o1s);"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "123456|Signal to noise ratio|10|2|1|1"
System {
Name "AWGN\nchannel1"
Location [346, 208, 631, 428]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Inport
Name "In"
Position [40, 38, 70, 52]
Port "1"
PortWidth "-1"
SampleTime "-1"
DataType "auto"
SignalType "auto"
Interpolate on
}
Block {
BlockType "S-Function"
Name "Dynamic AWGN"
Ports [3, 1, 0, 0, 0]
Position [105, 19, 185, 181]
FunctionName "scomawgnchan"
Parameters "mode,EsNodB,Ps,Tsym,variance"
PortCounts "[]"
SFunctionModules "''"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType RandomNumber
Name "Random\nNumber"
Position [40, 85, 70, 115]
Diagnostics "AllowInheritedTsInSrc"
Mean "0"
Variance "1"
Seed "SeedVec"
SampleTime "-1"
}
Block {
BlockType Ground
Name "Variance"
Position [40, 148, 70, 162]
}
Block {
BlockType Outport
Name "Out"
Position [210, 93, 240, 107]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Dynamic AWGN"
SrcPort 1
DstBlock "Out"
DstPort 1
}
Line {
SrcBlock "In"
SrcPort 1
DstBlock "Dynamic AWGN"
DstPort 1
}
Line {
SrcBlock "Random\nNumber"
SrcPort 1
DstBlock "Dynamic AWGN"
DstPort 2
}
Line {
SrcBlock "Variance"
SrcPort 1
DstBlock "Dynamic AWGN"
DstPort 3
}
}
}
Block {
BlockType Constant
Name "Constant"
Position [285, 25, 315, 55]
Value "1"
}
Block {
BlockType Reference
Name "Direct ber calculation1"
Ports [2, 1, 0, 0, 0]
Position [177, 525, 363, 625]
Orientation "down"
NamePlacement "alternate"
SourceBlock "utra_lib/Test functions/Direct ber calculation"
SourceType ""
N "N"
nFrames "1/16"
}
Block {
BlockType Display
Name "Display1"
Ports [1, 0, 0, 0, 0]
Position [225, 690, 315, 720]
Orientation "down"
NamePlacement "alternate"
ShowName off
Format "short"
Decimation "1"
Floating off
SampleTime "-1"
}
Block {
BlockType Display
Name "Display6"
Ports [1, 0, 0, 0, 0]
Position [56, 345, 144, 395]
Orientation "down"
NamePlacement "alternate"
ShowName off
Format "short"
Decimation "1"
Floating off
SampleTime "-1"
}
Block {
BlockType Display
Name "Display7"
Ports [1, 0, 0, 0, 0]
Position [465, 330, 555, 390]
Orientation "down"
NamePlacement "alternate"
ShowName off
Format "short"
Decimation "1"
Floating off
SampleTime "-1"
}
Block {
BlockType Display
Name "Display8"
Ports [1, 0, 0, 0, 0]
Position [580, 15, 650, 35]
Orientation "up"
ShowName off
Format "short"
Decimation "1"
Floating off
SampleTime "-1"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [325, 160, 385, 190]
ShowName off
VariableName "out"
Buffer "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Matrix"
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [325, 240, 385, 270]
ShowName off
VariableName "delay"
Buffer "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Matrix"
}
Block {
BlockType ToWorkspace
Name "To Workspace22"
Position [280, 330, 340, 360]
Orientation "down"
NamePlacement "alternate"
ShowName off
VariableName "q_out"
Buffer "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Matrix"
}
Block {
BlockType ToWorkspace
Name "To Workspace23"
Position [295, 640, 355, 670]
ShowName off
VariableName "ber"
Buffer "inf"
Decimation "1"
SampleTime "1/16"
SaveFormat "Matrix"
}
Block {
BlockType ToWorkspace
Name "To Workspace24"
Position [360, 475, 420, 505]
Orientation "down"
NamePlacement "alternate"
ShowName off
VariableName "q2_out"
Buffer "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Matrix"
}
Block {
BlockType ToWorkspace
Name "To Workspace25"
Position [655, 45, 715, 75]
ShowName off
VariableName "a_out"
Buffer "inf"
Decimation "1"
SampleTime "1/16"
SaveFormat "Matrix"
}
Block {
BlockType ToWorkspace
Name "To Workspace26"
Position [655, 85, 715, 115]
ShowName off
VariableName "b_out"
Buffer "inf"
Decimation "1"
SampleTime "1/16"
SaveFormat "Matrix"
}
Block {
BlockType ToWorkspace
Name "To Workspace3"
Position [40, 260, 100, 290]
Orientation "left"
NamePlacement "alternate"
ShowName off
VariableName "in"
Buffer "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Matrix"
}
Block {
BlockType ToWorkspace
Name "To Workspace4"
Position [325, 200, 385, 230]
ShowName off
VariableName "chan1"
Buffer "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Matrix"
}
Block {
BlockType Reference
Name "channel2"
Ports [2, 4, 0, 0, 0]
Position [165, 155, 300, 315]
ForegroundColor "blue"
ShowName off
FontName "helvetica"
FontWeight "bold"
SourceBlock "utra_lib/Channel models/channel2"
SourceType ""
N "N"
nSlot "16"
RM "1"
DM "0"
HP "1"
snr "10"
P "2"
nCode "1"
}
Block {
BlockType Reference
Name "hard decission"
Ports [1, 1, 0, 0, 0]
Position [305, 395, 405, 435]
Orientation "down"
NamePlacement "alternate"
SourceBlock "utra_lib/Test functions/hard decission"
SourceType ""
mode on
N "N"
thres "0"
nFrames "1/16"
}
Block {
BlockType Reference
Name "source_2"
Ports [0, 2, 0, 0, 0]
Position [20, 177, 105, 248]
ShowName off
FontName "helvetica"
FontSize 12
SourceBlock "utra_lib/Source blocks/source_2"
SourceType ""
N "N"
}
Line {
SrcBlock "AWGN\nchannel"
SrcPort 1
Points [0, 20; 110, 0]
Branch {
DstBlock "Display8"
DstPort 1
}
Branch {
DstBlock "To Workspace25"
DstPort 1
}
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [85, 0; 0, 20]
Branch {
DstBlock "AWGN\nchannel"
DstPort 1
}
Branch {
Points [0, 40]
DstBlock "AWGN\nchannel1"
DstPort 1
}
}
Line {
SrcBlock "AWGN\nchannel1"
SrcPort 1
DstBlock "To Workspace26"
DstPort 1
}
Line {
SrcBlock "source_2"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "channel2"
DstPort 1
}
Branch {
Points [0, 80; 5, 0]
Branch {
DstBlock "channel2"
DstPort 2
}
Branch {
Points [0, 210; 75, 0]
DstBlock "Direct ber calculation1"
DstPort 1
}
}
Branch {
Points [0, 80; -30, 0]
Branch {
DstBlock "To Workspace3"
DstPort 1
}
Branch {
Points [0, 55]
DstBlock "Display6"
DstPort 1
}
}
}
Line {
SrcBlock "channel2"
SrcPort 4
Points [5, 0]
Branch {
DstBlock "To Workspace22"
DstPort 1
}
Branch {
Points [45, 0]
Branch {
DstBlock "hard decission"
DstPort 1
}
Branch {
Points [155, 0]
DstBlock "Display7"
DstPort 1
}
}
}
Line {
SrcBlock "hard decission"
SrcPort 1
Points [-5, 0; 0, 15]
Branch {
Points [0, 55]
DstBlock "Direct ber calculation1"
DstPort 2
}
Branch {
Points [40, 0]
DstBlock "To Workspace24"
DstPort 1
}
}
Line {
SrcBlock "Direct ber calculation1"
SrcPort 1
Points [0, 25]
Branch {
DstBlock "Display1"
DstPort 1
}
Branch {
DstBlock "To Workspace23"
DstPort 1
}
}
Line {
SrcBlock "channel2"
SrcPort 3
DstBlock "To Workspace2"
DstPort 1
}
Line {
SrcBlock "channel2"
SrcPort 2
DstBlock "To Workspace4"
DstPort 1
}
Line {
SrcBlock "channel2"
SrcPort 1
DstBlock "To Workspace1"
DstPort 1
}
Annotation {
Position [138, 117]
Text "GIVE VALUES in workspace for\n \nN = block si"
"ze\n"
FontName "helvetica"
FontSize 12
FontWeight "bold"
}
Annotation {
Position [719, 159]
Text "Simulink AWGN model is\ndoing something very in"
"teresting:\nTry to increase signal power and \nsee that the noise increases t"
"oo. \n"
}
}
}