📄 utra_lib.mdl
字号:
PortCounts "[]" SFunctionModules "''" MaskPromptString "NumbSize of input block|Number of CRC b""its (if 0 nothing is done)|Generator polynomy for CRC|Number of frames in one"" block" MaskStyleString "edit,edit,edit,edit" MaskTunableValueString "on,on,on,on" MaskCallbackString "|||" MaskEnableString "on,on,on,on" MaskVisibilityString "on,on,on,on" MaskVariables "N=@1;nCRC=@2;crc_poly=@3;nFrames=@4;" MaskDisplay "disp('Add CRC\\n\\nif nCRC >0')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "N|nCRC|crc_poly|nFrames" } Block { BlockType "S-Function" Name "Rate Matching" Ports [1, 1, 0, 0, 0] Position [675, 316, 760, 374] FontName "helvetica" FontSize 14 FontWeight "bold" FunctionName "s_rate" Parameters "r_in,r_out,punk,nFrames" PortCounts "[]" SFunctionModules "''" MaskPromptString "Size of the input Block|Size of the oup""ut block|Maximum puncturation rate (DO NOT CHANGE)|Number of frames" MaskStyleString "edit,edit,edit,edit" MaskTunableValueString "on,on,on,on" MaskCallbackString "|||" MaskEnableString "on,on,on,on" MaskVisibilityString "on,on,on,on" MaskVariables "r_in=@1;r_out=@2;punk=@3;nFrames=@4;" MaskDisplay "disp('RATE\\nMATCHING')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "K*(N+nCRC)+nTail|nFrames*bits_in_frame|""0.2|nFrames" } Block { BlockType "S-Function" Name "ch_coding" Ports [2, 2, 0, 0, 0] Position [290, 285, 530, 405] FontName "helvetica" FontSize 14 FontWeight "bold" FunctionName "s_chcoding" Parameters "N_chcode,poly,cType,K,nTail,nFrames" PortCounts "[]" SFunctionModules "''" MaskType "wcdma" MaskDescription " CHANNEL CODING\n\nThe block ""performs convolutional coding. The parameters need to correspondd to the para""meters given for the channel decoder.\n\nThe block initializationn is done in"" file utra.m to make sure that all the blocks get same block size, scrambling"" codes etc. This block calls an s-function s_chcoding with arguments\n\n1) Si""ze of the input vector is the block size, N.\n2) Generator polynomials for co""nvolutional coder \n (initialization in coding_init.m)\n3) Coding type (1"" = convolution, 2 = turbo) \n4) Coding ratio\n5) Tail length\n" MaskPromptString "Input block size (data bits for nFrames"")|Coding Type (1= Convolutional 2= turbo)|Coding Gain|Tail length|Generator P""olynomials for coding|Number of frames " MaskStyleString "edit,edit,edit,edit,edit,edit" MaskTunableValueString "on,on,on,on,on,on" MaskCallbackString "|||||" MaskEnableString "on,on,on,on,on,on" MaskVisibilityString "on,on,on,on,on,on" MaskVariables "N_chcode=@1;cType=@2;K=@3;nTail=@4;poly""=@5;nFrames=@6;" MaskDisplay "disp('CHANNEL\\nCODING');\nport_label('""input',1,'input bits');\nport_label('input',2,'length');\nport_label('output'"",1,'coded bits');\nport_label('output',2,'tail bits');" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "N+nCRC|cType|K|nTail|ch_poly|nFrames" } Block { BlockType Mux Name "tail_mux" Ports [2, 1, 0, 0, 0] Position [605, 284, 615, 406] ShowName off FontName "helvetica" FontSize 14 FontWeight "bold" Inputs "2" DisplayOption "bar" } Block { BlockType Outport Name "I" Position [815, 338, 845, 352] ShowName off FontName "helvetica" FontSize 14 FontWeight "bold" Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock "Rate Matching" SrcPort 1 DstBlock "I" DstPort 1 } Line { SrcBlock "tail_mux" SrcPort 1 DstBlock "Rate Matching" DstPort 1 } Line { SrcBlock "ch_coding" SrcPort 2 DstBlock "tail_mux" DstPort 2 } Line { SrcBlock "ch_coding" SrcPort 1 DstBlock "tail_mux" DstPort 1 } Line { SrcBlock "length" SrcPort 1 DstBlock "ch_coding" DstPort 2 } Line { SrcBlock "Add CRC2" SrcPort 1 DstBlock "ch_coding" DstPort 1 } Line { SrcBlock "bits" SrcPort 1 DstBlock "Add CRC2" DstPort 1 } Annotation { Position [668, 158] Text "INITIALIZATION:\n\ninput_block_size = n""umber of input bits\nbits_in_frame = number of coded bits in a frame\nnFrames"" = number of frames in a block\nnCRC = number of CRC bits\ncrc_poly = CRC gen""erator polynomial\ncType = channel coding type\nK = coding ratio\nnTail = num""ber of tail bits\nch_poly = generator polynomials for encoder\n" FontName "helvetica" FontSize 14 } Annotation { Position [181, 142] Text "INPUT PARAMETERS: \n\nsizes\ncrc\nchCod""e" FontName "helvetica" FontSize 14 } Annotation { Position [398, 51] Text "CHANNEL CODING MODULE\n" FontName "helvetica" FontSize 18 FontWeight "bold" } Annotation { Position [809, 369] Text "out" FontName "helvetica" FontSize 14 FontWeight "bold" } } } } } Block { BlockType SubSystem Name "Channel models" Ports [0, 0, 0, 0, 0] Position [625, 473, 799, 612] Orientation "left" FontName "helvetica" ShowPortLabels on MaskDisplay "disp('CHANNEL MODELS\\n+\\nCHANNEL ESTIMATION')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" System { Name "Channel models" Location [58, 612, 676, 1032] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType "S-Function" Name "Channel estimator" Ports [2, 3, 0, 0, 0] Position [295, 150, 365, 220] ForegroundColor "blue" ShowName off FunctionName "s_channel_estimator" Parameters "threshold,nSlot" PortCounts "[]" SFunctionModules "''" MaskPromptString "Channel threshold value|Number of slots in ""a frame" MaskStyleString "edit,edit" MaskTunableValueString "on,on" MaskCallbackString "|" MaskEnableString "on,on" MaskVisibilityString "on,on" MaskVariables "threshold=@1;nSlot=@2;" MaskDisplay "disp('Channel \\nEstimator');" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "0.05|nSlot" } Block { BlockType "S-Function" Name "channel2" Ports [2, 4, 0, 0, 0] Position [95, 105, 230, 265] ForegroundColor "blue" ShowName off FontName "helvetica" FontWeight "bold" FunctionName "s_channel" Parameters "N,HR,HD,HP,snr,P,nCode,nSlot,in_type" PortCounts "[]" SFunctionModules "''" MaskDescription " CHANNEL \n\nThis block calls an s-""function s_channel. \n\nNotice :\n\n1) HR -- A matrix of different channel im""pulses. Each row represents a channel impulse attennuation factors. May also ""be just one row which represents a constant channel. In initialization this m""atrix is transposed to ease further manipulation.\n\n2) HD -- The delay profi""le for channel impulses (length of this vector is equal to number of columns ""in HR). In initailization the HD matrix is transposed so ease the furhter man""ipulation of the matrix.\n\n3) HP -- Probabilities for different channel impu""lses. The length of this vector is the number of rows in HR and sum of HP = 1"". IF a scalar value is given in this block the channel utilizes a intrepolati""ng channel model. For further information see more in the documentaion.\n\n4)"" Spreading code length is used to scale noise to chip level. The noise power ""given is for each symbol. " MaskPromptString "Size of input block (default = chips_in_slo""t)|Number of slots in a frame (default = nSlot)|Channel impulse matrix HR|Cha""nnel delay matrix HD|Impulse probabilities HP - vector for random channel or ""scalar|Signal to noise ratio|Noise power [mill watt]] -- if == 0 no noise|Le""ngth of spreading code|Input symbol type " MaskStyleString "edit,edit,edit,edit,edit,edit,edit,edit,pop""up(integer|double )" MaskTunableValueString "on,on,on,on,on,on,on,on,on" MaskCallbackString "||||||||" MaskEnableString "on,on,on,on,on,on,on,on,on" MaskVisibilityString "on,on,on,on,on,on,on,on,on" MaskVariables "N=@1;nSlot=@2;RM=@3;DM=@4;HP=@5;snr=@6;P=@7"";nCode=@8;in_type=@9;" MaskInitialization "HR=RM';HD=DM';" MaskDisplay "disp('CHANNEL')\nport_label('input',1,'I-si""gnal');\nport_label('input',2,'Q-signal');\nport_label('output',1,'I-signal')"";\nport_label('output',2,'channel')\nport_label('output',3,'delay')\nport_lab""el('output',4,'Q-signal');" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "16|16|[0.9 0 0.1;0.7 0.1 0.2]|[0 1 7; 0 3 6""]|1|0|0|4|int" } } } Block { BlockType SubSystem Name "DL" Ports [0, 0, 0, 0, 0] Position [57, 38, 271, 215] Orientation "left" FontName "helvetica" ShowPortLabels on MaskType "WCDMA UTRA" MaskPromptString "TX channel Type|Channel coding |Coding ratio "" |Spreading code length|Inter frame interleaver |Number of frames for int""er frame interleaver|Number of columns for inter frame interleaver |Intra fra""me interleaver (on or off)" MaskStyleString "popup(Dedicated Transport channel|Primary commo""n control|Secondary common control (FACH or PCH)),popup(Convolutional coding|""Turbo),popup(2|3),popup(4|8|16|32|64|128|256),popup(block interleaver|multist""age interleaver),edit,edit,checkbox" MaskTunableValueString "on,on,on,on,on,on,on,on" MaskCallbackString "|||||||" MaskEnableString "on,on,on,on,on,on,on,on" MaskVisibilityString "on,on,on,on,on,on,on,on" MaskVariables "tx_ch=@1;cType=@2;Kindex=@3;nC=@4;Inter_int_mod""e=@5;nFrames=@6;cols=@7;Intra_int_flag=@8;" MaskInitialization "nCode=2^(nC+1);\n % if you want to specify"" which code is used define ncode=[nCode index]\n[sizes,crc,chCode,C,control]=""dl_start(nCode,cType,Kindex,nFrames,tx_ch);\ninput_block_size=sizes(1);N=inpu""t_block_size;bits_in_frame=sizes(2);nFrames=sizes(3);\nnSlot=sizes(5); chips_""in_slot=sizes(6);nCRC=crc(1);crc_poly=crc(2);\ncType=chCode(1);K=chCode(2); n""Tail=chCode(3);ch_poly=[chCode(4:6)];\nnPilot=control(1);TPC=control(2);TFI=c""ontrol(3);" MaskDisplay "disp('DOWNLINK - BASE MODEL \\n\\nTransportChan""nel\\n\\n\\n\\n\\n1 - Decicated transport \nchannel\\n2 - Primary common cont""rol channel\\n3 - Secondary common control channel')\ndisp(tx_ch)" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "Dedicated Transport channel|Convolutional codin""g|2|256|block interleaver|1|1|off" System { Name "DL" Location [74, 250, 1262, 1026] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType Reference Name "Channel estimator" Ports [2, 3, 0, 0, 0] Position [1062, 440, 1128, 510] Orientation "down" ForegroundColor "blue" NamePlacement "alternate" ShowName off FontName "helvetica" FontSize 14 SourceBlock "utra_lib/Channel models/Channel estimator" SourceType "" threshold "0.05" nSlot "nSlot" } Block { BlockType Constant Name "Constant" Position [75, 130, 230, 170] ShowName off FontName "helvetica" FontSize 14 Value "input_block_size+nCRC" } Block { BlockType Reference Name "Delayed ber calculation" Ports [2, 1, 0, 0, 0] Position [70, 335, 365, 450] FontName "helvetica" FontSize 14 SourceBlock "utra_lib/Test functions/Delayed ber calcula""tion" SourceType "" N "N" nFrames "nFrames" } Block { BlockType ToWorkspace Name "To Workspace23" Position [410, 380, 470, 410] ShowName off FontName "helvetica" FontSize 14 VariableName "ber" Buffer "inf" Decimation "1" SampleTime "nFrames" SaveFormat "Matrix" } Block { BlockType ToWorkspace Name "To Workspace24" Position [15, 675, 65, 705] Orientation "left" NamePlacement "alternate" ShowName off FontName "helvetica" FontSize 14 VariableName "fer" Buffer "inf" Decimation "1" SampleTime "nFrames" SaveFormat "Matrix" } Block { BlockType Reference Name "channel2" Ports [2, 4, 0, 0, 0] Position [1030, 240, 1165, 400] Orientation "down" ForegroundColor "blue" NamePlacement "alternate" ShowName off FontName "helvetica" FontSize 14 FontWeight "bold" SourceBlock "utra_lib/Channel models/channel2" SourceType "" N "chips_in_slot" nSlot "nSlot" RM "[0.9 0 0.1]" DM "[0 1 2]" HP "1" snr "0" P "0" nCode "length(C)" in_type "integer" } Block { BlockType Reference Name "data source 01 ..10" Ports [0, 1, 0, 0, 0] Position [14, 15, 96, 90] Orientation "down" NamePlacement "alternate" ShowName off FontName "helvetica" FontSize 14 SourceBlock "utra_lib/Source blocks/data source 01 ..10" SourceType "koe" nFrames "nFrames" N "N" } Block { BlockType Reference Name "dl_RX_channel_decoding" Ports [2, 2, 0, 0, 0] Position [90, 562, 365, 733] Orientation "left" NamePlacement "alternate" FontName "helvetica" FontSize 14 SourceBlock "utra_lib/Channel coding block/dl_RX_channel"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -