📄 dlparam.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Property of Freescale
% Freescale Confidential Proprietary
% Freescale Copyright (C) 2005 All rights reserved
% ----------------------------------------------------------------------------
% $RCSfile: DLparam.m.rca $
% $Revision: 1.1 $
% $Date: Wed Jan 24 17:27:21 2007 $
% Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Test Case 510 (DL)
%%%%%%%%%%%%%%%%%%%%
% - four bursts
% - ideal synchronization (no rotation)
% - SNR = Inf
%Subframe Descriptor
SubframeD = ...
struct( 'NFFT', 512,... %FFT size (128, 512, 1024 or 2048)
'SubframeOff', 1,... %offset from frame boundary (in OFDMA symbols)
'NumSym', 22,... %number of OFDMA symbols in subframe
'SegMap', [63 0 0],... %usage of groups in segments
... %(here all groups are used by segment 0)
'NumZones', 1,... %number of zones in subframe (1,2,...)
'PreambleIdx', [108,-1,-1],...
'PreambleAmpl', 15168 ...
);
%zone configuration for DL-PUSC FFT-512 (static)
ZoneConfig = ...
struct( 'NFFT', 512,...
'NFFTUsed', 421,...
'ZoneType', 2,...%zone type: DLFUSC=1, DLPUSC=2, ULPUSC=3
'DCIndex', 256,...
'MaxSubch', 15,...
'CarrierPerSubch', 24,...
'LGuard', 46,...
'RGuard', 45,...
'NCluster', 30,...
'SymPerSlot', 2,...%Number of symbols per slot
'UsedSubChanBitMap', [1 0 1 0 1 0],...%aucUsedSubChanBitMap[i] describe the mapping for segment i.
'SubchGroup', [5 0 5 0 5 0]...
);
%UsedSubChanBitMap-->
%Bit 0 of each byte is LSB.
% b#0 set to 1 indicates that subchannel group 0 belongs to this segment.
% b#1 subchannel group 1?c
% aucUsedSubChanBitMap[i] describe the mapping for segment i.
%asynchronous PHY control structure
AsyncPhyCtrl = ...
struct( 'DlPermBase', 0,...
'IDCell', 0,...
'PreambleAmpl', 15168,...
'PilotAmpl', 7177,...
'SegmentNr', 0 ...
);
%Zone Descriptor
ZoneD = ...
struct( 'Type' , 2,... %zone type: DLFUSC=1, DLPUSC=2, ULPUSC=3
'SymOff' , 0,... %offset from subframe boundary (in OFDMA symbols)
'NumSym' , 22,... %number of OFDMA symbols in zone (1,2,...)
'NumBursts', 4,... %number of bursts in zone
...%the following parameters are fix or can be derived from other
...%parameters of the subframe or zone descriptor
'NumSubch' , 15,... %number of subchannels (1,2,...)
'UseAllScInd', 1,... %Use all subchannel indicator
'ZoneBoost', 0,... %Zone boosting as defined in 8.4.9.6. of [3]
'uliBuDStart', 80,... %Offset within the burst descriptor array to first burst descriptor in the zone
'Resolution', 15 ... %bit resolution of FP and TP
);
%Burst Descriptors (take care of the burst order!)
BurstD=[];
BurstD = [BurstD , ...
struct( 'Name' ,'FCH',...
'Size' , 6,... %burst size (payload) in bytes
'IUC' , 255,... %DIUC/UIUC (0..15, 255=FCH, 254=MAP) (Will be converted to 17=FCH, 16=MAP in MAC-PHY IF)
'ExtendedIUC', 17,... Extended IUC or extended-2 IUC, where applicable. Otherwise set to 16
'SymOff' , 0,... %OFDMA symbol offset from zone boundary
'SubchOff' , 0,... %subchannel offset
'NumSym' , 2,... %number of OFDM symbols per burst
'NumSubch' , 4,... %number of subchannel per burst
'Duration' , -1,... %number of allocated slots (MAP burst only)
'Type' , 0,... %FEC coding and modulation type (0..6)
'Boosting' , 0,... %boosting parameter
'R' , 4,... %repetition factor (1,2,4,6)
...%the following parameters are derived from the parameters above
'Slots' , -1,... %number of slots per burst (before repetition)
'FECType' , -1,... %CC=0, CTC=1, BTC=2, ZTCC=3
'ModMode' , -1,... %QPSK=2, 16QAM=4, 64QAM=6
'PunctMode', -1,... %puncturing rate 1/1, 4/3, 3/2 (0,1,2)
'J' , -1,... %maximum number of slots per code block
'B' , -1,... %payload bytes per slot
'Distance' , -1, ... %distance for Demodulation Mapper
'Data', uint8(204)...%PDU content (0xcc)
)];
BurstD = [BurstD , ...
struct( 'Name' ,'DL-MAP',...
'Size' , 40,... %burst size (payload) in bytes
'IUC' , 254,... %DIUC/UIUC (0..15, 255=FCH, 254=MAP) (Will be converted to 17=FCH, 16=MAP in MAC-PHY IF)
'ExtendedIUC', 16,... Extended IUC or extended-2 IUC, where applicable. Otherwise set to 16
'SymOff' , 0,... %OFDMA symbol offset from zone boundary
'SubchOff' , 4,... %subchannel offset
'NumSym' , 2,... %number of OFDM symbols per burst
'NumSubch' , 7,... %number of subchannel per burst
'Duration' , 7,... %number of allocated slots (MAP burst only)
'Type' , 0,... %FEC coding and modulation type (0..6)
'Boosting' , 0,... %boosting parameter
'R' , 1,... %repetition factor (1,2,4,6)
...%the following parameters are derived from the parameters above
'Slots' , -1,... %number of slots per burst (before repetition)
'FECType' , -1,... %CC=0, CTC=1, BTC=2, ZTCC=3
'ModMode' , -1,... %QPSK=2, 16QAM=4, 64QAM=6
'PunctMode', -1,... %puncturing rate 1/1, 4/3, 3/2 (0,1,2)
'J' , -1,... %maximum number of slots per code block
'B' , -1,... %payload bytes per slot
'Distance' , -1, ... %distance for Demodulation Mapper
'Data', uint8(204)...%PDU content (0xcc)
)];
BurstD = [BurstD , ...
struct( 'Name' ,'Burst 2',...
'Size' , 22,... %burst size (payload) in bytes
'IUC' , 0,... %DIUC/UIUC (0..15, 255=FCH, 254=MAP)
'ExtendedIUC', 0,... Extended IUC or extended-2 IUC, where applicable. Otherwise set to 16
'SymOff' , 18,... %OFDMA symbol offset from zone boundary
'SubchOff' , 0,... %subchannel offset
'NumSym' , 4,... %number of OFDM symbols per burst
'NumSubch' , 2,... %number of subchannel per burst
'Duration' , -1,... %number of allocated slots (MAP burst only)
'Type' , 0,... %FEC coding and modulation type (0..6)
'Boosting' , 0,... %boosting parameter
'R' , 1,... %repetition factor (1,2,4,6)
...%the following parameters are derived from the parameters above
'Slots' , -1,... %number of slots per burst (before repetition)
'FECType' , -1,... %CC=0, CTC=1, BTC=2, ZTCC=3
'ModMode' , -1,... %QPSK=2, 16QAM=4, 64QAM=6
'PunctMode', -1,... %puncturing rate 1/1, 4/3, 3/2 (0,1,2)
'J' , -1,... %maximum number of slots per code block
'B' , -1,... %payload bytes per slot
'Distance' , -1, ... %distance for Demodulation Mapper
'Data', uint8(204)...%PDU content (0xcc)
)];
BurstD = [BurstD , ...
struct( 'Name' ,'Burst 3',...
'Size' , 62,... %burst size (payload) in bytes
'IUC' , 0,... %DIUC/UIUC (0..15, 255=FCH, 254=MAP)
'ExtendedIUC', 0,... Extended IUC or extended-2 IUC, where applicable. Otherwise set to 16
'SymOff' , 18,... %OFDMA symbol offset from zone boundary
'SubchOff' , 2,... %subchannel offset
'NumSym' , 4,... %number of OFDM symbols per burst
'NumSubch' , 6,... %number of subchannel per burst
'Duration' , -1,... %number of allocated slots (MAP burst only)
'Type' , 0,... %FEC coding and modulation type (0..6)
'Boosting' , 0,... %boosting parameter
'R' , 1,... %repetition factor (1,2,4,6)
...%the following parameters are derived from the parameters above
'Slots' , -1,... %number of slots per burst (before repetition)
'FECType' , -1,... %CC=0, CTC=1, BTC=2, ZTCC=3
'ModMode' , -1,... %QPSK=2, 16QAM=4, 64QAM=6
'PunctMode', -1,... %puncturing rate 1/1, 4/3, 3/2 (0,1,2)
'J' , -1,... %maximum number of slots per code block
'B' , -1,... %payload bytes per slot
'Distance' , -1, ... %distance for Demodulation Mapper
'Data', uint8(204)...%PDU content (0xcc)
)];
%FEC coding and modulation type (11.4.2)
% 0 = CC 1/2 rate, QPSK
% 1 = CC 3/4 rate, QPSK
% 2 = CC 1/2 rate, 16QAM
% 3 = CC 3/4 rate, 16QAM
% 4 = CC 1/2 rate, 64QAM
% 5 = CC 2/3 rate, 64QAM
% 6 = CC 3/4 rate, 64QAM
% 7-21 = reserved
% 22 = ZTCC 1/2 rate, QPSK
% 23 = ZTCC 3/4 rate, QPSK
% 24 = ZTCC 1/2 rate, 16QAM
% 25 = ZTCC 3/4 rate, 16QAM
% 26 = ZTCC 1/2 rate, 64QAM
% 27 = ZTCC 2/3 rate, 64QAM
% 28 = ZTCC 3/4 rate, 64QAM
%29-31 = reserved
%constants (-1 = not implemented)
J = [ 6, 4, 3, 2, 2, 1, 1,-1,-1,-1,...
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,...
-1,-1, 6, 4, 3, 2, 2, 1, 1,-1,...
-1,-1]; %maximum number of slots per code block
B = [ 6, 9,12,18,18,24,27,-1,-1,-1,...
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,...
-1,-1, 6, 9,12,18,18,24,27,-1,...
-1,-1]; %payload per slot (in bytes)
ModMode = [ 2, 2, 4, 4, 6, 6, 6,-1,-1,-1,...
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,...
-1,-1, 2, 2, 4, 4, 6, 6, 6,-1,...
-1,-1]; %modulation mode
PunctMode = [ 0, 2, 0, 2, 0, 1, 2,-1,-1,-1,...
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,...
-1,-1, 0, 2, 0, 2, 0, 1, 2,-1,...
-1,-1]; %puncturing mode
FECType = [ 0, 0, 0, 0, 0, 1, 1,-1,-1,-1,... %burst 4 is CTC
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,...
-1,-1, 3, 3, 3, 3, 3, 3, 3,-1,...
-1,-1]; %FEC type (CC=0, ... )
Distance = [-1, 2*3805, -1, 2*1702, -1, 2*830];
for b=1:ZoneD.NumBursts,
%derive additional burst parameters from burst coding and modulation type
t=BurstD(b).Type+1;
BurstD(b).FECType = FECType(t);
BurstD(b).ModMode = ModMode(t);
BurstD(b).PunctMode = PunctMode(t);
BurstD(b).J = J(t);
BurstD(b).B = B(t);
%number of slots per burst (before repetition)
if BurstD(b).IUC==254,%beofre 254 was used to express DL map
BurstD(b).Slots = BurstD(b).Duration/BurstD(b).R;
else
BurstD(b).Slots = BurstD(b).NumSym*BurstD(b).NumSubch/ZoneD.Type/BurstD(b).R;
end
BurstD(b).Distance = Distance(BurstD(b).ModMode);
end
%clear local variables
clear J B ModMode PunctMode FECType Distance b t
%tc 510
BurstD(4).FECType = 1 ;
%
%parameters for time domain processing
TPparam = ...
struct( 'SizeFFT' , 512,... %128,256,512,1024,2048
'SizeCP' , 64,... %
'Fofdm' , 5.712e6,... %OFDM sampling frequency
'Comp_a_tx' , 0,... %quadrature compensation coefficient
'Comp_b_tx' , 1,... %gain unbalance compensation coefficient
'Comp_c_tx' , 0,... %carrier residual compensation coefficient(real)
'Comp_d_tx' , 0,... %carrier residual compensation coefficient(imaginary)
'Comp_a_rx' , 0,... %quadrature compensation coefficient
'Comp_b_rx' , 1,... %gain unbalance compensation coefficient
'Comp_c_rx' , 0,... %carrier residual compensation coefficient(real)
'Comp_d_rx' , 0,... %carrier residual compensation coefficient(imaginary)
'FilterCoeff_set' , 1,... %set of filter coefficients (to load the selected one)
'shift_ss' , 2,... %shift value used in spectr. shaper filter
'shift_ip1' , 2,... %shift value used in first interp. filter
'shift_ip2' , 2,... %shift value used in second interp. filter
'shift_comp_tx' , 0,... %shift value used in Tx error compensation
'shift_comp_rx' , 0,... %shift value used in Rx error compensation
'shift_dec1' , 0,... %shift value used in first dec. filter
'shift_dec2' , 0,... %shift value used in second dec. filter
'shift_cs' , 0,... % shift value used in chann. sep. filter
'Delay' , 29+22,... %overall delay (Tx + Rx) associated with the filter set
'SubDelay' , 3,... %sub-sample delay (to avoid equalization)
'NumSym' , 1 ... %number of OFDM symbols per burst
);
% AWGN channel (signal to noise ratio in dB or 'Inf' for no noise)
SNR = Inf;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -