-
Notifications
You must be signed in to change notification settings - Fork 1
/
Small_cell_parameters.m
99 lines (95 loc) · 3.94 KB
/
Small_cell_parameters.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
%% System Parameters
Hdr_PDCP = 2; %PDCP header (for RLC AM) in bytes
Hdr_RLC = 5; %RLC AM header in bytes (estimate per IP packet)
Hdr_MAC = 2; % MAC header in bytes (estimate per IP packet)
IP_pkt = 1500; %IP packet size in Bytes
TBS_DL = 75376; %Transport block size (in bits) for downlink
IP_DL_TTI = ceil(TBS_DL/((IP_pkt+Hdr_PDCP+Hdr_RLC+Hdr_MAC)*8)); %DL IP packets per Transport block.
TBS_UL = 48936; %Transport block size (in bits) for uplink
IP_UL_TTI = ceil(TBS_UL/((IP_pkt+Hdr_PDCP+Hdr_RLC+Hdr_MAC)*8)); %UL IP packets per Transport block.
N_TBS_DL = 2; %DL number TBS per TTI
N_TBS_UL = 1; %UL number TBS per TTI
Sched = 0.5; %Scheduler overhead per UE in Mbps
FAPI_DL = 1.5; %DL FAPI overhead per UE in Mbps
FAPI_UL = 1; %DL FAPI overhead per UE in Mbps
N_RB = 100; %Number of resource blocks per user
N_SYM_SUB = 14; %Number of symbols per sub-frame
N_SC_RB = 12; %Number of subcarriers per RB
N_SYM_Data = 12; %Number of data carrying symbols per sub-frame
N_UE = 1; %Number of UEs per TTI
N_Ant = 1; %Number of antennas
CFI = 1; %CFI symbols
Qm_PDSCH = 6; %64 QAM modulation used for PDSCH
Qm_PUSCH = 4; %16 QAM modulation used for PUSCH
Qm_PCFICH = 2; %QPSK modulation used for PCFICH
Qm_PDCCH = 2; %QPSK modulation used for PDCCH
Layers_DL = 2; %Number of DL layers
RefSym_REs = 6; %Number of REs for reference signals per RB per sub-frame (for 1 or 2 DL antennas)
PDSCH_REs = N_RB*(N_SC_RB*(N_SYM_SUB-CFI)-(RefSym_REs*N_Ant)); %PDSCH Resource Element per UE
PCFICH_REs = 16; %Number of REs for PCFICH
PHICH_RBEs = 12; %One PHICH group
PDCCH_REs = 144; %Aggregation level 4
N_IQ = 32; %16I + 16Q bits (16 bits is more practical to pass round than 15 bits)
PUCCH_RBs = 2; %Number of RBs allocated for PUCCH
N_LLR = 8; %8-bit LLRs
N_SICiter = 1; %No SIC
N_CPRI = 32; %15I + 15Q bits (CPRI adds 1 control bit per word)
f_s = 30.72; %Mbps, Sampling Rate at 20MHz
%1 user per TTI with 150Mbps DL and 50Mbps UL
User_DL = 150;
User_UL = 50;
%
%
%%
% %% L2/L3 calculations
% %Downlink throughputs/Mbps:
% RRC_PDCP = (IP_DL_TTI*IP_pkt*N_TBS_DL*8*1000)/1e6;
% PDCP_RLC = (IP_DL_TTI*(IP_pkt+Hdr_PDCP)*N_TBS_DL*8*1000)/1e6;
% RLC_MAC = (IP_DL_TTI*(IP_pkt+Hdr_PDCP+Hdr_RLC)*N_TBS_DL*8*1000)/1e6;
% Split_MAC = ((IP_DL_TTI*(IP_pkt+Hdr_PDCP+Hdr_RLC+Hdr_MAC)*N_TBS_DL*8*1000)/1e6) + Sched;
% MAC_PHY = ((IP_DL_TTI*(IP_pkt+Hdr_PDCP+Hdr_RLC+Hdr_MAC)*N_TBS_DL*8*1000)/1e6) + FAPI_DL;
%
% %% PHY layer calculations
% %Downlink throughputs/Mbps:
% Split_1 = (N_UE*PDSCH_REs*Qm_PDSCH*Layers_DL+(PCFICH_REs*Qm_PCFICH)+(PHICH_RBEs+PDCCH_REs*Qm_PDCCH))*1000/1e6;
% Split_2 = (N_UE*PDSCH_REs+PCFICH_REs+PHICH_RBEs+PDCCH_REs)*N_IQ*N_Ant*1000/1e6;
% Split_3 = N_SC_RB*N_RB*N_SYM_SUB*N_Ant*N_IQ*1000/1e6;
% SPlit_3b = f_s*N_Ant*N_IQ;
% Split_4 = f_s*N_Ant*N_CPRI*(10/8);
%
% %% BW requirements
% %
% t = linspace(0,1,100);
% %
% % % IP_DL_TTI = 1 + rand(1,100) + 3.5*(2+ sin(10*t) + sin(5*t));
% IP_DL_TTI = 6 + 2*sinc(3*t + 1.7) + 0.1*rand(1,100);
% % % IP_DL_TTI = smooth(IP_DL_TTI);
% % IP_DL_TTI = unifrnd(1,7,[1 1000]);
% % plot(t,IP_DL_TTI)
% %
% user_traffic = IP_DL_TTI*N_TBS_DL*(1500-32)*8*1000/1e6;
% plot(t,user_traffic,'LineWidth',2)
% hold on
%
% RRC_PDCP = (IP_DL_TTI*IP_pkt*N_TBS_DL*8*1000)/1e6;
% PDCP_RLC = (IP_DL_TTI*(IP_pkt+Hdr_PDCP)*N_TBS_DL*8*1000)/1e6;
% RLC_MAC = (IP_DL_TTI*(IP_pkt+Hdr_PDCP+Hdr_RLC)*N_TBS_DL*8*1000)/1e6;
% Split_MAC = ((IP_DL_TTI*(IP_pkt+Hdr_PDCP+Hdr_RLC+Hdr_MAC)*N_TBS_DL*8*1000)/1e6) + Sched;
% MAC_PHY = ((IP_DL_TTI*(IP_pkt+Hdr_PDCP+Hdr_RLC+Hdr_MAC)*N_TBS_DL*8*1000)/1e6) + FAPI_DL;
%
% plot(t,PDCP_RLC,'LineWidth',2)
% plot(t,MAC_PHY,'LineWidth',2)
%
% Split_1 = Split_1*ones(1,100);
% Split_2 = Split_2*ones(1,100);
% Split_3 = Split_3*ones(1,100);
% Split_4 = Split_4*ones(1,100);
%
% % plot(t,Split_4)
% legend('User Traffic','PDCP-RLC', 'MAC-PHY')
%% %---Comments---%% %
% IP packet size = 32 Bytes + (options) + data;
% PRB is related to traffic requirements
% size of TB will change
% IP packets will change
% (IP_pkt+Hdr_PDCP+Hdr_RLC+Hdr_MAC)/(IP_pkt-32); %factor of 1.0279